open-code-review  by alibaba

AI code review agent for deep analysis

Created 2 weeks ago

New!

2,750 stars

Top 16.8% on SourcePulse

GitHubView on GitHub
Project Summary

Summary Open-Code-Review (OCR) is an AI-powered CLI tool providing battle-tested, deterministic code reviews at scale. It addresses the need for precise, line-level feedback on Git diffs by leveraging a hybrid architecture combining deterministic pipelines with a sophisticated LLM agent. This tool targets developers and teams aiming to enhance code quality and security through automated, context-aware analysis.

How It Works OCR employs a hybrid architecture with a deterministic pipeline and an LLM agent. It processes Git diffs, sending changed files to a configurable LLM via an agent capable of tool-use. The agent reads full files, searches code, and inspects other changes for context. Its workflow includes an optional Plan phase for risk analysis on larger diffs, followed by a Main Task Loop processing files concurrently using LLM-driven tools. Memory compression manages token limits. This design enables deep, context-aware analysis beyond superficial diff feedback.

Quick Start & Requirements Installation is via NPM (npm install -g @alibaba-group/open-code-review) or pre-compiled binaries from GitHub Releases. Building from source (make build) is also an option. LLM configuration is mandatory, supporting OpenAI and Anthropic APIs via ocr config set or environment variables (OCR_LLM_URL, OCR_LLM_TOKEN, OCR_LLM_MODEL, OCR_USE_ANTHROPIC). A connectivity test (ocr llm test) is recommended. Reviews are initiated with ocr review, supporting workspace, branch range (--from, `--

Health Check
Last Commit

10 hours ago

Responsiveness

Inactive

Pull Requests (30d)
22
Issues (30d)
27
Star History
2,832 stars in the last 19 days

Explore Similar Projects

Feedback? Help us improve.