A small, model-agnostic code review tool. Reviews a git ref and emits a structured verdict: approve, request changes, or discuss — with per-issue severity, category, location, and suggested fix.
prc is opinionated about three things most LLM review tools get wrong:
- Explicit completion verdict. Every review ends with a single top-level decision. No "LGTM with these 14 suggestions."
- Author response is part of the protocol. Every blocker and major
issue expects an
accept,refute, orclarify. Single-word refusals are rejected by the protocol, not by social pressure. - Model-agnostic. Any OpenAI-compatible endpoint works — hosted (OpenAI, OpenRouter, Together, Groq) or local (vLLM, llama.cpp, LM Studio, ollama).
uv sync
export PRC_MODEL=gpt-4o-mini
export PRC_API_KEY=sk-...
uv run prc HEADThat reviews the most recent commit in the current repo and writes a markdown verdict to stdout.
Pointing at a local model:
export PRC_MODEL=qwen2.5-coder:7b
export PRC_API_BASE=http://localhost:11434/v1
export PRC_API_KEY=ollama
uv run prc HEAD~3..HEAD --format jsonTry it without an API key using the built-in mock LLM:
PRC_MOCK=1 uv run prc HEADprc <git-ref> [--mode quick] [--format md|json]- Sequential
understand → correctness → verdictpipeline. - Structured verdict with severity / category / location / suggested fix.
- Author response data types ready for the v0.2 interactive loop.
- Bench-A scaffolding with 10 hand-curated injected-bug fixtures.
See CHANGELOG.md for the not-yet-shipped list.
prc is not a replacement for CodeRabbit, Cursor Review, or Greptile if
what you want is broad, polished, auto-posted PR commentary on a busy
shared repo. Those tools have richer integrations, web UIs, and
inline-comment ergonomics that this project does not try to match.
prc is a small, local-first tool for one specific case: you want a
single structured verdict on a change, and you want the protocol itself
to push back on hand-wave answers from either side. It runs against any
OpenAI-compatible model, has no hosted dependency, costs nothing
beyond the model call, and the entire pipeline fits in a few hundred
lines you can read in one sitting.
| Variable | Purpose | Default |
|---|---|---|
PRC_MODEL |
Model identifier passed through to the provider. | (required, unless PRC_MOCK) |
PRC_API_KEY |
Bearer token. Optional for local servers. | (none) |
PRC_API_BASE |
OpenAI-compatible base URL. | https://api.openai.com/v1 |
PRC_MOCK |
If 1, use a built-in fixed mock LLM. |
(unset) |
uv sync
uv run pytest
uv run ruff check .
uv run mypy src/CI runs the same checks on every push.
MIT. See LICENSE.