Open the current git repo's diff as a beautiful side-by-side HTML view in your browser. One command, any project, no per-repo setup.
gdiff # working tree + staged vs HEAD
gdiff main # diff vs main
gdiff HEAD~3 HEAD # diff between two refs
gdiff --unified # plain colored unified diff in terminalcurl -fsSL https://raw.githubusercontent.com/lord-eagle/gdiff/main/install.sh | bashDrops gdiff into ~/.local/bin. Add it to PATH if not already.
Tracking in issue #1. For now use the curl installer above.
git clone https://github.com/lord-eagle/gdiff.git
ln -s "$PWD/gdiff/bin/gdiff" ~/.local/bin/gdiffgit- Browser network access for HTML mode — loads
@pierre/diffsfromesm.sh - macOS or Linux (uses
open/xdg-open)
--unified mode needs only git.
- Runs
git diff(working tree + staged, or against the refs you pass). - Streams the unified diff into a temp patch file.
- Writes a static HTML app to
.git/gdiff/diff.htmland opens it in your default browser. - The app parses and renders the patch with
@pierre/diffs.
The HTML view uses Diffs' CodeView, which handles virtualized file rendering, row/window measurement, scroll reconciliation, and syntax highlighting.
The HTML view includes a searchable, collapsible file tree, side-by-side/stacked view switching, per-file viewed/collapse state, file-level comment icons, and inline hunk expand controls for showing more context.
In the HTML diff view:
- Click a line number (gutter) to add or edit feedback for that line. The code column stays selectable so you can still copy snippets.
- Drag across line numbers, or click one and then shift-click another, to comment on a range.
- Click the comment icon in a file header to leave file-level feedback.
- Each file header sticks while you scroll through that file, keeping its Viewed toggle and file-comment button reachable. The header controls stay in sync with sidebar state and the
v/ckeyboard shortcuts. - Comments are saved to browser
localStorageonly, scoped to the repository so changed or removed anchors remain visible in the comment list.gdiffdoes not run a local server or write repository review-state JSON. - Click the floating comment counter to open the comment list. The list includes stored comments even when their old anchors are no longer present in the current diff; those rows are marked not in current diff and can be deleted individually.
- Viewed file state is also saved to
localStorage, scoped by repository and diff arguments. A file is restored as viewed only when its saved per-file diff hash matches the current diff, so changed or newly added files start unviewed until explicitly marked again. - Click Copy prompt to copy all comments as structured feedback that can be pasted into an agent. Line comments include their enclosing
@@ ... @@hunk header plus nearby context lines, with the commented line prefixed by>. If the browser blocks the clipboard API, a fallback modal lets you copy manually.
Soloterm has no global config, so you wire gdiff per project. Two paths:
Option A — drop the example solo.yml into your project (one-liner):
curl -fsSL https://raw.githubusercontent.com/lord-eagle/gdiff/main/examples/solo.yml -o solo.ymlReload the project in Solo. Solo prompts to trust the YAML commands (security gate) — approve once, then:
Diff (HTML)tab → browser pops with side-by-side viewDiff (terminal)tab → ANSI unified diff in-pane
If your repo already has a solo.yml, copy the processes block from examples/solo.yml into yours instead of overwriting.
Option B — add via Solo UI (no file change):
- Open the project in Solo.
- Add Process → Command →
gdiff→ Save. - Click the tab any time you want to see the current diff.
Either way, you can also just run gdiff in any Solo terminal tab.
gdiff is a thin bash wrapper. The actual side-by-side HTML rendering is done by:
@pierre/diffs— itsCodeViewhandles virtualized file rendering, split/stacked layout, syntax highlighting, and line selection. Loaded in the browser at runtime from esm.sh (@pierre/diffs@1.2.7by default; override withGDIFF_DIFFS_VERSION); not bundled.
Huge thanks to that project — gdiff would not exist without it.
MIT — see LICENSE.