TL;DR — Quick Summary

difftastic compares code structurally, not line by line. It parses 50+ languages and shows meaningful changes — moved functions, renamed variables, reformatted code won't show as noise.

difftastic understands code. Structural diffs that show real changes, not formatting noise.

Installation

# macOS
brew install difftastic

# Arch Linux
sudo pacman -S difftastic

# Cargo
cargo install difftastic

Usage

# Compare two files
difft old.rs new.rs

# Git integration (one-off)
GIT_EXTERNAL_DIFF=difft git diff

# Git integration (permanent)
git config --global diff.external difft

# Display modes
difft --display side-by-side file1 file2
difft --display side-by-side-show-both file1 file2
difft --display inline file1 file2

# Color modes
difft --color always file1 file2

# Language override
difft --language rust file1 file2

# Tab width
difft --tab-width 4 file1 file2

# Width
difft --width 120 file1 file2

# Git log with difftastic
GIT_EXTERNAL_DIFF=difft git log -p

Summary

  • difftastic compares code by structure, not text lines
  • Parses 50+ languages into ASTs for meaningful diffs
  • Formatting, whitespace, and move changes are noise-free
  • Drop-in git diff replacement (GIT_EXTERNAL_DIFF=difft)
  • Written in Rust — fast, cross-platform