open-code-review is a free, open source version control & collaboration project written in Go and released under Apache-2.0. It has 34,427 GitHub stars, 2,452 forks and 160 open issues, and was last pushed 11 hours ago. On this registry it ranks #3 of 30 tracked projects in Version Control & Collaboration, with 5 head-to-head comparisons available. It gained 6,256 stars over the last 3 tracked days.

What is open-code-review?

Open Code Review is an Apache-2.0, Go-based AI code review CLI that reads Git diffs, sends changed files to a configurable LLM through a tool-using agent, and returns line-level review comments, built for developers and platform teams that want large-scale review automated inside infrastructure they control.

What it is

Open Code Review is an AI-powered code review command-line tool written in Go and released under the Apache-2.0 licence. It sits in the developer tools and version control ecosystem, in the review step of the pull request workflow, and it replaces general-purpose coding agents used for review with a purpose-built hybrid pipeline. It originated as Alibaba Group's internal official AI code review assistant; over two years it served tens of thousands of developers and identified millions of code defects before being incubated into an open source project. Setup starts with a model endpoint, and it is compatible with OpenAI and Anthropic style endpoints.

The concrete problem it solves is quality drift in agent-driven review. General-purpose agents with skills show incomplete coverage on large changesets, selectively reviewing some files and missing others; position drift, where reported issues do not match the actual code location; and unstable quality, because natural-language-driven skills are hard to debug and fluctuate with minor prompt variations. The root cause named in the README is that a purely language-driven architecture lacks hard constraints on the review process. Open Code Review answers this with a hybrid split: deterministic engineering guarantees the steps that must not go wrong, such as file selection, file bundling, and rule matching, while the agent handles judgment. The measured result against Claude Code with the same underlying model is higher Precision and F1, about one ninth of the tokens, and faster completion, with lower Recall as a deliberate trade-off favouring precision over noise.

Key capabilities

  • Hybrid architecture combining deterministic engineering with an LLM agent, so file selection, smart file bundling, and fine-grained rule matching are enforced by logic rather than by prompt text.
  • Line-level precision in structured review comments, aimed at real defects instead of surface-level diff feedback.
  • Repository-level agent context: the agent reads full file contents, searches the codebase, and inspects other changed files to deepen a review.
  • ocr scan reviews entire files, covering auditing of unfamiliar codebases or directories that have no meaningful diff.
  • Smart file bundling groups related files into a single review unit, for example message_en.properties bundled with message_zh.properties, and each bundle runs as a sub-agent with isolated context, which keeps large changesets stable and supports concurrent review.
  • Built-in multi-language ruleset covering NPE, thread-safety, XSS, and SQL injection, matched to each file's characteristics through a template engine.
  • Benchmark available as the AACR-Bench dataset on Hugging Face: 50 popular open source repositories, 200 real pull requests, 10 programming languages, and 1,505 annotated ground-truth issues cross-validated by more than 80 senior engineers.

Who uses it and how

  • Organisations reviewing at Alibaba scale, where the tool has been validated on tens of thousands of developers and millions of identified defects.
  • CI pipelines, where the benchmark's Avg Time and Avg Token metrics map directly to pipeline latency and API cost, and the roughly one ninth token consumption against general-purpose agents reduces per-review spend.
  • Teams working on large changesets or monorepos, where bundling plus isolated sub-agents plus concurrent review counteracts agents that cut corners on file coverage.
  • Auditors and onboarding engineers who run ocr scan over entire files and unfamiliar directories that have no diff to review.
  • Teams already holding an OpenAI or Anthropic compatible endpoint, who point the CLI at their own model deployment rather than a separate review service.

Getting started

Configure a model endpoint, then run the ocr CLI; ocr scan extends it to whole-file review. The available facts do not document a package name, container image, compose file, or additional install step beyond configuring a compatible endpoint.

How it compares

Against general-purpose agents such as Claude Code running with skills, Open Code Review uses the same underlying model yet reports higher Precision and F1 while consuming roughly one ninth of the tokens and completing reviews faster. The honest contrast is Recall: general-purpose agents find a larger share of real defects, while Open Code Review accepts lower recall to reduce false alarms. Being Apache-2.0 and driven by a model endpoint the operator supplies, it also keeps code and review traffic inside that operator's own infrastructure.

When to use it — and when not to

A self-hoster must operate a model endpoint and absorb the token cost of every review, since the tool has no bundled model and the facts name no database, storage, or SMTP dependency to run. Teams that need maximum defect recall, or that cannot send code to an LLM at all, should not pick it, because lower recall is a designed property rather than a bug. The project carries 160 open issues and depends on an external endpoint, so it suits groups already comfortable running and tuning their own model access.

project readme (upstream, from github) — read inline

OpenCodeReview

alibaba%2Fopen-code-review | Trendshift alibaba%2Fopen-code-review | Trendshift

npm Build status License Ask DeepWiki OpenSSF Best Practices

Windows macOS Linux Claude Code Codex Cursor

English | 简体中文 | 日本語 | 한국어 | Русский


What is Open Code Review?

Open Code Review is an AI-powered code review CLI tool. It originated as Alibaba Group's internal official AI code review assistant — over the past two years, it has served tens of thousands of developers and identified millions of code defects. After thorough validation at massive scale, we incubated it into an open source project for the community. Simply configure a model endpoint to get started.

It reads Git diffs, sends changed files to a configurable LLM via an agent with tool-use capabilities, and generates structured review comments with line-level precision. The agent can read full file contents, search the codebase, inspect other changed files for context, and produce deep reviews — not just surface-level diff feedback. Beyond diff review, ocr scan reviews entire files for auditing unfamiliar codebases or directories that have no meaningful diff.

Visit the official website for more details.

Highlights

Benchmark

Compared to general-purpose agents (Claude Code), Open Code Review achieves significantly higher Precision and F1 with the same underlying model, while consuming only ~1/9 of the tokens and completing reviews faster. Note that its Recall is lower than general-purpose agents — a deliberate trade-off favoring precision over noise.

A real-world code review benchmark built from 50 popular open-source repositories, 200 real Pull Requests, and 10 programming languages — cross-validated by 80+ senior engineers (1,505 annotated ground-truth issues).

Hugging Face Explore the AACR-Bench dataset on Hugging Face.

Metric What it measures Why it matters
F1 Harmonic mean of precision and recall Best single number for overall review quality
Precision Proportion of reported issues that are real defects Higher = fewer false alarms to triage
Recall Proportion of real defects that are found Higher = fewer issues slip through review
Avg Time Wall-clock time per review Matters for CI pipeline latency
Avg Token Total tokens consumed per review Directly impacts API cost

Benchmark

Why Open Code Review?

The Problem with General-Purpose Agents

If you've used general-purpose agents like Claude Code with Skills for code review, you've likely encountered these pain points:

  • Incomplete coverage — On larger changesets, agents tend to "cut corners," selectively reviewing only some files and missing others.
  • Position drift — Reported issues frequently don't match the actual code location, with line numbers or file references drifting off target.
  • Unstable quality — Natural-language-driven Skills are hard to debug, and review quality fluctuates significantly with minor prompt variations.

The root cause: a purely language-driven architecture lacks hard constraints on the review process.

Core Design: Deterministic Engineering × Agent Hybrid

Open Code Review's core philosophy is to combine deterministic engineering with an agent, each handling what it does best.

Deterministic Engineering — Hard Constraints

For review steps that must not go wrong, engineering logic — not the language model — guarantees correctness:

  • Precise file selection — Determines exactly which files need review and which should be filtered, ensuring no important change is missed.
  • Smart file bundling — Groups related files into a single review unit (e.g., message_en.properties and message_zh.properties are bundled together). Each bundle runs as a sub-agent with isolated context — a divide-and-conquer strategy that stays stable on very large changesets and naturally supports concurrent review.
  • Fine-grained rule matching — Matches review rules to each file's characteristics, keeping the model's attention sharply focused and eliminating information noise at the source. Compared to purely language-driven rule guidance, template-engine-based rule matching is more stable and predictable.
  • External positioning and reflection modules — Independent comment-positioning and comment-reflection modules systematically improve both the location accuracy and content accuracy of AI feedback.

Agent — Dynamic Decision-Making

The agent's strengths are concentrated where they matter most — dynamic decisions and dynamic context retrieval:

  • Scenario-tuned prompts — Prompt templates deeply optimized for code review, improving effectiveness while reducing token consumption.
  • Scenario-tuned toolset — Distilled from deep analysis of tool-call traces in large-scale production data — including call frequency distributions, per-tool repetition rates, and the impact of new tools on the overall call chain — resulting in a purpose-built toolset that is more stable and predictable for code review than a generic agent toolkit.

How to Use

Prerequisites

  • Git >= 2.41 — Open Code Review relies on Git for diff generation, code search, and repository operations.

CLI

Install
npm install -g @alibaba-group/open-code-review

After installation, the ocr command is available globally.

For other installation methods (install script, GitHub Release binary, from source), see Installation.

Quick Start

1. Configure LLM

You must configure an LLM before reviewing code, unless you use Delegation Mode.

ocr config provider          # Select a built-in provider or add a custom one
ocr config model             # Pick a model for the active provider

Provider setup

The interactive UI guides you through provider selection, API key entry, and model configuration, then automatically tests connectivity.

For CLI setup, environment variables, custom providers, and other advanced configuration, see Configuration.

**2. Revi

readme truncated — read the full docs on github

Frequently asked questions

Is open-code-review free to use?

open-code-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 open-code-review do?

Fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built

What is open-code-review written in?

open-code-review is primarily written in Go. Its source is publicly available at https://github.com/alibaba/open-code-review, and it has 34,427 GitHub stars.