Skip to main content

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)

uvx reviewate --repo facebook/react --pr 28000 --platform github --review
# 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 --repo facebook/react --pr 28000 --platform github --review

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 --repo facebook/react --pr 28000 --platform github --review

Config file

On first run, Reviewate saves your config to ~/.reviewate/config.toml:

[models]
review = "gemini/gemini-2.5-flash"
utility = "gemini/gemini-2.5-flash-lite"

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

reviewate \
  --repo owner/repo \
  --pr 123 \
  --platform github \
  --review \            # Run review pipeline
  --summary \           # Generate PR summary
  --dry-run \           # Don't post comments
  --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
  1. TriageAgent — Analyzes PR complexity, determines reasoning effort
  2. IssueExplorerAgent — Finds and summarizes linked issues
  3. SimpleReviewAgent (x2, parallel) — Reviews code with search/read tools
  4. SynthesizerAgent — Combines findings from both reviewers
  5. DuplicateAgent — Removes duplicates with existing human comments
  6. FactCheckerAgent — Verifies every claim against actual code
  7. 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
├── 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.

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
GEMINI_API_KEY Google Gemini API key
ANTHROPIC_API_KEY Anthropic Claude API key
OPENAI_API_KEY OpenAI API key
GITHUB_API_TOKEN GitHub token (optional with gh CLI)
GITLAB_API_TOKEN GitLab token (optional with glab CLI)

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reviewate-0.3.0.tar.gz (83.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reviewate-0.3.0-py3-none-any.whl (124.2 kB view details)

Uploaded Python 3

File details

Details for the file reviewate-0.3.0.tar.gz.

File metadata

  • Download URL: reviewate-0.3.0.tar.gz
  • Upload date:
  • Size: 83.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for reviewate-0.3.0.tar.gz
Algorithm Hash digest
SHA256 db97c022bdbe03dc2aea7a8bd42af91c2a11e541e1cbbe82277107cd531104ee
MD5 f495d84c9cd01843691ae8683f1c36c1
BLAKE2b-256 dd1c2e8112cbe80c850cbd627d4f38143e673227f5ccd6d44fd74defd33e8353

See more details on using hashes here.

File details

Details for the file reviewate-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: reviewate-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 124.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for reviewate-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8445679c900b868d9a49f762134dc0698c938a9c0e05c96c428e0fd198066d6a
MD5 433b44a563c3525e288082400876fae3
BLAKE2b-256 08c42a5f7ab125261c12b91f8f8d33d82e1ff20baaf291af9983087e6ce81f37

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page