A new open-source tool called OmniDiff wants to replace the plain line-by-line diff you’re used to. It’s a Git difftool written in Rust, and it looks at what kind of file you’re comparing before it decides how to compare it. According to Hacker News, where the Show HN post reached a score of 167, the project says it can diff 99.95% of code changes, and 98.8% of those get handled by an algorithm built for that specific file type.
What stands out here is the range. OmniDiff doesn’t stop at source code. It handles pictures (still and animated), fonts, cursors, archives, compiled translation catalogs, OpenDocument files and PDFs. The project’s own example shows a PDF diagram where one box was renamed, and a web font where twenty icons were redrawn.
What OmniDiff brings to the table
- Content-aware diffing by file type: Classic Unix diff treats everything as lines of text. OmniDiff picks a different algorithm for each format, so a change in a font or image shows up as a real visual change and not as a block of unreadable bytes. For code, it compiles tree-sitter grammars (parsers that understand a language’s structure), which lets it read code by its syntax.
- Speed you can measure: The project targets diffs under 100ms. It says 98% of code diffs hit that mark, along with 96% of pictures and 95% of fonts. Benchmarks ran on a ThinkPad T14s with an Intel Core i7-1370P and 32 GB of RAM.
- Accuracy numbers that are actually published: OmniDiff reports how often its output was judged perfect and how often it was near-perfect. For code, that’s 70% perfect and 92% near-perfect. Cursors scored 100% near-perfect, and so did fonts. It’s rare for a dev tool to show you its own scorecard, and that kind of honesty deserves credit.
- Smarter context in large files: Like
diff -u, it keeps 3 lines of context around each change by default. It also adds the nearest enclosing function, class or struct line to the top of each hunk, so you can tell where a change sits deep inside a big file. - Built for scripts and CI too: There’s an interactive terminal UI, plus a headless mode that prints plain text. That mode kicks in automatically when output gets piped or redirected. A JSON output mode with a published schema makes it easy to plug into other tools. The exit codes follow
diff(1)conventions, and an opt-in--exit-codeflag avoids breaking Git and jj, which read a non-zero exit as a failure. - Fits into Git without much setup: A setup wizard configures it as a
git difftool, either globally or for one repository. One caveat:git diffandgit log -palways get the plain-text version, because a full-screen TUI can’t draw onto a pipe. If you want the interactive viewer, usegit difftool.
Availability
OmniDiff is free and open source. You can install it in several ways:
cargo install --locked omnidiff(needs Rust 1.92+ and a C compiler; the first build takes a few minutes)- Prebuilt binaries for Linux, macOS (Intel and Apple Silicon) and Windows
- Homebrew on macOS and Linux
- A signed apt repository with .deb packages for amd64 and arm64
- Nix, plus build recipes for Arch and Gentoo
There’s also a VS Code extension, which is listed on Open VSX for VSCodium, Cursor and Windsurf, and a Neovim plugin.
Caveats worth knowing
A few rough edges come with the launch. PDF results rest on fewer than ten judged test cases, so read those 100% accuracy numbers carefully. Only 57% of PDF diffs finish under 100ms. VS Code doesn’t yet let extensions replace its built-in diff view, so the extension will get full integration only when that upstream API ships. The companion browser review tool, codereview, sits at v0.0.0, and the author says to use it at your own risk.
Why it matters
AI coding assistants now produce more code changes than ever, which makes reviewing diffs a bigger part of a developer’s day. A diff that understands structure, and that can show you a changed icon or translation catalog as it really is, makes that review faster and less error-prone. The JSON output also makes OmniDiff a good fit for automated review pipelines and agent workflows.
If the accuracy numbers keep climbing and VS Code opens up its diff API, OmniDiff could become a default install for many developers. You can find the full benchmarks and side-by-side examples in the original Hacker News post.