A syntax-highlighting pager for git, diff, grep and blame output, configured as a drop-in replacement for git's default pager.
ivankovic/omnidiff
A content-aware diff tool in Rust that compares code structurally with tree-sitter and also diffs pictures, fonts, archives and PDFs.
- Stars
- 1,168
- Forks
- 28
- Open issues
- 9
- Last commit
- 7 hours ago
What is it?
OmniDiff is a command-line and terminal diff tool that chooses how to compare files based on their type. For source code in 25 languages, it parses each file with a tree-sitter grammar and highlights only the parts that actually changed, such as a renamed expression, instead of marking whole lines as deleted and inserted. Files with unknown extensions are compared as plain text.
Non-text files are handled by their contents rather than their names. Pictures are compared pixel by pixel, animations frame by frame. Fonts are compared glyph by glyph, archives file by file, and PDFs page by page, with each change labelled by how visible it is to a reader. Anything else binary gets a one-line notice that the files differ.
OmniDiff runs as an interactive two-pane viewer, as plain text or JSON output for scripts and CI, and as a backend for git difftool, git diff via GIT_EXTERNAL_DIFF, and Jujutsu (jj). It is installable through Cargo, Homebrew, apt, Nix, and prebuilt binaries for Linux, macOS and Windows.
Key features
- 01Structural diffs for 25 programming and markup languages via tree-sitter grammars.
- 02Pixel-level comparison for pictures, including animated frames.
- 03Glyph-by-glyph comparison of fonts and page-by-page comparison of PDFs.
- 04File-by-file comparison of archives, including nested archives.
- 05Interactive TUI, headless text output, and JSON output.
- 06Integrates with git difftool, git diff, and Jujutsu (jj).
Use cases
- Reviewing refactorings in code where only a few expressions changed.
- Checking what changed in a font, icon set, or PDF diagram tracked in git.
- Scripting or CI pipelines that need machine-readable diff output.
- Replacing the default git difftool with a syntax-aware viewer.
Quick start
- 1
Install with Homebrew (macOS and Linux)
brew install ivankovic/omnidiff/omnidiff - 2
Or build from source with Cargo (needs a C compiler and Rust 1.92 or later)
cargo install --locked omnidiff - 3
Open the interactive viewer on two files
omnidiff BEFORE AFTER
Things to know
- The README badge names the AGPL-3.0-only license, a copyleft license, though the repository metadata reports no detected license.
- Building from source needs a C compiler and Rust 1.92 or later, and the first cargo install takes a few minutes.
In collections
Topics
FAQ
- What is omnidiff?
- A content-aware diff tool in Rust that compares code structurally with tree-sitter and also diffs pictures, fonts, archives and PDFs. OmniDiff is a command-line and terminal diff tool that chooses how to compare files based on their type. For source code in 25 languages, it parses each file with a tree-sitter grammar and highlights only the parts that actually changed, such as a renamed expression, instead of marking whole lines as deleted and inserted. Files with unknown extensions are compared as plain text.
- Is omnidiff free to use? What license does it have?
- omnidiff is open source under the Other license. Check the license terms before using it in commercial products.
- Is omnidiff still maintained?
- Actively maintained. The last commit to omnidiff was on Nov 6, 2026.
- What can I use omnidiff for?
- Reviewing refactorings in code where only a few expressions changed. Checking what changed in a font, icon set, or PDF diagram tracked in git. Scripting or CI pipelines that need machine-readable diff output. Replacing the default git difftool with a syntax-aware viewer.
- How do I install omnidiff?
- Install with Homebrew (macOS and Linux): brew install ivankovic/omnidiff/omnidiff Or build from source with Cargo (needs a C compiler and Rust 1.92 or later): cargo install --locked omnidiff Open the interactive viewer on two files: omnidiff BEFORE AFTER
- Where can I get omnidiff?
- The source code and installation instructions are on GitHub: https://github.com/ivankovic/omnidiff
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A git pager that renders diffs side by side with syntax highlighting in the terminal, GitHub-style.
A command-line diff tool that compares files by their syntax tree instead of lines, so reformatting and moved code show up accurately.
Interactive terminal diff viewer for reviewing code changes from Git, Jujutsu, Sapling, GitHub PRs, and raw files, with inline agent notes.
A CLI tool that opens a local GitHub-style web viewer for reviewing git commit diffs, with comments you can copy as AI prompts.
A cat(1) clone for the terminal with syntax highlighting, Git change markers, and automatic paging.