A terminal UI for reviewing git diffs and providing feedback to coding agents. Built for developers running multiple agents across worktrees who need a fast way to review changes, annotate code, and send structured feedback back.
- Split and unified diff views — side-by-side or interleaved, toggle with
Tab - Syntax highlighting — tree-sitter powered, supports Rust, TypeScript, JavaScript, Python, Go, Ruby, JSON, TOML, YAML, CSS, HTML, and Bash
- Inline annotations — select diff lines in visual mode and attach review comments that persist across sessions
- Prompt templating — annotations and diff context are rendered into a structured prompt you can copy to clipboard (
y) and paste into any agent session, or send directly to a configured agent (Ctrl+A) - Worktree browser — browse and switch between git worktrees with automatic detection of active coding agents (Claude Code, Codex, OpenCode, Gemini)
- Git operations — stage, unstage, restore files, and commit without leaving the TUI
- Runtime target switching — change the comparison ref (branch, tag, commit) at runtime with
t - Fuzzy file search — quickly filter the file list with
/ - Whitespace toggle — hide whitespace-only changes with
w
Homebrew
brew install mutinyhq/tap/mdiff
Cargo
cargo install mutiny-diff
GitHub Releases
Pre-built binaries for macOS (Intel & Apple Silicon) and Linux (x86_64 & ARM) are available on the releases page.
# Review what an agent changed on this worktree
mdiff
# Compare against main to see the full branch diff
mdiff main
# Diff against a specific commit
mdiff abc1234
# Browse worktrees to check on multiple agents
mdiff --wt
# Start in unified view, ignoring whitespace
mdiff --unified -wmdiff fits into a workflow where you have multiple coding agents working in parallel across git worktrees. You review their output, leave feedback as annotations, and send that feedback back — either by copying a templated prompt into an existing agent session or by launching an agent directly.
- Open
mdiff(ormdiff --wtto start in the worktree browser) - Browse worktrees to see which agents are active and switch to one to review
- Navigate the diff, press
vto select lines, and pressito annotate with your feedback - Repeat across files — annotations persist per comparison target across sessions
- When ready to send feedback:
- Press
yto copy the rendered prompt (diff context + annotations) to your clipboard, then paste it into your existing agent session - Or press
Ctrl+Ato launch a configured agent directly with the prompt
- Press
- Press
pto preview the prompt before sending
Press ? to show all keybindings in the HUD. The essentials:
| Key | Action |
|---|---|
j / ↓ |
Next item / scroll down |
k / ↑ |
Previous item / scroll up |
g |
Jump to top |
G |
Jump to bottom |
] |
Jump to next hunk |
[ |
Jump to previous hunk |
h / ← |
Focus file navigator |
l / → / Enter |
Focus diff view |
/ |
Search files (or current file in diff view) |
Ctrl+F |
Search across all diff content |
n / N |
Next/previous search match (in global search) |
Tab |
Toggle split/unified view |
PageUp / PageDown |
Scroll page |
| Key | Action |
|---|---|
v |
Enter visual mode (select lines) |
i |
Add comment on selection |
a |
Open annotation menu on current line |
d |
Delete annotation on selection |
Ctrl+] / Ctrl+[ |
Jump to next/previous annotation |
y |
Copy rendered prompt to clipboard |
p |
Toggle prompt preview |
Ctrl+A |
Open agent selector |
| Key | Action |
|---|---|
s |
Stage file |
u |
Unstage file |
r |
Restore file |
c |
Open commit dialog |
t |
Change comparison target |
R |
Refresh diff |
| Key | Action |
|---|---|
q |
Quit |
Ctrl+C / Ctrl+D |
Quit (press the same combo twice, from any modal) |
w |
Toggle whitespace |
o |
Toggle agent outputs tab |
Ctrl+W |
Toggle worktree browser |
? |
Show/hide all keybindings |
| Key | Action |
|---|---|
j / ↓ |
Next worktree |
k / ↑ |
Previous worktree |
Enter |
Select worktree |
r |
Refresh list |
f |
Freeze worktree (stage all + auto-commit) |
Esc |
Back to diff view |
Configure agents in ~/.config/mdiff/config.toml:
[[agents]]
name = "claude"
command = "claude --model {model} --print '{rendered_prompt}'"
models = ["sonnet", "opus"]
[[agents]]
name = "codex"
command = "codex --model {model} --prompt '{rendered_prompt}'"
models = ["o3-mini", "o4-mini"]The {rendered_prompt} placeholder is replaced with the templated prompt containing the diff context, selected code, and your annotations. The {model} placeholder is replaced with the model you select.
| Flag | Description |
|---|---|
<TARGET> |
Branch, commit, or ref to diff against (default: HEAD) |
--wt |
Open worktree browser directly |
-w, --ignore-ws |
Ignore whitespace changes |
--unified |
Start in unified view instead of split |
MIT