Try the CLI without a key
This walkthrough runs the real CLI against a local fixture. It needs no account or API key.
The readiness result is hand-authored synthetic data. The exercise shows commands, response shapes and recovery; it does not call an AI model or demonstrate manufacturing execution.
Run it
Section titled “Run it”Install Node.js 22.13 or newer and Git, then run:
git clone --depth 1 https://github.com/Maglev-Inc/maglev_public_official.gitcd maglev_public_officialnpm ci --ignore-scriptsnpm run demoCloning and dependency installation use the network. The walkthrough itself talks only to a temporary server on your computer. It ignores any real MAGLEV_API_KEY or MAGLEV_API_URL already set in your shell and leaves your configuration unchanged.
For a JSON transcript:
node scripts/demo-cli.mjs --jsonFollow one project
Section titled “Follow one project”The supplied example describes 100 sensor enclosures, a required US build and dimensional quality ahead of lead time and price. The BOM proposes Aluminum 6061; the material, tolerances and acceptance criteria still need review.
| Step | What happens | What to notice |
|---|---|---|
| Preview files | The CLI hashes the example engineering folder locally. | A file manifest is not CAD interpretation or upload. |
| Read the action schema | The fixture exposes production_readiness. |
An agent can inspect the expected input and output before calling it. |
| Save the project | The structured brief retains its priorities and unknowns. | Saved requirements do not establish supplier fit. |
| Request a draft | The fixture saves one action, then deliberately drops the response. | A network error does not establish that the write failed. |
| Recover the result | The CLI lists project actions, then reads the saved ID. | The result lives at action.output.result; draft_ready is a draft state. |
| Replay the request | The identical body and original idempotency key return the same ID. | There is still one stored action. |
| Change the request | Reusing that key with a changed body returns HTTP 409. | New work needs a new key; preserve the earlier result. |
The interrupted request and final conflict are expected parts of a successful walkthrough. The complete program exits successfully only after checking both. See idempotency and 409 conflicts for the rule this demonstrates.
Read evidence and gaps
Section titled “Read evidence and gaps”The example result includes:
GAP · Released design No released dimensioned drawing or native CAD file is provided.
UNKNOWN · Acceptance criteria No numeric tolerances, fit criteria, finish requirement or acceptance test limits have been approved.
UNKNOWN · Material Proposed Aluminum 6061. Material is not validated.Each result item has area, question, status, evidence and nextStep. An agent should preserve those distinctions when reporting back. A requirement, an assumption and a measured result are different inputs to a manufacturing decision.
The result fixture is available for inspection. It has no fabricated inspection pass, factory quote or source citation. No one has approved production in this example.
Move to your existing agent
Section titled “Move to your existing agent”The CLI is a transport for your current stack. Your agent uses its permitted local tools to read the BOM, requirements and any formats it supports, then sends only the structured information needed for the request. This walkthrough does not create a new agent or install a harness.
For an actual sandbox session:
- Install the versioned CLI and connect a sandbox key.
- Use the existing-agent example, or prepare a reviewed brief from your own files.
- Create the project and inspect the action schema. Save the project ID and a unique key for the action request.
- Request a draft and read its actual saved status. Follow projects and actions for recovery; a real action may still be running or may have failed.
- Use the production readiness guide to review missing evidence and the revision guide when the design changes.
Real requests require a key, are subject to limits and may use a model. The local exercise does not validate those services, prove model quality or recover a server process that crashes before saving. It never contacts a supplier, uploads engineering files or places an order.
Reset and inspect
Section titled “Reset and inspect”Run npm run demo again to start fresh. Each run creates a temporary loopback server and discards its in-memory project/action at exit; the IDs are synthetic and cannot be retrieved from Maglev’s real API.
The walkthrough source validates requests and responses against the reviewed public contract. The repository’s test suite exercises the same real CLI calls, response interruption, saved-ID recovery and conflict.