← Back to tools
View AGENTS.md for delta
delta
A syntax-highlighting pager for git, diff, and grep output
Description
delta provides syntax highlighting, line numbering, and side-by-side view for git diff output. It can be configured as the default pager for git, making diffs far more readable with language-aware highlighting.
Install
homebrew
brew install git-deltaapt
sudo apt install git-deltapacman
sudo pacman -S git-deltacargo
cargo install git-deltaAI Summary
Makes git diffs beautiful. Syntax-highlighting pager for git, diff, and grep output with side-by-side view, line numbers, and word-level diff highlighting.
Capabilities
- + Syntax highlighting in diffs using bat's engine
- + Side-by-side diff view
- + Line numbers in diff output
- + Word-level diff highlighting
- + Navigate diffs with n/N in less
- + Hyperlinks to GitHub/GitLab
- + Configurable via .gitconfig
Use When
- → Reading git diffs and want better readability
- → Reviewing code changes in the terminal
- → Need side-by-side diff comparison
Avoid When
- x Scripting that parses raw diff output
- x Need plain text diff for piping
Usage Patterns
Configure as git pager
git config --global core.pager delta Sets delta as the default pager for all git commands
Side-by-side diff
git diff | delta --side-by-side Shows changes in side-by-side columns
Compare two files
delta file_a file_b Diff two files with syntax highlighting
Input / Output
stdin: Diff output or text to highlight
stdout: Syntax-highlighted, formatted diff
Exit codes:
0 Success Typical Pipelines
git diff | delta --side-by-side git log -p --follow file.rs | delta diff -u old new | delta