TL;DR — Quick Summary

diffsitter diffs code using AST parsing (tree-sitter). See semantic changes instead of line-based diffs — understands code structure, ignores formatting noise.

diffsitter understands code. AST-based diffs that show real changes, not formatting noise.

Installation

# Cargo
cargo install diffsitter

Usage

# Diff two files
diffsitter old.rs new.rs

# Diff with explicit language
diffsitter --language python old.py new.py

# Diff from stdin
cat old.js | diffsitter - new.js

Git Integration

# .gitconfig
[diff]
    tool = diffsitter

[difftool "diffsitter"]
    cmd = diffsitter "$LOCAL" "$REMOTE"

Summary

  • diffsitter diffs code using AST parsing (tree-sitter)
  • Semantic diffs: shows real changes, ignores formatting
  • Supports all tree-sitter grammars (Rust, Python, JS, Go, etc.)
  • Git integration as difftool
  • Written in Rust — fast parsing and comparison