{"id":23916,"date":"2009-05-10T12:57:06","date_gmt":"2009-05-10T12:57:06","guid":{"rendered":"https:\/\/scannn.com\/alibaba-open-code-review-fast-efficient-battle-tested-at-alibabas-scale-hybrid-architecture-code-review-tool-deterministic-pipelines-llm-agent-precise-line-level-comments-built-in-multi-lang\/"},"modified":"2009-05-10T12:57:06","modified_gmt":"2009-05-10T12:57:06","slug":"alibaba-open-code-review-fast-efficient-battle-tested-at-alibabas-scale-hybrid-architecture-code-review-tool-deterministic-pipelines-llm-agent-precise-line-level-comments-built-in-multi-lang","status":"publish","type":"post","link":"https:\/\/scannn.com\/lv\/alibaba-open-code-review-fast-efficient-battle-tested-at-alibabas-scale-hybrid-architecture-code-review-tool-deterministic-pipelines-llm-agent-precise-line-level-comments-built-in-multi-lang\/","title":{"rendered":"alibaba\/open-code-review: 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. \u00b7 GitHub"},"content":{"rendered":"\n<div id=\"\">\n<div align=\"center\" dir=\"auto\">\n  <a href=\"https:\/\/open-codereview.ai\" rel=\"nofollow\"><br \/>\n    <br \/>\n  <\/a><\/p>\n<\/div>\n<p align=\"center\" dir=\"auto\">\n  <a href=\"https:\/\/trendshift.io\/repositories\/41087?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-41087\" rel=\"nofollow\"><br \/>\n    <img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/fdb1e5d4c8aa7bd0bc67dbb2f6cd8a52e07aa95f4139a50860e2123d57a84bdd\/68747470733a2f2f7472656e6473686966742e696f2f6170692f62616467652f7265706f7369746f726965732f3431303837\" alt=\"alibaba%2Fopen-code-review | Trendshift\" style=\"width: 280px; height: 60px; max-width: 100%;; aspect-ratio: 280 \/ 60; background-color: var(--bgColor-muted); border-radius: 6px\" width=\"280\" height=\"60\" data-canonical-src=\"https:\/\/trendshift.io\/api\/badge\/repositories\/41087\" class=\"js-gh-image-fallback\"\/><br \/>\n  <\/a><br \/>\n  <a href=\"https:\/\/trendshift.io\/repositories\/41087\" rel=\"nofollow\"><br \/>\n    <img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/61b2bcf3034477c03fba732e0f3f51d28e982c8368bb9d2c4fcee1d0026035a8\/68747470733a2f2f7472656e6473686966742e696f2f6170692f62616467652f7472656e6473686966742f7265706f7369746f726965732f34313038372f7765656b6c793f6c616e67756167653d476f\" alt=\"alibaba%2Fopen-code-review | Trendshift\" style=\"width: 280px; height: 60px; max-width: 100%;; aspect-ratio: 280 \/ 60; background-color: var(--bgColor-muted); border-radius: 6px\" width=\"280\" height=\"60\" data-canonical-src=\"https:\/\/trendshift.io\/api\/badge\/trendshift\/repositories\/41087\/weekly?language=Go\" class=\"js-gh-image-fallback\"\/><br \/>\n  <\/a>\n<\/p>\n<p align=\"center\" dir=\"auto\">\n  <a href=\"https:\/\/www.npmjs.com\/package\/@alibaba-group\/open-code-review\" rel=\"nofollow\"><img decoding=\"async\" alt=\"npm\" src=\"https:\/\/camo.githubusercontent.com\/e4b8794715fd95b551a5f9151bb4cafdc660ff143c3375aadbae3698a50ed82e\/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f40616c69626162612d67726f75702f6f70656e2d636f64652d7265766965773f7374796c653d666c61742d737175617265\" data-canonical-src=\"https:\/\/img.shields.io\/npm\/v\/@alibaba-group\/open-code-review?style=flat-square\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/actions\/workflows\/release.yml\"><img decoding=\"async\" alt=\"Build status\" src=\"https:\/\/camo.githubusercontent.com\/aaac266761424237a7f8ac6c51a51a453169fc8881d26a2ca027259d3bed5bea\/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f616c69626162612f6f70656e2d636f64652d7265766965772f72656c656173652e796d6c3f7374796c653d666c61742d737175617265\" data-canonical-src=\"https:\/\/img.shields.io\/github\/actions\/workflow\/status\/alibaba\/open-code-review\/release.yml?style=flat-square\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/LICENSE\"><img decoding=\"async\" alt=\"License\" src=\"https:\/\/camo.githubusercontent.com\/81a302e376f278236fe580b923ee7e69db270e5ed4b65b78c325efbb9158be05\/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f616c69626162612f6f70656e2d636f64652d7265766965773f7374796c653d666c61742d737175617265\" data-canonical-src=\"https:\/\/img.shields.io\/github\/license\/alibaba\/open-code-review?style=flat-square\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"https:\/\/deepwiki.com\/alibaba\/open-code-review\" rel=\"nofollow\"><img decoding=\"async\" alt=\"Ask DeepWiki\" src=\"https:\/\/camo.githubusercontent.com\/0f5ae213ac378635adeb5d7f13cef055ad2f7d9a47b36de7b1c67dbe09f609ca\/68747470733a2f2f6465657077696b692e636f6d2f62616467652e737667\" data-canonical-src=\"https:\/\/deepwiki.com\/badge.svg\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"https:\/\/www.bestpractices.dev\/projects\/13328\" rel=\"nofollow\"><img decoding=\"async\" alt=\"OpenSSF Best Practices\" src=\"https:\/\/camo.githubusercontent.com\/13a19646a1861f3b0137b568e030de84b712e7c040eabc44443f9380405453b7\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f70656e5353462d476f6c642d4434414633373f7374796c653d666c61742d737175617265\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/OpenSSF-Gold-D4AF37?style=flat-square\" style=\"max-width: 100%;\"\/><\/a>\n<\/p>\n<p align=\"center\" dir=\"auto\">\n  <a href=\"#supported-platforms\"><img decoding=\"async\" alt=\"Windows\" src=\"https:\/\/camo.githubusercontent.com\/7edf0f374beac0986c08e1057749ccb3e3e6eed55245a5bd5434b76558f8c59b\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f57696e646f77732d737570706f727465642d626c75652e737667\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Windows-supported-blue.svg\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"#supported-platforms\"><img decoding=\"async\" alt=\"macOS\" src=\"https:\/\/camo.githubusercontent.com\/4dcef7af08cde5cff53d43f82f22ceae144d61ade6b92719967026c8ce5d2f0f\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d737570706f727465642d626c75652e737667\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/macOS-supported-blue.svg\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"#supported-platforms\"><img decoding=\"async\" alt=\"Linux\" src=\"https:\/\/camo.githubusercontent.com\/00b63454a8354774ce865db6165a49bb16bd6ccd6818ddce9559919709186905\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e75782d737570706f727465642d626c75652e737667\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Linux-supported-blue.svg\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"#supported-agents\"><img decoding=\"async\" alt=\"Claude Code\" src=\"https:\/\/camo.githubusercontent.com\/c218c58e48b7f31182f3664134ce3747a222f0b408afa99f62edf37b0493860a\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436c617564655f436f64652d737570706f727465642d626c756576696f6c65742e737667\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Claude_Code-supported-blueviolet.svg\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"#supported-agents\"><img decoding=\"async\" alt=\"Codex\" src=\"https:\/\/camo.githubusercontent.com\/a123417ad9408d2174269d1d1d59398cb51b1453b077ac5cacb6e1999881932c\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f436f6465782d737570706f727465642d626c756576696f6c65742e737667\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Codex-supported-blueviolet.svg\" style=\"max-width: 100%;\"\/><\/a><br \/>\n  <a href=\"#supported-agents\"><img decoding=\"async\" alt=\"Cursor\" src=\"https:\/\/camo.githubusercontent.com\/d9a9e0ee7f0a111fc8404b9d2269c1debfca4cca297c86bd681ed70186f1f1b8\/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f437572736f722d737570706f727465642d626c756576696f6c65742e737667\" data-canonical-src=\"https:\/\/img.shields.io\/badge\/Cursor-supported-blueviolet.svg\" style=\"max-width: 100%;\"\/><\/a>\n<\/p>\n<p align=\"center\" dir=\"auto\">\n  English | <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/README.zh-CN.md\">\u7b80\u4f53\u4e2d\u6587<\/a> | <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/README.ja-JP.md\">\u65e5\u672c\u8a9e<\/a> | <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/README.ko-KR.md\">\ud55c\uad6d\uc5b4<\/a> | <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/README.ru-RU.md\">\u0420\u0443\u0441\u0441\u043a\u0438\u0439<\/a>\n<\/p>\n<hr\/>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h2 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">What is Open Code Review?<\/h2>\n<p><a id=\"user-content-what-is-open-code-review\" class=\"anchor\" aria-label=\"Permalink: What is Open Code Review?\" href=\"#what-is-open-code-review\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewbox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\/><\/svg><\/a><\/div>\n<p dir=\"auto\">Open Code Review is an AI-powered code review CLI tool. It originated as Alibaba Group&#8217;s internal official AI code review assistant \u2014 over the past two years, it has served tens of thousands of developers and identified millions of code defects. After thorough validation at massive scale, we incubated it into an open source project for the community. Simply configure a model endpoint to get started.<\/p>\n<p dir=\"auto\">It reads Git diffs, sends changed files to a configurable LLM via an agent with tool-use capabilities, and generates structured review comments with line-level precision. The agent can read full file contents, search the codebase, inspect other changed files for context, and produce deep reviews \u2014 not just surface-level diff feedback. Beyond diff review, <code>ocr scan<\/code> reviews entire files for auditing unfamiliar codebases or directories that have no meaningful diff.<\/p>\n<p dir=\"auto\">Visit the <a href=\"https:\/\/open-codereview.ai\" rel=\"nofollow\">official website<\/a> for more details.<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/imgs\/highlights-en.png\"><img decoding=\"async\" src=\"https:\/\/github.com\/alibaba\/open-code-review\/raw\/main\/imgs\/highlights-en.png\" alt=\"Highlights\" style=\"max-width: 100%;\"\/><\/a><\/p>\n<blockquote>\n<p dir=\"auto\">Compared to general-purpose agents (Claude Code), Open Code Review achieves significantly higher <strong>Precision<\/strong> and <strong>F1<\/strong> with the same underlying model, while consuming only <strong>~1\/9 of the tokens<\/strong> and completing reviews faster. Note that its Recall is lower than general-purpose agents \u2014 a deliberate trade-off favoring precision over noise.<\/p>\n<\/blockquote>\n<p dir=\"auto\">A real-world code review benchmark built from <strong>50<\/strong> popular open-source repositories, <strong>200<\/strong> real Pull Requests, and <strong>10<\/strong> programming languages \u2014 cross-validated by 80+ senior engineers (<strong>1,505<\/strong> annotated ground-truth issues).<\/p>\n<p dir=\"auto\"><a href=\"https:\/\/huggingface.co\/datasets\/Alibaba-Aone\/aacr-bench\" rel=\"nofollow\"><img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/2739ca217c05c26c3c5bffd598962115d69f05f6c0dc762c7d4fe35251d72ff3\/68747470733a2f2f68756767696e67666163652e636f2f66617669636f6e2e69636f\" alt=\"Hugging Face\" width=\"20\" height=\"20\" data-canonical-src=\"https:\/\/huggingface.co\/favicon.ico\" style=\"max-width: 100%; height: auto; max-height: 20px;; aspect-ratio: 20 \/ 20; background-color: var(--bgColor-muted); border-radius: 6px\" class=\"js-gh-image-fallback\"\/> Explore the AACR-Bench dataset on Hugging Face<\/a>.<\/p>\n<p><markdown-accessiblity-table><\/p>\n<table>\n<thead>\n<tr>\n<th>Metric<\/th>\n<th>What it measures<\/th>\n<th>Why it matters<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>F1<\/strong><\/td>\n<td>Harmonic mean of precision and recall<\/td>\n<td>Best single number for overall review quality<\/td>\n<\/tr>\n<tr>\n<td><strong>Precision<\/strong><\/td>\n<td>Proportion of reported issues that are real defects<\/td>\n<td>Higher = fewer false alarms to triage<\/td>\n<\/tr>\n<tr>\n<td><strong>Recall<\/strong><\/td>\n<td>Proportion of real defects that are found<\/td>\n<td>Higher = fewer issues slip through review<\/td>\n<\/tr>\n<tr>\n<td><strong>Avg Time<\/strong><\/td>\n<td>Wall-clock time per review<\/td>\n<td>Matters for CI pipeline latency<\/td>\n<\/tr>\n<tr>\n<td><strong>Avg Token<\/strong><\/td>\n<td>Total tokens consumed per review<\/td>\n<td>Directly impacts API cost<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><\/markdown-accessiblity-table><\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/imgs\/benchmark-en.png\"><img decoding=\"async\" src=\"https:\/\/github.com\/alibaba\/open-code-review\/raw\/main\/imgs\/benchmark-en.png\" alt=\"Benchmark\" style=\"max-width: 100%;\"\/><\/a><\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">The Problem with General-Purpose Agents<\/h3>\n<p><a id=\"user-content-the-problem-with-general-purpose-agents\" class=\"anchor\" aria-label=\"Permalink: The Problem with General-Purpose Agents\" href=\"#the-problem-with-general-purpose-agents\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewbox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\/><\/svg><\/a><\/div>\n<p dir=\"auto\">If you&#8217;ve used general-purpose agents like Claude Code with Skills for code review, you&#8217;ve likely encountered these pain points:<\/p>\n<ul dir=\"auto\">\n<li><strong>Incomplete coverage<\/strong> \u2014 On larger changesets, agents tend to &#8220;cut corners,&#8221; selectively reviewing only some files and missing others.<\/li>\n<li><strong>Position drift<\/strong> \u2014 Reported issues frequently don&#8217;t match the actual code location, with line numbers or file references drifting off target.<\/li>\n<li><strong>Unstable quality<\/strong> \u2014 Natural-language-driven Skills are hard to debug, and review quality fluctuates significantly with minor prompt variations.<\/li>\n<\/ul>\n<p dir=\"auto\">The root cause: a purely language-driven architecture lacks hard constraints on the review process.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\">\n<h3 tabindex=\"-1\" class=\"heading-element\" dir=\"auto\">Core Design: Deterministic Engineering \u00d7 Agent Hybrid<\/h3>\n<p><a id=\"user-content-core-design-deterministic-engineering--agent-hybrid\" class=\"anchor\" aria-label=\"Permalink: Core Design: Deterministic Engineering \u00d7 Agent Hybrid\" href=\"#core-design-deterministic-engineering--agent-hybrid\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewbox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"\/><\/svg><\/a><\/div>\n<p dir=\"auto\">Open Code Review&#8217;s core philosophy is to combine deterministic engineering with an agent, each handling what it does best.<\/p>\n<p dir=\"auto\"><strong>Deterministic Engineering \u2014 Hard Constraints<\/strong><\/p>\n<p dir=\"auto\">For review steps that <em>must not go wrong<\/em>, engineering logic \u2014 not the language model \u2014 guarantees correctness:<\/p>\n<ul dir=\"auto\">\n<li><strong>Precise file selection<\/strong> \u2014 Determines exactly which files need review and which should be filtered, ensuring no important change is missed.<\/li>\n<li><strong>Smart file bundling<\/strong> \u2014 Groups related files into a single review unit (e.g., <code>message_en.properties<\/code> and <code>message_zh.properties<\/code> are bundled together). Each bundle runs as a sub-agent with isolated context \u2014 a divide-and-conquer strategy that stays stable on very large changesets and naturally supports concurrent review.<\/li>\n<li><strong>Fine-grained rule matching<\/strong> \u2014 Matches review rules to each file&#8217;s characteristics, keeping the model&#8217;s attention sharply focused and eliminating information noise at the source. Compared to purely language-driven rule guidance, template-engine-based rule matching is more stable and predictable.<\/li>\n<li><strong>External positioning and reflection modules<\/strong> \u2014 Independent comment-positioning and comment-reflection modules systematically improve both the location accuracy and content accuracy of AI feedback.<\/li>\n<\/ul>\n<p dir=\"auto\"><strong>Agent \u2014 Dynamic Decision-Making<\/strong><\/p>\n<p dir=\"auto\">The agent&#8217;s strengths are concentrated where they matter most \u2014 dynamic decisions and dynamic context retrieval:<\/p>\n<ul dir=\"auto\">\n<li><strong>Scenario-tuned prompts<\/strong> \u2014 Prompt templates deeply optimized for code review, improving effectiveness while reducing token consumption.<\/li>\n<li><strong>Scenario-tuned toolset<\/strong> \u2014 Distilled from deep analysis of tool-call traces in large-scale production data \u2014 including call frequency distributions, per-tool repetition rates, and the impact of new tools on the overall call chain \u2014 resulting in a purpose-built toolset that is more stable and predictable for code review than a generic agent toolkit.<\/li>\n<\/ul>\n<ul dir=\"auto\">\n<li><strong>Git &gt;= 2.41<\/strong> \u2014 Open Code Review relies on Git for diff generation, code search, and repository operations.<\/li>\n<\/ul>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"npm install -g @alibaba-group\/open-code-review\">\n<pre>npm install -g @alibaba-group\/open-code-review<\/pre>\n<\/div>\n<p dir=\"auto\">After installation, the <code>ocr<\/code> command is available globally.<\/p>\n<p dir=\"auto\">For other installation methods (install script, GitHub Release binary, from source), see <a href=\"https:\/\/open-codereview.ai\/docs\/installation\" rel=\"nofollow\">Installation<\/a>.<\/p>\n<p dir=\"auto\"><strong>1. Configure LLM<\/strong><\/p>\n<p dir=\"auto\">You must configure an LLM before reviewing code, unless you use <a href=\"https:\/\/open-codereview.ai\/docs\/delegate\" rel=\"nofollow\">Delegation Mode<\/a>.<\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"ocr config provider          # Select a built-in provider or add a custom one&#10;ocr config model             # Pick a model for the active provider\">\n<pre>ocr config provider          <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Select a built-in provider or add a custom one<\/span>\nocr config model             <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Pick a model for the active provider<\/span><\/pre>\n<\/div>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/imgs\/providers.jpg\"><img decoding=\"async\" src=\"https:\/\/github.com\/alibaba\/open-code-review\/raw\/main\/imgs\/providers.jpg\" alt=\"Provider setup\" style=\"max-width: 100%;\"\/><\/a><\/p>\n<p dir=\"auto\">The interactive UI guides you through provider selection, API key entry, and model configuration, then automatically tests connectivity.<\/p>\n<p dir=\"auto\">For CLI setup, environment variables, custom providers, and other advanced configuration, see <a href=\"https:\/\/open-codereview.ai\/docs\/configuration\" rel=\"nofollow\">Configuration<\/a>.<\/p>\n<p dir=\"auto\"><strong>2. Review<\/strong><\/p>\n<div class=\"highlight highlight-source-shell notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"cd your-project&#10;&#10;# Workspace mode \u2014 review all staged, unstaged, and untracked changes&#10;ocr review&#10;&#10;# Branch range \u2014 reviews feature-branch's changes since it diverged from main (merge-base mode)&#10;ocr review --from main --to feature-branch&#10;&#10;# Single commit&#10;ocr review --commit abc123&#10;&#10;# Resume an interrupted range or commit review&#10;ocr session list&#10;ocr review --from main --to feature-branch --resume &lt;session-id&gt;&#10;&#10;# Full-file scan \u2014 review whole files instead of a diff (no git history needed)&#10;ocr scan                          # scan the entire repository&#10;ocr scan --path internal\/agent    # scan a directory or specific files&#10;ocr scan --resume &lt;session-id&gt;   # resume an interrupted full-file scan&#10;&#10;# Save results to a file (recommended for AI host agents)&#10;ocr review --format json --output result.json&#10;&#10;# Delegation mode \u2014 let your AI coding agent perform the review itself&#10;# OCR handles file selection and rule resolution; no LLM configuration needed&#10;ocr delegate preview&#10;ocr delegate rule src\/main.go src\/handler.go\">\n<pre><span class=\"pl-c1\">cd<\/span> your-project\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Workspace mode \u2014 review all staged, unstaged, and untracked changes<\/span>\nocr review\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Branch range \u2014 reviews feature-branch's changes since it diverged from main (merge-base mode)<\/span>\nocr review --from main --to feature-branch\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Single commit<\/span>\nocr review --commit abc123\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Resume an interrupted range or commit review<\/span>\nocr session list\nocr review --from main --to feature-branch --resume <span class=\"pl-k\">&lt;<\/span>session-id<span class=\"pl-k\">&gt;<\/span>\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Full-file scan \u2014 review whole files instead of a diff (no git history needed)<\/span>\nocr scan                          <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> scan the entire repository<\/span>\nocr scan --path internal\/agent    <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> scan a directory or specific files<\/span>\nocr scan --resume <span class=\"pl-k\">&lt;<\/span>session-id<span class=\"pl-k\">&gt;<\/span>   <span class=\"pl-c\"><span class=\"pl-c\">#<\/span> resume an interrupted full-file scan<\/span>\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Save results to a file (recommended for AI host agents)<\/span>\nocr review --format json --output result.json\n\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> Delegation mode \u2014 let your AI coding agent perform the review itself<\/span>\n<span class=\"pl-c\"><span class=\"pl-c\">#<\/span> OCR handles file selection and rule resolution; no LLM configuration needed<\/span>\nocr delegate preview\nocr delegate rule src\/main.go src\/handler.go<\/pre>\n<\/div>\n<p dir=\"auto\">Full documentation lives at <strong><a href=\"https:\/\/open-codereview.ai\/docs\" rel=\"nofollow\">open-codereview.ai\/docs<\/a><\/strong>:<\/p>\n<ul dir=\"auto\">\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/quickstart\" rel=\"nofollow\">Quickstart<\/a> \u2014 install and run your first review<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/installation\" rel=\"nofollow\">Installation<\/a> \u2014 all platforms and package managers<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/cli-reference\" rel=\"nofollow\">CLI Reference<\/a> \u2014 every command and flag<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/review-rules\" rel=\"nofollow\">Review Rules<\/a> \u2014 customize review rules with path filtering and targeting<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/configuration\" rel=\"nofollow\">Configuration<\/a> \u2014 config keys and environment variables<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/mcp\" rel=\"nofollow\">MCP Server<\/a> \u2014 extend the review agent with external tools<\/li>\n<li>Coding Agent Integrations \u2014 choose the platform you use\n<ul dir=\"auto\">\n<li><a href=\"http:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/plugins\/open-code-review\/README.md#claude-code\">Claude Code<\/a> \u2014 install a plugin with review slash commands<\/li>\n<li><a href=\"http:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/plugins\/open-code-review\/README.md#codex\">Codex<\/a> \u2014 install a plugin with callable review skills<\/li>\n<li><a href=\"http:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/plugins\/open-code-review\/README.md#cursor\">Cursor<\/a> \u2014 install a plugin with portable review skills<\/li>\n<li><a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/plugins\/open-code-review\/opencode\/README.md\">OpenCode<\/a> \u2014 install native review tools and slash commands<\/li>\n<li><a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/plugins\/open-code-review\/qca\/README.md\">QCA Forward<\/a> \u2014 run delegation mode with the QCA host model and a ready-to-publish template<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/agent-skill\" rel=\"nofollow\">Skill-compatible agents<\/a> \u2014 install the portable agent skill<\/li>\n<\/ul>\n<\/li>\n<li>Review Execution Modes \u2014 after integration, choose which LLM performs the review\n<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/cicd\" rel=\"nofollow\">CI\/CD Integration<\/a> \u2014 GitHub Actions, GitLab CI, GitFlic CI, and Gerrit integration<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/viewer\" rel=\"nofollow\">Session Viewer<\/a> \u2014 browse and replay review sessions in browser, mark comments as fixed or ignored and hide them while you work through the findings<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/telemetry\" rel=\"nofollow\">Telemetry<\/a> \u2014 OpenTelemetry integration for observability<\/li>\n<li><a href=\"https:\/\/open-codereview.ai\/docs\/faq\" rel=\"nofollow\">FAQ<\/a> \u2014 common questions and troubleshooting<\/li>\n<\/ul>\n<p dir=\"auto\">This project exists thanks to all the people who contribute. See <a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/CONTRIBUTING.md\">CONTRIBUTING.md<\/a> for development setup, coding guidelines, and how to submit pull requests.<\/p>\n<p><a href=\"https:\/\/github.com\/alibaba\/open-code-review\/graphs\/contributors\"><br \/>\n  <img decoding=\"async\" src=\"https:\/\/camo.githubusercontent.com\/96a63aa0469d79aac15c205bdc8ddfed9ed0e6f7159a7721316456bc3550ae35\/68747470733a2f2f636f6e747269622e726f636b732f696d6167653f7265706f3d616c69626162612f6f70656e2d636f64652d726576696577\" data-canonical-src=\"https:\/\/contrib.rocks\/image?repo=alibaba\/open-code-review\" style=\"max-width: 100%;\"\/><br \/>\n<\/a><\/p>\n<p dir=\"auto\"><a href=\"https:\/\/github.com\/alibaba\/open-code-review\/blob\/main\/LICENSE\">Apache-2.0<\/a> \u2014 Copyright 2026 Alibaba<\/p>\n<\/div>\n<p><a href=\"https:\/\/github.com\/alibaba\/open-code-review?utm_source=tldrai\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>English | \u7b80\u4f53\u4e2d\u6587 | \u65e5\u672c\u8a9e | \ud55c\uad6d\uc5b4 | \u0420\u0443\u0441\u0441\u043a\u0438\u0439 What is Open Code Review? Open Code Review is an AI-powered code review CLI tool. It originated as Alibaba Group&#8217;s internal official AI code review assistant \u2014 over the past two years, it has served tens of thousands of developers and identified millions of code defects. [&hellip;]<\/p>\n","protected":false},"author":16,"featured_media":23917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[143],"tags":[],"class_list":["post-23916","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai"],"_links":{"self":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/posts\/23916","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/comments?post=23916"}],"version-history":[{"count":0,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/posts\/23916\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/media\/23917"}],"wp:attachment":[{"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/media?parent=23916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/categories?post=23916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scannn.com\/lv\/wp-json\/wp\/v2\/tags?post=23916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}