# How to Use Crit Crit keeps you in the loop with your AI agent. Run `crit`, leave inline comments on the diff, click **Finish Review**, and your agent reads the feedback and fixes things. Then Crit shows what changed round to round. ## Install ```bash # macOS / Linux brew install crit # Or with Go go install github.com/tomasz-tomczyk/crit@latest ``` ```powershell # Windows (PowerShell) iwr https://github.com/tomasz-tomczyk/crit/releases/latest/download/crit-windows-amd64.exe -OutFile crit.exe ``` ARM64 and WSL users: `go install` works on any platform. Single binary. No runtime dependencies. ## Connect Your Agent One command gives your agent a skill that knows when to run crit, how to read the review, and how to apply your comments: ```bash # Claude Code claude plugin marketplace add tomasz-tomczyk/crit && claude plugin install crit@crit # Cursor crit install cursor ``` Integrations also exist for Copilot, Aider, Cline, Windsurf, Codex, and OpenCode. Run `crit install` to see the [full list](https://crit.md/integrations). ## Review Your Code With the Claude Code plugin, type `/crit` in your agent session — it runs all of this for you. Or use the CLI directly: ```bash # Review all uncommitted changes crit # Review staged changes only crit --scope staged # Review changes since branching from main crit --scope branch # Review a specific file or plan crit README.md ``` Crit opens your browser with a full diff view. Click any line number to leave a comment. Drag across lines to comment on a range. ## Comment Features ### Inline Comments Click the gutter next to any line. Write your feedback in markdown — code blocks, links, bold, lists all work. ### Suggestions Propose exact code changes with suggestion blocks: A comment explains the issue; the suggestion gives the agent the replacement: ~~~ ```suggestion if errors.Is(err, ErrNotFound) { ``` ~~~ The agent sees the anchored line, the replacement, and applies it directly. ### Threaded Replies Reply to any comment to start a conversation. Discuss trade-offs, ask follow-ups, or clarify — all anchored to the relevant code. ### Resolve Comments Mark comments as resolved when addressed. They collapse so you can focus on what's left. Unresolve if the fix wasn't right. ## Multi-Round Review With an integration installed, the loop is: 1. Type `/crit` in your agent (or run `crit` in your terminal) — review the diff, leave comments 2. Click **Finish Review** 3. Tell your agent to fix the comments (or it picks them up automatically) 4. Crit shows a round-to-round diff of what changed 5. Review again — repeat until the code is right Each round tracks which comments are new, which are resolved, and exactly what the agent changed since your last review. ## Share Reviews Click **Share** to upload your review to [crit.md](https://crit.md). Anyone with the link can view and add their own comments. For teams that need control over where data lives, self-host [crit-web](https://github.com/tomasz-tomczyk/crit-web): ```bash # Self-host crit-web git clone https://github.com/tomasz-tomczyk/crit-web crit --share-url https://reviews.yourcompany.com ``` Shared reviews support multiple authors, threaded replies, and resolve/unresolve — just like local reviews. ## GitHub PR Integration ```bash # Push local comments to a GitHub PR crit push owner/repo#123 # Pull PR comments into your local review crit pull owner/repo#123 ``` Your inline comments become real PR review comments. Pull existing PR comments locally too. ## Agent Integrations Installing an integration does three things: the agent learns when to invoke crit, how to read the review you left, and how to apply suggestion blocks. You run one command (`crit install ` or the Claude Code plugin flow), and the rest is handled. No manual prompt-engineering, no copy-paste of file paths. The integration wires up the full loop. - [Claude Code](https://crit.md/integrations/claude-code) - [Cursor](https://crit.md/integrations/cursor) - [GitHub Copilot](https://crit.md/integrations/github-copilot) - [Codex](https://crit.md/integrations/codex) - [Gemini CLI](https://crit.md/integrations/gemini) - [Qwen Code](https://crit.md/integrations/qwen) - [Hermes](https://crit.md/integrations/hermes) - [Windsurf](https://crit.md/integrations/windsurf) - [OpenCode](https://crit.md/integrations/opencode) - [Cline](https://crit.md/integrations/cline) - [Aider](https://crit.md/integrations/aider) ### Programmatic Comments Agents can write comments without the UI: ```bash crit comment --file main.go --line 42 --body "Hot loop allocation" ``` This is unique to crit — agents can review their own code, then ask a human to look at the review. ## The Review Format No official integration for your agent yet? Reviews are JSON files in `~/.crit/reviews/` (keyed by working directory and branch): ```json { "branch": "feature/auth-rate-limit", "base_ref": "main", "updated_at": "2025-05-08T14:23:11Z", "review_round": 1, "files": { "auth/handler.go": { "status": "modified", "comments": [ { "id": "c_a3f8b2", "start_line": 42, "end_line": 45, "body": "Validate token expiry before checking permissions", "resolved": false } ] } } } ``` The file, the line, what to fix, and which round it came from — no ambiguity. --- **Get started:** `brew install crit` and run `crit` in any git repo.