Diff Tools

diffsitter – semantic diff tool

diffsitter is a semantic diff tool for source code.

Instead of comparing files purely as text, it parses code with tree-sitter and computes differences from the abstract syntax tree, which helps it ignore non-meaningful formatting changes such as spacing and layout. The project is designed for developers who want diffs that better reflect code structure, and it also offers configuration options for file associations, output formatting, and filtering the syntax nodes that take part in comparisons.

This is free and open source software.

Key Features

  • Creates semantically meaningful diffs by comparing abstract syntax trees instead of raw text.
  • Ignores purely formatting-related changes that don’t alter code meaning.
  • Supports multiple languages through tree-sitter, including Bash, C#, C++, CSS, Go, Java, OCaml, PHP, Python, Ruby, Rust, Typescript/TSX, and HCL.
  • Lets you configure file associations and formatting options with a config file.
  • Supports include and exclude rules for tree-sitter node kinds so you can control which syntax nodes are considered in the diff.
  • Offers terminal-aware formatted output.
  • Includes extensive logging for debugging and timing information.
  • Cross-platform support – runs under Linux, macOS, and Windows.

Website: github.com/afnanenayet/diffsitter
Support:
Developer: Afnan Enayet
License: MIT License

diffsitter commands, arguments and options

diffsitter is written in Rust. Learn Rust with our recommended free books and free tutorials.


Related Software

Terminal-Based Diff Tools
difftasticStructural diff tool that compares files based on their syntax
diff-so-fancyAttractive diffs with diff-highlight and more
deltaViewer for git and diff output
icdiffAn improved colored diff
diffoscopeIn-depth comparison of files, archives, and directories
colordiffWrapper for diff with pretty syntax highlighting
objdiffLocal diffing tool for decompilation project
ydiffTool to view colored, incremental diff in a version controlled workspace
diffrWord-by-word diff highlighting utility
dyffdiff tool for YAML files
WdiffWordwise implementation of diff
dwdiffdiff program that operates at the word level
diff2html-cliGenerate HTML diffs
dirdiffCompute the differences between two directories
csv-diffDiffing CSV and JSON files
csvdiffFast diff tool for comparing CSV files
sesdiffGenerates a shortest edit script

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.

This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more.

Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form.
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments