// guide · cli reference
jointchiefs — the CLI.
Same engine as the MCP server. Streams live. Exits with meaningful codes. Pipes stdin. Emits JSON on request.
// commands
Commands.
jointchiefs review <path>
Runs a full multi-model review of the file or directory. Streams to stdout; every provider token lands live.
$ jointchiefs review src/auth.swift
$ jointchiefs review src/auth.swift --goal "security audit"
$ jointchiefs review src/auth.swift --context "prefer pure functions; Swift 6 concurrency"
jointchiefs review --stdin
Reads code from stdin. Great for piping a git diff in as a pre-commit gate.
$ git diff | jointchiefs review --stdin --goal "pre-commit check"
$ cat pr.patch | jointchiefs review --stdin --json > review.json
jointchiefs models
Lists every configured provider and its model. Use --test to probe each provider's API with a round-trip connection check.
$ jointchiefs models
$ jointchiefs models --test
// flags
Flags.
| Flag | Description |
|---|---|
--goal <text> | What you want the debate to focus on. "security audit", "performance review", "readability pass". Passed to every provider. |
--context <text> | Free-form context — style rules, conventions, framework versions, caller behavior. Feeds the spokes alongside the code. |
--rounds <n> | Max debate rounds. Default 5. Debate breaks early when positions converge. |
--timeout <sec> | Per-provider request timeout in seconds. Default 120. |
--stdin | Read code from stdin instead of a file argument. |
--json | Emit the consensus summary as JSON at the end. Streaming chatter still goes to stderr. |
// exit codes
Exit codes.
| Code | Meaning |
|---|---|
0 | Review completed successfully. |
1 | Review failed — every provider errored, or consensus could not be produced. |
2 | Invalid input (missing file, unreadable stdin, malformed flags). |
3 | No providers configured — no API keys found in environment or Keychain. |
64 | Usage error (help requested, unknown subcommand). |
// configuration
Environment.
API keys resolve in order: environment variable first (CI escape hatch), then the Keychain via jointchiefs-keygetter. Model overrides always come from env vars.
OPENAI_API_KEY | Enables OpenAI as a spoke. |
|---|---|
GEMINI_API_KEY | Enables Gemini as a spoke. |
GROK_API_KEY | Enables xAI Grok as a spoke. |
ANTHROPIC_API_KEY | Enables Claude — also the default moderator/decider. |
OLLAMA_ENABLED=1 | Include a local Ollama model in the panel. |
OPENAI_MODEL etc. | Override the default model for any provider. |
CONSENSUS_MODEL | Override the Claude model used specifically for consensus synthesis. |
Prefer the tool-call flow?
The MCP server exposes the same engine to any MCP-aware client — one JSON snippet to wire it up.