Appearance
Local Code Review
caliper check reviews your local changes with AI before you commit — no GitHub PR needed. It analyzes staged changes for logic errors, security issues, design problems, and convention violations, then presents findings interactively.
Basic usage
bash
npx caliper checkThis reviews staged changes and presents findings interactively. Requires ANTHROPIC_API_KEY.
--fix mode
bash
npx caliper check --fixAuto-applies suggested fixes directly to your working tree files. Each fix is applied in place — review the changes with git diff before committing.
--hook mode
bash
npx caliper check --hookNon-interactive mode designed for git pre-commit hooks. Exits with code 1 if blocking findings are found, code 0 otherwise. No interactive prompts.
To install as a git pre-commit hook, add to .git/hooks/pre-commit:
bash
#!/bin/sh
npx caliper check --hookVariants
| Flag | Description |
|---|---|
--branch | Review all commits on this branch vs base branch |
--full | Run full pipeline (synthesis, lenses, consolidation) |
--resume | Resume the last review without re-running AI |
Severity filter
bash
npx caliper check --severity blocking # only report blocking issuesInterpreting results
Severity levels
| Level | Meaning |
|---|---|
| blocking | Must be fixed before merging. Security issues, logic bugs, broken contracts. |
| suggestion | Should be addressed but not a merge blocker. Design improvements, readability, error handling gaps. |
| nit | Minor style or preference issue. Naming, import order, formatting. |
Categories
Listed in priority order (within each severity level):
| Category | What it covers |
|---|---|
security | Auth guards, injection vulnerabilities, credential exposure, input validation |
logic | Off-by-one errors, race conditions, null/undefined handling, edge cases |
error-handling | Recovery logic, error propagation, swallowed errors, actionable messages |
design | Single responsibility, abstraction level, naming, coupling, duplication |
performance | N+1 queries, missing pagination, unbounded operations |
boy-scout | Dead code, stale comments, unnecessary complexity in modified code |
testability | Missing tests for behavior changes, untestable structure |
convention | Project-specific conventions from deterministic checks |
Confidence levels
| Level | Meaning |
|---|---|
| high | Strong evidence in the code. The finding is almost certainly correct. |
| medium | Likely correct based on the diff, but may need human judgment. |
| low | Possible issue flagged for review. Evidence and reasoning are shown in the Details tab for you to evaluate. |
Every AI finding includes evidence (specific file paths, line numbers, or code patterns) and an explanation (the AI's reasoning). These are for your eyes only — they are not posted to the PR.