Repository: https://github.com/everettjf/grapecompare
Professional comparison for files, folders, images, merges, and Git on macOS.
Native, local, open source, and built without a subscription.
Download the latest signed and notarized Universal app, or install it with Homebrew.
Homebrew · Website · 中文说明 · Changelog · Contributing
brew install --cask everettjf/tap/grapecompareRequires macOS 14 or later. The Homebrew build is a signed and notarized Universal app for Apple silicon and Intel Macs.
Browse a recursive, filterable tree and jump directly from a changed file into its text diff.
Review aligned lines, character-level edits, totals, and previous/next difference navigation side by side.
- Accurate: byte-exact folder validation, shortest edit scripts for normal changes, visible final-newline differences, and correct handling of symbolic links, packages, and file/folder conflicts.
- Fast at scale: 100,000-line text comparisons complete in about 0.06 seconds; a 10,000-file folder benchmark completes in about 0.38 seconds on the development machine.
- Easy to read: side-by-side lines, character-level highlights, aligned line numbers, difference counts, and previous/next navigation.
- Native and private: a responsive macOS interface, local-only processing, no account, no telemetry, and no cloud upload.
- Open and subscription-free: inspect the implementation, reproduce the benchmarks, and use the complete tool without a recurring fee.
- Adaptive Myers line diff with low-occurrence anchors for large rewrites
- Character-level highlighting inside modified lines
- Search and line navigation, persistent comparison rules for comments, timestamps, UUIDs, addresses, and validated custom regex filters, syntax colors, optional line wrapping, and external-editor/Finder actions
- Hunk-level left/right acceptance, editable output, and unified diff/patch export
- Added, removed, and modified counts with keyboard-friendly navigation
- Window workspaces with multiple independent comparison tasks and safe close protection
- Live, coalesced refresh for files, folders, merges, and Git changes, paused whenever editable output is dirty
- CRLF/LF normalization, final-newline reporting, and binary-file detection
- Memory-mapped input to avoid duplicating large files in memory
- Three-way base/ours/theirs merge with explicit conflict resolution
- Branch, commit, index, and working-tree changesets grouped as staged, unstaged, and untracked, with target shortcuts, filters, commit context, persistent live refresh, opt-in local notifications, and rich file context actions
- Persistent repository library, linked-worktree switching, upstream/ahead/behind context, merge-base shortcuts, flat/tree changesets, commit graph, cross-file review navigation, and durable reviewed state
- Rename-aware paginated file history with arbitrary A/B revision and merge-parent comparison without changing repository state
- Explicit text, binary, Git LFS pointer, submodule, and bounded large-file inspection
- Standalone CLI plus Git difftool/mergetool configuration
- Stable JSON output for text, merge, structured-data, image, Git, and folder dry-run automation
- Finder Quick Action support through the built-in Compare Files shortcut on macOS 15+
- Image Two-Up, One-Up, Split, Blink, and Difference modes with synchronized zoom/pan, metadata inspection, lockable RGBA/HSB/Lab pixel sampling and crosshair, absolute/proportional configurable difference rendering, thresholds, channel isolation, bounded local alignment, and SVG support
- Semantic JSON, plist,
.xcstrings, and section-aware.pbxprojcomparison with stable paths and object-key-order independence - App Bundle, nested code, code-signature, entitlement, provisioning-profile, Mach-O architecture, and Asset Catalog inspection without launching bundled code
- Recursive expandable tree with Same, Different, Left Only, and Right Only states
- All/Differences/Left Only/Right Only filters with automatic expansion of changed folders
- Type and size prechecks followed by exact, bounded-parallel byte validation
- Correct traversal of package directories and comparison of symbolic-link targets
- Fast subtree filtering through pre-aggregated status indexes
- Per-item and multi-row Left → Right / Right → Left operation planning
- Space-bar Quick Look for selected comparison items
- Preflight review with real item/byte counts, overwrite warnings, progress, cancellation, and per-item results
- Safe copy, backup-before-replace, destination-empty move, and recoverable Move to Trash
- Durable undo history with changed-output protection, including across app relaunches; cross-volume moves are copied and byte-verified before the source enters Trash
- Explicit stop/continue failure policies plus transfer speed and estimated remaining time during execution
- Import/export of safe
.grapeplanrecipes that remap validated relative operations to the current folder pair - Ignore profiles and Mirror/Update/Custom synchronization plans with POSIX permission and extended-attribute comparison
- Machine-readable dry-run reports in the GUI and CLI, plus verified APFS clone-copy acceleration with safe fallback
The pre-release engineering milestones and acceptance criteria are preserved in the safe-operations plan, the durable-workflows plan, the text-actions plan, and the integration contract. These internal milestone numbers were never public releases; 1.0.0 is the first public version.
The repository includes a Release benchmark with reproducible generated fixtures. Representative results from the development machine:
| Scenario | Result | Notes |
|---|---|---|
| 100k-line sparse edit | 0.060 s | End-to-end: split, diff, inline ranges, rows |
| 30k-line high churn | 0.070 s | Retains all stable structural anchors |
| 10k-file folder | 0.382 s | Down from 2.385 s, about 6.2× faster |
| 50k-file folder | 3.917 s | Full scan, validation, tree, sort, rollup |
| 1024×1024 RGBA image | 0.005 s | RGB threshold comparison and heatmap |
| 10k-file sync planning | 0.010 s | Mirror plan with ignore-profile matching |
| 10k-file mixed Git changeset | 0.294 s | 10k staged plus 5k unstaged records |
| 200-commit Git file history | 0.196 s | Rename-aware metadata and paths |
Timings exclude fixture generation and vary by hardware and storage. Run them locally:
bash macos/Benchmarks/run-benchmarks.sh
bash macos/Benchmarks/run-benchmarks.sh 100000 50000
GRAPECOMPARE_VERIFY_PERFORMANCE=1 bash macos/Benchmarks/run-benchmarks.sh 100000 10000
GRAPECOMPARE_VERIFY_PERFORMANCE=1 bash macos/Benchmarks/run-git-benchmarks.sh 10000 200
bash macos/Benchmarks/run-real-folder-benchmark.sh /path/to/older-tree /path/to/newer-treeThe LLVM real-world benchmark records a verified comparison of trees containing up to roughly 170,000 leaves and 2.3 GiB of extracted data.
The CI gate fails when either end-to-end text scenario exceeds 0.25 seconds, the 1024×1024 image comparison or 10k-file sync planner exceeds 0.25 seconds, the 10k-file folder scenario exceeds 2 seconds, a 10k-file mixed staged/unstaged Git changeset exceeds 4 seconds, a 200-commit file history exceeds 2 seconds, or the applicable peak-memory budget is exceeded. CI also builds and audits the universal macOS 14+ release archive.
The diff design builds on Myers' O(ND) algorithm and the low-occurrence anchoring ideas documented in Git's diff algorithms.
GrapeCompare supports macOS 14 and later. The Finder Quick Action requires macOS 15 or later. To build from source, use Xcode 26 or later:
xcodebuild -project macos/GrapeCompare.xcodeproj \
-scheme GrapeCompare \
-destination 'platform=macOS' \
-configuration Debug buildYou can also open macos/GrapeCompare.xcodeproj in Xcode and press Run.
bash macos/CLI/build.sh
macos/CLI/.build/grapecompare diff left.txt right.txt --patch
macos/CLI/.build/grapecompare diff left.txt right.txt --format json
macos/CLI/.build/grapecompare merge base.txt ours.txt theirs.txt merged.txt
macos/CLI/.build/grapecompare git-config
macos/CLI/.build/grapecompare folder-sync left-folder right-folder mirror --dry-runThe printed Git mergetool configuration launches the GUI and reports success only after the merged output is saved. The Homebrew build is distributed outside the App Store sandbox so it can access the arbitrary temporary paths supplied by Git.
Two folders open the folder comparison; other inputs open the file comparison. The Homebrew build supports these arbitrary command-line paths directly.
Run the platform-independent core suite without launching Xcode:
bash macos/Tests/run-tests.sh
bash macos/CLI/run-tests.sh
ruby scripts/run-correctness-audit.rbThe suite contains focused comparison and transaction checks, 300 randomized shortest-edit-script cases, large-text stress cases, and filesystem safety cases. The audit also verifies the published screenshots and writes .audit/correctness-report.json; CI archives the same report for every pull request.
macos/
├── GrapeCompare/
│ ├── Core/
│ │ ├── DiffEngine.swift # adaptive Myers + low-occurrence anchors
│ │ ├── FolderComparator.swift # POSIX scan + bounded exact validation
│ │ └── FileOperations.swift # preflight, transactions, verification + undo
│ ├── Views/ # native SwiftUI file/folder interfaces
│ └── AppState.swift # comparison orchestration
├── Tests/ # deterministic correctness and stress tests
└── Benchmarks/ # repeatable large-file/folder benchmarks
Contributions are welcome. Read CONTRIBUTING.md before opening a pull request. For help, use GitHub Issues; report security problems according to SECURITY.md. By participating, you agree to follow the Code of Conduct.

