A beautiful, snappy, and highly interactive tool for exploring diffs without leaving your terminal.
Run dv with no arguments to see changes currently tracked by git.
- Unified and split diffs
- Snappy native terminal app
- Lots of pretty themes
- Keyboard centric
- Mouse support
- Command palette
- Synchronised scrolling
- Intraline diff highlighting
- Supports piped input
Install it using Homebrew:
brew install darrenburns/homebrew/dvAlternatively install using Go (ensure $GOPATH/bin or $HOME/go/bin is in your PATH):
go install github.com/darrenburns/dv@latestThen run it like this:
dvdv displays your current staged/unstaged files from git.
You can also pipe a diff directly into dv:
git diff | dv
gh pr diff <number> | dvMost keybinds are documented either in the footer, command palette (ctrl+p), or in the UI itself.
Some things that aren't as clear at the moment:
- You can click and drag the sidebar divider to resize it.
- You can click and drag the central divider when in side-by-side/split view to adjust the ratio.
- As a shortcut you can use
ctrl+h/ctrl+lto shift it left/right.
- As a shortcut you can use
- Tab and shift-tab move focus
- Press
/from the file tree or diff view to filter files (if the sidebar is hidden, this opens it). While the filter input is focused,up/downmove through matching files,tabmoves focus back to the tree, andescclears the filter. - Press
yto copy the active file path to your clipboard (also available via the command palette).
There are a few CLI options available for customising dv.
| Flag | Values | Default |
|---|---|---|
--view |
unified, split |
unified |
--sidebar |
true, false |
true |
--theme |
any built-in theme name (for example catppuccin, dracula, nord) |
obsidian-tide |
--intraline-style |
background, underline |
background |
--show-symbols |
true, false |
false |
--ignore-whitespace |
true, false |
false |
--config |
path to a YAML config file | auto-discover via XDG |
--no-config |
true, false |
false |
Example using all options:
dv --view split --sidebar=false --theme catppuccin --intraline-style underline --show-symbolsdv can load startup defaults from a YAML config file.
Default path:
$XDG_CONFIG_HOME/dv/config.yaml
This path is resolved using xdg.ConfigHome via the github.com/adrg/xdg package.
Precedence:
- CLI flags
- Config file
- Built-in defaults
You can also use:
--config /path/to/config.yamlto load an explicit file path.--no-configto disable config loading for a run.
Example config file:
view: split
sidebar: true
theme: catppuccin
intraline-style: underline
show-symbols: false
ignore-whitespace: trueNotes:
- For string flags, both
--flag valueand--flag=valuework. - For booleans, prefer
--flag=falsewhen disabling. ignore-whitespaceis unavailable in piped mode (git diff | dv); apply whitespace flags before piping.