@mynd/cli reference
CLI
The CLI wraps the REST API for terminal workflows: auth, scaffolding, runs, traces, keys, and live webhook debugging. Install globally; the binary is `mynd`. Every command accepts --json and respects MYND_API_KEY over the stored session.
npm install -g @mynd/cli mynd auth login
Command reference
| command | what it does |
|---|---|
| mynd auth login / status / logout | Manage the local session |
| mynd init <name> | Scaffold a project with a sandbox key |
| mynd run "<prompt>" | Create a run; streams the trace live |
| mynd runs list / get <id> | Inspect recent runs |
| mynd traces export <id> | Full trace to stdout as JSON |
| mynd traces replay <files> | Replay traces; --fail-on-diff for CI |
| mynd files upload <path> | Upload into the context graph |
| mynd keys create / rotate / revoke | Key lifecycle with scope flags |
| mynd webhooks tail | Stream live events to the terminal |
| mynd evals run <suite> | Run an eval suite; --min-score gates exit code |
| mynd status | Platform status, same data as /status |
Exit codes
| code | meaning |
|---|---|
| 0 | Success |
| 1 | API error — body printed to stderr as JSON |
| 2 | Usage error — bad flags or arguments |
| 3 | Auth error — no session and no MYND_API_KEY |
| 4 | Gate failure — replay diff or eval below --min-score |
The CLI is versioned with the API: `mynd --version` prints both, and a major API bump ships a CLI major with a migration note in the release notes.