Rank #04 · Weekly · DevTools
Open Code Review: Alibaba's Hybrid LLM Code-Review CLI
Install the ocr CLI, point it at a model endpoint (or delegate to your coding agent), and review a workspace, branch range, commit, or directory with line-level comments.
What it does
Open Code Review (README: OpenCodeReview) is an AI-powered code-review CLI from Alibaba. GitHub description: "Secure, fast, efficient, battle-tested at Alibaba's scale. Hybrid architecture code review tool: deterministic pipelines + LLM Agent, precise line-level comments, built-in multi-language ruleset (NPE, thread-safety, XSS, SQL injection), OpenAI & Anthropic compatible." Site: open-codereview.ai.
README claims (as verified):
- The project began as Alibaba Group's internal AI code-review assistant. The README states it has served tens of thousands of developers and identified millions of code defects before being open-sourced — treat those figures as the author's claim, not an external audit.
- It reads Git diffs, sends changed files to a configurable LLM via an agent with tool-use, and generates structured, line-level review comments. The agent can read full file contents, search the codebase, and inspect other changed files for context.
ocr scanreviews entire files or directories when you do not have a meaningful diff (for example, auditing an unfamiliar tree). - Hybrid design. Deterministic engineering handles steps the README says must not go wrong: precise file selection and filtering, bundling related files into review units (each bundle as a sub-agent), template-engine rule matching per file, and separate comment-positioning and comment-reflection modules. The LLM agent is used for dynamic decisions and context retrieval, with review-specific prompts and a purpose-built toolset.
- CLI. npm package
@alibaba-group/open-code-review(npm install -g @alibaba-group/open-code-review) exposes the globalocrcommand. Other install paths (install script, GitHub Release binary, from source) are documented on the site. Prerequisite: Git >= 2.41. - Typical flow:
ocr config providerandocr config model(unless you use Delegation Mode), thenocr review(staged, unstaged, and untracked changes),ocr review --from main --to feature-branch,ocr review --commit <sha>, orocr scan/ocr scan --path …. Interrupted range, commit, or scan work can be resumed with--resume. Results can be written with--format json --output result.json. - Delegation Mode (
ocr delegate …, plus host-agent skills/commands): OCR handles file selection and rule resolution; the host coding agent runs the review with its own model and credentials — no separate OCR LLM configuration required for that path. Integrations listed in the README include Claude Code, Codex, Cursor, Kimi Code, OpenCode, QCA Forward, and a portable agent skill. CI/CD docs cover GitHub Actions, GitLab CI, and others. - The README also points to a published benchmark dataset, AACR-Bench (described as 50 popular repositories, 200 real pull requests, 10 languages, and 1,505 annotated issues). It claims higher precision and F1 than general-purpose agents on the same model, at about one-ninth the tokens, with lower recall as a deliberate trade-off. Those numbers and the comparison are the project's own results, not a TidyHow evaluation.
License: Apache-2.0 (LICENSE file — Copyright 2026 Alibaba / contributors — and GitHub SPDX agree).
Who it's for
- Engineering and platform teams that want a CLI or CI code-review step with line-level comments, not only a chat prompt to a general coding agent.
- Groups that already use Claude Code, Codex, Cursor, or similar and want either OCR-managed reviews or Delegation Mode on the host agent.
- People auditing a tree without a useful diff, via
ocr scan.
Less ideal if you want a fully offline, rule-only static analyzer with no model costs, cannot meet Git >= 2.41, or need a human annotation workspace rather than an automated reviewer (see Plannotator, #05).
Stars / language / license
54,388 stars · Go · Apache-2.0
Data verified: 2026-11-20 09:04 Asia/Shanghai (official Daily Top10 gate; language/license confirmed via GitHub API get_repository + README + LICENSE)
Trending note: +4,492/wk (weekly Trending window; selection captured 09:04 Asia/Shanghai)
Category tags
DevTools · code-review · CLI · Go · LLM · Git · CI · Alibaba
How it differs from similar projects
Compared with asking a general coding agent to "review this PR." Open Code Review's pitch is a constrained review pipeline: deterministic file selection and bundling, rule matching, and positioning/reflection modules around the LLM, plus a saved session you can resume or export. The README argues this reduces missed files and line-number drift; TidyHow has not verified that.
Compared with Semgrep, CodeQL, and similar rule- or query-based SAST. Those match patterns or queries you (or a vendor) maintain and typically need no LLM budget. Open Code Review is an LLM-assisted review CLI with a built-in ruleset (GitHub description mentions NPE, thread-safety, XSS, and SQL injection). It is not presented as a replacement for classic SAST.
Compared with Plannotator (#05). Plannotator is a human review and annotation workspace that sends your comments back to an agent. Open Code Review generates the comments. Different jobs in the same loop.
Caveats. Default reviews consume model/API budget unless you use Delegation Mode on a host agent you already pay for. Internal usage figures and AACR-Bench results are author-reported; no independent precision or recall figures are claimed here. Read comments as suggestions, not as a substitute for a human security or design review.