Introduction

miu-cr (MIU Code Review) is AI code review for the CLI, CI, and MCP hosts, built on a deterministic + agent engine. Review your own changes locally before you open a PR, gate them in CI, review GitHub PRs with inline comments, or drive the engine from any MCP-capable agent host (Claude Code, Codex, …). One review path, four ways to run it, a stable JSON envelope on stdout.
Latest release: v0.42.0 — a single static binary; credentials are passed at runtime and never persisted.
Diff-only review misses cross-file bugs; bare-agent review drifts and burns tokens. miu-cr keeps the correctness-critical parts deterministic — file selection, context assembly, line-anchoring, severity gating, dedupe — and uses the LLM only where judgment helps: finding bugs and proposing fixes.
Start here
Section titled “Start here”What you get
Section titled “What you get”Review where you work
Section titled “Review where you work”- Local review — Usage · Use cases
- Run staged, range, or commit reviews:
--staged,--from+--to,--commit. - Deterministic select → context → single LLM pass → line-anchor → gate → dedupe.
- CI-friendly exit codes at or above
--gateseverity.
- Run staged, range, or commit reviews:
- GitHub PR review — GitHub PR review
- Head-SHA-anchored inline comments, including multi-line ranges.
- One idempotent summary, or a required GitHub Check Run with
--mode checks. --filter-mode, SARIF export, cross-push dedupe,--suggest, and--approve-clean.
Project context
Section titled “Project context”- Project rules — Project rules
.miu/cr/rules/*.mdfrontmatter selects context by changed-file glob.- Built-in, user, and repo layers; repo rules are trust-fenced on fork PRs.
- Semantic code-recall — Semantic code-recall
- Optional embeddings + pgvector recall prior findings as advisory context.
- Off by default.
Automation and integrations
Section titled “Automation and integrations”- serve · poll · Action — Serve & Action
- HMAC webhook daemon, opt-in poll trigger, and reusable GitHub Action.
- All three funnel into the same review path.
- MCP server — MCP integration
miucr mcpexposesreview_run/review_getover stdio.
- REST API + GitHub App — REST API & GitHub App
MIUCR_API_TOKENregisters/v1/reviews.[github] mode = appswaps PAT auth for App installation auth.
Storage and packaging
Section titled “Storage and packaging”- Review history — Review history
- Every review auto-saves findings, stats, transcript, and raw I/O.
- Browse with
miucr history,miucr history show <id>, andmiucr history prune.
- Store backends — Store backends
- SQLite by default; opt into Postgres via
[store] backend+MIUCR_PG_DSN.
- SQLite by default; opt into Postgres via
- Single static binary
- Credentials are passed at runtime and never persisted.
A 30-second tour
Section titled “A 30-second tour”export ANTHROPIC_API_KEY=... # bring your own key (--provider auto detects OpenAI too)miucr login --provider openai # or: review on your ChatGPT planmiucr review --staged # review staged changesmiucr review --from main --to HEAD -o pretty # review a range, human-readablemiucr review --commit HEAD~1 --gate high # exit 2 if a high+ finding landsmiucr review --pr owner/repo#123 --no-post -o json # dry-run a GitHub PRmiucr mcp # serve the engine over MCP (stdio)Every command emits the stable miucr.cli/v1 JSON envelope by default (-o pretty for a human table). New here? Start with Getting started, then browse copy-paste starters (rules, GitHub Action, MCP setup, Docker) in examples/. It is Apache-2.0 licensed; the source of truth is the repository.