Terminal UI git diff viewer built with Go and Bubble Tea. Two-panel layout: file list + syntax-highlighted diff preview.
brew install jansmrcka/tap/differOr via Go:
go install github.com/jansmrcka/differ@latestOr build from source:
make build # → bin/differ
make install # → $GOPATH/bin/differdiffer # all changes (staged + unstaged + untracked)
differ -s # staged only
differ -r main # compare against ref
differ -c # open in commit mode
differ log # browse recent commits
differ commit # review staged + commit| Key | Action |
|---|---|
j/k |
navigate files |
enter / l |
view diff |
tab |
stage/unstage file |
a |
stage all |
c |
commit (AI-generated message via claude) |
b |
open branch picker |
v |
toggle split (side-by-side) diff |
e |
open in editor ($EDITOR, configurable) |
P |
push (auto --set-upstream if needed) |
F |
pull (fast-forward only) |
g/G |
first/last file |
q |
quit |
| Key | Action |
|---|---|
j/k |
scroll |
d/u |
half page down/up |
g/G |
top/bottom |
n/p |
next/prev file |
tab |
stage/unstage |
b |
open branch picker |
v |
toggle split diff |
e |
open in editor |
esc / h |
back to file list |
| Key | Action |
|---|---|
enter |
confirm commit |
esc |
cancel |
| Key | Action |
|---|---|
| type | filter branches |
↑/↓ / ^j/^k |
navigate |
enter |
switch branch |
ctrl+n |
create new branch |
esc |
clear filter / close |
When pressing c, differ uses claude -p (Claude CLI) to generate a commit message from the staged diff. The message is pre-filled in the input — edit or confirm with Enter.
Requires Claude CLI installed. Falls back to empty input if unavailable.
differ --theme dark # default
differ --theme lightConfig file: ~/.config/differ/config.json
{
"theme": "dark",
"commit_msg_cmd": "claude -p",
"commit_msg_prompt": "Write a concise git commit message for this diff:",
"editor_cmd": "tmux new-window -c {repo} nvim {file}",
"split_diff": false
}editor_cmd supports {file} (absolute path) and {repo} (repo root) placeholders. Defaults to $EDITOR {file} (falls back to vi).
Bind differ to a key in tmux for quick access as a popup overlay:
bind g display-popup -E -w 90% -h 90% "cd #{pane_current_path} && differ"Press prefix + g to open differ in a floating window over your current session. It closes automatically on quit.
- Syntax highlighting via Chroma (Go, JS/TS, Python, Rust, CSS, HTML, JSON, YAML, Markdown, ...)
- Staged/unstaged/untracked file indicators
- Stage/unstage individual files or all at once
- Split (side-by-side) diff view
- Branch picker with type-to-filter and branch creation (
ctrl+n) - Push with auto
--set-upstreamfor new branches - Pull with upstream ahead/behind tracking
- Per-file added/deleted line counts in file list
- Configurable editor command (
editor_cmd) - Commit flow with AI-generated messages
- Commit log browser with diff preview
- Compare against any branch/tag/commit ref
- Auto-refresh (2s polling)
- Single binary, no runtime dependencies
