dv

command module
v0.6.1-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 27 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dv

A beautiful, snappy, and highly interactive tool for exploring diffs without leaving your terminal.

image

Run dv with no arguments to see changes currently tracked by git.

Highlights

  • 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

Installation

Install it using Homebrew:

brew install darrenburns/homebrew/dv

Alternatively install using Go (ensure $GOPATH/bin or $HOME/go/bin is in your PATH):

go install github.com/darrenburns/dv@latest

Then run it like this:

dv

dv displays your current staged/unstaged files from git.

Piped Input

You can also pipe a diff directly into dv:

git diff | dv
gh pr diff <number> | dv

Things you can do

Most 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+l to shift it left/right.
  • 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/down move through matching files, tab moves focus back to the tree, and esc clears the filter.
  • Press y to copy the active file or directory path to your clipboard (also available via the command palette).
  • Press m to toggle seen on the active file, or M to clear all seen marks (both are also available in the command palette).
  • Press ctrl+j/ctrl+k to move to the next/previous file (same as n/p).

Startup options

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, off 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-symbols

Config file

dv 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:

  1. CLI flags
  2. Config file
  3. Built-in defaults

You can also use:

  • --config /path/to/config.yaml to load an explicit file path.
  • --no-config to disable config loading for a run.

Example config file:

view: split
sidebar: true
theme: catppuccin
intraline-style: underline
show-symbols: false
ignore-whitespace: true

Notes:

  • For string flags, both --flag value and --flag=value work.
  • For booleans, prefer --flag=false when disabling.
  • ignore-whitespace is unavailable in piped mode (git diff | dv); apply whitespace flags before piping.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址