The apex CLI
Apex Directive in your terminal and in CI
In short
apex runs a multi-model code review on your own API keys. Three models review your changes at once, each with a different lens (architect, tech lead, security). Findings come back as one deduplicated list, one at a time, so you can see where the models actually disagree.
npx @apex-directive/cli review
What you need
Node 24 or newer, and your own API keys for the providers you seat:
export ANTHROPIC_API_KEY=...
export OPENAI_API_KEY=...
export GOOGLE_API_KEY=...
Calls are billed by those providers directly. Nothing is sent anywhere else.
Commands
| Command | What it does |
|---|---|
apex review [paths] | Review the branch's changes, the files named, or --pr <n> |
apex ask <question> | One open question: no findings, no merge seat |
apex show [id] | The findings, or one finding in full |
apex discuss <id> | Have the panel talk one finding through |
apex final | Write the merged document (apex-review.md) |
apex dismiss <id> | Set a finding aside (-m "reason" required) |
apex table | Show the panel; add, rm or merge <model> to change it |
apex history | Saved reviews; history rm <id> deletes one |
apex --help has the full flag list.
In CI
--ci runs a review with no prompts and writes apex-review.md in the same run. The exit code is the contract:
| Code | Meaning |
|---|---|
| 0 | OK |
| 1 | Usage, config or refusal |
| 2 | --fail-on tripped |
| 3 | Over --budget, nothing sent |
| 4 | A seat did not answer |
apex review --ci --fail-on high --budget 200k
Configuration
.apex.toml in the repo, falling back to ~/.config/apex/config.toml. Reviews are kept in .apex/reviews/, which holds your source code and should stay git-ignored.
License
FSL-1.1-MIT (Functional Source License). Use it, change it and run it for anything except a competing product or service. Each version becomes MIT two years after it is released.
Prefer a browser?
The hosted app runs the same panel with nothing to install, reviews GitHub pull requests directly, and can run on our keys. See AI code review, or the package on npm.
Try it on your next review
Seven days on our keys with 250,000 credits. No card, so there is nothing to cancel.