Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

🐱 diffcat

cat, but for git diffs.

CI Go License Release

diffcat browsing a branch diff

Why diffcat?

There are good diff tools already: delta, difftastic, lazygit, tig. diffcat is narrower on purpose, its main focus is on making the git diff view experience delighful.

Features

  • TUI with native vim keybindings
  • GitHub-style diffs: green/red tints, line-number gutters, syntax highlighting, surrounding-line expansion
  • Unified or side-by-side view (s); a theme picker (t) with 8 color themes, light/dark, file-type icons, and a reduce-motion toggle
  • Auto-detected base, or any ref via --base
  • Commit history view with per-commit diffs
  • Stats dashboard (S): contribution calendar, per-author ranking, activity charts, streaks, and a human-vs-AI split that names each agent

Demo

commit details modal and the whole-repo stats dashboard

fuzzy find and in-diff search

Install

Prebuilt binary (no Go required). Download the tarball for your platform from the latest release (darwin-amd64, darwin-arm64, linux-amd64, linux-arm64), then:

tar -xzf diffcat-*-darwin-arm64.tar.gz # match the file you downloaded
sudo mv diffcat /usr/local/bin/

With Go (1.25+):

go install github.com/trebaud/diffcat/cmd/diffcat@latest

From source:

git clone https://github.com/trebaud/diffcat.git && cd diffcat && ./scripts/install.sh

Commands

diffcat [path] [--base <ref>] # launch the TUI (path defaults to .)
diffcat files [path] [--base <ref>] # print the changed-file list, non-interactive

--base, -b <ref> overrides the base. It accepts any git ref: a branch, remote branch, tag, or commit.

diffcat -b develop
diffcat -b origin/main
diffcat -b v1.2.0
diffcat -b 3f9a1c2

Without --base, the base is auto-detected: origin/HEAD, else master, else main.

Themes & appearance

Press t in the TUI for the theme picker: arrow through the themes with a live preview, T flips light/dark, i cycles the file-type icon set, m toggles animations, ↡ keeps the choice (persisted), esc reverts. Your selection is saved to ~/.config/diffcat/config.json and restored on the next run.

You can also set appearance up front, via flags or environment variables:

diffcat --theme dracula # github (default), dracula, nord, catppuccin,
 # gruvbox, tokyonight, solarized, monochrome
diffcat --icons nerd # ascii (default), unicode, nerd (needs a Nerd Font)
diffcat --no-anim # freeze the nyan cat, pulse, and shimmer
DIFFCAT_THEME=nord diffcat # env equivalents: DIFFCAT_THEME, DIFFCAT_ICONS,
 # DIFFCAT_NO_ANIM

Precedence is flag β†’ environment β†’ saved config β†’ terminal auto-detection. NO_COLOR is honored: when set, diffcat forces the monochrome theme and freezes all motion.

License

MIT, see LICENSE. Built on Bubble Tea, Lip Gloss, Cobra, and Chroma.

About

TUI for visualizing git diffs

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /