Open Code Review क्या है?
Open Code Review Alibaba का code-review CLI, जो review प्रक्रिया को deterministic engineering से तय रखता है और सिर्फ़ judgement calls LLM agent पर छोड़ता है. यह AI Coding टूल्स की AI Code Review & Security श्रेणी में आता है; ओपन सोर्स है, Go में लिखा गया है और Apache-2.0 लाइसेंस के तहत है।
सारांश
Open Code Review (`ocr`) एक command-line code-review tool है, जिसे Alibaba Group ने ओपन सोर्स करने से पहले दो साल तक अंदरूनी तौर पर चलाया। यह Git diffs पढ़ता है और बदली हुई फ़ाइलें एक configurable LLM को भेजता है, एक agent के ज़रिए, जो पूरी फ़ाइलें पढ़ सकता है, codebase में खोज सकता है और संदर्भ के लिए संबंधित बदलावों की जाँच कर सकता है। इसके बाद यह विशिष्ट lines से जुड़ी संरचित review comments लौटाता है। दूसरा mode, `ocr scan`, diff के बजाय पूरी फ़ाइलों की review करता है, किसी अनजान codebase या ऐसी directory का audit करने के लिए जिसमें कोई सार्थक changeset न हो।
README में डिज़ाइन का तर्क यह है कि सिर्फ़ भाषा पर आधारित reviewer भटक जाता है: बड़े changesets पर general-purpose agents फ़ाइलें छोड़ देते हैं, issues गलत line पर बताते हैं, और छोटे prompt बदलावों से गुणवत्ता में भारी उतार-चढ़ाव आता है। इसलिए Open Code Review उन चरणों को hard-code करता है जिनमें गड़बड़ी नहीं होनी चाहिए। Engineering logic तय करता है कि कौन-सी फ़ाइलें review होंगी और कौन-सी filter होंगी, संबंधित फ़ाइलों को (उदाहरण: `message_en.properties` के साथ `message_zh.properties`) isolated sub-agent review units में बाँधता है ताकि बहुत बड़े changesets बँटकर एक साथ चल सकें, हर फ़ाइल के लिए rules को prompt से नहीं बल्कि template से मिलाता है, और model के output पर अलग comment-positioning और reflection modules चलाता है। Agent के पास सिर्फ़ dynamic decisions और context retrieval बचता है।
प्रोजेक्ट इस trade-off के समर्थन में AACR-Bench प्रकाशित करता है: 50 लोकप्रिय open-source repositories के 200 असली pull requests, 10 भाषाओं में, जिनमें 1,505 ground-truth issues हैं, जिन्हें 80 से ज़्यादा senior engineers ने cross-validate किया है। उसी underlying model पर एक general-purpose agent की तुलना में यह बताता है कि precision और F1 ज़्यादा हैं और tokens लगभग एक-नौवें हैं, जबकि recall कम है, जो कम false alarms के पक्ष में जानबूझकर चुना गया है। यह Go में लिखा गया है, npm पर `@alibaba-group/open-code-review` के रूप में आता है, साथ में एक install script, GitHub Release binaries और source build भी मिलते हैं, Windows, macOS और Linux पर चलता है, और Apache-2.0 लाइसेंस के तहत है।
यह क्या करता है
- Hybrid architecture: file selection, bundling और rule matching के लिए deterministic pipelines; dynamic decisions के लिए LLM agent
- Line-level inline comments, साथ में बाहरी positioning और reflection modules जो location और content के drift को ठीक करते हैं
- `ocr scan` उन codebases और directories की पूरी फ़ाइलों की review करता है जहाँ कोई उपयोगी diff नहीं है
- हर bundle के लिए अलग context वाले sub-agents, ताकि बहुत बड़े changesets बँटें, एक साथ review हों और स्थिर रहें
- Built-in multi-language ruleset, जिसमें NPE, thread-safety, XSS और SQL injection शामिल हैं
- OpenAI- और Anthropic-compatible providers, connectivity test के साथ interactive setup
- AACR-Bench: 200 असली PRs, 10 भाषाएँ, 1,505 human-validated ground-truth issues, Hugging Face पर प्रकाशित
शुरू करें
Global `ocr` command पाने के लिए npm package install करें, फिर एक model provider configure करें। Git 2.41 या उससे नए version की ज़रूरत है — tool diffs, code search और repository operations के लिए इस पर निर्भर है।
CLI install करें
npm ही documented default है; project एक install script, GitHub Release binaries और source build भी देता है।
npm install -g @alibaba-group/open-code-reviewModel configure करें
Interactive flow provider चुनने, API key डालने और model चुनने में मदद करता है, फिर connectivity test करता है। जब तक आप Delegation Mode इस्तेमाल न कर रहे हों, तब तक model ज़रूरी है।
ocr config provider
ocr config modelDiff की review करें
Git repository के अंदर `ocr` चलाएँ, मौजूदा changeset की line-level comments के साथ review करने के लिए।
ocrपूरी directory का audit करें
`ocr scan` diff के बजाय पूरी फ़ाइलों की review करता है — किसी अनजान codebase पर उपयोगी।
ocr scanकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- जब कोई general-purpose coding agent बड़े pull requests पर फ़ाइलें छोड़ता रहे या line numbers गलत जगह दे, तब इसे इस्तेमाल करें
- जब review का token cost मायने रखे और आप सब कुछ ढूँढने के बजाय कम, पर ज़्यादा सटीक findings चाहें, तब इसे चुनें
- जब आपको CI में दोहराने लायक (reproducible) review व्यवहार चाहिए, prompt के शब्दों से बदलने वाला output नहीं, तब इसे इस्तेमाल करें
- जब किसी अनजान repository का audit करना हो जिसमें review करने लायक कोई सार्थक diff न हो, तब इसे इस्तेमाल करें
वर्शन इतिहास
Every verified update to Open Code Review that AI/TLDR tracked, newest first — each links to our coverage and the official changeset.
- 16 सित॰ 2026v1.12.3
Two allowlist features keep secrets out of a review: secret paths are excluded, and per-environment .env files are protected. A path-traversal bypass in the code_search and code_comment tools is fixed by normalizing paths, and a tool-call JSON response that arrives with trailing content is now recovered instead of failing the run.
- 28 जुल॰ 2026v1.8.0
v1.8.0 added remote MCP servers over Streamable HTTP, Bicep and Terraform review support, and chunked inline comments.
How Open Code Review compares
Open Code Review alongside other open-source ai code review & security tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| Open Code Review | ★ 57.9k | Alibaba का code-review CLI, जो review प्रक्रिया को deterministic engineering से तय रखता है और सिर्फ़ judgement calls LLM agent पर छोड़ता है |
| Bend | ★ 26.1k | एक कंपाइल होने वाली भाषा जिसका टाइप चेकर ही प्रूफ़ चेकर भी है, इसलिए AI का कोई बदलाव तभी बिल्ड होता है जब वह साबित करे कि आपके घोषित नियम अब भी सही हैं |
| Codex Security | ★ 14.5k | किसी codebase में सुरक्षा कमज़ोरियाँ (vulnerabilities) खोजने, उनकी पुष्टि (validate) करने और उन्हें ठीक करने के लिए OpenAI का CLI और TypeScript SDK |
| Whiteboard | ★ 3.6k | एक ओपन सोर्स कैनवास, जहाँ कोडिंग एजेंट अपने बदलावों के डायग्राम बनाते हैं, ताकि लोग diff देखने से पहले डिज़ाइन की समीक्षा कर सकें |
| git-lrc | ★ 1.5k | git commit से जुड़ने वाला एक Go CLI, जो हर staged diff को commit होने से पहले AI review से गुज़ारता है। इसमें browser review UI है और git log में review stats भी दिखते हैं। |
| Sphinx | ★ 511 | एक git hook जो protected branch पर push को तब तक रोकता है जब तक आप सही अनुमान न लगा लें कि agent द्वारा लिखा गया change क्या करता है |
| CodeRabbit | — | AI pull request reviewer that analyzes diffs with full-repo context to flag bugs, security issues, and quality problems, posting inline comments and one-click fixes. |
| Greptile | — | AI code review tool that indexes your whole codebase into a graph so a swarm of agents can catch multi-file logic bugs and security risks in every PR. |
