Công cụ lập trình

Omnidiff brings structural and binary diffing to the terminal

A new Rust-based tool, Omnidiff, offers fast structural code comparison and pixel-level binary diffs for images, fonts, and archives directly in the terminal.

Terminal interface displaying code and binary image diffs side by side
Minh họa được tạo riêng cho bài viết này

Bài viết này chỉ có sẵn bằng tiếng Anh.

Marko Ivankovic has released Omnidiff, a high-performance diffing utility written in Rust that extends beyond traditional text comparison. Published on November 1, 2026, the tool aims to provide robust, accurate differences for both source code and binary assets like images, fonts, and archives.

What happened

The release introduces a command-line interface and a terminal user interface (TUI) designed to handle twenty real-world code changes and various binary formats. Unlike standard Unix diff tools that treat files as lines of text, Omnidiff parses content based on its type. It supports structural diffing for twenty-five programming languages and provides visual comparisons for binary files, including pixel-by-pixel analysis for images and glyph-by-glyph inspection for fonts.

Performance is a central focus of the project. Benchmarks conducted on a T14s laptop with an Intel Core i7-1370P processor and 32 GB of RAM target a median diff time of under 100 milliseconds. The ninety-ninth percentile latency is capped at 1000 milliseconds. The tool is available via prebuilt binaries for Linux, macOS, and Windows, as well as through package managers like Homebrew, Nix, and apt.

How it works

Omnidiff detects file types using extensions for text and byte signatures for binary data. For source code, it employs tree-sitter grammars to parse twenty-five languages, including Rust, Python, JavaScript, and C++. This allows it to understand the structure of the code, identifying changes within functions, classes, or structs rather than just reporting line shifts. When a change occurs deep in a large file, the tool prefixes the diff hunk with the nearest enclosing definition to provide context.

For binary files, the approach varies by format. Images in PNG, JPEG, GIF, and other formats are compared pixel by pixel or frame by frame for animations. Archives like zip and tar are inspected member by member, allowing nested archives to be traversed. Fonts are analyzed glyph by glyph, showing only the specific characters that have changed. The TUI renders these visuals using terminal graphics protocols like kitty or sixel when available, falling back to Unicode half-blocks otherwise.

Key details

  • Structural parsing: Supports twenty-five languages via tree-sitter, including C, Go, Java, and TypeScript, providing context-aware diffs.
  • Binary support: Handles images, fonts, archives, PDFs, and message catalogs by comparing their internal structures rather than raw bytes.
  • Performance targets: Aims for a median diff time of 100ms and a 99th-percentile time of 1000ms on modern hardware.
  • Integration: Works as a backend for git difftool and jj diff, with setup wizards for both Git and Jujutsu version control systems.
  • Output modes: Offers an interactive TUI, a headless batch mode for scripts, and JSON output for programmatic consumption.
  • Licensing: Released under the GNU Affero General Public License version 3, with a commercial subscription option available via GitHub Sponsors.

Why it matters

For software engineers, the limitation of traditional diff tools is their inability to meaningfully compare non-text assets. Changes in icons, fonts, or compiled resources often require opening separate graphical tools to verify. Omnidiff consolidates this workflow into the terminal, allowing developers to review visual changes alongside code changes in a single interface. This reduces context switching and speeds up the review process for full-stack applications that include design assets.

The structural awareness of the tool also improves code review accuracy. By understanding the syntax of the language, it can ignore irrelevant whitespace or formatting changes that often clutter standard diffs. This helps reviewers focus on logical changes rather than stylistic noise. Additionally, the integration with modern version control systems like Jujutsu ensures that users of emerging tools can maintain a consistent review experience.

What you can do

  • Install Omnidiff using your system package manager, such as brew install ivankovic/omnidiff/omnidiff on macOS or the provided apt repository for Debian.
  • Configure it as your default git difftool by running omnidiff git configure to enable interactive reviews for Git repositories.
  • Use the headless mode with omnidiff --headless BEFORE AFTER in CI pipelines to generate plain text diffs for automated checks.
  • Explore binary changes by passing image or font files to the TUI to see pixel-level or glyph-level differences without leaving the terminal.
  • Set the COLORTERM=truecolor environment variable if your terminal supports 24-bit color but does not advertise it, ensuring optimal visual fidelity.
  • Review the JSON schema in src/tui/json_output.schema.json if you plan to integrate Omnidiff’s output into custom tooling or dashboards.
  • #rust
  • #developer-tools
  • #version-control
  • #diffing
  • #cli

Công cụ từ cửa hàng Bytechap

Đọc tiếp

Tất cả bài viết