What it is
Open Code Review is an open-source AI code review CLI from Alibaba, hosted at github.com/alibaba/open-code-review with a project site at open-codereview.ai. It is written in Go and released under Apache-2.0, with roughly 47,000 stars as of October 2026. According to the README, it grew out of Alibaba Group’s internal AI code review assistant, which served tens of thousands of developers and surfaced millions of defects over two years before being incubated as an open-source project. It reads a git diff, hands changed files to an agent with tool-use, and produces structured review comments at line-level precision. Beyond diffs, ocr scan reviews whole files, which is useful for auditing unfamiliar repositories or directories with no meaningful diff. The core design claim is a hybrid of deterministic engineering and an agent. Steps that must not go wrong are handled by code rather than by the model: exact selection of which files to review and which to filter, bundling of related files into one review unit so that message_en.properties and message_zh.properties are reviewed together, running each bundle as a context-isolated sub-agent so large changesets stay stable and review naturally parallelises, template-engine rule matching instead of natural-language rule guidance, plus separate comment-positioning and comment-reflection modules that raise location and content accuracy. The agent is reserved for dynamic decisions and dynamic context retrieval, using prompt templates tuned for review and a purpose-built toolset distilled from tool-call traces in large-scale production data. The model side is vendor-neutral, compatible with OpenAI and Anthropic endpoints, and ships a multi-language ruleset covering null pointer dereference, thread safety, XSS and SQL injection.
Highlights
- Hybrid architecture: file selection, bundling, rule matching and comment positioning are enforced by engineering logic, with the model reserved for dynamic judgement
- Context-isolated sub-agents review file bundles in parallel, so very large changesets stay stable
- Built-in multi-language ruleset covering null pointer dereference, thread safety, XSS and SQL injection
- ocr scan reviews whole files, so you can audit an unfamiliar codebase with no diff available
- Ships AACR-Bench: 50 open-source repositories, 200 real pull requests, 10 languages and 1,505 issues annotated by 80-plus senior engineers
- Under the same model, Alibaba reports clearly higher precision and F1 than general-purpose agents, about one ninth of the tokens and faster reviews
- OpenAI and Anthropic compatible, with plugins for Claude Code, Codex, Cursor and Kimi Code
- Delegation mode lets your coding agent run the review on its own model while OCR handles file selection and rule resolution, with no extra API key required
- Apache-2.0, written in Go, runs on Windows, macOS and Linux, and holds OpenSSF Best Practices Gold
How to use
You need Git 2.41 or newer, since diff generation, code search and repository operations all depend on it. Install the CLI globally with npm by adding @alibaba-group/open-code-review, which puts the ocr command on your path; an install script, release binaries and building from source are also documented. Before the first review, run ocr config provider to pick a built-in provider or add a custom endpoint, then ocr config model to choose a model. The interactive UI walks you through provider selection, API key entry and model setup, then tests connectivity automatically; environment variables and non-interactive configuration are covered in the docs. To review, run ocr review inside the repository to cover staged, unstaged and untracked changes, or pass a branch range from main to a feature branch computed at the merge base, a single commit, or resume an interrupted session. Use ocr scan for whole-file review, optionally limited to a directory or specific files. For pipelines, emit structured output with —format json —output. If you already work in Claude Code, Codex, Cursor or Kimi Code, install the official plugin to get review slash commands or a skill. If you would rather not configure a model for OCR at all, use Delegation mode and let the host coding agent run the review on its own model while OCR handles file selection and rule resolution.
License
Released under Apache-2.0. Read the terms before commercial use or redistribution, especially if you plan to offer it as a service.