From 82555f1c886ab508804de7cdcef087de43e49ac8 Mon Sep 17 00:00:00 2001 From: viwe-monai Date: Fri, 4 Dec 2026 12:46:01 +0800 Subject: [PATCH] docs: write script.forma before quickstart CLI invocations (#117) --- AGENTS.md | 3 ++- README.md | 9 +++++++++ SKILL.md | 1 + llms.txt | 1 + 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index 6040568..66ffff3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -54,7 +54,8 @@ flange = box(4, 2, 0.4) section(flange, 0.0) EOF -# 3. Standalone deterministic geometric lint + pairwise assembly contact graph +# 3. Save a Forma-Pipe script to disk (or reuse one from step 2), then run standalone deterministic geometric lint + pairwise assembly contact graph +echo 'flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))' > script.forma # write any Forma-Pipe script first forma lint --json script.forma ``` diff --git a/README.md b/README.md index 9cfc294..3af66f6 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,13 @@ EOF git clone https://github.com/wrong-nebula/forma.git cd forma cargo build --release +cat > script.forma <<'EOF' +flange = box(4, 2, 0.4) + | mat("brushed_steel", color=(0.55, 0.68, 0.85), metallic=0.9, roughness=0.25) + | cut(cyl(0.5, 1)) + | cut(cyl(0.25, 1), at=[(-1.4,-0.5,0), (-1.4,0.5,0), (1.4,-0.5,0), (1.4,0.5,0)]) +section(flange, 0.0) +EOF ./target/release/forma eval --strict --out flange.glb --render flange.png --draw flange.svg script.forma ``` @@ -85,6 +92,7 @@ Add Forma's MCP server (4 tools: `eval`, `inspect`, `tx`, `export` — **900 `o2 Or invoke directly from any shell-capable agent: ```bash +echo 'flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))' > script.forma # write any Forma-Pipe script first forma spec # ~485-token language reference forma eval --strict --critique --out out.glb script.forma # transactional eval + 0-tok clean critique forma lint --json script.forma # Layer A geometric lint + contact graph @@ -102,6 +110,7 @@ Install or run Forma's zero-dependency WebAssembly engine directly from npm ([** ```bash npm install forma-3d # JS/TS ESM + WASM library + CLI + MCP server +echo 'flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))' > script.forma # write any Forma-Pipe script first npx -y forma-3d eval --strict --out part.glb script.forma npx -y -p forma-3d forma-3d-mcp # stdio MCP server ``` diff --git a/SKILL.md b/SKILL.md index fa0fc29..2603479 100644 --- a/SKILL.md +++ b/SKILL.md @@ -32,6 +32,7 @@ Use either the compiled native binary (`forma`) or the cross-platform npm CLI (` ```bash forma spec # Print ~485-token language reference forma spec --gbnf # Print GBNF grammar for constrained decoding +echo 'flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))' > script.forma # write any Forma-Pipe script first forma lint --json script.forma # Deterministic Layer A lint + contact graph forma eval --strict --critique --scene \ --out scene.glb \ diff --git a/llms.txt b/llms.txt index 1e8b364..accc4fc 100644 --- a/llms.txt +++ b/llms.txt @@ -32,6 +32,7 @@ cargo build --release ./target/release/forma spec --gbnf # Evaluate a Forma-Pipe script, verify watertightness, export .glb/.step/.3mf/.stl/.obj/.blend, render 4-view .png, draw .svg blueprint (add --scene for multi-part assemblies) +echo 'flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))' > script.forma # write any Forma-Pipe script first ./target/release/forma eval --strict --out part.glb --render preview.png --draw blueprint.svg script.forma # Run stdio MCP server (4 tools: eval, inspect, tx, export)