Alibaba Open Code Review: Hybrid AI Code Review CLI Guide
Open Code Review is Alibaba's open-source AI code review CLI, combining a deterministic pipeline with an LLM agent after two years of internal use. This guide covers installation, configuration, CI integration, and how it compares to CodeRabbit and other tools.
Open Code Review is an AI-powered code review CLI that Alibaba open-sourced in May 2026 after running it internally for two years. Its defining feature is a hybrid design that pairs a deterministic pipeline (file selection, bundling, rule matching) with an LLM agent: it reads a Git diff and returns precise, line-level review comments.
It is built and maintained by Alibaba Group, licensed under Apache-2.0, and written in Go. It ships as the ocr command via npm and is configured against any OpenAI- or Anthropic-compatible LLM endpoint. As of this writing (September 22, 2026), the repository has roughly 39,400 GitHub stars and about 2,800 forks, and on September 15, 2026 it reached #1 across all languages on GitHub Trending (per Trendshift). Trade press InfoQ covered the release on September 20.
Key facts
| Item | Detail |
|---|---|
| Maintainer | Alibaba Group |
| Repository created | May 18, 2026 (per GitHub) |
| License | Apache-2.0 |
| Language | Go |
| Distribution | npm package (@alibaba-group/open-code-review); an install script, GitHub Release binaries, and building from source are also supported |
| GitHub stars | ~39,400 (as of this writing) |
| Supported OS | Windows / macOS / Linux |
| Supported LLMs | OpenAI-compatible API, Anthropic-compatible API |
| Integrations | GitHub Actions, GitLab CI, GitFlic CI, Gerrit, VS Code, MCP |
| Coding-agent integrations | Claude Code, Codex, Cursor, Kimi Code |
| Official site | open-codereview.ai |
What it does
The core idea behind Open Code Review is "deterministic engineering x agent," working as a hybrid. The official README names three failure modes it is built to avoid when a general-purpose Skills-based agent like Claude Code is used for review: (1) incomplete coverage, where agents "cut corners" on large diffs and skip files; (2) position drift, where a reported issue's line number or file reference doesn't match the actual code; and (3) unstable quality, where review results fluctuate with small prompt changes. The README attributes the root cause to a purely language-driven architecture having no hard constraints on the review process, so Open Code Review fixes the steps that must never go wrong — file selection, bundling, rule matching, and positioning — with engineering logic, and hands only the dynamic judgment calls, i.e. code analysis, to the LLM agent.

| Feature | What it does |
|---|---|
ocr review | Reviews staged, unstaged, and untracked changes in the workspace together |
ocr review --from --to | Reviews a branch's changes since it diverged from another branch (merge-base mode) |
ocr review --commit | Reviews a single commit |
ocr scan | Audits whole files without needing Git history — useful for unfamiliar codebases |
ocr session list / --resume | Resumes an interrupted review by session |
ocr delegate | Delegation Mode: your own AI coding agent performs the review; OCR only handles file selection and rule resolution, so no LLM key is needed on the OCR side |
| Session Viewer | Browse review results in the browser and mark findings as fixed or ignored |
| Telemetry | OpenTelemetry integration for observability |
Built-in ruleset
The official README and the GitHub repository description both state that Open Code Review ships a built-in multi-language ruleset covering null-pointer exceptions (NPE), thread safety, XSS, and SQL injection. As of this writing, the full itemized list of rules and per-language coverage lives on the official site's "Review Rules" page rather than in the repository's docs directory, and rules can be scoped with path filtering. Because that list depends on the maintainers' site updates, check the latest documentation before adopting it.
- Rules are narrowed by file type and path (template-engine-based matching for stable behavior)
- Cross-language defect patterns such as NPE and thread-safety issues
- Web application security defects such as XSS and SQL injection
- Rule matching is handled by deterministic logic, not left entirely to the model
Installation
Git 2.41 or later is a prerequisite, since Open Code Review relies on Git for diff generation, code search, and repository operations. The officially documented path is installing via npm.
```bash
# Install globally via npm
npm install -g @alibaba-group/open-code-review
# The ocr command is available after install
ocr --version
```An install script, GitHub Release binaries, and building from source are also supported; the official site's "Installation" page has the exact steps for each.
Configuration
In the default mode, where OCR itself calls the LLM, you must configure a provider before reviewing. An interactive setup walks you through provider selection, API key entry, model selection, and a connectivity test.
```bash
# Select a built-in provider or add a custom one
ocr config provider
# Pick a model for the selected provider
ocr config model
```Any OpenAI-compatible or Anthropic-compatible endpoint can be registered as a custom provider. Environment variables and other advanced configuration are documented on the official site's "Configuration" page.
How to use it
The shortest path is simply running ocr review at the project root, which covers staged, unstaged, and untracked changes together.
```bash
cd your-project
# Review all workspace changes
ocr review
# Review a branch's changes since it diverged from main
ocr review --from main --to feature-branch
# Review a single commit
ocr review --commit abc123
# Resume an interrupted review
ocr session list
ocr review --from main --to feature-branch --resume <session-id>
# Full-file scan, no git history required
ocr scan
ocr scan --path internal/agent
# Save results to JSON (for AI host-agent integration)
ocr review --format json --output result.json
```If you already use a coding agent such as Claude Code, Codex, or Cursor, Delegation Mode is worth trying: OCR itself never calls an LLM, only handling file selection and rule resolution, while the actual review runs on the LLM behind your own agent. No OCR-side API key is required.
```bash
# Preview what Delegation Mode would review
ocr delegate preview
# Check which rules apply to specific files
ocr delegate rule src/main.go src/handler.go
```CI/CD integration
The official docs describe integration with GitHub Actions, GitLab CI, GitFlic CI, and Gerrit (concrete YAML examples live on the official site's "CI/CD Integration" page; as of this writing they are not included in the README itself). The intended workflow runs a review automatically on pull requests and posts the results as comments. Before wiring it into a pipeline, it is safer to run ocr review locally first to see how much noise and rule coverage you get.
How it compares to existing tools
AI code review already has established options such as CodeRabbit, GitHub Copilot's code review feature, and Greptile, alongside traditional static analyzers like SonarQube. Understanding how Open Code Review differs from each helps place it correctly.

| Tool | Approach | Strengths | Weaknesses / caveats |
|---|---|---|---|
| Open Code Review | Deterministic pipeline + LLM agent (OSS, self-hostable) | Prioritizes precision (fewer false positives) and token efficiency; bring your own LLM | Recall is deliberately modest; independent tests have reported results below the official benchmark |
| CodeRabbit | AI agent (SaaS) | Deep GitHub/GitLab integration, easy to adopt, rich summaries and chat | Built around a cloud SaaS model; less freedom to bring your own LLM or self-host than OCR |
| GitHub Copilot code review | AI agent (native GitHub feature) | Seamless inside GitHub, no extra tooling needed | Limited to the GitHub ecosystem, with limited customization of review criteria |
| Greptile | AI agent specialized in whole-codebase understanding (SaaS) | Strong at repo-wide contextual findings | SaaS, not open source; pricing assumes a commercial plan |
| SonarQube-style static analysis | Rule-based static analysis (non-LLM) | High precision on known patterns; fast and stable | Misses novel or context-dependent defects; rules need ongoing maintenance |
Caveats and who it fits
On the official benchmark (AACR-Bench: 50 repositories, 200 PRs, 10 languages, 1,505 ground-truth annotations cross-validated by 80+ senior engineers), Open Code Review reportedly achieved higher precision and F1 than Claude Code on the same underlying model while using roughly one-ninth the tokens — but the project itself states that recall is lower than a general-purpose agent, a deliberate trade-off. Shopify senior developer Tom Rochette, reviewing the project for InfoQ, called the architecture a response to real agent failure modes, but also noted that one independent benchmark (the Martian Benchmark, 10 PRs) found precision around 12% — which the maintainer attributes to a tool-call anomaly that has since been fixed, though no independent re-validation has been confirmed as of this writing. HCLTech's Daniel Vaughan likewise points out that even the best AACR-Bench configuration reaches only 20% recall, meaning roughly 80% of expert-identified issues go unfound. All of these figures come from vendor claims or third-party commentary and should be validated against your own codebase.
- Good fit: teams that want to cut false-positive noise and review overhead; teams watching LLM API spend; teams that want to self-host or bring their own LLM provider; teams already using Claude Code or another coding agent that want Delegation Mode at no extra LLM cost
- Not a good fit: teams that need recall as close to zero missed issues as possible; teams that want a fully supported SaaS with turnkey CI examples; teams that want to go to production immediately without engineering time to tune it
FAQ
Is Open Code Review free to use?
The tool itself is open source under Apache-2.0 and free to use. LLM API costs from providers like OpenAI or Anthropic are separate — unless you use Delegation Mode, in which case OCR itself doesn't need its own LLM budget.
What are the prerequisites for installing it?
Git 2.41 or later is required. It supports Windows, macOS, and Linux, and can be installed globally via npm, an install script, or prebuilt binaries.
How is it different from Claude Code's or GitHub Copilot's review features?
General-purpose agents aim for broad coverage, which makes them prone to missing files on large diffs or reporting issues at the wrong line. Open Code Review fixes file selection, rule matching, and positioning with deterministic logic, prioritizing precision and token efficiency instead.
Can it be wired into CI?
Integration with GitHub Actions, GitLab CI, GitFlic CI, and Gerrit is officially documented. Concrete YAML examples are on the official site's CI/CD Integration page.
How has it performed in independent evaluations?
As of this writing (September 22, 2026), independent evaluations have reported results below the official benchmark on both precision and recall. The maintainer attributes part of this to an anomaly it says has been fixed, but an independent re-validation has not been confirmed. Testing it against your own codebase before adoption is recommended.
Takeaways
Open Code Review pairs a deterministic pipeline with an LLM agent to directly address the coverage gaps, position drift, and quality swings that plague AI code review. Trading recall for precision and token efficiency sets it apart from CodeRabbit, GitHub Copilot's review feature, and static analyzers like SonarQube. That said, independent evaluations have varied, so it's safer to validate the official benchmark numbers against your own codebase before rolling it out in production. For another look at AI agent workflows, see our piece on Orca's parallel worktree-based agent environment. For the security side of IT operations more broadly, see vulnerability assessment and penetration testing cost guide. We also support companies on AI tool adoption and development processes through software development and AI consulting; reach out via contact.
Related free tools (no sign-up, instant results)
Feel free to contact us
Contact Us