OpenCodeReview
An AI-powered code review CLI that combines deterministic pipelines with LLM agents, battle-tested at Alibaba scale, delivering precise line-level comments.
- Source repo
- alibaba/open-code-review
- Stars
- ★ 58k
- Last updated
- 1d ago v1.14.7
- FARS reviewed
- Nov 08, 2026 +15 new
- License
- Apache-2.0
- Primary language
- Go
- FA score
- 60/100 · Some gaps
At a glance
- How it runs
- 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
- Typical use
- A developer reviewing a feature branch before merging:
ocr review --from main --to feature-branchprovides 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.
- A developer reviewing a feature branch before merging:
ocr review --from main --to feature-branchprovides line-level comments on all changed files. - A CI pipeline automatically runs
ocr reviewon each pull request to catch defects early, integrating with GitHub Actions or GitLab CI. - A security auditor uses
ocr scan --path internal/agentto review entire unfamiliar codebases for vulnerabilities like SQL injection or XSS. - A team using Claude Code or Codex wants code review without managing a separate LLM API key, using
ocr delegateso the coding agent performs the review. - A developer working on a massive changeset relies on OCR's file bundling and concurrent sub-agents to maintain full coverage and stable performance.
- 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?
- Configure an LLM: run
ocr config providerto select a provider (OpenAI/Anthropic compatible) or add custom, thenocr config modelto choose a model. The interactive UI guides through API key entry and connectivity test. 2. Review code: navigate to project and runocr reviewto review all changes, or specify a branch rangeocr review --from main --to feature-branch, or a commit--commit abc123. 3. Full-file scan:ocr scan --path internalscans a directory. 4. Delegation mode:ocr delegate previewto preview, no LLM needed. To resume an interrupted review, useocr session listand--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)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What are this agent's strengths and limitations?
- 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.
- 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?
Why each dimension lost points
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.
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.
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.
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.
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.
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.
- 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.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
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.7View on GitHub ↗ -
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.6View on GitHub ↗ -
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?
How does OCR save tokens compared to general agents?
Can I customize the review rules?
Is OpenCodeReview suitable for large codebases?
What is delegation mode and when should I use it?
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.Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.