← Back to tools

difftastic

A structural diff tool that understands syntax

Development Version Control linuxmacoswindows Rust MIT

Description

difftastic is a diff tool that compares files based on their syntax rather than line-by-line text. It understands 30+ programming languages and highlights meaningful changes while ignoring formatting differences.

Install

homebrewbrew install difftastic
cargocargo install difftastic
pacmansudo pacman -S difftastic

AI Summary

A structural diff tool that understands syntax. Compares code based on AST structure rather than text lines, showing meaningful changes and ignoring formatting noise.

Capabilities

  • + Syntax-aware diffing for 30+ languages
  • + Ignores formatting-only changes
  • + Side-by-side display with syntax highlighting
  • + Git integration as external diff tool

Use When

  • Reviewing code changes where formatting was also modified
  • Want to see meaningful structural changes, not whitespace diffs
  • Using as a git difftool for code review

Avoid When

  • x Need to diff non-code files (use standard diff)
  • x Diffing unsupported languages

Usage Patterns

Diff two files

difft old.py new.py

Shows structural differences between two Python files

Use as git difftool

GIT_EXTERNAL_DIFF=difft git diff

Uses difftastic for git diff output

Related Tools

View AGENTS.md for difftastic