CLI Reference
nittle reviews whichever git repo you run it from. Each command prints a http://127.0.0.1:<port> URL and opens it in your browser — the diff renders there, not in the terminal.
Getting help
Section titled “Getting help”nittle --help prints an overview with common tasks and examples. Every command also takes --help (or -h) for its own options, examples, and related commands:
nittle update --helpnittle mcp --helpnittle setup -hCommands
Section titled “Commands”nittle
Section titled “nittle”Review the working tree against HEAD, including untracked files.
nittlenittle staged
Section titled “nittle staged”Review staged changes only.
nittle stagednittle <branch>
Section titled “nittle <branch>”Review the current branch against the named branch, using a PR-style three-dot comparison.
nittle mainnittle <ref1>..<ref2>
Section titled “nittle <ref1>..<ref2>”Review a commit range.
nittle v0.1.0..HEADnittle show [rev]
Section titled “nittle show [rev]”Review one commit. With no rev it reviews HEAD. It shows the same diff as nittle <rev>^!, with the commit’s short hash (click to copy the full hash), subject, message, author and date above the files.
A root commit is compared with the empty tree. A merge commit is compared with its first parent, and the header says so.
The review is pinned to the full commit hash. Reopen it later and you see the same diff, even after HEAD has moved. It reopens only while the commit still exists in the repo (a rebase plus gc removes it).
It takes -p, --port <n>, --no-open and --no-lsp, as for the default command.
nittle show # the last commitnittle show HEAD~2 # an earlier commitnittle show a1b2c3d # any commit by hashnittle browse [path]
Section titled “nittle browse [path]”Review the whole codebase, optionally scoped to a path.
nittle browsenittle browse src/servernittle mcp serve
Section titled “nittle mcp serve”Run the local MCP server for agent integrations. See MCP tools.
nittle mcp servenittle mcp list
Section titled “nittle mcp list”List running nittle MCP servers (pid and binary path).
nittle mcp listnittle mcp restart [--yes]
Section titled “nittle mcp restart [--yes]”Stop every running nittle MCP server so your agent relaunches it, e.g. on the new binary after an update. Agents don’t respawn a stopped stdio server by themselves: in Claude Code, reconnect it from /mcp or start a new session. It refuses while a review session is live, since a review can be hosted inside an MCP server; stale sessions don’t block it. --yes skips the confirmation.
nittle mcp restartnittle mcp restart --yesnittle setup [--remove] [--agents <id,id>] [--yes]
Section titled “nittle setup [--remove] [--agents <id,id>] [--yes]”Wire nittle into your coding agents. It detects installed agents (binary on PATH or config directory present), shows a checkbox list (↑↓ move, space select, a all, enter confirm) with detected agents first and pre-checked, prints every command and file it will touch, and asks Proceed? [y/N] before applying. It’s idempotent: re-running reports unchanged. See Agent feedback.
--remove reverses the setup. Its list starts with every agent nittle is currently set up in, tagged (set up) and pre-checked, so pressing enter removes them all; unchecking one leaves it set up and exits non-zero (so the uninstaller keeps the binary). --agents selects agents non-interactively and --yes skips the confirmation. Without a terminal and without --agents, it exits 1 with a hint.
nittle setupnittle setup --agents claude,codex --yesnittle setup --removeAgent ids: claude, codex, cursor, gemini, vscode, windsurf, opencode, zed, copilot.
nittle hook stop --agent <codex|claude-code>
Section titled “nittle hook stop --agent <codex|claude-code>”Completion-hook entry used by the agent integrations.
nittle hook stop --agent codexnittle hook stop --agent claude-codenittle sessions
Section titled “nittle sessions”List running nittle sessions with their host, port, age, and live/stale status.
nittle sessionsnittle cleanup [--yes] [--all]
Section titled “nittle cleanup [--yes] [--all]”Stop stale sessions and finished reviews. --yes skips the confirmation; --all also stops active sessions.
nittle cleanupnittle cleanup --yesnittle cleanup --all --yesnittle update [--check]
Section titled “nittle update [--check]”Download and install the latest release. It verifies the download’s SHA-256 and refuses when a package manager owns the install. After installing, it stops MCP servers still running the old binary (the same as nittle mcp restart) as long as no review session is live; otherwise it tells you to run nittle mcp restart later. It ends with a numbered list of the next steps that apply to you: restart any open review (it still runs the old version), reconnect your agents if their MCP servers were stopped (Claude Code: /mcp → reconnect, or a new session), run nittle mcp restart once live reviews finish if they blocked it, and confirm with nittle --version in a new shell. On Windows a copy of the old binary still held by a running MCP server can’t be deleted, so it is retired under a unique name and cleaned up by a later update. --check only reports whether a newer release exists and never downloads; it also works in a source checkout. See Configuration for the full update behavior.
nittle updatenittle update --checkAn installed binary also announces a newer release in one line when a review launches, checking GitHub at most once a day. Set NITTLE_NO_UPDATE_CHECK=1 to silence it (it’s also skipped when CI is set).
nittle doctor [--fix] [--yes]
Section titled “nittle doctor [--fix] [--yes]”Check the Claude Code plugin install for stale diffle-review or loupe-review leftovers and report what to repair. It also reports whether a newer release is published. --fix runs the repair commands through the claude CLI; --yes skips the confirmation. See Migrating from diffle.
nittle doctornittle doctor --fixOptions
Section titled “Options”| flag | meaning |
|---|---|
-p, --port <n> |
serve on a fixed port (default: any free port) |
--no-open |
don’t open the browser automatically |
--wait |
block until you send feedback, approve or cancel, then print the prompt on stdout (see Agent feedback) |
--json |
with --wait, print the review as JSON instead of the prompt |
--no-lsp |
start no language servers (see Code navigation) |
--review-id <id> |
open an existing durable Review Record |
-v, --version |
print the installed version |
--license |
print the bundled MIT license notice |
-h, --help |
show help |
Shell completion
Section titled “Shell completion”nittle completion --shell <bash|zsh|fish|powershell> prints a tab-completion script to stdout. It completes commands (show, mcp, setup, doctor, sessions, cleanup, update, completion), subcommands (mcp serve|list|restart), each command’s flags, enumerable flag values (--shell, --agent, --agents), and refs for the review and show commands: branches, remote branches and tags.
Refs are read from git when you press tab, so a branch you created a minute ago shows up without regenerating anything. The script comes from the same table that drives --help, so a new flag shows up in all four shells in the next release.
nittle never edits your shell profile. Add the line for your shell yourself.
Add to ~/.bashrc:
eval "$(nittle completion --shell bash)"Add to ~/.zshrc, after compinit:
source <(nittle completion --shell zsh)Or save the script as _nittle in a directory on your $fpath (before compinit) and compinit loads it on demand:
nittle completion --shell zsh > ~/.zfunc/_nittleAdd to ~/.config/fish/config.fish, or save the output as ~/.config/fish/completions/nittle.fish to load it on demand:
nittle completion --shell fish | sourcePowerShell
Section titled “PowerShell”Add to your profile (notepad $PROFILE):
nittle completion --shell powershell | Out-String | Invoke-ExpressionOpen a new shell afterwards. Tab completes nittle <tab>, nittle mcp <tab>, nittle setup --<tab> and nittle show <tab>.
Old command names
Section titled “Old command names”There is no diffle or loupe alias. The binary is nittle, and the first run moves an older install over. See Migrating from diffle.