Skip to content

docs: write script.forma before quickstart CLI invocations (#117) - #122

Open
viwe-monai wants to merge 1 commit into
wrong-nebula:mainfrom
viwe-monai:docs/quickstart-script-forma-input
Open

viwe-monai wants to merge 1 commit into
wrong-nebula:mainfrom
viwe-monai:docs/quickstart-script-forma-input

Conversation

@viwe-monai

Copy link
Copy Markdown

What

Every snippet that invokes the CLI with script.forma now writes that input file first (or names it in a comment), so the documented commands work on a fresh clone / fresh shell.

  • README.md Quickstart Option 2: writes script.forma with the same flange model Option 1 pipes via stdin, so the documented flange.glb / flange.png / flange.svg outputs are produced.
  • README.md "invoke directly from any shell-capable agent" block, README.md npm section: one echo ... > script.forma line before the first command that reads the file.
  • llms.txt, SKILL.md (Option B), AGENTS.md (step 3): same one-line write step before the script.forma invocations.

Why (Fixes #117)

The quickstart builds the binary and then runs forma eval ... script.forma, but nothing in the repo (or the documented steps) ever creates script.forma, so the command fails with ERR: cannot read 'script.forma' on a fresh clone. Option 1 pipes its model through a heredoc and never writes a file, yet Option 2 and the agent snippets reference that phantom file. Per the issue: the same one-line input fix applies to the llms.txt / SKILL.md / AGENTS.md snippets, whose part.glb outputs are fine once the input exists.

How it was verified

Built cargo build --release (forma 0.4.x, Linux x86_64) and ran the documented sequences verbatim.

Before (documented command, no input file):

$ ./target/release/forma eval --strict --out flange.glb --render flange.png --draw flange.svg script.forma
ERR: cannot read 'script.forma': No such file or directory (os error 2)
exit=1

After (README Option 2 as updated): writes script.forma, then the same eval command:

OK [8.85ms] parts=1
- flange: V=330 F=676 WT=ok NM=0 B=0 g=5 vol=2.576 ...
exit=0
$ ls -la flange.glb flange.png flange.svg
28664 flange.glb  22139 flange.png  77085 flange.svg

The one-line write step used in the other snippets was checked the same way (echo 'flange = box(4, 2, 0.4) | cut(cyl(0.5, 1))' > script.forma then forma lint --json script.forma -> {"clean":true,"findings":[],"contacts":[],"exit=0}). python3 scripts/check_local_paths.py passes on all tracked files. Docs-only diff; no source changes.

Follow-ups deliberately left out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

README quickstart (native build) references script.forma, which is not in the repo

1 participant