ivankovic/omnidiff
Developer ToolsA content-aware diff tool that highlights changes inside code and binary files, with a terminal UI and Git integration.
What it does
OmniDiff is a diff engine and terminal viewer that compares files by their content rather than line by line. Code files are parsed with tree-sitter grammars and diffed structurally, so a changed expression is painted in place instead of showing an entire line as removed and re-added. For 25 languages the tool detects structure by file extension; unknown text extensions fall back to line diffing.
Beyond text, it inspects bytes to recognize pictures, archives, fonts, cursors, gettext/Qt message catalogs and PDFs. Each type gets a dedicated comparison: pixels for images, frame or glyph comparisons for animations and fonts, member listings for archives, page renderings for PDFs. Other binary files get the familiar Binary file <path> differs notice.
The main audience is developers reviewing code changes, especially in Git or Jujutsu repositories, who want to see what actually changed inside a line and want some visibility into binary assets as well.
Quick start
Install with Cargo (Rust 1.92+, a C compiler on PATH, first build takes a few minutes):
cargo install --locked omnidiff
Prebuilt binaries for Linux, macOS and Windows are on the releases page; Homebrew (brew install ivankovic/omnidiff/omnidiff), a signed apt repository, Nix and packaging recipes for Arch and Gentoo are also documented.
Open two files directly:
omnidiff BEFORE AFTER
or start empty and press o to pick files. In the viewer, ? lists keybindings.
Wire it into Git with the setup wizard:
omnidiff git configure
Or by hand:
git config difftool.omnidiff.cmd 'omnidiff "$LOCAL" "$REMOTE"'
git difftool --tool=omnidiff
Use git difftool for the interactive TUI; git diff and git log -p are piped and therefore always render the text mode. GIT_EXTERNAL_DIFF=omnidiff git diff works without difftool configuration.
For scripting and CI, omnidiff --headless BEFORE AFTER prints plain text, with --context N, --color, --exit-code and --mode json options. JSON output follows the schema in json_output.schema.json. Headless mode starts automatically when stdout is not a terminal.
Supported content
Text: 25 tree-sitter-parsed languages including C, C++, Rust, Go, Python, JavaScript/TypeScript, Java, Kotlin, Ruby and PHP. Markdown, SQL, Protobuf and a few others are recognized but diffed as plain text.
Binary: PNG, JPEG, GIF, WebP, BMP, ICO, TIFF; zip and derived formats (jar, Office, EPUB), tar, gzip, xz, bzip2; TrueType/OpenType/WOFF/WOFF2/EOT fonts; Windows, X and Hyprland cursors; gettext .mo and Qt .qm; PDFs. UTF-16/UTF-32 with BOM are read as text.
The TUI renders images using kitty, sixel or iTerm2 protocols when available and Unicode half blocks otherwise; OMNIDIFF_GRAPHICS overrides detection.
Constraints
- License: AGPL-3.0-only. A paid commercial license is offered via GitHub Sponsors for organizations that cannot accept AGPL source-disclosure terms.
- No contributions at present: the README states contributions are not accepted, and that AI assistance (Claude Code) is disclosed in commits.
- Merge/3-way support: the README documents two-way diffs and
git difftool/jjintegration only; a 3-way algorithm is described in HN discussion as a long-term goal. - Performance scope: published speed figures come from a specific laptop; the PDF 100ms rate is 57% and archives miss the 99th-percentile goal. Accuracy is measured against hand-painted ground truth and currently sits at 60.0% (
--full) and 69.6% (--minimal) of fixtures with zero mismatched bytes, below the project's own 90% target. - JJ integration requires
diff-invocation-mode = "file-by-file"; without it, invocations fail because jj passes directory trees. - The companion browser reviewer codereview is at v0.0.0 and the README warns to use it at your own risk.
HotRepo's take
The project appeared on GitHub's Rust daily list on 2026-11-03 at position 7, with 300 stars gained that day, and the associated Show HN thread (2026-11-01) drew 314 points and 95 comments. The README's own measurements are unusually detailed: 2,302 fixtures, 442,530 code pairs across ~7,500 repositories, and published p50/p90/p99 timings. The discussion surfaces two open questions worth flagging: 3-way merge support is not implemented, and the "99.95%" robustness figure refers to files the tool completes on, with the remainder mostly generated or embedded blobs that other tools also fail on. Readers evaluating it should treat the accuracy table as the primary limitation.
Written by AI from the project's README, updated . The project's own docs are the source of truth.