OpenCodeReview
AI-powered code review CLI that combines deterministic file selection and rule matching with an LLM agent to produce precise line-level comments, plus full-file scanning and CI/CD integrations.
OpenCodeReview is a code review CLI for teams and individual developers who want structured feedback on changes without relying on a free-form prompt alone. Its hybrid design uses deterministic engineering for the steps that need hard guarantees—selecting the right files, bundling related files, matching rules, and positioning and reflection—while an agent handles dynamic context retrieval and review decisions. The tool reads Git diffs and sends changed files to a configurable LLM. The agent can read full files, search the repository, and inspect related changed files before producing line-level comments. It can also scan entire files or directories when there is no meaningful diff. Built-in rules cover areas such as null-pointer errors, thread safety, XSS, and SQL injection, and the project supports OpenAI- and Anthropic-compatible endpoints. To try it, install @alibaba-group/open-code-review with npm, run ocr config to choose a provider and model, then use ocr review for staged, unstaged, or untracked changes. Use ocr scan for a full-file review, or ocr delegate to let a coding agent perform the review in delegation mode. The repository also documents CI/CD integrations, MCP support, session viewing, and integrations for Claude Code, Codex, Cursor, OpenCode, and other agent hosts. The repository's benchmark section describes AACR-Bench, built from 50 open-source repositories, 200 real pull requests, 10 programming languages, and 1,505 annotated issues cross-validated by more than 80 senior engineers. These are project-reported benchmark details; they are not an independent guarantee for every codebase.