Skip to content
Back to search

crit

Your feedback loop with the agent

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/tomasz-tomczyk/crit with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/tomasz-tomczyk/crit'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tomasz-tomczyk--crit/badge.svg)](/listings/tomasz-tomczyk--crit)

HTML

<a href="/listings/tomasz-tomczyk--crit"><img src="/api/listings/tomasz-tomczyk--crit/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Install Crit binary

Brew:

brew install crit

<details> <summary>Also available via Go, Nix and Windows</summary>

Go:

go install github.com/tomasz-tomczyk/crit/cmd/crit@latest

Nix:

nix profile install github:tomasz-tomczyk/crit

Windows:

iwr https://github.com/tomasz-tomczyk/crit/releases/latest/download/crit-windows-amd64.exe -OutFile crit.exe

> Note: Then move crit.exe somewhere on your PATH. ARM64 users: swap amd64 for arm64. WSL users: use the Linux binary instead.

</details>

Or download the latest release from [GitHub](https://github.com/tomasz-tomczyk/crit/releases/latest).

2. Integrate with your agent

Claude Code:

claude plugin marketplace add tomasz-tomczyk/crit
claude plugin install crit@crit

Crit also works with Cursor, GitHub Copilot, OpenCode, Codex, Gemini, Qwen, Hermes, Windsurf, Cline, Grok, Aider, and Pi — any agent that can read a file and run a command. See [`integrations/`](integrations/) for all install methods and details.

3. Tell your agent to use `crit`

Most integrations include a `/crit` slash command that automates the full review loop. The agent launches Crit, waits for your review, then acts on the feedback. Repeat until you approve.

Here's a 2-minute demo walkthrough of plan review and branch review:

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 23 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "crit",
  4. "owner": {
  5. "name": "Tomasz Tomczyk"
  6. },
  7. "plugins": [
  8. {
  9. "name": "crit",
  10. "description": "Close the feedback loop on AI coding: review plans and code changes with GitHub-style inline comments, then let the agent address them.",
  11. "source": "./integrations/claude-code",
  12. "homepage": "https://crit.md",
  13. "category": "development"
  14. },
  15. {
  16. "name": "crit-tui",
  17. "description": "Early: crit inside Claude Code. A review pane for the conversation, your diff or a file, with Claude replying in threads. Needs Claude Code 2.1.287+ and the crit CLI.",
  18. "source": "./integrations/claude-code-tui",
  19. "homepage": "https://crit.md",
  20. "category": "development"
  21. }
  22. ]
  23. }
README.md · README · 594 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. # Crit
  2. [![CI](https://github.com/tomasz-tomczyk/crit/actions/workflows/test.yml/badge.svg)](https://github.com/tomasz-tomczyk/crit/actions/workflows/test.yml)
  3. [![codecov](https://codecov.io/gh/tomasz-tomczyk/crit/graph/badge.svg)](https://codecov.io/gh/tomasz-tomczyk/crit)
  4. [![Release](https://img.shields.io/github/release/tomasz-tomczyk/crit.svg)](https://github.com/tomasz-tomczyk/crit/releases)
  5. [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
  6. Review your coding agent's plans, diffs and running apps in the browser. Click a line, leave a comment, and the agent gets it.
  7. ![Crit UI for "notification-plan.md" showing comment left on "Queue - Redis Streams, SQS, RabbitMQ" line saying "Just use SQS - we're in AWS"](docs/images/demo-overview.png)
  8. ## Adaptive UI for each type of output
  9. To an agent, plans and code are both just text. To you, reviewing a plan and reviewing a web app are different jobs.
  10. Crit gives each type of output its own review UI. Point at the exact thing that's wrong and leave a comment for the agent:
  11. - `crit plan.md` renders a markdown file with review comments.
  12. - `crit` finds your git changes and shows them as syntax-highlighted diffs.
  13. - `crit http://localhost:3000` proxies your running app and adds a review layer on top.
  14. - `crit landing.html` renders a static HTML file you can click and comment on.
  15. Everything runs locally from a single binary.
  16. ## Quickstart
  17. ### 1. Install Crit binary
  18. Brew:
  19. ```bash
  20. brew install crit
  21. ```
  22. <details>
  23. <summary>Also available via Go, Nix, Arch Linux, and Windows</summary>
  24. Go:
  25. ```bash
  26. go install github.com/tomasz-tomczyk/crit/cmd/crit@latest
  27. ```
  28. Nix:
  29. ```bash
  30. nix profile install github:tomasz-tomczyk/crit
  31. ```
  32. Arch Linux:
  33. ```bash
  34. yay -S crit.md-bin
  35. ```
  36. > [AUR](https://aur.archlinux.org/packages/crit.md-bin) package, maintained outside this project. Any AUR helper works in place of `yay`.
  37. Windows:
  38. ```bash
  39. iwr https://github.com/tomasz-tomczyk/crit/releases/latest/download/crit-windows-amd64.exe -OutFile crit.exe
  40. ```
  41. > Note: Then move crit.exe somewhere on your PATH. ARM64 users: swap amd64 for arm64. WSL users: use the Linux binary instead.
  42. </details>
  43. Or download the latest release from [GitHub](https://github.com/tomasz-tomczyk/crit/releases/latest).
  44. ### 2. Integrate with your agent
  45. Claude Code:
  46. ```
  47. claude plugin marketplace add tomasz-tomczyk/crit
  48. claude plugin install crit@crit
  49. ```
  50. Crit also works with Cursor, GitHub Copilot, OpenCode, OMO, omp, Codex, Gemini, Qwen, Hermes, Windsurf, Cline, Grok, Aider, and Pi — any agent that can read a file and run a command. See [`integrations/`](integrations/) for all install methods and details.
  51. ### 3. Tell your agent to use `crit`
  52. Most integrations include a `/crit` slash command that automates the full review loop.
  53. The agent launches Crit, waits for your review, then acts on the feedback.
  54. Repeat until you approve.
  55. Here's a 2-minute demo walkthrough of plan review and branch review:
  56. [![Crit demo](docs/images/video-thumbnail.png)](https://www.youtube.com/watch?v=LHwfdvePf5A)
  57. ## Usage
  58. The recommended way is to run the `/crit` command in your agent after any piece of work, whether it wrote a plan or changed code. You can also launch Crit yourself in a terminal and paste the prompt back to your agent when you finish.
  59. ```bash
  60. crit # auto-detect changed files in your repo
  61. crit plan.md # review a specific file
  62. crit plan.md api-spec.md # review multiple files
  63. crit http://localhost:3000 # review a running dev server
  64. crit landing.html # review a static HTML file
  65. ```
  66. In your agent chat, run `/crit` with any of the arguments above. Run it bare and the agent picks what to launch from the conversation.
  67. ### Story mode
  68. For larger branch, PR, MR, or range reviews, **story mode** adds a chaptered
  69. overview of the diff — thematic chapters, a prologue, and a support bucket for
  70. noise — so you can understand the shape of the change before line-by-line
  71. review. It is an explainer, not a reviewer.
  72. **Recommended:** invoke `/crit-story` (or `$crit-story`, `/skill:crit-story`,
  73. depending on your agent) after `crit install <tool>`. Your agent authors the
  74. story in-session via `crit story --prep` / `--story-file`. Only run it when you
  75. explicitly ask — agents will not infer it from a normal `/crit` review.
  76. **Alternative:** `crit story` from the terminal uses your global `agent_cmd`
  77. (separate LLM spend). Generation is LLM-driven exploration — cost depends on
  78. change complexity more than raw file/diff size, and does not scale linearly.
  79. In our experience, complex PRs (~20–50 files, ~2k–5k lines) land around
  80. $1–$1.40 with Claude Opus 5. See the **[story mode guide](docs/story-mode.md)**
  81. for commands, custom prompts, JSON shape, and token-cost notes.
  82. ### Live mode
  83. `crit live <url>` (or `crit <url>`) proxies a running dev server through Crit's review UI. Crit's iframe loads the app on a different origin/port than your browser tab, so **host-scoped session cookies are not shared automatically**. If the direct URL works but Crit shows a login page or hydration mismatch, forward the upstream cookies:
  84. ```bash
  85. # one-off
  86. crit live http://localhost:4000/dashboard --cookie "_crit_key=..."
  87. # repeatable (Netscape jar or raw Cookie header lines)
  88. crit live http://localhost:4000/dashboard --cookie-file .crit/live-cookies.txt
  89. # reuse cookies from a Chrome session with remote debugging enabled
  90. crit live http://localhost:4000/dashboard --cdp-url http://127.0.0.1:9222
  91. ```
  92. **Getting cookies:** log in to the app in your browser, then copy the session cookie from DevTools (Application → Cookies), export a cookie jar, or start Chrome with `--remote-debugging-port=9222` and pass `--cdp-url` so Crit reads cookies for the target origin automatically.
  93. **Config** (global or project `.crit.config.json`; project overrides global):
  94. ```json
  95. {
  96. "live_cookie_file": ".crit/live-cookies.txt",
  97. "live_cdp_url": "http://127.0.0.1:9222"
  98. }
  99. ```
  100. Relative paths resolve from the repo root. Prefer a gitignored file under `.crit/` over committing `live_cookie` inline. Run `crit live --help` for all flags.
  101. Cookie forwarding is available only when Crit listens on loopback without
  102. `--public-url`; Crit refuses cookie options and their config keys when the live
  103. proxy may be exposed over the network.
  104. If Comment/Pin stays unavailable, or a framework needs local CSP / iframe
  105. tweaks, see the **[live mode guide](docs/live-mode.md)** (injection model,
  106. common failures, Phoenix / Vite / Next.js recipes).
  107. ```bash
  108. crit status # show review file path and daemon status
  109. crit resume # pick a previous review to reopen
  110. crit stats # show lifetime review statistics
  111. crit cleanup # delete stale review files
  112. ```
  113. `crit resume` lists every review in `~/.crit/reviews`, newest first, with its branch or files, directory, age, and open comment count. Choosing one reconnects to its daemon, or restarts the daemon in the directory the review came from when it has stopped — so you can resume a review from anywhere. Pass `--list` to print the list instead, or a session ID to skip the picker.
  114. ## Features
  115. ### Round-to-round diff
  116. After your agent edits the file, Crit shows a split or unified diff of what changed - toggle it in the header.
  117. #### Split view
  118. ![Round-to-round diff - split view](docs/images/diff-split.png)
  119. #### Unified view
  120. ![Round-to-round diff - unified view](docs/images/diff-unified.png)
  121. ### Inline comments: single lines and ranges
  122. Click a line number to comment. Drag to select a range. Comments are rendered inline after their referenced lines, just like a GitHub PR review.
  123. ![Simple comments](docs/images/simple-comments.gif)
  124. ### Programmatic comments
  125. AI agents can use `crit comment` to add inline review comments without opening the browser UI or constructing JSON manually:
  126. ```bash
  127. crit comment src/auth.go:42 'Missing null check'
  128. crit comment src/handler.go:15-28 'Error handling issue'
  129. crit comment --selector 'h1' 'Heading is vague' # live app or HTML preview
  130. crit comment --selector '#save' --route /settings 'Save stays disabled'
  131. crit comment --session 839f3b4cd5d6 src/auth.go:42 'Target this review'
  132. echo '[{"body":"Overall feedback"}]' | crit comment --session 839f3b4cd5d6 --json
  133. crit comment --output ~/.crit src/auth.go:42 'comment' # same as default (~/.crit/reviews/<key>/)
  134. crit comment --output .crit src/auth.go:42 'comment' # in-repo: .crit/reviews/<key>/
  135. crit comment --clear # remove the review file
  136. ```
  137. Comments are appended to the review file (stored in `~/.crit/reviews/`) and created automatically if it doesn't exist. Run `crit status` to see active review session IDs and paths. If multiple sessions match the same directory and branch, select one with `--session <id>` on `crit comment`, `crit comments`, `crit share`, `crit push`, or `crit pull`; an unqualified command fails instead of guessing.
  138. ### Share for Async Review
  139. Want a second opinion before handing off to the agent? Click the Share button to upload your review and get a public URL anyone can open in a browser, no install needed. Each reviewer's comments are color-coded by author. Unpublish anytime.
  140. You can also share directly from the CLI without starting the browser UI:
  141. ```bash
  142. crit share plan.md # share files and print the URL
  143. crit share plan.md --qr # also print a QR code in the terminal
  144. crit share plan.md --org acme # share under an organization
  145. crit share plan.md --org acme --visibility unlisted # org share with explicit visibility
  146. crit unpublish # remove the shared review
  147. ```
  148. When sharing under an org, visibility defaults to `organization` (members only). Override with `--visibility` (`organization`, `unlisted`, or `public`). The browser UI shows an org picker when you're signed in and belong to an organization.
  149. Sharing uses [crit.md](https://crit.md) when no sharing key exists. To use several deployments, configure global `share_targets`; the browser asks for a destination and each review stays bound to its first destination:
  150. ```json
  151. {"share_targets":[
  152. {"name":"Acme Crit","url":"https://crit.acme.com","default":true,"proxy_auth":true},
  153. {"name":"crit.md","url":"https://crit.md"}
  154. ]}
  155. ```
  156. Run `crit auth login --share-url https://crit.acme.com` to add or authenticate a target, and add `--set-default` to make it the CLI default. `crit auth status` lists every target. An explicit `"share_targets": []` disables sharing and never injects crit.md. Legacy `share_url` remains readable; `crit config --migrate` converts it atomically. `--share-url` and `CRIT_SHARE_URL` are process-only overrides and never persist a new target; an explicitly empty `CRIT_SHARE_URL` disables sharing for that process.
  157. A review saved before `share_base_url` existed does not guess a deployment from the share link, and it does not fall back to the current default. Re-bind it with `crit share --share-url https://crit.acme.com plan.md`, where that URL is still a configured target. If a saved base URL is no longer in your config, Crit names that missing instance instead of sending the review somewhere else.
  158. If a target sits behind an SSO reverse proxy, set `proxy_auth: true` on that target. Browser-driven Share / Pull / Re-share / Unpublish then use its popup relay; terminal operations remain unavailable for that target.
  159. #### Authentication
  160. You can share anonymously or you can create a free crit.md account (using GitHub oAuth). To authenticate with crit-web (for sharing and other features that require an account):
  161. ```bash
  162. crit auth login # opens browser to log in
  163. crit auth login --share-url https://crit.acme.com --set-default
  164. crit auth status # list targets and identities
  165. crit auth logout --share-url https://crit.md
  166. ```
  167. `crit auth login` uses the OAuth Device Flow - it opens your browser, you confirm, and the CLI receives a token automatically. The token is stored in your global config (`~/.crit.config.json`).
  168. ### GitHub PR and GitLab MR Sync
  169. Crit can review and sync comments bidirectionally with GitHub pull requests and GitLab merge requests. Install and authenticate the CLI for your forge: [GitHub CLI](https://cli.github.com) (`gh auth login`) or [GitLab CLI](https://gitlab.com/gitlab-org/cli) (`glab auth login`). GitLab.com, self-managed GitLab hosts, nested groups, and cross-project merge requests are supported.
  170. Crit auto-detects GitHub or GitLab from the repository remote. Set `"forge": "github"` or `"forge": "gitlab"` in config to override ambiguous/self-managed remotes, or pass `--forge` to `crit pull` and `crit push`. GitLab's base URL is configured once with `gitlab_url` and defaults to `https://gitlab.com`; set it to your self-managed instance in `.crit.config.json`. MR URLs remain valid change identifiers, but their host must match the configured `gitlab_url`.
  171. #### Open a remote change for review
  172. ```bash
  173. crit pr # PR for the current branch (like gh)
  174. crit pr 42 # GitHub pull request
  175. crit mr # MR for the current branch
  176. crit mr 42 # GitLab MR in the current project
  177. crit mr https://gitlab.com/group/sub/project/-/merge_requests/42
  178. crit review --mr 42 --remote # read MR files via GitLab instead of local git
  179. ```
  180. #### Pull comments
  181. ```bash
  182. crit pull # auto-detect from current branch and remote
  183. crit pull 42 # explicit PR number or MR IID
  184. crit pull --forge gitlab 42 # explicit provider
  185. crit pull https://gitlab.com/group/project/-/merge_requests/42
  186. ```
  187. #### Push comments and review outcomes
  188. ```bash
  189. crit push # auto-detect PR/MR from current branch
  190. crit push --dry-run # preview without posting
  191. crit push --message "Round 2" # add a review summary
  192. crit push --event approve 42 # approve
  193. crit push --event request-changes --forge gitlab 42
  194. ```
  195. #### Sync viewed files with GitHub
  196. When you review with `crit --pr`, files you mark as viewed can be ticked in the PR's "Files changed" tab, and the other way round:
  197. ```bash
  198. crit push --viewed # tick your viewed files on the PR
  199. crit push --viewed --dry-run # preview what would change
  200. crit pull --viewed # bring in files ticked on GitHub
  201. ```
  202. Push skips files that changed since you viewed them, files marked by `auto_viewed_patterns`, and marks made outside the PR's own diff. Unticking a file in Crit unticks it on GitHub. Your marks stay available after you finish a review, so you can push them afterwards. Pull adds GitHub's ticks but keeps any file you unticked in Crit; an open review page shows them after a reload. GitLab has no equivalent, so `--viewed` is an error there.
  203. GitLab inline comments are published as a single review using Draft Notes. `request-changes` requires GitLab support for the `reviewer_state=requested_changes` bulk-publish option; Crit reports an error instead of silently downgrading the outcome. Pulling again imports replies, edits, deletes, and discussion resolution without duplicating local comments.
  204. ### Send to agent (experimental)
  205. Click "Send now" on any comment during a review to get an AI agent response in real-time. This feature only appears when `agent_cmd` is configured.
  206. The agent reads the comment context, addresses it (editing code if needed), and replies
  207. inline - all while you continue reviewing.
  208. ![Send to agent](docs/images/live-mode.png)
  209. Configure in `~/.crit.config.json` (global config only):
  210. ```json
  211. {
  212. "agent_cmd": "claude --dangerously-skip-permissions -p"
  213. }
  214. ```
  215. > **Security note:** `agent_cmd` is read exclusively from your global `~/.crit.config.json`. Project-level `.crit.config.json` files cannot set it. This prevents a malicious repository from executing arbitrary commands when you trigger "Send to agent".
  216. #### Permission modes
  217. Agents need tool permissions to edit files on your behalf. How you grant them depends on your trust level:
  218. | Mode | Command | What the agent can do |
  219. | ---------------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
  220. | Full access | `claude --dangerously-skip-permissions -p` | Read, write, and run any tool. Simplest option - recommended for trusted repos. |
  221. | Selective access | `claude --allowedTools Edit,Read,Bash,Write,Glob,Grep -p` | Only the listed tools are permitted. Good middle ground. |
  222. | No permissions | `claude -p` | The agent can respond to comments but **cannot edit files**. Useful for Q&A-only workflows. |
  223. #### How it works
  224. 1. The agent receives the comment text, quoted text (if text was selected), file path, and line range on **stdin**.
  225. 2. The agent's **stdout** is captured and posted as a reply to the comment automatically.
  226. 3. If the agent edits files, Crit detects the changes via **file watching** and updates the UI.
  227. #### Live threads
  228. After the first agent interaction, the comment becomes a **live thread**:
  229. - Further replies you post in the thread are automatically sent to the agent - no need to click "Send to agent" again.
  230. - The agent sees the **full conversation history**, so it can build on previous context.
  231. - Live threads show a ⚡ **live** badge and green glow - the agent will respond immediately to further replies.
  232. #### Supported agents
  233. | Agent | `agent_cmd` value |
  234. | --------------------- | ------------------------ |
  235. | Claude Code | `claude -p` |
  236. | OpenCode | `opencode run` |
  237. | Cline | `cline --pipe` |
  238. | Aider | `aider --message-file -` |
  239. | Cursor (experimental) | `cursor --pipe` |
  240. > **Tip:** Claude Code still prompts for permission in `-p` mode. To let it edit files freely, use `claude --dangerously-skip-permissions -p` instead. The other agents already operate without permission prompts in their pipe/non-interactive modes.
  241. >
  242. > You can also specify a model with `--model` (e.g. `claude --model sonnet -p`).
  243. ### Everything else
  244. - **Per-branch review isolation.** Each branch gets its own review file — switch branches freely without losing comments. Review data lives in `~/.crit/reviews/`, not your repo.
  245. - **Draft autosave.** Close your browser mid-review and pick up exactly where you left off.
  246. - **Vim keybindings.** `j`/`k` to navigate, `c` to comment, `Shift+F` to finish. `?` for the full reference.
  247. - **Concurrent reviews.** Each instance runs on its own port - review multiple plans at once.
  248. - **Syntax highlighting.** Code blocks are highlighted and split per-line, so you can comment on individual lines inside a fence.
  249. - **Diagrams and custom renderers.** Mermaid fences render as diagrams, and `.mermaid` / `.mmd` files get a Diagram / Source toggle. In a Mermaid file, click a diagram node to comment on the line that defines it. See the **[renderers guide](docs/renderers.md)**.
  250. - **Live file watching.** Each new round loads the latest files. If a file under review changes during a round (in files and plan mode), Crit offers to reload the files in place, keeping your place and any comment you're writing. Comments move to their new lines at the next round, so until then one below an added or removed line can sit slightly off, as after a browser refresh.
  251. - **Paired UI and code themes.** Choose light and dark Shiki-based palettes in Settings; code, rendered markdown and review UI share their colours. System/Light/Dark selects the active palette. Preferences persist in a cookie across ports.
  252. - **Configurable code font.** Code-review Settings → Display → Code font lists coding/monospace fonts detected by the local Crit daemon, plus Default, System monospace, and a custom `font-family` fallback. Applies to code and diffs, and persists across sessions.
  253. - **Local by default.** Server binds to `127.0.0.1`. Your files stay on your machine unless you explicitly share. Non-loopback listen hosts and `public_url` require `--allow-unauthenticated-network` (or `CRIT_ALLOW_UNAUTHENTICATED_NETWORK=1`) because Crit has no network authentication — prefer SSH forwarding, Tailscale Serve to loopback, or Docker `-p 127.0.0.1:…`.
  254. - **Collapsing generated files.** Honors `linguist-generated` in `.gitattributes` — matching files appear collapsed by default.
  255. - **No analytics or tracking.** Crit collects zero telemetry. No usage stats, no crash reports, no phone-home. If we ever add anonymous usage statistics in the future, they will be explicitly opt-in.
  256. - **Update check.** On startup, Crit makes one network request to check for a newer version and prints a notice if one is available. Set `CRIT_NO_UPDATE_CHECK=1` to disable it.
  257. ## Configuration
  258. Crit supports persistent configuration via JSON files so you don't have to pass the same flags every time.
  259. | File | Scope | Location |
  260. | --------------------- | ------- | ------------------------------------------------ |
  261. | `~/.crit.config.json` | Global | Applies to all projects |
  262. | `.crit.config.json` | Project | Repo root (from `git rev-parse --show-toplevel`) |
  263. Project config overrides global. CLI flags and env vars override both.
  264. ```bash
  265. crit config --generate > ~/.crit.config.json # scaffold a starter config file
  266. crit config # view resolved config (merged global + project)
  267. ```
  268. ### Config keys
  269. All keys are optional — omit any you don't need.
  270. | Key | Type | Default | Description |
  271. | ---------------------- | -------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  272. | `port` | int | `0` (random) | Port for the local server. `0` picks a random available port. |
  273. | `host` | string | `"127.0.0.1"` | Listen host (global/CLI/env only). Non-loopback values also require `--allow-unauthenticated-network` / `CRIT_ALLOW_UNAUTHENTICATED_NETWORK=1`. Prefer loopback + SSH/Tailscale/Docker host-loopback publish. |
  274. | `no_open` | bool | `false` | Don't auto-open the browser when starting a review. |
  275. | `quiet` | bool | `false` | On success, suppress daemon connect/start lines, integration tips, and the session summary. Errors, `approved:`, and the finish prompt are unchanged. |
  276. | `output` | string | `~/.crit` | Crit data root for reviews. Reviews live in `<root>/reviews/<key>/` (same layout as the default). |
  277. | `author` | string | VCS user name | Author name shown on comments. Falls back to your configured VCS user name. |
  278. | `forge` | string | `"auto"` | Remote review provider: `"auto"`, `"github"`, or `"gitlab"`. Auto-detection uses the repository remote; set this for ambiguous self-managed hosts. |
  279. | `gitlab_url` | string | `"https://gitlab.com"` | GitLab base URL used for every MR operation. Set once for a self-managed instance; MR URL arguments must use the same host. |
  280. | `base_branch` | string | auto-detected | Base branch to diff against (e.g. `"main"`, `"develop"`). Overrides auto-detection. |
  281. | `ignore_patterns` | string[] | `[".crit/"]` | File patterns to exclude from git-mode file lists. Global and project patterns are merged. |
  282. | `auto_viewed_patterns` | string[] | `[]` | File patterns auto-marked as viewed (collapsed) once when a review opens — e.g. `["*.lock", "generated/", "PLAN.md"]`. Manually un-marking a file keeps it open. Global and project patterns are merged. |
  283. | `default_markdown_view` | string | `""` (diff in git mode) | Initial view for markdown files (Document/Diff toggle) in git mode: `"document"` opens them in document view, `"diff"` (or unset) keeps diff view. File mode is always document view. Project overrides global. |
  284. | `cleanup_on_approve` | bool | `true` | Automatically delete the review file when you approve with no unresolved comments. Set to `false` to preserve review history. |
  285. | `notify_on_round_ready`| bool | `false` | Opt in to a desktop notification when a review round becomes ready for you (after the agent finishes addressing comments). On macOS, install [`terminal-notifier`](https://github.com/julienXX/terminal-notifier) (`brew install terminal-notifier`) so clicking the notification opens the review URL — without it, clicking falls back to AppleScript's `display notification`, which macOS attributes to Script Editor and activates that instead of your browser. |
  286. | `no_update_check` | bool | `false` | Don't check for new versions on startup. |
  287. | `no_integration_check` | bool | `false` | Skip the integration config freshness check on startup. |
  288. | `vcs` | string | auto-detected | Preferred VCS backend: `"git"`, `"sl"`, or `"jj"`. When set, crit uses this VCS instead of auto-detecting. Falls back to git if the configured VCS isn't available. Can also be set via `--vcs` CLI flag (flag takes precedence over config). |
  289. | `live_cookie` | string | `""` | Cookie header value forwarded to the upstream app in live mode (e.g. `"_crit_key=..."`). Global or project. Prefer `live_cookie_file` for secrets. |
  290. | `live_cookie_file` | string | `""` | Path to a file with upstream cookies for live mode (raw header lines or Netscape jar). Global or project; relative paths resolve from repo root. |
  291. | `live_cdp_url` | string | `""` | Chrome DevTools URL (e.g. `http://127.0.0.1:9222`) to reuse browser cookies for the live upstream. Global or project. |
  292. | `prompts` | object | `{}` | Custom finish-hook templates (project overrides global per key). See [Agent prompts](docs/agent-prompts.md). |
  293. | `hooks` | object | `{}` | Custom finish-hook **commands** executed at Finish/Approve (project overrides global per key). Deterministic side effects — `crit` pipes a JSON payload to stdin and sets `CRIT_*` env vars. See [Command hooks](docs/agent-hooks.md). |
  294. ### Agent prompts
  295. Customize what Crit tells your agent when you **Finish Review** or **Approve**. Hooks are templates in global or project config (`prompts` map) and `.crit/prompts/*.md` files.
  296. See the **[agent prompts guide](docs/agent-prompts.md)** for hook reference, template variables, trust flow, and examples.
  297. ### Command hooks
  298. Run your own scripts when you **Finish Review** or **Approve** — deterministic side effects, no LLM in the loop. Crit pipes a JSON payload to the hook's stdin and sets `CRIT_*` env vars (review path, session key, mode, unresolved count, files-with-comments, …). Keys and resolution mirror the prompt system (`on_finish_unresolved` / `on_finish_approved`, optionally `:files` / `:diff` / `:live` / `:preview`), and project hooks go through the same trust gate as project prompts.
  299. ```bash
  300. # ~/.crit.config.json
  301. {
  302. "hooks": {
  303. "on_finish_unresolved": "inline:rsync -a \"$CRIT_REVIEW_PATH\" ~/reviews/$CRIT_SESSION_KEY.json",
  304. "on_finish_approved": "file:~/.crit/hooks/approved.sh"
  305. }
  306. }
  307. ```
  308. See the **[command hooks guide](docs/agent-hooks.md)** for the full env-var/stdin reference, trust flow, and examples (including the “snapshot commented-on files” recipe). Reference example hook scripts live under [`docs/example-hooks/`](https://github.com/tomasz-tomczyk/crit/tree/main/docs/example-hooks) in the repo — they're documentation, not installed by `crit install` and not tracked among the integrations (hooks are opt-in and not used by default).
  309. ### Global-only config keys
  310. These keys can only be set in `~/.crit.config.json` (global). Project-level `.crit.config.json` cannot override them — this prevents a malicious repository from hijacking local commands or redirecting share requests.
  311. | Key | Type | Default | Description |
  312. | ---------------------- | -------- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  313. | `agent_cmd` | string | `""` | Shell command for "Send to agent" (e.g. `"claude -p"`). See [Send to agent](#send-to-agent-experimental). |
  314. | `open_cmd` | string | `""` | Custom command to open review URLs — receives the URL as its only argument (must be a single executable, no flags). Use when the browser isn't on the machine running crit, e.g. crit runs on a remote host over SSH and a small wrapper script opens the URL on your local machine. When unset, crit uses the platform default opener. |
  315. | `share_targets` | array | implicit crit.md when absent | Deployment list with per-target `name`, `url`, `default`, `proxy_auth`, nested `auth`, and public `share_consented`. An explicit empty array disables sharing. |
  316. | `auth_token` | string | `""` | Legacy singleton token; read only while `share_targets` is absent. |
  317. | `share_url` | string | implicit `"https://crit.md"` | Legacy singleton URL. An explicitly empty value disables sharing; migrate with `crit config --migrate`. |
  318. | `public_url` | string | `""` | Advertised base URL for stderr and browser-open (e.g. `https://machine.ts.net` via tailscale serve). Listen address unchanged. Requires `--allow-unauthenticated-network` / `CRIT_ALLOW_UNAUTHENTICATED_NETWORK=1`. |
  319. | `share_consented` | bool | `false` | Written automatically to `true` after you confirm the first-time share prompt. Reset to `false` to see the prompt again. Not used when `share_url` is a custom (self-hosted) URL. |
  320. | `proxy_auth` | bool | `false` | When `true`, share / pull / unpublish / re-share use the browser popup relay instead of the local Go server contacting crit-web directly. Use when crit-web is behind an SSO reverse proxy that the terminal cannot authenticate against. No flag or env var — this is a property of the deployment, not a per-invocation choice. |
  321. | `plan_approve_mode` | string | unset | Claude Code permission mode after Crit approves an `ExitPlanMode` hook: `default`, `manual`, `acceptEdits`, `plan`, `auto`, `dontAsk`, or `bypassPermissions`. The update uses `destination: "session"`, so it lasts only for the current Claude Code session. See [Claude Code plan approval mode](integrations/README.md#claude-code-plan-approval-mode). |
  322. | `close_on_approve_after_ms` | int | unset (disabled) | Auto-close the review tab this many milliseconds after you Approve with no unresolved comments. Unset means no auto-close (current behavior); negative values are treated as unset. A Cancel button during the countdown skips the close for that approval. |
  323. | `stale_review_days` | int | `14` | Delete reviews untouched for this many days in the background sweep that runs when a review starts. Unset or non-positive values use the default. `crit cleanup --days N` is unaffected. |
  324. | `remote_images` | string[] | `[]` | Hosts whose remote (http/https) images load without a click: `"img.shields.io"`, `"*.githubusercontent.com"` (subdomains only), or `"*"` for any host. See [Remote images](#remote-images). |
  325. ### Remote images
  326. Reviewed files and comments can be written by an agent, so Crit does not load images from other hosts on its own: a remote image URL can carry data to whoever runs that host, even when the agent itself has no network access. Each remote image shows as a placeholder with the image's host; click it to load that image. The review page's Content-Security-Policy blocks remote images and media, so this holds for every way an image can get onto the page, including raw HTML and diagrams.
  327. To load images from hosts you trust without clicking, list them in `remote_images` in `~/.crit.config.json`:
  328. ```json
  329. { "remote_images": ["img.shields.io", "*.githubusercontent.com"] }
  330. ```
  331. `remote_images` is global-only: a project's `.crit.config.json` cannot set it, because an agent can write that file. The same policy applies to `~/.crit/custom.css`: it can load fonts from Google Fonts and images from `remote_images` hosts, or use `data:` URLs.
  332. This covers the review page itself. The HTML file shown by `crit preview` and the pages of your dev server in live mode are not covered: they run with their own content and headers.
  333. ### CLI flags
  334. | Flag | Short | Equivalent config key | Description |
  335. | --------------- | ----- | --------------------- | -------------------------------------- |
  336. | `--port` | `-p` | `port` | Port to listen on |
  337. | `--host` | | `host` | Listen host (default `127.0.0.1`) |
  338. | `--public-url` | | `public_url` | Advertised review URL (listen unchanged) |
  339. | `--allow-unauthenticated-network` | | — | Required with non-loopback `--host` or any `--public-url` |
  340. | `--no-open` | | `no_open` | Don't auto-open browser |
  341. | `--share-url` | | `share_url` | Share service URL |
  342. | `--output` | `-o` | `output` | Crit data root for reviews (`<root>/reviews/<key>/`). |
  343. | `--quiet` | `-q` | `quiet` | On success, suppress connect/start status, tips, and session summary |
  344. | `--base-branch` | | `base_branch` | Base branch to diff against |
  345. | `--vcs` | | `vcs` | VCS backend (`git`, `sl`, or `jj`) |
  346. | `--no-ignore` | | | Temporarily bypass all ignore patterns |
  347. | `--version` | `-v` | | Print version and exit |
  348. **Live mode only** (`crit live <url>` — see `crit live --help`):
  349. | Flag | Equivalent config key | Description |
  350. | --------------- | --------------------- | ----------- |
  351. | `--cookie` | `live_cookie` | Upstream cookie value (repeatable) |
  352. | `--cookie-file` | `live_cookie_file` | File with upstream cookies |
  353. | `--cdp-url` | `live_cdp_url` | Chrome DevTools URL to reuse browser cookies |
  354. ### Ignore patterns
  355. Patterns from global and project configs are merged. Supported syntax:
  356. | Pattern | Matches |
  357. | ------------------- | ----------------------------------------------- |
  358. | `*.lock` | Files ending in `.lock` anywhere in tree |
  359. | `vendor/` | All files under `vendor/` |
  360. | `package-lock.json` | Exact filename anywhere in tree |
  361. | `generated/*.pb.go` | Path prefix with glob (`filepath.Match` syntax) |
  362. Use `--no-ignore` to temporarily bypass all patterns:
  363. ```bash
  364. crit --no-ignore
  365. ```
  366. ### Custom styles
  367. To restyle Crit with your own CSS, create `~/.crit/custom.css`. Every Crit page (reviews, live mode and the theme preview) loads it after Crit's own styles, reading it fresh each time, so edit the file and reload the tab to see changes. If the file can't be read, Crit logs why and uses its own styles. In review and live mode, Settings → Configuration shows whether the file exists and its path, and Settings → Display has a "Use custom CSS" switch to turn it off without deleting it.
  368. Crit marks the page with the mode in use, `data-crit-mode="light"` or `"dark"` (also when following the system setting), so you can keep everything for one mode in one block. Override theme variables and nest element rules inside it:
  369. ```css
  370. :root[data-crit-mode="dark"] {
  371. /* the block a comment is on, and the exact words it quotes */
  372. --crit-comment-range-bg: rgba(83, 155, 245, 0.15);
  373. --crit-quote-highlight-bg: rgba(83, 155, 245, 0.28);
  374. .line-block.has-comment { box-shadow: inset 3px 0 0 #539bf5; }
  375. }
  376. :root[data-crit-mode="light"] {
  377. --crit-comment-range-bg: rgba(9, 105, 218, 0.10);
  378. --crit-quote-highlight-bg: rgba(9, 105, 218, 0.18);
  379. .line-block.has-comment { box-shadow: inset 3px 0 0 #0969da; }
  380. }
  381. ```
  382. For a single value that differs by mode, `light-dark(light, dark)` also works.
  383. Code diffs are drawn inside shadow roots, which page CSS cannot reach with selectors; only inherited CSS variables (such as the ones above, or `--diffs-*` overrides) get through. Override the derived `--crit-*` variables, as above: the palette's own `--crit-palette-*` values are set inline on `<html>`, so they only change with `!important`. Class names are not a stable API and may change between releases.
  384. ### Environment variables
  385. | Variable | Description |
  386. | --------------------------- | ------------------------------------------------- |
  387. | `CRIT_PORT` | Default port for the local server |
  388. | `CRIT_HOST` | Listen host (default `127.0.0.1`) |
  389. | `CRIT_PUBLIC_URL` | Advertised review URL (e.g. tailscale serve) |
  390. | `CRIT_ALLOW_UNAUTHENTICATED_NETWORK` | Allow non-loopback host / public_url (`1`/`true`/`yes`/`on`) |
  391. | `CRIT_SHARE_URL` | Override the share service URL |
  392. | `CRIT_AUTH_TOKEN` | Override the auth token (skips `crit auth login`) |
  393. | `CRIT_NO_UPDATE_CHECK` | Disable the update check on startup |
  394. | `CRIT_NO_INTEGRATION_CHECK` | Skip integration config freshness checks |
  395. ## Other Install Methods
  396. ### Build from Source
  397. Requires Go 1.26+:
  398. ```bash
  399. git clone https://github.com/tomasz-tomczyk/crit.git
  400. cd crit
  401. go build -o crit ./cmd/crit
  402. mv crit /usr/local/bin/
  403. ```
  404. ### Go
  405. ```bash
  406. go install github.com/tomasz-tomczyk/crit/cmd/crit@latest
  407. ```
  408. ### Nix
  409. ```bash
  410. nix run github:tomasz-tomczyk/crit -- --help
  411. ```
  412. Or add it to a `flake.nix`:
  413. ```nix
  414. inputs.crit.url = "github:tomasz-tomczyk/crit";
  415. ```
  416. ### Download Binary
  417. Grab the latest binary for your platform from [Releases](https://github.com/tomasz-tomczyk/crit/releases).
  418. ### Windows
  419. Native Windows: download `crit-windows-amd64.exe` (or `crit-windows-arm64.exe`) from [Releases](https://github.com/tomasz-tomczyk/crit/releases), rename to `crit.exe`, and place it on your `PATH`.
  420. WSL: install the Linux binary as you would on Linux (`go install`, `nix run`, or download `crit-linux-amd64` from Releases). Crit detects WSL and opens URLs in your Windows host browser via `wslview` / `powershell.exe` / `cmd.exe`.
  421. ### Docker (sandboxed agents)
  422. For running crit alongside an AI agent inside a container, with the review UI reachable from your host browser, see [`integrations/docker/`](integrations/docker/). Includes a working `Dockerfile` + `entrypoint.sh` that bridges crit's loopback-bound server via `socat`. Publish with `-p 127.0.0.1:8080:8080` so the host mapping stays on loopback.
  423. ## Acknowledgements
  424. Crit embeds the following open-source libraries:
  425. - [markdown-it](https://github.com/markdown-it/markdown-it): Markdown parser
  426. - [@pierre/diffs](https://github.com/pierrecomputer/pierre): Diff and code rendering
  427. - [Shiki](https://github.com/shikijs/shiki): Syntax highlighting and code themes
  428. - [Mermaid](https://github.com/mermaid-js/mermaid): Diagram rendering

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.