OpenCodeReview

An AI-powered code review CLI that combines deterministic pipelines with LLM agents, battle-tested at Alibaba scale, delivering precise line-level comments.

Stars
★ 58k
Last updated
1d ago v1.14.7
FARS reviewed
Nov 08, 2026 +15 new
License
Apache-2.0
Primary language
Go

At a glance

How it runs
CLIAgent plugin / skill
Works with
Universal · cross-platformCodex · Claude CodeChatGPT (Partial support)
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Node.jsGit >= 2.41Shell / CLINetwork accessLocal filesystem
Typical use
A developer reviewing a feature branch before merging: ocr review --from main --to feature-branch provides line-level comments on all changed files.
Not a fit if
  • Users unwilling to configure an API key or pay per-token model costs
  • Environments still on Git versions below 2.41
Website
open-codereview.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-12-02latest release v1.14.7 (2026-12-02)+224.4 ★/day over 7 days
Source review
60/100 · Some gaps

What does this agent do, and when should you use it?

OpenCodeReview (OCR) is an AI-powered code review CLI tool open-sourced by Alibaba Group, originally the internal official AI code review assistant that served tens of thousands of developers and identified millions of defects. It uses a hybrid architecture: deterministic engineering handles file selection, bundling, rule matching, and comment positioning for hard correctness; an LLM agent handles dynamic decisions, reading full files and searching the codebase for deep context. It reads Git diffs and produces structured comments with line-level precision, supporting multi-language rulesets for NPE, thread-safety, XSS, and SQL injection. The CLI offers commands like ocr review and ocr scan, with session resume and delegation mode. It integrates with coding agents like Claude Code, Codex, and Cursor via plugins, and supports CI/CD platforms. Licensed under Apache-2.0, with documentation in English, Simplified Chinese, Japanese, Korean, and Russian.

OpenCodeReview reads Git diffs to generate review comments. The deterministic layer selects which files to review, filters irrelevant ones, and bundles related files (e.g., grouping message_en.properties with message_zh.properties). It matches review rules to each file's characteristics using a template engine, and uses external positioning and reflection modules to improve comment accuracy. The LLM agent, configured via ocr config provider and ocr config model, reads full file content, searches the repository for context, and generates line-specific comments. Commands include: ocr review for workspace, branch ranges (--from main --to feature-branch), or single commits (--commit abc123); ocr scan for full-file scans of directories or files; ocr session list and --resume to continue interrupted reviews; and ocr delegate for delegation mode where a coding agent performs the review using its own LLM. Output is structured review comments, with options for CI/CD integration.

  1. A developer reviewing a feature branch before merging: ocr review --from main --to feature-branch provides line-level comments on all changed files.
  2. A CI pipeline automatically runs ocr review on each pull request to catch defects early, integrating with GitHub Actions or GitLab CI.
  3. A security auditor uses ocr scan --path internal/agent to review entire unfamiliar codebases for vulnerabilities like SQL injection or XSS.
  4. A team using Claude Code or Codex wants code review without managing a separate LLM API key, using ocr delegate so the coding agent performs the review.
  5. A developer working on a massive changeset relies on OCR's file bundling and concurrent sub-agents to maintain full coverage and stable performance.
  6. An organization wants to enforce custom review rules, configuring path-specific rules to focus the model's attention on critical files.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

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

How do you install or deploy this agent?

Install globally via npm: npm install -g @alibaba-group/open-code-review. The ocr command becomes available. Alternative methods include install script, GitHub Release binary, or from source, as documented in the official installation guide.

How do you use this agent?

  1. Configure an LLM: run ocr config provider to select a provider (OpenAI/Anthropic compatible) or add custom, then ocr config model to choose a model. The interactive UI guides through API key entry and connectivity test. 2. Review code: navigate to project and run ocr review to review all changes, or specify a branch range ocr review --from main --to feature-branch, or a commit --commit abc123. 3. Full-file scan: ocr scan --path internal scans a directory. 4. Delegation mode: ocr delegate preview to preview, no LLM needed. To resume an interrupted review, use ocr session list and --resume <session-id>.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • Deterministic + Agent hybrid ensures precise file selection and rule matching, improving review accuracy over pure language-driven agents.
  • Proven at Alibaba scale: served tens of thousands of developers and found millions of defects, indicating production readiness.
  • Higher precision and F1 than general-purpose agents (e.g., Claude Code) with the same underlying model, while consuming about 1/9 of the tokens and faster.
  • Built-in multi-language ruleset covers common issues like NPE, thread-safety, XSS, and SQL injection, reducing false positives.
  • Extensive integrations: plugins for Claude Code, Codex, Cursor, OpenCode, and CI/CD systems, plus MCP server support.
Limitations
  • Requires LLM configuration with API key for default mode, adding cost and setup complexity.
  • CLI-only interface may be less accessible for non-developers; requires Git >= 2.41.
  • Network dependency for API calls; latency and availability depend on the model provider.
  • Recall is lower than general-purpose agents by design, potentially missing some issues that need human review.
  • Advanced configuration (custom providers, environment variables) has a learning curve, as documented in the official configuration docs.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
OpenCodeReview This agent 60 · Some gaps CLIFree + model costs ★ 58k 1d ago Go Codex · Claude Code
Compound Engineering 75 · Good Agent plugin / skill ★ 26k 1d ago TypeScript Codex · Claude Code
MCO 75 · Some gaps CLIFree + model costs ★ 563 26d ago Python Codex · Claude Code
reviewr 70 · Some gaps Agent plugin / skillFree ★ 1k 18d ago Rust Codex · Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
60/ 100 5-point scale 3.0 / 5
This review covers the source as of Nov 08, 2026. The project has shipped 15 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 11/29
Reliability 8/14
Adaptability 14/18
Convention 12/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust11 / 29 · 1.9/5

The README says the tool reads Git diffs, sends changed files to a configurable LLM, and can read full files and search the codebase; delegation mode has the host agent perform the review, reducing OCR-side model use. The CLI skill says automatic fixes require an explicit user request, and the delegation skill specifies a reviewable file list and rule workflow. The supplied material does not describe permission isolation, retention/redaction, or pre-review confirmation, so most trust criteria receive only thin credit. Telemetry initialization is visible in code, but its data details are not. The plugin manifest and skill metadata identify the project as Alibaba, with versions and license; publisher identity remains unverified as specified.

Reliability8 / 14 · 2.9/5

The README, skills, and CLI interface broadly agree on workspace, branch, and commit review, scanning, and delegation; the delegation skill also requires accounting for every file and explaining skips. ACP code provides explicit errors for invalid configuration, client initialization, and shutdown timeout. Dependencies are version-pinned, and CI definitions include tests, static analysis, and vulnerability scanning, but the packet cannot establish dependency availability or actual execution results, so availability scores conservatively.

Adaptability14 / 18 · 3.9/5

The materials cover workspace, branch ranges, commits, full-file scans, delegation, CI/CD, and several host agents, with command examples for multiple modes. The CLI skill explains triggers, arguments, and failure handling, while the delegation skill defines OCR and host-agent responsibilities. Platform support and installation entry points are described, but a complete environment compatibility matrix is absent; security checks are chiefly product claims in the README, not demonstrated coverage boundaries.

Convention12 / 18 · 3.3/5

The README clearly organizes features, installation, quick start, documentation, integrations, FAQ, and contribution guidance. Root AGENTS.md is contributor guidance, not product instructions, so it is not scored as product behavior. The packet provides an npm install command and points to other methods, and includes the Apache-2.0 license text. Command, repository, and skill names are mostly stable, but version evidence is limited to plugin/skill 1.0.0 and package.json 0.0.0, with no changelog supplied. Contribution guidance and project attribution provide some maintenance context, but no explicit support or update commitment appears.

Effectiveness10 / 13 · 3.8/5

The product describes structured, line-level review comments; skills specify severity/category and require full accounting of files, while delegation defines comment fields for downstream use. Deterministic file selection, rule resolution, and context retrieval are clear sources of value. The README claims roughly one ninth the token use of a general-purpose agent and favors precision, but the packet points to an external dataset/figure without supplying verifiable result details, so cost and benefit scores remain cautious.

Verifiability5 / 8 · 3.1/5

The README gives workflows, benchmark metric definitions, and an AACR-Bench dataset reference; the skills and CLI descriptions partly corroborate file selection, rule resolution, and output structure. Performance, scale, and defect-detection claims remain largely project assertions in the supplied material, without visible benchmark values or code-level confirmation. The evidence does not consistently distinguish claims, directly visible facts, and inference, so scores are below full marks.

Risks and how to mitigate them
  • Reviews send changed code to the configured LLM and may read full files and repository context; check the provider's data terms and sensitive-code policy before use.
  • The supplied materials do not verify benchmark claims or actual security-rule coverage; do not treat generated findings as complete or deterministic security conclusions.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 0d403392073b New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/open-code-review.svg)](https://followagents.com/en/agents/open-code-review)
<a href="https://followagents.com/en/agents/open-code-review"><img src="https://followagents.com/badge/open-code-review.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.14.7
    Release notes excerpt
    🚀 Features - feat(analysis): honor Git lazy fetching in partial clones (#2158) - feat(raw): include analysis attempts in the review capture (#2155) - feat(plugins): add Google Antigravity integration (#2111) 🐛 Bug Fixes - fix(review): keep log.showSignature output out of the commit-message background (#2145) Full Changelog: https://github.com/alibaba/open-code-review/compare/v1.14.6...v1.14.7
    View on GitHub ↗
  2. v1.14.6
    Release notes excerpt
    🐛 Bug Fixes - fix(diff): report gitignored files as excluded instead of dropping them (#1805) - fix(viewer): show a live review as running instead of aborted (#1757) - fix(diff): honor negated gitignore directories (#1794) 📖 Documentation - docs(ci): standardize review-language configuration (#1293) Full Changelog: https://github.com/alibaba/open-code-review/compare/v1.14.5...v1.14.6
    View on GitHub ↗
  3. v1.14.5
    Release notes excerpt
    🚀 Features - feat: support OCR_HOME for persistent CLI storage (#2090) - feat(opencode): support delegated review execution (#1926) (#1929) - feat(pages): add Indonesian UI localization (#2112) 🐛 Bug Fixes - fix(cmd): allow rules check in non-git directories (#2054) - fix(pages): pages docs does not redirect (URL) to docs index with 404 sub-URLs (#1578) - fix(ci): show review coverage in PR and MR summaries (#2107) - fix(llm): send session affinity headers for ChatGPT plan cache routing (#1944) 📖 Documentation …
    View on GitHub ↗

FAQ

What are the prerequisites for using OpenCodeReview?
You need Node.js for npm install and Git >= 2.41. For default mode, you need an LLM API key (OpenAI or Anthropic compatible). Delegation mode removes the API key requirement.
How does OCR save tokens compared to general agents?
OCR uses deterministic file selection and bundling to reduce context, achieving about 1/9 of the token consumption of general-purpose agents like Claude Code for the same review, based on benchmark data.
Can I customize the review rules?
Yes, you can define custom rules with path filtering and targeting, as described in the Review Rules documentation. The template engine matches rules to file characteristics.
Is OpenCodeReview suitable for large codebases?
Yes, it is designed for scale, using file bundling and sub-agents to handle large changesets concurrently, ensuring stable coverage and performance, as demonstrated in Alibaba's internal use.
What is delegation mode and when should I use it?
Delegation mode (ocr delegate) lets your coding agent (e.g., Claude Code) perform the review using its own LLM, so you don't need to configure a separate LLM for OCR. It's useful when you already use a coding agent and want to reduce setup.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts