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. Powered by the Claude Agent SDK, it explores your codebase, verifies every finding against actual code, and posts only fact-checked feedback.

Requirements

  • LLM auth: Anthropic API key, Claude subscription (via CLI login), or CLAUDE_CODE_OAUTH_TOKEN
  • Platform: gh/glab CLI logged in, or GITHUB_TOKEN/GITLAB_TOKEN env var

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 model choice, saves to ~/.reviewate/config.toml

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/Reviewate/reviewate.git
cd reviewate/code_reviewer
uv sync

uv run python main.py facebook/react -p 28000

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_TOKEN or GITLAB_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 \                                     # Enable debug logging
  --json \                                      # Output results as JSON

Architecture

Multi-Agent Pipeline

Powered by the Claude Agent SDK. Agents use Claude Code's built-in tools (Read, Grep, Glob, Bash) for codebase exploration.

PR Diff
  │
  ▼
Issue Explorer + 2 Analyze Agents (parallel, with Read/Grep/Glob/Bash)
                │
                ▼
           Synthesizer ──▶ Deduplicate ──▶ Fact Checker ──▶ Style
                                                              │
                                                              ▼
                                                   Guardrail (secret scan)
                                                              │
                                                              ▼
                                                        Post Comments
  1. IssueExplorerAgent — Finds and summarizes linked issues
  2. AnalyzeAgent (x2, parallel) — Reviews code with Read/Grep/Glob/Bash tools
  3. SynthesizerAgent — Combines findings from both reviewers
  4. DedupAgent — Removes duplicates with existing human comments
  5. FactCheckAgent — Verifies every claim against actual code
  6. StyleAgent — Final formatting (makes reviews concise)
  7. Guardrail — Scans findings for leaked secrets (gitleaks-based) before posting

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 AnalyzeAgent (x2), FactCheckAgent Critical analysis
Utility SynthesizerAgent, DedupAgent, StyleAgent, IssueExplorerAgent, SummarizerAgent, SummaryParserAgent 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            # Simple env var based configuration
├── config_file.py       # ~/.reviewate/config.toml handling
├── output.py            # Progress tracking & result output
├── schemas.py           # Data models (ReviewComment, Review, FilterResult, etc.)
├── guardrail.py         # Gitleaks-based secret scanning before posting
├── adaptors/
│   ├── factory.py       # Platform handler factory
│   └── repository/      # GitHub/GitLab handlers (gh api / glab api)
├── agents/
│   ├── base.py          # BaseAgent (wraps claude_agent_sdk.query())
│   ├── analyzer.py      # AnalyzeAgent (Read/Grep/Glob/Bash, sonnet)
│   ├── synthesizer.py   # SynthesizerAgent (no tools, haiku, 1 turn)
│   ├── deduplicator.py  # DedupAgent (no tools, haiku, 1 turn)
│   ├── fact_checker.py  # FactCheckAgent (Read/Grep/Glob, sonnet)
│   ├── styler.py        # StyleAgent (no tools, haiku, 1 turn)
│   ├── post_fixer.py    # PostingFixAgent (Bash, fixes line numbers)
│   ├── issue_explorer.py
│   ├── summary.py       # SummarizerAgent (no tools, haiku, structured output)
│   └── summary_parser.py # SummaryParserAgent (no tools, haiku, structured output)
├── workflows/
│   ├── context.py       # RunContext shared state
│   ├── review/
│   │   ├── runner.py    # Review pipeline orchestration
│   │   └── utils.py     # Pipeline helpers (parse, filter, style, post)
│   └── summary/
│       └── runner.py    # Summary pipeline orchestration
├── prompts/             # Jinja2 prompt templates (.md)
└── hooks/               # Tool budget hooks

Environment Variables

All env vars are optional if you have a config file (~/.reviewate/config.toml). Env vars override config file values when set.

Authentication (depends on auth mode chosen during reviewate config):

Variable Description
ANTHROPIC_API_KEY Anthropic API key (mode 1: API key, mode 3: custom endpoint)
CLAUDE_CODE_OAUTH_TOKEN OAuth token for headless/container use (mode 2: subscription). Locally, CLI session is used — no env var needed

Model configuration:

Variable Description
REVIEWATE_REVIEW_MODEL Review tier model (default: sonnet)
REVIEWATE_UTILITY_MODEL Utility tier model (default: haiku)
REVIEWATE_BASE_URL Custom base URL (e.g., LiteLLM proxy)

Platform tokens:

Variable Description
GITHUB_TOKEN GitHub token (optional with gh CLI)
GITLAB_TOKEN GitLab token (optional with glab CLI)

Self-hosted platforms:

Variable Default Description
GITLAB_HOST https://gitlab.com GitLab self-hosted instance URL

Override priority: env vars > config file > defaults

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.5.0.tar.gz (46.7 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.5.0-py3-none-any.whl (71.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reviewate-0.5.0.tar.gz
  • Upload date:
  • Size: 46.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reviewate-0.5.0.tar.gz
Algorithm Hash digest
SHA256 7ecb78142de6725723c333955d4fdec7f28279018a0c74779e6f3016c3d53bda
MD5 8c38bde1ad6977f6878a35f6434ddb35
BLAKE2b-256 99f1adc13934b7a3ad64b1e7829570bcd2a881148c11ba1bf67c1ab262a4bda0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: reviewate-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 71.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for reviewate-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f50ccf44a70769bf5366b371c985c1525943fa50f008a0d12fd5d26f92cc4750
MD5 cf60613c368f0cf7ca3932e22fd2b6f6
BLAKE2b-256 3364907ec8f360e1e944d8c74041b226723c18aa92f06647a4aa85420d734202

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