53 developer tools, always updated, new upstream releases land in apt within hours. Join the Discord

📅 From , the apt mirror will require a subscription. See pricing · 🆓 There is an always-free mirror

🔀 Install Latest difftastic on Debian

A structural diff tool that compares files by syntax, not line by line

Latest version: 0.70.0 · updated 2026-08-18
SourceVersion
deb.griffo.io0.70.0 ✅
Official Debian🚫 not packaged
← Back to home
📌 Installing on a specific release? Debian 12 (bookworm) · Debian 13 (trixie) · Debian 14 (forky) · Debian Sid

What is difftastic?

difftastic (the command is difft) is a structural diff tool. Instead of comparing lines, it parses both files with tree-sitter, builds a syntax tree for each side and reports which pieces of syntax actually changed. Reindenting a block, rewrapping an argument list or moving a closing brace stops being a diff, while a renamed variable buried in reformatted code stands out.

🚀 Why Latest Versions Matter: difftastic understands your code through tree-sitter grammars, and those grammars are shipped with each release. A year-old build parses last year's languages: newer syntax turns into parse errors, and a file with too many parse errors silently falls back to a plain line-oriented diff, exactly the behaviour you installed difftastic to avoid. Every release also brings algorithm and memory improvements for large files.

⚡ Key Features of difftastic

🌳 Syntax-Aware Diffs

Both sides are parsed into syntax trees and compared as structure, so formatting churn disappears and real changes stand out.

🧩 Over 30 Languages

Rust, Python, TypeScript, Go, C, C++, Java, Ruby, YAML, JSON, HTML, CSS, Markdown and many more, difft --list-languages prints the full list with extensions.

🪟 Side-by-Side or Inline

--display picks side-by-side, side-by-side-show-both, inline, or machine-readable JSON for tooling.

🔗 Drop-in for Git

Works as an external diff command for git, and just as well for Mercurial, Jujutsu and Fossil.

🚦 Honest Fallback

An unknown extension, an enormous file or too many parse errors falls back to a line-oriented diff with word-level highlighting instead of failing.

🗂️ Directories and Conflicts

Diff two directories in one command, or hand difftastic a file full of merge-conflict markers and read the conflict as a diff.

🚀 Always ahead of the official archives: Debian and Ubuntu freeze package versions when a release ships. This repository publishes new upstream releases typically within hours. A simple apt upgrade keeps you on the latest version.

📦 Installation from deb.griffo.io

Run the commands

Step 1: Add Repository

sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | sudo gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | sudo tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
sudo apt update
install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://deb.griffo.io/EA0F721D231FDD3A0A17B9AC7808B4DD62C41256.asc | gpg --dearmor --yes -o /etc/apt/keyrings/deb.griffo.io.gpg
echo "deb [signed-by=/etc/apt/keyrings/deb.griffo.io.gpg] https://deb.griffo.io/apt $(lsb_release -sc 2>/dev/null) main" | tee /etc/apt/sources.list.d/deb.griffo.io.list > /dev/null
apt update
sudo apt install extrepo
sudo extrepo enable griffo
sudo apt update

🆓 There is an always-free mirror. deb-free.griffo.io serves packages free forever, no account, no subscription, at most 2 months behind upstream, security fixes immediately. It currently carries cliamp, Ghostty, lazydocker, Oh My Posh and Zed; difftastic is not one of them, so the repository above is the only way to get it today, ask and it can be enrolled.

How the free mirror works →

🧩 About the extrepo option. extrepo is Debian's own tool for external repositories: it writes the sources file and installs the signing key for you, checking the key against signed metadata first. This repository is registered with it as griffo, and the always-free mirror as griffo-free, so on Debian (bookworm, trixie, forky and sid) the commands above are the whole setup.

extrepo sets up the sources file and the key only, so a subscription's credentials still go in /etc/apt/auth.conf.d/deb.griffo.io.conf. Ubuntu is not covered, because extrepo publishes metadata for Debian suites only: there, use the sudo or root commands.

Step 2: Install difftastic

# Install latest difftastic
sudo apt install difftastic

# Verify installation
difft --version
# Install latest difftastic
apt install difftastic

# Verify installation
difft --version

Step 3: Wire it into git

# Compare two files directly
difft old.py new.py

# Or let git call difftastic for every diff
git config --global diff.external difft

# The plain git diff is still one flag away
git --no-ext-diff diff

# The manual page ships with the package
man difft

🎯 Basic Usage Examples

Comparing files and directories:

# Two files, side by side
difft before.rs after.rs

# A single column, closer to traditional diff output
difft --display inline before.ts after.ts

# Two directories, skipping files that did not change
difft old/ new/ --skip-unchanged --sort-paths

# Which languages does this build understand?
difft --list-languages

Using it as git's diff:

# One-off: difftastic for this diff only
GIT_EXTERNAL_DIFF=difft git diff

# Structural diffs through the whole history
GIT_EXTERNAL_DIFF=difft git log -p --ext-diff

# Register it as a difftool
git config --global difftool.difftastic.cmd 'difft "$LOCAL" "$REMOTE"'
git difftool --tool difftastic

# A git alias for a structural log
git config --global alias.dlog '!GIT_EXTERNAL_DIFF=difft git log -p --ext-diff'

Tuning the output:

# Ignore comment-only changes
difft --ignore-comments a.go b.go

# More context, and tabs worth two spaces
difft --context 5 --tab-width 2 a.py b.py

# For scripts: is there a syntactic change at all?
difft --check-only --exit-code a.json b.json

# Defaults for every invocation, from the environment
export DFT_DISPLAY=inline DFT_BACKGROUND=light

🔧 Tool Integrations

difftastic plugs into the tools that already show you diffs:

  • git: GIT_EXTERNAL_DIFF, diff.external or a difftool entry, --ext-diff extends it to git log -p and git show
  • Jujutsu: set it as the diff command in jj and get structural diffs in a Git-compatible workflow
  • Mercurial and Fossil: both accept an external diff command, so the same binary serves every repository you have
  • Environment variables: DFT_DISPLAY, DFT_BACKGROUND, DFT_WIDTH and friends set your defaults once
  • CI and scripts: --check-only with --exit-code answers "did the syntax change?" without printing the diff, and --display json is made for parsing

🚀 Why Choose deb.griffo.io?

📊 Repository Comparison:
  • Official Debian: does not package difftastic at all, a stock system has nothing to install
  • cargo install difftastic: current, but it is a long compile with a lot of tree-sitter grammars, and it lands outside apt with no man page
  • Upstream tarball: the official binary, re-downloaded by hand for every release
  • deb.griffo.io: latest version with automatic updates

📦 Package Build Repository

The Debian packages are automatically built and maintained in this GitHub repository:

🔗 Related Packages

Also available from deb.griffo.io:

🎯 Perfect for: reviewing a refactor that moved code around, reading a formatter's commit without going cross-eyed, telling a real API change apart from a reindentation, and any codebase where "the whole file changed" is usually a lie.

💝 Support This Project

If this repository saves you time and effort, please consider supporting it!

⭐ Star on GitHub 🐦 Share on Twitter

Just after the command? See apt install difftastic, one page covering Debian and Ubuntu.

📦 Recent releases from this repository

📚 Release-specific install guides

❓ Frequently asked questions

Is difftastic in the official Debian repositories?

No, difftastic is not packaged in the official Debian archives. This repository is currently the only apt source, serving difftastic 0.70.0.

How do I install the latest difftastic on Debian?

Add the deb.griffo.io repository once using the instructions above, then run: sudo apt install difftastic. New releases arrive through the normal sudo apt upgrade.

Are the packages signed and how are they built?

Every package is signed with the repository's GPG key (EA0F721D231FDD3A0A17B9AC7808B4DD62C41256) and built from upstream releases in public GitHub packaging repositories that anyone can inspect.

Which Debian releases are supported?

Debian 12 Bookworm, Debian 13 Trixie, Forky and Sid.