# Open Code Review

An AI-powered code review CLI that reads git diffs and sends changed files to a large language model agent with tool access, producing line-level review comments while combining deterministic checks with agent reasoning.

Open Code Review originated as Alibaba's internal AI code review assistant before being open-sourced. It reads a Git diff, sends the changed files to a configurable large language model through an agent that can read full file contents, search the codebase and inspect other changed files for context, and produces structured, line-level review comments rather than only surface-level diff feedback. A separate `ocr scan` command reviews whole files or directories for auditing a codebase that has no meaningful diff.

Its design combines deterministic engineering steps, such as precise file selection and file bundling, with the language model agent for the parts of a review that benefit from reasoning. On a benchmark built from 50 open-source repositories and 200 real pull requests across 10 languages, the project reports higher precision and F1 than general-purpose coding agents used for review, at a fraction of the token cost, with lower recall as a deliberate trade-off favoring fewer false alarms.

It works with OpenAI- and Anthropic-compatible models, is written in Go, and is licensed under Apache-2.0.

Website: https://open-codereview.ai
