Skip to main content

An interactive git commit picker and diff viewer, inspired by lazygit and powered by git-delta

Project description

diffpick

An interactive commit picker and diff viewer for git.

Designed as a diff-viewing companion to lazygit — built because viewing diffs felt like the rough edge in lazygit's otherwise excellent UX. Keybindings follow lazygit conventions where it makes sense; see KEYBINDINGS.md for the full table.

Rendering is done by git-delta.

What it does

  • Lazygit-inspired commit picker with single-commit and range selection
  • Side-by-side or unified diff view (auto-adapts to terminal width)
  • Zoom into a commit to browse its file tree
  • Hunk navigation, full-file context view, "open in editor" jump
  • Filter by path or commit subject
  • Familiar keybindings: j/k, /, v for range, F7 for next hunk, ? for help

Prerequisites

Install delta:

macOS:        brew install git-delta
Windows:      winget install dandavison.delta   (or: scoop install delta)
Debian/Ubuntu: sudo apt install git-delta
Arch:         sudo pacman -S git-delta
Fedora:       sudo dnf install git-delta
Any:          cargo install git-delta

If you don't have Python yet:

  • macOS: brew install python
  • Windows: install from https://python.org or winget install Python.Python.3.12
  • Linux: already there on most distros (python3 --version to check)

Install

The recommended way is pipx, which installs CLI tools into isolated environments:

pipx install diffpick

If you don't have pipx:

macOS:    brew install pipx && pipx ensurepath
Windows:  python -m pip install --user pipx && python -m pipx ensurepath
Linux:    sudo apt install pipx && pipx ensurepath   (or: python -m pip install --user pipx)

Alternative — with uv:

uv tool install diffpick

Or plain pip into a venv:

python -m venv ~/.venvs/diffpick
~/.venvs/diffpick/bin/pip install diffpick
~/.venvs/diffpick/bin/diffpick

Usage

diffpick                  # open the TUI in the current repo
diffpick path/to/file     # narrow to commits touching one path
diffpick --side-by-side   # force side-by-side layout
diffpick --unified        # force unified layout
diffpick --help

Inside the TUI, press ? for the keybinding list.

Configuration

Editor for "open file at line"

Pressing o on a focused hunk or selected file launches it in your editor at the right line. The command is resolved in this order:

  1. DIFFPICK_OPEN_CMD — full format string, with {file} and {line} placeholders. Power-user override:
    export DIFFPICK_OPEN_CMD='code -g {file}:{line}'
    
  2. $VISUAL or $EDITOR — if the basename matches a known editor (code, code-insiders, vim, nvim, subl, idea, pycharm, webstorm, goland, rubymine, emacs), the right "open at line" invocation is used automatically. Unknown editors are launched without a line number.
  3. Fallbackcode -g {file}:{line} if code is on PATH.

WSL note

If you're on WSL and use VS Code, install the WSL extension in your Windows VS Code (formerly "Remote - WSL"). With the extension and code on PATH inside WSL, opening files from diffpick "just works." If code is missing, run Shell Command: Install 'code' command in PATH from VS Code's command palette (Ctrl+Shift+P).

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

diffpick-0.2.0.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

diffpick-0.2.0-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file diffpick-0.2.0.tar.gz.

File metadata

  • Download URL: diffpick-0.2.0.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for diffpick-0.2.0.tar.gz
Algorithm Hash digest
SHA256 fa24147f34ea3f451ac7010c0170998be47f213c4ad36655b5912046863df3de
MD5 7290a4b22dfc2344b4d19dfbdf7dcabd
BLAKE2b-256 8f3d6dfcb1c775f38099a81a674427cc83a1551b0c83ce3c348d75aadf7248e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for diffpick-0.2.0.tar.gz:

Publisher: publish.yml on steveoleary/diffpick

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file diffpick-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: diffpick-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for diffpick-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 33834ad534d0c3ccffe3241649cba7f01658751b22d80f0091752fa1ed8de1f1
MD5 358c26e1d30c2dda9aa4415ef208401c
BLAKE2b-256 f88e71f8cf6a07ddade3deaed664a40f27b475f0b3e5dae0af017a5020b4a890

See more details on using hashes here.

Provenance

The following attestation bundles were made for diffpick-0.2.0-py3-none-any.whl:

Publisher: publish.yml on steveoleary/diffpick

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page