# Installation

> Install the CommitBrief CLI on macOS, Linux, or Windows via Homebrew, Scoop, go install, or pre-built binaries.

CommitBrief docs · v1.x · Getting Started

Canonical URL: https://commitbrief.com/docs/1.x/installation

---

CommitBrief ships pre-built binaries for Linux, macOS, and Windows on
amd64 and arm64. Goreleaser uploads them to GitHub Releases on every
stable tag and refreshes the Homebrew formula and Scoop manifest.

## Homebrew (macOS and Linux)

```sh
brew install CommitBrief/tap/commitbrief
```

Upgrades follow `brew update && brew upgrade commitbrief`. The
formula is auto-updated at
[`CommitBrief/homebrew-tap`](https://github.com/CommitBrief/homebrew-tap)
on every stable tag.

## Scoop (Windows)

```sh
scoop bucket add commitbrief https://github.com/CommitBrief/scoop-bucket
scoop install commitbrief
```

The manifest is auto-updated at
[`CommitBrief/scoop-bucket`](https://github.com/CommitBrief/scoop-bucket).

## Go install

```sh
go install github.com/CommitBrief/commitbrief/cmd/commitbrief@latest
```

`go install` writes the binary to `$(go env GOPATH)/bin/commitbrief`
(typically `~/go/bin/commitbrief`). If that directory is not on
your `PATH`, the binary is not found by name — invoke it with an
explicit path or add the directory to `PATH`:

```sh
export PATH="$(go env GOPATH)/bin:$PATH"
```

The Go-install path does not get ldflags-injected version /
commit / date strings; `--version` reports the upstream tag from
`runtime/debug.BuildInfo` but `commit` and `built` show as
`none` / `unknown`. Brew and Scoop binaries embed all three.

## GitHub Releases (raw binaries)

Pre-built archives for every published stable tag are at
[github.com/CommitBrief/commitbrief/releases](https://github.com/CommitBrief/commitbrief/releases).
Download the archive that matches your platform (e.g.
`commitbrief_Darwin_arm64.tar.gz`), extract it, and place the
binary somewhere on your `PATH`. Each archive ships the
`commitbrief` binary plus generated man pages under `man/`.

## Staying current — `commitbrief upgrade` (v1.15.0)

Whichever of the four routes above you took,
[`commitbrief upgrade`](/docs/1.x/upgrade) updates the binary:

```sh
commitbrief upgrade --check   # what's available, and what it would do
commitbrief upgrade           # confirm, then install
```

It detects how the running binary was installed and delegates to
the owning package manager (`brew upgrade` / `scoop update` /
`go install …@latest`), or — for a manual install — downloads the
release archive, verifies its SHA-256 against `checksums.txt`, and
swaps the binary in place. The version check runs **only** when you
run this command: no background check, no telemetry.

## Verifying the install

```sh
commitbrief --version
```

A successful install reports something like:

```
commitbrief v1.4.0 (commit abc1234, built 2026-05-29T12:34:56Z)
```

In a TTY, the splash logo prints to stderr before any command
runs. The logo is suppressed when stderr is redirected or piped
(it would appear as raw ANSI escapes), so capturing output via
`commitbrief --json | jq` stays clean.

## A shorter command — `cbr` (v1.7.0)

`commitbrief` is a long name to type on every commit. `setup --alias`
installs a shell alias (default `cbr`) into the right startup file for
your shell — bash, zsh, fish, PowerShell, and cmd.exe are all
handled:

```sh
commitbrief setup --alias            # installs `cbr`, prompts if the name is taken
commitbrief setup --alias=cb         # pick your own name, no prompt
```

It skips the provider wizard entirely and writes an idempotent
managed block — re-running replaces it in place and never clobbers
surrounding lines. Open a new shell (or source your rc file) and
`cbr --staged` works like `commitbrief --staged`. If the chosen name
shadows an existing command you're warned first.

## Requirements

- **Git** must be available on `PATH`. CommitBrief shells out to
  `git` for the working-tree and index diff paths, and as a
  fallback for some commit-range operations.
- An **LLM provider** — see [Providers](/docs/1.x/providers). The
  `mock` provider is registered for tests; production reviews need
  Anthropic, OpenAI, Gemini, DeepSeek, Mistral, Cohere, Ollama, or
  one of the CLI-tool-backed providers.
- The [`gh` CLI](https://cli.github.com) — **only** if you use
  [`commitbrief remote pr`](/docs/1.x/remote-pr) to review GitHub
  pull requests. Not needed for local reviews.

## Uninstalling

| Source | Command |
|--------|---------|
| Homebrew | `brew uninstall commitbrief && brew untap CommitBrief/tap` |
| Scoop | `scoop uninstall commitbrief && scoop bucket rm commitbrief` |
| Go install | `rm $(go env GOPATH)/bin/commitbrief` |
| Raw binary | delete the file |

Removing the binary leaves your `~/.commitbrief/` config and any
repo-local `.commitbrief/` directories in place. Delete them
manually for a fully clean uninstall.

## Next

Once `commitbrief --version` works, head to
[Run your first review](/docs/1.x/first-review).