Skip to content
Muhammet Şafak
tr
CommitBrief CLI output — code review findings listed as colored severity cards in the terminal

CommitBrief

Ongoing

CommitBrief is a provider-agnostic Go CLI tool that performs LLM-powered local code review on git diffs. It reviews any scope — from staged/unstaged changes to a single commit to PR-style three-dot ranges — without leaving the terminal, without leaking the diff, and with customizable project rules.

Role
Founder & Developer
Duration
April 2026 — Ongoing

Technologies

Go Cobra go-git Anthropic Claude OpenAI Google Gemini Ollama YAML Goreleaser Astro Tailwind CSS

Skills

CLI Development Software Architecture Provider Abstraction Git Internals LLM Integration Prompt Engineering Caching Strategy Cross-Platform Development Open Source Maintenance Release Engineering i18n Test-Driven Development

CommitBrief is an open-source Go CLI tool I built to deliver a fast, structured “second pair of eyes” on a code change before another person (or your future self) ever sees it. The tool’s core promise is simple: run commitbrief and your staged diff is reviewed; commitbrief diff main...feature/x reviews a PR range, and commitbrief diff HEAD checks your working tree. The output can be a colorized card view in the terminal, markdown written to a file, or a strict JSON schema for automation. The principle that the diff and the review output never leave your machine sits at the heart of the design; the only outbound call goes to the LLM provider the user has chosen.

Architecturally, the project was built around a Provider interface with a database/sql-style registration system: Anthropic, OpenAI, Gemini, and Ollama ship as API-based providers, while claude-cli and gemini-cli ship as subprocess-based providers that reuse the user’s existing subscription; adding a new provider means a single package and a single blank import. On the git side there’s a hybrid approach: commit-based operations try go-git first and fall back to the git binary for scenarios that require the working tree/index — both paths implement the same Repo interface. A SHA256-based local cache (diff + system prompt + provider + model + language) reduces re-running the same diff to a single disk read; after each call, a “Saved: $X” line reports the savings. A three-layer filter (built-in defaults → .commitbriefignoreCOMMITBRIEF.md semantic filter), CI integration via --fail-on=<severity>, EN/TR i18n parity tests, and a pre-submission secret scanner are among the project’s other standout pieces.

Beyond the product, CommitBrief was built as an example of engineering discipline. The project includes 14 architecture decision records (ADRs), a locked JSON schema v1 contract, a suite of ~530 tests, golden-file drift protection, binaries signed with Goreleaser, and automated distribution infrastructure for a Homebrew tap and a Scoop bucket. With v1.0.0, the CLI flag surface, JSON schema, and config keys came under a semver guarantee; transitions between major versions are documented as migration guides in CHANGELOG.md. The license is GPL-3.0-or-later, the module is github.com/CommitBrief/commitbrief, and installation is a single line via brew install, scoop install, or go install.

Search the site

Start typing to search posts, projects and pages.

Esc to close Powered by Pagefind