RabbitAIRabbitAI
Docs
GitHub
···
Twitter

Get started

Add to your repo

Reference

What is RabbitAI

Add RabbitAI to Your Repo

One workflow file. A few secrets. RabbitAI reviews every PR automatically.


Option 1 — GitHub Action

The recommended way. RabbitAI runs inside GitHub Actions on every PR — no server needed.

Step 1 — Add the workflow file

Create .github/workflows/review.yml in your repo:

name: RabbitAI Code Review

on:
  pull_request:
    types: [opened, synchronize, reopened]

jobs:
  review:
    runs-on: ubuntu-latest

    permissions:
      pull-requests: write
      contents: read

    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Install RabbitAI
        run: pip install rabbitai-reviewer

      - name: Run RabbitAI
        env:
          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          PINECONE_API_KEY: ${{ secrets.PINECONE_API_KEY }}
          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
          GITHUB_REPOSITORY: ${{ github.repository }}
          PR_NUMBER: ${{ github.event.pull_request.number }}
          VECTOR_STORE_PROVIDER: ${{ vars.VECTOR_STORE_PROVIDER }}
          EMBEDDING_PROVIDER: ${{ vars.EMBEDDING_PROVIDER }}
          EMBEDDING_MODEL: ${{ vars.EMBEDDING_MODEL }}
          LLM_PROVIDER: ${{ vars.LLM_PROVIDER }}
          LLM_MODEL: ${{ vars.LLM_MODEL }}
          REVIEW_LANGUAGE: ${{ vars.REVIEW_LANGUAGE }}
          PINECONE_INDEX: ${{ vars.PINECONE_INDEX }}
        run: |
          python -c "
          import os
          from rabbitai.agent import run
          result = run(os.environ['GITHUB_REPOSITORY'], int(os.environ['PR_NUMBER']))
          print(result.comment_url if result.posted else result.reason)
          "

Commit this file to your main branch. That's the only file you need in your repo.


Step 2 — Add your secrets

Go to your repo on GitHub → Settings → Secrets and variables → Actions

Under the Secrets tab, add whichever keys your chosen providers need:

SecretWhen you need itGet it from
GEMINI_API_KEYUsing Gemini for LLM or embeddingsaistudio.google.com → Get API key
OPENAI_API_KEYUsing OpenAI for LLM or embeddingsplatform.openai.com/api-keys
PINECONE_API_KEYUsing Pinecone as vector storeapp.pinecone.io → API Keys

GITHUB_TOKEN is injected automatically by GitHub. Do not add it as a secret.


Step 3 — Set your variables

Go to your repo → Settings → Secrets and variables → Actions → Variables tab

VariableOptionsDefault
VECTOR_STORE_PROVIDERchromadb · pinecone · qdrantchromadb
EMBEDDING_PROVIDERgemini · openaigemini
EMBEDDING_MODELe.g. text-embedding-3-smallprovider default
LLM_PROVIDERgemini · openaigemini
LLM_MODELe.g. gpt-4o-miniprovider default
REVIEW_LANGUAGEtypescript · python · go etctypescript
PINECONE_INDEXyour Pinecone index namecode-review

⚠️ Important: Make sure variable values have no leading/trailing spaces or newlines. A value of " openai" instead of "openai" will cause an Unknown provider error.

⚠️ Pinecone users: PINECONE_INDEX must exactly match an index you've already created in your Pinecone dashboard. RabbitAI does not auto-create indexes. If the index doesn't exist you'll get a 404 NOT_FOUND error. See Getting Your API Keys for index setup instructions.

If you skip this step entirely, RabbitAI defaults to Gemini for everything — free and zero config.


Step 4 — Open a PR

That's it. Open any PR on your repo and RabbitAI posts a structured review automatically.


Option 2 — MCP Server

Trigger reviews manually from inside Claude or Cursor IDE.

Setup

git clone https://github.com/nikhilsaiankilla/rabbitai
cd rabbitai
pip install rabbitai-reviewer
cp config.example.yaml config.yaml
# fill in your keys in config.yaml
python mcp/server.py

Add to Claude desktop

Edit claude_desktop_config.json:

{
  "mcpServers": {
    "rabbitai": {
      "command": "python",
      "args": ["/absolute/path/to/rabbitai/mcp/server.py"]
    }
  }
}

Add to Cursor

Go to Cursor Settings → MCP and add the same config.

Usage

Once connected, type inside Claude or Cursor:

"Review PR #12 in nikhilsaiankilla/myrepo"

RabbitAI fetches the diff, runs the full pipeline, and posts the comment directly on the PR.


Option 3 — Local CLI

Run reviews manually from your terminal.

git clone https://github.com/nikhilsaiankilla/rabbitai
cd rabbitai
pip install rabbitai-reviewer
cp config.example.yaml config.yaml
# fill in your keys in config.yaml

Create test.py:

from rabbitai.agent import run

result = run(
    repo_name="your-username/your-repo",
    pr_number=1,
)
print(result)
python test.py

The review posts as a comment on the PR. The comment URL is printed to stdout.

Requires Python 3.11. Use py -3.11 on Windows if you have multiple Python versions installed.


Getting Your API Keys

Gemini API key — free

  1. →Go to aistudio.google.com
  2. →Sign in with your Google account
  3. →Click Get API key → Create API key → copy it

No credit card required. The free tier covers most usage.


OpenAI API key

  1. →Go to platform.openai.com → sign in
  2. →Click your avatar → API keys
  3. →Create new secret key → copy it

Pinecone API key — free tier available

  1. →Go to app.pinecone.io → sign up
  2. →API Keys in the sidebar → copy your key
  3. →Indexes → Create Index with these settings:
    • →Name: whatever you set as PINECONE_INDEX (e.g. rabbitai)
    • →Dimensions: 768 for Gemini · 1536 for OpenAI text-embedding-3-small
    • →Metric: cosine
    • →Cloud: AWS us-east-1 (free tier)

⚠️ The index name you create here must exactly match what you set in PINECONE_INDEX. If they don't match, you'll get a 404 NOT_FOUND error.


GitHub token — local dev only

Only needed when running locally. GitHub Actions injects the token automatically.

  1. →Go to github.com → avatar → Settings
  2. →Developer settings → Personal access tokens → Tokens (classic)
  3. →Generate new token (classic) → check repo → copy it

Never commit this token. Add it to config.yaml only — which is gitignored.

On this page

GitHub ActionMCP ServerLocal CLIGetting Your API Keys

RabbitAI Documentation

Open-source AI code reviews for GitHub PRs.

DocsIntegrateGitHubX