Open-source · Local-first · Windows · macOS · Linux

The diff & merge tool that
thinks with you.

DiffCompanion is a fast, local-first desktop diff & merge tool — everything you expect from Beyond Compare (text, folders, tables, hex, images, registry, archives, sync) plus HTML/CSV reports, a command-line mode, and a bring-your-own-key AI assistant.

Free & open-source (MIT) · Grab an installer from Releases — or build from source: git clone https://github.com/xShiroeNguyenx/diff-companion && pnpm install && pnpm tauri:dev

greet.ts — Text Compare ≠ inline diff
◀ left · greet.ts
1function greet(name) {
2 return "Hello " + name;
3}
right · greet.ts ▶
1function greet(name) {
2 return
3}
Everything in one window

Compare anything, merge with confidence

From a single file diff to a full folder sync across a project — without leaving the app.

📝

Text compare

Line + inline character diff, syntax highlighting, ignore whitespace / case / EOL, encoding detection, in-place edit, and one-click beautify (Prettier).

🔀

3-way merge

diff3 engine auto-merges one-sided changes; a UI resolves conflicts (take left / base / right / both) and saves.

📁

Folder compare

Two-pane aligned lists, parallel scan + blake3 hashing, filters, progress & cancel, double-click to open a file diff.

🔁

Folder sync

Mirror / update / two-way with a dry-run preview before apply; copy & delete preserving timestamps.

📊

Table / CSV

Auto-detect delimiter & header, align rows, highlight changed cells.

🔢

Hex / binary

Byte-level compare with offset + hex + ASCII, differing bytes highlighted.

🖼️

Image compare

Side-by-side, slider wipe, and pixel-difference map with a change percentage.

🪟

Registry & Archive

Diff Windows .reg exports; browse & compare zip / tar / tar.gz like folders.

🌿

Git-native

Compare working ↔ HEAD, staged, or any two branches / commits / tags / stashes — then open a file's text diff. Runs on the git CLI.

🖥️

Command-line

Headless compare / sync with CI-friendly exit codes and HTML/CSV report export.

📄

Reports

Export a folder comparison to a self-contained HTML page or a CSV for review.

🕘

History & workspaces

Every comparison is remembered; reopen it in one click. Save a whole multi-tab session as a workspace and restore it later.

🎨

Themes & background

Light / dark, six accent colors, four fonts and adjustable text size — plus a full-window background image (local file or Google Drive link) with opacity & blur.

🤖

AI assistant (BYOK)

Claude, OpenAI or Gemini: explain a diff, summarize a changeset, review, or suggest a merge — you bring the key.

🔒

Privacy-first

Local-first, keys in the OS keychain, optional redaction before anything is sent to an AI provider.

See it in action

One window, many superpowers

A peek at a few of the built-in tools — no extra apps, no context switching.

📁Folder Compare= 633 · ≠ 2870 · ◀ 4038 · ▶ 355
Trái · GlobalFrontSystemUpJava
📁shipping
📄ShippingModule.java11 KB
📄PaymentApplePay.java2 KB
📄DigitalWallets.java8 KB
Phải · GlobalFrontSystemOld
📁shipping
📄ShippingModule.java10 KB
📄PaymentPaypal.java9 KB
🤖AI Assistantstream
ClaudeOpenAIGemini 🛡️ redact
The change replaces string concatenation with a template literal, so name is interpolated safely. Behavior is identical for normal input; no functional risk. Cosmetic + minor readability improvement.
≈ 412 tokens in · est ~$0.0021 · claude-opus-4-8
🔁Sync preview — Mirror trái → phảidry-run
shipping/Freeshipcampaign.javachép phải
common/enums/OrderStatusEnum.javachép phải
🗑legacy/OldPayment.javaxoá phải
common/CartConstants.javachép phải
Less staring, more understanding

An AI that reads the diff for you

Pull the current comparison into context with one click, then ask for an explanation, a summary, a review, or a merge suggestion. Bring your own key (Anthropic, OpenAI, Gemini) — stored in your OS keychain, never in the UI.

  • Redaction masks secrets/PII before anything leaves your machine.
  • Cost meter estimates tokens & price before you send.
  • Streaming output, right beside the diff.
Claude OpenAI Gemini
# Explain / Review / Merge-assist — on the current diff Task: Review Redact: on # → potential bug, security, style — with severity Context: pulled from the active tab
# compare two folders, write an HTML report $ diff-companion compare ./a ./b --report out.html # exit code 1 when there are differences (great for CI) # mirror left → right (dry-run, then --apply) $ diff-companion sync ./a ./b --mode mirror-lr --apply
Automate it

A CLI & reports for your pipeline

The same engine that powers the UI runs headless. Fail a build when a generated folder drifts, produce an HTML/CSV diff report as a build artifact, or script a folder sync.

  • CI-friendly exit codes — non-zero on differences.
  • HTML & CSV reports — shareable, self-contained.
  • Same core — identical results to the desktop app.
Local-first & private

Your files stay yours

No account, no telemetry, no cloud lock-in. Everything runs on your machine.

🗝️

Keys in the keychain

AI provider keys live in the OS keychain and are read only inside the Rust core — there is no command that returns a key to the UI.

🛡️

Redaction on send

Optional (on by default) redaction masks API keys, tokens, private keys, emails and password assignments before any AI request.

🦀

Rust core, fast

Parallel scanning, blake3 hashing, and virtualized lists keep huge folders responsive — all offline.

Ready when you are

Diff, merge, sync — with a brain

Free and open-source (MIT). Download an installer for your OS, or clone the repo and run from source.