CLI code review for local git branches and GitHub pull requests, using any OpenAI-compatible HTTP API.
Tip
See CI.md for a guide on integrating augur into GitHub Actions.
- Rust toolchain
- For
review pr: a GitHub personal access token with permission to read the PR and create reviews
| Variable | Required | Description |
|---|---|---|
OPENAI_API_KEY |
Yes (for LLM) | API key for your provider. |
OPENAI_API_BASE |
No | Base URL for OpenAI-compatible APIs (e.g. https://api.openai.com/v1). Omit for default OpenAI. |
OPENAI_MODEL |
No | Model id; defaults to gpt-5.4-nano if unset. |
GITHUB_TOKEN or GH_TOKEN |
Yes for review pr |
Token used for GitHub API (same idea as the gh CLI). |
GITHUB_API_URL |
No | REST API root URL. Default is https://api.github.com. For GitHub Enterprise Server, set the full API base (often https://<hostname>/api/v3). |
GITHUB_HOST |
No | GitHub Enterprise Server hostname only if GITHUB_API_URL is unset; augur uses https://<GITHUB_HOST>/api/v3. Do not set this for github.com—leave unset or set GITHUB_API_URL explicitly. |
- Private repositories:
repo - Public repositories only:
public_repois often enough for read + review on public PRs; userepoif you hit permission errors.
Local review (git diff semantics match git diff <base>..<head>: changes on head since the merge-base with base):
augur review local --base main --head feature/foo
augur review local --base main --head feature/foo --repo /path/to/repoPull request (fetches the PR diff, runs the LLM, posts a Pull Request Review with event COMMENT):
export GITHUB_TOKEN=ghp_...
export OPENAI_API_KEY=sk-...
augur review pr octo-org hello-world 42Agent mode (default) uses tools to inspect the patch; read_file_at_ref and grep_repo need a local clone that matches the PR. If you do not pass --repo-path, augur uses the current directory (see log warning); pass an explicit clone when in doubt:
augur review pr octo-org hello-world 42 --repo-path /path/to/hello-worldDiff size: --max-diff-chars is a soft limit; augur may keep a large first file so the review is never empty on an oversized patch.
Dry-run (compute the review and print it, do not post to GitHub):
augur review pr octo-org hello-world 42 --dry-runOverride LLM settings per run:
augur review local --base main --head HEAD --model gpt-5.4-nano --api-base https://api.example.com/v1 --api-key "$KEY"Set RUST_LOG for tracing, e.g. RUST_LOG=debug.
Augur is distributed under the MIT License. Refer to the LICENSE file for details.