Installation¶
Requirements¶
- An Anthropic API key — you need a paid API account to use Claude models
- For platform PR reviews: a GitHub/GitLab/Bitbucket token with read access
macOS (Homebrew) — recommended¶
This installs a pre-built binary and keeps it up to date with brew upgrade.
Linux / macOS (direct download)¶
Download the latest binary for your platform:
Option 1 — Direct download (PowerShell)
# Download and extract
Invoke-WebRequest -Uri "https://github.com/critbot/claude-review/releases/latest/download/claude-review-windows-amd64.zip" -OutFile claude-review.zip
Expand-Archive claude-review.zip -DestinationPath .
# Move to a directory on your PATH, e.g.:
Move-Item claude-review.exe "$env:USERPROFILE\bin\claude-review.exe"
Option 2 — Build from source (requires Go 1.22+, see below)
Setting ANTHROPIC_API_KEY on Windows:
Go install¶
If you have Go 1.22+ installed, the simplest cross-platform option:
This builds from source and installs to $GOPATH/bin (typically ~/go/bin).
Build from source¶
Requires Go 1.22+.
git clone https://github.com/critbot/claude-review
cd claude-review
make install # builds and installs to $GOPATH/bin
Or just build locally:
Verify the installation¶
Set your API key¶
claude-review requires an Anthropic API key. Set it as an environment variable:
Add this to your ~/.bashrc, ~/.zshrc, or equivalent shell config to persist it across sessions.
For platform-specific PR reviews, also set the appropriate token:
export GITHUB_TOKEN=ghp_... # GitHub PRs
export GITLAB_TOKEN=glpat-... # GitLab MRs
export BITBUCKET_TOKEN=... # Bitbucket PRs (app password)
Per-project config
You can also set these in a claude-review.config.json file in your project root. See Configuration for details.
Checking your setup¶
Run a quick test with a local diff:
# Stage any change in a git repo
echo "// test" >> README.md
git add README.md
# Run a review
claude-review
# Clean up
git restore README.md
If everything is working, you'll see a review report written to REVIEW.md.