qmetrics.net

Difftastic

Structural diff tool that understands syntax

Difftastic screenshot

Difftastic compares files by parsing their syntax rather than diffing line by line. It is a CLI that highlights real code changes, including reflows across lines.

Overview

Difftastic is a command-line diff utility built around syntax-aware comparison. It parses source with tree-sitter and reports which syntactic pieces changed, showing them in side-by-side context so reviewers can see what moved versus what was merely reformatted.

When whitespace is only indentation or formatting, the tool can treat it differently from meaningful edits. If a formatter splits an expression across lines, the diff still reflects the underlying change instead of treating every new line as novel content. For unrecognized file extensions it falls back to a line-oriented diff with word highlighting.

It supports more than thirty programming languages plus formats such as JSON, YAML, HTML, and HCL, with a manual listing the full set. Git and Mercurial integration is documented, and it can read merge conflict markers to diff the two conflict sides in one file. A check mode compares abstract syntax without printing a full diff for faster change detection.

Output targets human review: it does not emit applyable patches, and it does not perform merges. Large files with many edits can be slow and memory-heavy, and parse errors cause a conservative fallback to line-based diffing.

Key features

  • Tree-sitter syntax-aware diffs
  • Side-by-side highlighted output
  • Git and Mercurial integration
  • Merge conflict marker support
  • Fast same-AST check mode
  • 30+ language parsers
  • Word-level fallback for unknown types
  • Real before and after line numbers

Use cases

  • Reviewing formatted code changes
  • Inspecting git diffs with structure
  • Reading merge conflict changes
  • CI syntactic change detection
  • Comparing config files like JSON

Tags

Similar software

Lazygit

Terminal user interface for everyday Git workflows

Lazygit wraps common Git operations in a keyboard-driven terminal UI. You can stage partial changes, rebase, cherry-pick, and inspect history without memorizing fragile command sequences.

★ 84.1k⟳ 5 days agoMIT

Gitea

Self-hosted Git forge with CI/CD and packages

Gitea is an all-in-one software development service you can run on your own infrastructure. It combines Git hosting with issues, reviews, project boards, package registries, and Gitea Actions CI/CD.

★ 59.3k⟳ todayMIT
Build & DeploymentSelf-hostable
Open Source Alternative to:GitHub

Gogs

Self-hosted Git service with web collaboration tools

Gogs hosts Git repositories over SSH and HTTP(S) and adds issues, pull requests, wikis, and organization features through a browser UI.

★ 48k⟳ 2 days agoMIT

GitHub CLI

Official GitHub terminal client

GitHub CLI brings issues, pull requests, and other GitHub workflows to the terminal beside git. It works with GitHub.com, Enterprise Cloud, and supported Enterprise Server deployments.

★ 47.3k⟳ yesterdayMIT

Harness

End-to-end developer platform with SCM, CI/CD, and registries

Harness Open Source combines code hosting, automated DevOps pipelines, hosted development environments called Gitspaces, and artifact registries in one platform.

★ 39k⟳ yesterdayApache-2.0
Build & DeploymentSelf-hostable
Open Source Alternative to:GitHub

Husky

Lightweight native Git hooks for Node projects

Husky wires Git hooks so teams can lint commit messages, run tests, or check code on commit and push. It uses core.hooksPath, stays around two kilobytes gzipped, and supports macOS, Linux, and Windows.

★ 35.4k⟳ 8 months agoMIT