The CLI is the whole product surface. Commands are designed to be run in order the first time and independently ever after, and the exit codes are stable so agentic pipelines and CI systems can script against them.
| Command | What it does |
|---|---|
mantyl init | Create mantyl.config.json with safe defaults. Redaction on, sandbox network off, LLM off. |
mantyl scan | Collect repository, git and agent-session observations into facts, claims and decisions. Use --session-dir to point at a non-standard session store. |
mantyl verify | Execute install, build, typecheck, test and lint in an isolated Docker sandbox. Network is connected for install only and then cut. |
mantyl generate | Assemble passport.json from all evidence, validate it against the schema, stamp digests and render the HTML and Markdown reports. |
mantyl publish | Host the approved passport at a shareable link. Explicit confirmation, passport document only, delete token shown once. Use --yes to skip the prompt and --endpoint to target another host. |
mantyl receive | The recipient's side. Independently recheck a received passport: digest, file manifest, commit and re-executed checks. Use --skip-checks for a digest-only comparison. |
mantyl doctor | Check the local environment: node, git, docker, agent sessions and API key configuration. |
mantyl config | Print the resolved configuration and its digest. |
Exit codes are part of the contract. A CI job can run mantyl receive on every delivery and gate acceptance on the result.
| Code | Meaning |
|---|---|
0 | Success. |
1 | Generic error, including a failed publish upload. |
2 | Invalid mantyl.config.json. The config is validated before any workflow runs. |
3 | Not a project Mantyl can work with. |
4 | Verification ran and at least one check failed. |
5 | Sandbox unavailable. Checks are recorded as skipped, never fake-passed. |
6 | Passport invalid, including a failed digest self-check before publish. |
7 | Receive detected divergence. Do not accept the delivery without investigating. |
mantyl.config.json lives at the project root and is validated against a versioned schema. The settings you are most likely to touch: scan.exclude takes glob patterns for directories that should never feed evidence, such as vendored examples or fixtures. llm.provider switches the optional analysis stage on with anthropic and llm.model overrides the default model. The API key comes from the ANTHROPIC_API_KEY environment variable or a gitignored .env file, never from config.