Appearance
CLI Reference
Convention enforcement
caliper init --agent
Set up the Claude Code stop hook.
bash
npx caliper init --agentcaliper refresh
Regenerate deterministic checks from CLAUDE.md files (root and nested). Requires ANTHROPIC_API_KEY.
bash
npx caliper refresh # Auto-accept all generated checks
npx caliper refresh --interactive # Manually approve each checkLocal code review
caliper check
Review local changes before committing — no GitHub PR needed.
bash
npx caliper check # Review staged changes interactively
npx caliper check --fix # Auto-apply suggested fixes to working tree
npx caliper check --hook # Non-interactive, exit 1 on blocking findings
npx caliper check --branch # Review all commits on this branch vs base
npx caliper check --resume # Resume the last review without re-running AI
npx caliper check --severity blocking # Only report blocking issues
npx caliper check --agent # Stop hook mode (deterministic only, exit 2 on violations)
npx caliper check --verbose # Show Claude API request/response details| Flag | Description |
|---|---|
--fix | Auto-apply suggested fixes to working tree files |
--hook | Non-interactive mode for git hooks (exit 1 on blockers) |
--full | Run full pipeline (synthesis, lenses, consolidation) |
--resume | Resume the last review without re-running AI |
--branch | Review all commits on this branch vs base branch |
--severity <level> | Minimum severity to report (blocking, suggestion, nit) |
--agent | Stop hook mode (deterministic only, exit 2 on violations) |
--all-files | Check all source files, not just recently changed (agent mode) |
--verbose | Show Claude API request/response details |
PR review
caliper <pr-number>
Run a full review pipeline on a pull request.
npx caliper <pr-number> [flags]| Flag | Description |
|---|---|
--resume | Resume from the last saved phase |
--skip-refresh | Skip the staleness check on startup |
--no-post | Run the review but skip the posting phase |
--post-only | Post findings from a previous review without re-running |
--sequential | Use sequential finding reviewer instead of navigator |
--fast | Force fast path (skip synthesis/lenses/consolidation/narrative) |
--full | Force full pipeline even for small PRs |
--ci | Non-interactive mode for CI/CD (auto-approve and post findings) |
--min-severity <level> | Minimum severity to post in CI mode (blocking, suggestion, nit) |
--max-cost <amount> | Cost ceiling in USD — skip review if exceeded (CI mode) |
--fail-on-blocking | Exit 1 if blocking findings found (CI mode) |
--verbose | Show Claude API request/response details |
--help, -h | Show help message |
--version, -v | Show version number |
Examples:
bash
npx caliper 142 # Full review
npx caliper 142 --resume # Resume interrupted review
npx caliper 142 --no-post # Review without posting
npx caliper 142 --post-only # Re-enter approval for existing findings
npx caliper 142 --fast # Force fast path
npx caliper 142 --ci # Non-interactive CI modeUtilities
caliper init
Scaffold .caliper/ configuration in your repo.
bash
npx caliper init # Interactive setup
npx caliper init --yes # Non-interactive (use detected defaults)
npx caliper init --agent # Set up Claude Code stop hookcaliper trace
View the pipeline trace for a completed review.
bash
npx caliper trace <pr-number> # Print summary and open trace.html
npx caliper trace <pr-number> --json # Print path to trace.jsonOutput includes: step count, AI call count, total duration, cost estimate, and convention check results.
caliper clean
Remove old review state and trace files.
bash
npx caliper clean # Remove all review state
npx caliper clean <pr-number> # Remove state for a specific PR
npx caliper clean --older-than 7 # Remove reviews older than 7 dayscaliper-post
Standalone script for posting findings from a completed review.
bash
# Post specific findings by index
npx caliper-post <pr-number> <index> [<index> ...]
# Post all pending findings as a batched review
npx caliper-post <pr-number> --review [--event REQUEST_CHANGES|COMMENT|APPROVE]