Script Front-Matter
Standalone .shape scripts can embed TOML frontmatter between --- delimiters.
Example
Section titled “Example”#!/usr/bin/env shape---name = "quick-check"version = "0.1.0"
[modules]paths = ["./lib"]
[dependencies]utils = { path = "../utils" }
[[extensions]]name = "python"path = "./extensions/libshape_ext_python.so"autoload = true---
print("ready")Allowed Sections
Section titled “Allowed Sections”- top-level metadata (
name,description,version,author,tags) [modules][dependencies][dev-dependencies][[extensions]]
Not Allowed
Section titled “Not Allowed”Frontmatter cannot define project-level sections such as:
[project][build][plugins]— legacy name; use[[extensions]]instead
Use shape.toml for project configuration.
Lockfile Behavior
Section titled “Lockfile Behavior”Standalone scripts use a per-script lockfile:
demo.shape->demo.lock
Resolution Rules
Section titled “Resolution Rules”- If a project
shape.tomlis discovered, frontmatter is rejected. - For standalone scripts, extension loading precedence is:
- CLI (
--plugin,--plugin-dir) - script frontmatter
[[extensions]]
- CLI (