ai-review is a free, open source version control & collaboration project written in Python and released under Apache-2.0. It has 600 GitHub stars, 103 forks and 11 open issues, and was last pushed 1 months ago. On this registry it ranks #43 of 50 tracked projects in Version Control & Collaboration, with 5 head-to-head comparisons available. It gained 15 stars over the last 30 tracked days.

What is ai-review?

AI Review is an Apache-2.0 licensed, Python-based developer tool that posts AI-generated inline comments, summary reviews, and threaded replies on pull and merge requests across GitHub, GitLab, Bitbucket Cloud, Bitbucket Server, Azure DevOps, and Gitea; it is built for development teams that want an automated first pass of code review running inside the CI/CD pipeline they already use.

What it is

AI Review is a command-line code review tool distributed through PyPI, written in Python, and licensed under Apache-2.0. It lives in the Python packaging ecosystem and sits in the version-control and collaboration category of developer tooling. The tool connects to a version control system and one large language model provider, reviews a diff, and writes the result back into the merge request or pull request as native comments, so the output appears where reviewers already read.

The concrete problem it solves is the manual first pass over a changeset. Rather than a human reviewer opening every diff and writing line-level notes, AI Review generates line-by-line inline comments, a broader context review spanning multiple files, and a summary review, and it can also take part in review threads that already exist by posting follow-up replies. Teams use it to enforce consistency and cut the time spent on mechanical review feedback before a human reviewer looks at the change.

Key capabilities

  • Multiple LLM providers are supported and can be switched at any time: OpenAI, Claude, Gemini, Ollama, Bedrock, OpenRouter, and Azure OpenAI.
  • Version control integration works out of the box with GitLab, GitHub, Bitbucket Cloud, Bitbucket Server, Azure DevOps, and Gitea.
  • Customizable prompts adapt inline, context, and summary reviews to a team's own coding guidelines.
  • Agent mode runs an iterative ReAct-style loop in which the model explores the repository with shell commands such as ls, cat, rg, and git before producing a final review, giving it deeper context than a single-shot call.
  • Reply modes let the AI participate in existing review threads, adding follow-up replies in both inline and summary discussions.
  • Configuration is accepted as YAML, JSON, or ENV, with overrides applied inside CI/CD pipelines.
  • AI Review runs fully client-side and never proxies or inspects requests.

Who uses it and how

  • Teams already running GitHub Actions or GitLab CI/CD pipelines add the tool as a workflow step so every merge request receives comments automatically.
  • Organizations on self-hosted version control, such as Bitbucket Server or Gitea, use the same integrations without exposing repositories to a hosted review service.
  • Teams with data residency or model policy constraints point the tool at Ollama, Bedrock, or Azure OpenAI instead of a public API endpoint.
  • Teams maintaining written coding standards encode them as custom prompts so review output matches internal conventions.
  • Repositories large enough that a diff alone lacks context enable agent mode, allowing the model to read files and search the tree before commenting.

Getting started

Install the Python package xai-review from PyPI, then add it as a step in a GitHub Actions workflow or a GitLab CI/CD pipeline. Configuration is supplied through YAML, JSON, or ENV, with CI/CD overrides.

How it compares

The facts provided do not name any comparable or competing code review tools, and no list of paid products it replaces is given. It stands alone in this registry.

When to use it โ€” and when not to

An adopter must operate the CI/CD pipeline that runs the tool and supply credentials for the chosen version control system and LLM provider; choosing Ollama also means hosting and serving the model. Teams that cannot send source code to a third-party LLM API, or that lack a pipeline in which to run review jobs, should not pick it. The project shows a single maintainer, is funded through donations on Boosty, and ships no hosted option in the material provided, so adopters carry the operational and upgrade burden themselves.

project readme (upstream, from github) โ€” read inline

AI Review

AI-powered code review tool.

CI codecov PyPI version License GitHub stars Support

Made with โค๏ธ by @NikitaFilonov


โค๏ธ Support AI Review

If AI Review helps you reduce noise in pull requests and saves time in code reviews, consider supporting its development.

Your support helps to:

  • improve review accuracy and reduce false positives
  • expand integrations (GitHub, GitLab, Azure DevOps, etc.)
  • develop new features and maintain the project

๐Ÿ‘‰ https://boosty.to/ai_review


๐Ÿ“‘ Table of Contents


โœจ About

AI Review is a developer tool that brings AI-powered code review directly into your workflow. It helps teams improve code quality, enforce consistency, and speed up the review process.

โœจ Key features:

  • Multiple LLM providers โ€” choose between OpenAI, Claude, Gemini, Ollama, Bedrock, OpenRouter, or Azure OpenAI and switch anytime.
  • VCS integration โ€” works out of the box with GitLab, GitHub, Bitbucket Cloud, Bitbucket Server, Azure DevOps, and Gitea.
  • Customizable prompts โ€” adapt inline, context, and summary reviews to match your teamโ€™s coding guidelines.
  • Agent mode โ€” iterative ReAct-style loop where the model can explore the repository with shell commands (ls, cat, rg, git) before producing a final review, giving it deeper context than a single-shot call.
  • Reply modes โ€” AI can now participate in existing review threads, adding follow-up replies in both inline and summary discussions.
  • Flexible configuration โ€” supports YAML, JSON, and ENV, with seamless overrides in CI/CD pipelines.
  • AI Review runs fully client-side โ€” it never proxies or inspects your requests.

AI Review runs automatically in your CI/CD pipeline and posts both inline comments, summary reviews, and now AI-generated replies directly inside your merge requests. With agent mode enabled, the model can autonomously explore the codebase before reviewing, resulting in more accurate and context-aware feedback. This makes reviews faster, more conversational, and still fully under human control.


๐Ÿงช Live Preview

Curious how AI Review works in practice? Here are three real Pull Requests reviewed entirely by the tool โ€” one per mode:

Mode Description ๐Ÿ™ GitHub ๐ŸฆŠ GitLab ๐Ÿชฃ Bitbucket
๐Ÿงฉ Inline Adds line-by-line comments directly in the diff. Focuses on specific code changes. View on GitHub View on GitLab View on Bitbucket
๐Ÿง  Context Performs a broader analysis across multiple files, detecting cross-file issues and inconsistencies. View on GitHub View on GitLab View on Bitbucket
๐Ÿ“„ Summary Posts a concise high-level summary with key highlights, strengths, and major issues. View on GitHub View on GitLab View on Bitbucket
๐Ÿ’ฌ Inline Reply Generates a context-aware reply to an existing inline comment thread. Can clarify decisions, propose fixes, or provide code suggestions. View on GitHub View on GitLab View on Bitbucket
๐Ÿ’ฌ Summary Reply Continues the summary-level review discussion, responding to reviewer comments with clarifications, rationale, or actionable next steps. View on GitHub View on GitLab View on Bitbucket

๐Ÿ‘‰ Each review was generated automatically via GitHub Actions using the corresponding mode:

ai-review run-inline
ai-review run-summary
ai-review run-context
ai-review run-inline-reply
ai-review run-summary-reply

๐Ÿš€ Quick Start

Install via pip:

pip install xai-review

๐Ÿ“ฆ Available on PyPI


Or run directly via Docker:

docker run --rm -v $(pwd):/app nikitafilonov/ai-review:latest ai-review run-summary

๐Ÿณ Pull from DockerHub

๐Ÿ‘‰ Before running, create a basic configuration file .ai-review.yaml in the root of your project:

llm:
  provider: OPENAI

  meta:
    model: gpt-4o-mini
    max_tokens: 1200
    temperature: 0.3

  http_client:
    timeout: 120
    api_url: https://api.openai.com/v1
    api_token: ${OPENAI_API_KEY}

vcs:
  provider: GITLAB

  pipeline:
    project_id: "1"
    merge_request_id: "100"

  http_client:
    timeout: 120
    api_url: https://gitlab.com
    api_token: ${GITLAB_API_TOKEN}

๐Ÿ‘‰ This will:

  • Run AI Review against your codebase.
  • Generate inline and/or summary comments (depending on the selected mode).
  • Use your chosen LLM provider (OpenAI GPT-4o-mini in this example).

Note: Running ai-review run executes the full review (inline + summary). To run only one mode, use the dedicated subcommands:

  • ai-review run-inline
  • ai-review run-context
  • ai-review run-summary
  • ai-review run-inline-reply
  • ai-review run-summary-reply

AI Review can be configured via .ai-review.yaml, .ai-review.json, or .env. See ./docs/configs for complete, ready-to-use examples.

Key things you can customize:

  • LLM provider โ€” OpenAI, Gemini, Claude, Ollama, Bedrock, OpenRouter, or Azure OpenAI
  • Model settings โ€” model name, temperature, max tokens
  • VCS integration โ€” works out of the box with GitLab, GitHub, Bitbucket Cloud, Bitbucket Server, Azure DevOps, and Gitea
  • Agent mode โ€” enable iterative repository exploration before review
  • Review policy โ€” which files to include/exclude, review modes
  • Prompts โ€” inline/context/summary/agent prompt templates

๐Ÿ‘‰ Minimal configuration is enough to get started. Use the full reference configs if you want fine-grained control ( timeouts, artifacts, logging, etc.).


โš™๏ธ CI/CD Integration

AI Review works out-of-the-box with major CI providers. Use these snippets to run AI Review automatically on Pull/Merge Requests.
Each integration uses environment variables for LLM and VCS configuration.

For full configuration details (timeouts, artifacts, logging, prompt overrides), see ./docs/configs.

๐Ÿš€ GitHub Actions

Add a workflow like this (manual trigger from Actions tab):

name: AI Review

on:
  workflow_dispatch:
    inputs:
      review-command:
        type: choice
        default: run
        options:
          - run
          - run-inline
          - run-context
          - run-summary
          - run-inline-reply
          - run-summary-reply
          - clear-inline
          - clear-summary
      pull-request-number:
        type: string
        required: true
jobs:
  ai-review:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0

      - uses: Nikita-Filonov/ai-review@v0.77.0
        with:
          review-command: ${{ inputs.review-command }}
        env:
          # --- LLM configuration ---
          LLM__PROVIDER: "OPENAI"
          LLM__META__MODEL: "gpt-4o-mini"
          LLM__META__MAX_TOKENS: "15000"
          LLM__META__TEMPERATURE: "0.3"
          LLM__HTTP_CLIENT__API_URL: "https://api.openai.com/v1"
          LLM__HTTP_CLIENT__API_TOKEN: ${{ secrets.OPENAI_API_KEY }}

          # --- GitHub integration ---
          VCS__PROVIDER: "GITHUB"
          VCS__PIPELINE__OWNER: ${{ github.repository_owner }}
          VCS__PIPELINE__REPO: ${{ github.event.repository.name }}
          VCS__PIPELINE__PULL_NUMBER: ${{ inputs.pull-request-number }}
          VCS__HTTP_CLIENT__API_URL: "https://api.github.com"
          VCS__HTTP_CLIENT__API_TOKEN: ${{ secrets.GITHUB_TOKEN }}

๐Ÿ”— Full example: ./docs/ci/github.yaml

๐Ÿš€ GitLab CI/CD

For GitLab users:

ai-review:
  stage: review
  image: nikitafilonov/ai-review:latest
  rules:
    - if: '$CI_MERGE_REQUEST_IID'
      when: manual
  script:
    - ai-review run
  variables:
    # --- Mandatory ---
    GIT_DEPTH: "0"

    # --- LLM configuration ---
    LLM__PROVIDER: "OPENAI"
    LLM__META__MODEL: "gpt-4o-mini"
    LLM__META__MAX_TOKENS: "15000"
    LLM__META__TEMPERATURE: "0.3"
    LLM__HTTP_CLIENT__API_URL: "https://api.openai.com/v1"
    LLM__HTTP_CLIENT__API_TOKEN: "$OPENAI_API_KEY"

    # --- GitLab integration ---
    VCS__PROVIDER: "GITLAB"
    VCS__PIPELINE__PROJECT_ID: "$CI_PROJECT_ID"
    VCS__PIPELINE__MERGE_REQUEST_ID: "$CI_MERGE_REQUEST_IID"
    VCS__HTTP_CLIENT__API_URL: "$CI_SERVER_URL"
    VCS__HTTP_CLIENT__API_TOKEN: "$CI_JOB_TOKEN"
  allow_failure: true  # Optional: don't block pipeline if AI review fails

๐Ÿ”— Full example: ./docs/ci/gitlab.yaml


๐Ÿ“˜ Documentation

See these folders for reference templates and full configuration options:

  • ./docs/ci โ€” CI/CD integration templates (GitHub Actions, GitLab CI, Bitbucket Pipelines, Jenkins)
  • ./docs/cli โ€” CLI command reference and usage examples
  • ./docs/hooks โ€” hook reference and lifecycle events
  • ./docs/configs โ€” full configuration examples (.yaml, .json, .env)
  • ./docs/prompts โ€” prompt templates for Python/Go (light & strict modes)
  • ./docs/troubleshooting.md โ€” common environment and Git-related issues

โš ๏ธ Privacy & Responsibility Notice

AI Review does not store, log, or transmit your source code to any external service other than the LLM provider explicitly configured in your .ai-review.yaml.

All data is sent directly from your CI/CD environment to the selected LLM API endpoint (e.g. OpenAI, Gemini, Claude, OpenRouter). No intermediary servers or storage layers are involved.

If you use Ollama, requests are sent to your local or self-hosted Ollama runtime
(by default http://localhost:11434). This allows you to run reviews completely offline, keeping all data strictly inside your infrastructure.

โš ๏ธ Please ensure you use proper API tokens and avoid exposing corporate or personal secrets. If you accidentally leak private code or credentials due to incorrect configuration (e.g., using a personal key instead of an enterprise one), it is your responsibility โ€” the tool does not retain or share any data by itself.


๐Ÿง  AI Review โ€” open-source AI-powered code reviewer

Frequently asked questions

Is ai-review free to use?

ai-review is open source under the Apache-2.0 licence. There is no licence fee and no seat count โ€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does ai-review do?

๐Ÿš€ AI-powered code review tool for GitHub, GitLab, Bitbucket Cloud, Bitbucket Server, Azure DevOps and Gitea โ€” built with LLMs like OpenAI, Claude, Gemini, Olla

What is ai-review written in?

ai-review is primarily written in Python. Its source is publicly available at https://github.com/Nikita-Filonov/ai-review, and it has 600 GitHub stars.