CI Integration

Add AI code reviews to your GitHub Actions or GitLab CI pipelines.

Run Reviewate as part of your CI pipeline — no server or dashboard needed. Reviews run on every pull request and post comments directly.

CI pipelines and Docker containers require API tokens (GITHUB_TOKEN / GITLAB_TOKEN). The CLI fallback (gh / glab) is not available in container environments.

Pipeline Setup

Add this workflow to your repository:

# .github/workflows/ai-review.yml
name: AI Code Review
on:
  pull_request:
    types: [opened, synchronize]

jobs:
  review:
    runs-on: ubuntu-latest
    container:
      image: reviewate/code-reviewer:latest
    steps:
      - name: Run AI Review
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
        run: |
          reviewate ${{ github.repository }} \
            -p ${{ github.event.pull_request.number }}

Required secrets: Set ANTHROPIC_API_KEY in your repository secrets. GITHUB_TOKEN is automatically provided by GitHub Actions.

CLI Options

Use subcommands and flags to control behavior:

reviewate owner/repo -p 123                    # review (default)
reviewate summary owner/repo -p 123            # summary only
reviewate full owner/repo -p 123               # review + summary
FlagDescription
-p / --prPull request / merge request number
--platformgithub or gitlab
--dry-runRun without posting comments to the platform
--debugEnable debug mode with tracebacks and reasoning output
--jsonOutput results as JSON

Model Configuration

Set the model via environment variables:

VariableDescription
ANTHROPIC_API_KEYAPI key for Claude models (or use CLAUDE_CODE_OAUTH_TOKEN)
REVIEWATE_REVIEW_MODELReview tier model (default: sonnet)
REVIEWATE_UTILITY_MODELUtility tier model (default: haiku)
REVIEWATE_BASE_URLCustom base URL (e.g., LiteLLM proxy)

See Model Configuration for the two-tier model system and all configuration options.