@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

commandwhat it does
mynd auth login / status / logoutManage 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 / revokeKey lifecycle with scope flags
mynd webhooks tailStream live events to the terminal
mynd evals run <suite>Run an eval suite; --min-score gates exit code
mynd statusPlatform status, same data as /status

Exit codes

codemeaning
0Success
1API error — body printed to stderr as JSON
2Usage error — bad flags or arguments
3Auth error — no session and no MYND_API_KEY
4Gate 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.