TL;DR — Quick Summary

diffsitter produces structural diffs using AST parsing. Instead of line-by-line diffs, it shows semantic changes — moved functions, renamed variables, changed logic — not whitespace noise.

diffsitter diffs code structurally. AST-aware changes — see what actually changed, not formatting noise.

Installation

# Cargo
cargo install diffsitter

Usage

# Compare two files
diffsitter old.rs new.rs

# Compare with specific language
diffsitter --language python old.py new.py

# Use with git (add to .gitconfig)
# [diff]
#   external = diffsitter

Summary

  • diffsitter produces AST-based structural diffs
  • Filters out whitespace and formatting noise
  • Shows semantic changes: moved, renamed, changed
  • Supports 30+ languages via tree-sitter
  • Written in Rust — fast parsing