AI-powered code reviewer for GitHub and GitLab
Project description
Reviewate - AI-Powered Code Review
Reviewate is a multi-agent code review system for GitHub and GitLab pull requests. It explores your codebase, verifies every finding against actual code, and posts only fact-checked feedback.
Quick Start
Run without installing (recommended)
# From a PR/MR URL (platform, repo, PR auto-detected):
uvx reviewate https://github.com/facebook/react/pull/28000
# Or with owner/repo + PR number:
uvx reviewate facebook/react -p 28000
# First run: prompts for your LLM provider + API key
# Saves config to ~/.reviewate/config.toml — all future runs just work
Requires uv.
Or install globally
uv tool install reviewate # or: pip install reviewate
reviewate facebook/react -p 28000
No token needed if the gh or glab CLI is logged in.
From source (for development)
git clone https://github.com/numberly/reviewate.git
cd reviewate/code_reviewer
uv sync
uv run python main.py facebook/react -p 28000
LLM Providers
Reviewate works with any LLM provider via LiteLLM. Browse all supported models at models.litellm.ai.
| Provider | Setup |
|---|---|
| Google Gemini | GEMINI_API_KEY |
| Anthropic Claude | ANTHROPIC_API_KEY |
| OpenAI | OPENAI_API_KEY |
| OpenRouter | OPENROUTER_API_KEY |
| OpenAI-compatible (Ollama, vLLM, LiteLLM proxy, etc.) | OPENAI_API_KEY + custom URL |
On first run, Reviewate prompts you to pick a provider and saves your config to ~/.reviewate/config.toml:
[models]
review = "gemini/gemini-2.5-flash"
utility = "gemini/gemini-2.5-flash-lite"
# Optional: custom API URLs for OpenAI-compatible providers
[urls]
openai = "http://localhost:11434/v1" # e.g. Ollama
API keys are read from environment variables only (not stored in the config file).
You can also set env vars or pass CLI args — they take priority over the config file.
Authentication
| Method | Best for | Setup |
|---|---|---|
| CLI Auth | Local development | Log in with gh auth login or glab auth login |
| API Token | CI pipelines, Docker, self-hosted | Set GITHUB_API_TOKEN or GITLAB_API_TOKEN |
CLI Options
# From PR/MR URL (auto-detects platform, repo, PR number):
reviewate https://github.com/org/repo/pull/48
reviewate https://gitlab.com/group/repo/-/merge_requests/1
reviewate https://gitlab.example.com/group/sub/project/-/merge_requests/352
# Classic format:
reviewate owner/repo -p 123 # review (default)
reviewate summary owner/repo -p 123 # summary only
reviewate full owner/repo -p 123 # review + summary
reviewate review owner/repo -p 123 --dry-run # explicit review
# Configuration
reviewate config # re-run setup wizard
# Additional flags
reviewate owner/repo -p 123 \
--platform gitlab \ # GitLab (default: github)
--dry-run \ # Don't post comments
--debug \ # Show tracebacks on error
--review-model anthropic/claude-sonnet-4 # Override review tier model
--utility-model gemini/gemini-2.5-flash-lite # Override utility tier model
Architecture
Multi-Agent Pipeline
PR Diff
│
▼
Triage ──▶ 2 Review Agents (parallel, with grep/read tools)
│
▼
Synthesizer ──▶ Deduplicate ──▶ Fact Checker ──▶ Style
│
▼
Post Comments
- TriageAgent — Analyzes PR complexity, determines reasoning effort
- IssueExplorerAgent — Finds and summarizes linked issues
- SimpleReviewAgent (x2, parallel) — Reviews code with search/read tools
- SynthesizerAgent — Combines findings from both reviewers
- DuplicateAgent — Removes duplicates with existing human comments
- FactCheckerAgent — Verifies every claim against actual code
- StyleAgent — Final formatting (makes reviews concise)
Two-Tier Model Configuration
Agents are grouped into tiers so you can use a strong model for critical analysis and a fast/cheap model for supporting tasks:
| Tier | Agents | Purpose |
|---|---|---|
| REVIEW | triage, review (x2), fact_checker | Critical analysis |
| UTILITY | style, duplicate, issue_explorer, summarizer, output_parser | Supporting tasks |
Code Structure
code_reviewer/
├── main.py # CLI entry point & main() loop
├── cli.py # Argument parsing & URL resolution
├── runner.py # Config validation & workflow execution
├── config.py # Two-tier model configuration
├── config_file.py # ~/.reviewate/config.toml handling
├── output.py # Progress tracking & result output
├── adaptors/
│ ├── factory.py # Platform handler factory
│ ├── _transport.py # Abstract transport (APIClient protocol)
│ ├── _http.py # HTTP client (httpx)
│ ├── _cli.py # CLI fallback (gh api / glab api)
│ ├── repository/ # PR/MR diffs, reviews, comments
│ └── issue/ # Linked issue fetching
├── agents/
│ ├── base.py # BaseAgentImpl (LLM calls, tool loop, retry)
│ ├── specialized.py # SimpleReviewAgent, SynthesizerAgent
│ ├── triage.py # TriageAgent
│ ├── fact_checker.py # FactCheckerAgent
│ ├── issue_explorer.py
│ ├── duplicate.py # DuplicateAgent
│ ├── style.py # StyleAgent
│ ├── summarizer.py # SummarizerAgent
│ └── tools.py # Tool definitions for agents
├── explorer/
│ ├── explorer.py # CodeExplorer (ripgrep search + file reads)
│ └── builder.py # Explorer factory
├── workflows/
│ ├── review.py # ReviewWorkflow (main pipeline)
│ ├── summary.py # SummaryWorkflow (PR summaries)
│ └── context.py # Linked repos, team guidelines
├── prompts/ # Jinja2 prompt templates (.txt)
└── schema/ # Data models
Environment Variables
All env vars are optional if you have a config file (~/.reviewate/config.toml). Env vars override config file values when set.
Model configuration:
| Variable | Description |
|---|---|
REVIEW_AGENT_MODEL |
Model for review tier agents |
REVIEW_AGENT_PROVIDER |
Provider for review tier |
UTILITY_AGENT_MODEL |
Model for utility tier agents |
UTILITY_AGENT_PROVIDER |
Provider for utility tier |
API keys:
| Variable | Description |
|---|---|
GEMINI_API_KEY |
Google Gemini API key |
ANTHROPIC_API_KEY |
Anthropic Claude API key |
OPENAI_API_KEY |
OpenAI API key (also used for OpenAI-compatible providers) |
OPENROUTER_API_KEY |
OpenRouter API key |
Platform tokens:
| Variable | Description |
|---|---|
GITHUB_API_TOKEN |
GitHub token (optional with gh CLI) |
GITLAB_API_TOKEN |
GitLab token (optional with glab CLI) |
OpenAI-compatible providers (Ollama, vLLM, etc.):
| Variable | Description |
|---|---|
REVIEW_OPENAI_URL |
Custom API URL for review tier |
REVIEW_OPENAI_KEY |
Custom API key for review tier |
UTILITY_OPENAI_URL |
Custom API URL for utility tier |
UTILITY_OPENAI_KEY |
Custom API key for utility tier |
OpenRouter provider order:
| Variable | Description |
|---|---|
OPENROUTER_PROVIDER_ORDER |
Global provider order (e.g. Anthropic,Google) |
REVIEW_OPENROUTER_PROVIDER_ORDER |
Provider order for review tier only |
UTILITY_OPENROUTER_PROVIDER_ORDER |
Provider order for utility tier only |
Override priority: CLI args > env vars > config file
Development
# From monorepo root
make code-review-test # Run tests
make qa # Run linters and type checks
License
AGPL-3.0 — see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reviewate-0.4.1.tar.gz.
File metadata
- Download URL: reviewate-0.4.1.tar.gz
- Upload date:
- Size: 87.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49d74651a8ac11a8924475c9071442c314d3d2aed059774c670961b9b7e5c898
|
|
| MD5 |
df88fd288fafa9c585aedb8844d11dff
|
|
| BLAKE2b-256 |
0eead306dca9dc15f73e53ca2e1fb78b8fbf57d75aba2a94c4378cb0e1d5dd8c
|
File details
Details for the file reviewate-0.4.1-py3-none-any.whl.
File metadata
- Download URL: reviewate-0.4.1-py3-none-any.whl
- Upload date:
- Size: 129.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d038bc96203e6baaf68e100a2abaa140227007d883e2bfa50a9ae380bb764b91
|
|
| MD5 |
721cee11037850607dbb53df07e51b11
|
|
| BLAKE2b-256 |
c7bb27b0f623802c36d006027bb6f41e8eccdd860db048d4623580367a0a0f4b
|