AI code reviews.
Right in your terminal.

A provider-agnostic, local-first CLI that reviews your staged changes, a historic range, or a whole GitHub pull request —before your colleagues do. Zero telemetry. No server.

CommitBrief is an open-source AI code review CLI that reviews git diffs — staged changes, a commit range, or a GitHub pull request — from your terminal, a git hook, or CI. You choose the provider: ten are supported, including fully local models through Ollama. It sends no telemetry and is licensed GPL-3.0-or-later.

Zero telemetry Local response cache Ten providers GPL-3.0
orbital-api — commitbrief --staged — 100×34
zsh
commitbrief --staged×
git status
● running

works with every provider you already pay for

Anthropic · Claude Opus 5.5 / Sonnet 5 / Haiku 4.5
OpenAI · GPT-5.5 / 5.4-mini / 5.5-pro
Google · Gemini 3.8 Flash / 3.1 Pro / Flash-Lite
DeepSeek · deepseek-chat / reasoner
Mistral · large / codestral
Cohere · command-r / command-a
Ollama · local, no API key
Claude Code CLI · subscription-backed
Gemini CLI · subscription-backed
OpenAI Codex CLI · subscription-backed
Anthropic · Claude Opus 5.5 / Sonnet 5 / Haiku 4.5
OpenAI · GPT-5.5 / 5.4-mini / 5.5-pro
Google · Gemini 3.8 Flash / 3.1 Pro / Flash-Lite
DeepSeek · deepseek-chat / reasoner
Mistral · large / codestral
Cohere · command-r / command-a
Ollama · local, no API key
Claude Code CLI · subscription-backed
Gemini CLI · subscription-backed
OpenAI Codex CLI · subscription-backed
// principles

Built like a real CLI.
Not a SaaS in disguise.

Local LLM code review through Ollama needs no API key and no account.

Four guarantees we won't compromise on. Read the sourceon GitHub.

01 · Privacy

Privacy-first & local-only

No telemetry, no analytics endpoint, no account. Config is plain YAML on disk. Pair with Ollama for a fully offline review loop — no API key, no network egress.

# ~/.commitbrief/config.yml
provider: ollama
providers:
  ollama:
    model: qwen2.5-coder:14b
output:
  lang: en
cache:
  ttl_days: 7
02 · Rules

Project rules in plain markdown

Drop a COMMITBRIEF.md next to your README. No DSL, no YAML schema — just the words you'd say in a code review, used as the system prompt.

# COMMITBRIEF.md
## Rules
- Block any new use of database/sql; use pgx.
- Flag log lines containing PII (email, phone).
- Prefer table-driven tests in _test.go.
03 · Cost

Engineered for cheap tokens

SHA-256 response cache skips reviews you've already run. Provider prompt caching (Anthropic, OpenAI, Gemini) cuts repeated input cost.--verbose tells you what you saved.

# commitbrief --staged --verbose./.commitbrief/cache
cachelocal cache hit0 mstokensin=1840, out=612 (provider cached: 1400)Saved$0.0143no call
# Saved: shown when the run was a local cache hit
04 · Providers

Truly provider-agnostic

Swap between ten providers — seven API backends plus subprocess wrappers around Claude Code, Gemini CLI, and OpenAI Codex — withcommitbrief providers use or per-run--provider. Keep an alternate configured so a 429 is one command away.

anthropicclaude-opus-5-5default
openaigpt-5.4-minicloud
geminigemini-3.8-flash1M ctx
deepseekdeepseek-chatlow-cost
mistralcodestral-latestEU
coherecommand-r-pluscompat
ollamaany local modeloffline
claude-clihost CLI subprocesssubscription
gemini-clihost CLI subprocesssubscription
codex-clihost CLI subprocesssubscription
// 90 seconds, total

From zero to first review
before your coffee finishes brewing.

Run commitbrief setup, optionallycommitbrief init, thencommitbrief; to put AI review in a pre-commit hook, add commitbrief install-hook.

Three commands. No browser tab. No "log in to your dashboard." Config lives in~/.commitbrief/config.yml.
1$ commitbrief setup

Pick provider, paste key

An interactive wizard cycles through Anthropic, OpenAI, Gemini, DeepSeek, Mistral, Cohere, and Ollama; pings the provider to confirm the key works.

┌─ commitbrief setup ──────────────────────────┐
│ ? Pick a provider │
│ ○ openai │
│ ● anthropic │
│ ○ gemini │
│ ○ ollama (local) │
│ │
│ ↑↓ move ↵ select ⌃c quit │
└──────────────────────────────────────────────┘
2$ commitbrief init

Optional: your own rules

Embedded defaults ship in the binary, so day-one runs work without this step. init writes COMMITBRIEF.md + an OUTPUT.md template you can edit.

┌─ COMMITBRIEF.md ──── 24 lines ─┐
# orbital-api review rules
 
## Critical
- No raw SQL outside /db
- Always wrap context
 
## Style
- Use slog, not log
3$ commitbrief

Review before you commit

Default scope is your staged diff. Reach any historic range via commitbrief diff <args>, select a set of commits with --author/--start-date/--text, or review a whole PR with commitbrief remote pr <id> — it posts inline comments and a verdict back to GitHub. Gate CI with commitbrief guard against a policy file, or expose the same review to an agent over MCP with commitbrief mcp. Two commands never call a model at all: commitbrief leaks audits your tree and git history for committed credentials, and commitbrief map draws the commit graph so you can see what a filter selected. Output in terminal, plain markdown, or strict JSON.

➜~/repos/orbital-apicommitbrief
commitbrief v1.18.1 · provider: anthropic/claude-opus-5-5 · cache: miss
analyzing 4 files · 187 added · 42 removed
●Critical
SQL injection in session.go:142
●Medium
N+1 query in rank.go:78
✓ Done in 3.90s · 2 findings · 1420 tokens · Cost: $0.0121
// commitbrief compress

Your rules file,
on a token diet.

commitbrief compress shrinks your COMMITBRIEF.md review rules file, so each review that reaches the provider sends fewer input tokens.

Three embedded prompts rewrite COMMITBRIEF.md into a denser, equivalent instruction set. Backs up the original under.commitbrief/backups/, applies atomically, and refuses to overwrite when the result isn't actually smaller.

↳ shows tokens before/after + cost, asks [y/N], then overwrites in place. --out path writes elsewhere.
light
conservative trim
balanced
default
aggressive
maximum savings
denser, equivalent
before · COMMITBRIEF.md
verbose prose
1# Code Review Rules for orbital-api
2 
3Please review the changes carefully. Make sure
4to consider performance, security, and style.
5 
6## Security
7We have had issues with SQL injection in the
8past, so please flag any use of string
9concatenation when building queries. We prefer
10parameterized queries with the pgx library.
11 
12## Performance
13We run on small instances, so please flag any
14N+1 query patterns, unnecessary allocations in
15hot paths, and any blocking I/O in handlers...
16 
17## Style
18Use slog over the standard log package, prefer
19table-driven tests, and avoid global state...
after · balanced
same intent, fewer tokens
1# orbital-api review rules
2 
3SEC: flag string-concat SQL; require pgx params.
4PERF: flag N+1, hot-path allocs, blocking I/O.
5STYLE: slog over log, table-driven tests,
6 no globals.
// backup at .commitbrief/backups/COMMITBRIEF-<timestamp>.md
// faq

Questions, answered.

What is CommitBrief?

CommitBrief is a Go CLI that runs LLM-powered code reviews on git diffs — staged, unstaged, or any historic range git diff understands via the commitbrief diff <args> subcommand (single commit, branch vs target, PR-style three-dot range, etc.). It runs locally; the only network egress is to the provider you chose.

It is not a SaaS, a dashboard, a GitHub App, or a bot. There is no account, no server-side state, and no telemetry.

Is CommitBrief free? What license does it use?

Yes. The CLI is free and open source under GPL-3.0-or-later, hosted at github.com/CommitBrief/commitbrief. There’s no subscription, no seat license, and no paid tier.

The only cost is whatever your chosen LLM provider charges per token — and that’s $0 with Ollama (your own local model) or a CLI-tool-backed provider that reuses a subscription you already have.

Can I run it fully offline?

Yes — pick Ollama as the provider. The CLI then talks only to http://localhost:11434 (or whatever you’ve configured); no API key is required and no diff leaves your machine.

CommitBrief itself never makes outbound network calls on its own beyond the provider you chose, except for commands you run that explicitly talk to GitHub (commitbrief upgrade and remote pr). There is no telemetry endpoint, no auto-update check, no analytics beacon.

Is my code sent to the LLM provider? What exactly leaves my machine?

Only what the review needs: the diff text, your COMMITBRIEF.md rules and — if present — the constraints from architecture.json (together they form the prompt) — sent directly over HTTPS to the provider you configured. OUTPUT.md is a local render template and is never sent. There is no CommitBrief server in between.

A pre-send secret scanner blocks credential-shaped strings before that call goes out, and picking Ollama keeps everything on your machine — zero third-party egress. The -cli providers (claude-cli, gemini-cli, codex-cli) are different: they hand the prompt to the host CLI you already have installed, which sends it to its own vendor (Anthropic, Google or OpenAI). With --with-context, the host CLI may also read and send surrounding project files. Run commitbrief --staged --show-prompt to see the exact payload before anything is sent — no provider call, no cost.

How is this different from my editor's AI assistant?

An editor assistant reviews what’s near the cursor, inside one IDE, against whatever model that tool ships with. CommitBrief reviews the whole diff — staged changes, a commit range, or a PR — against rules you declare once in COMMITBRIEF.md, with a provider you pick per repo, so the same review runs identically from your terminal, a git hook, or CI.

Neither replaces a human reviewer’s intent-level judgment — “does this function solve the right problem” stays a person’s call. CommitBrief is a pre-check before that person (or your future self) looks at the change.

All questions on the FAQ page →

Catch the bug before
your colleague does.

One install. No account. Free forever — because it's open source.

Add AI code review to GitHub Actions withCommitBrief/commitbrief-action, or gate any CI system with --fail-on.

Read the docs