Skip to content

notgba/diff.rxt.io

Repository files navigation

diff · rxt.io

Review code locally. Hand notes to your agent.

A git diff reviewer that runs entirely in your browser — open any local repo, review changes side-by-side, drop line-anchored comments, and export a brief your coding agent can act on without guessing.

Open the app → diff.rxt.io

No backend  ·  No upload  ·  No telemetry  ·  MIT

Side-by-side diff with word-level highlights and an inline review comment

The loop

  1. Open a local repo. No clone, no upload, no install — the browser reads your .git directly.
  2. Review the diff. Side-by-side, word-level highlights, Gerrit-style. Select lines and comment, tagged nit / suggestion / blocker.
  3. Generate feedback. One keystroke bundles every comment into a file-and-line-anchored brief — paste it into Claude Code, Cursor, or any agent.

Coding agents are great at writing code and bad at knowing which parts you care about. A tight review — this line, this concern — is the fastest way to steer them. diff makes producing that review pleasant.

Review summary dialog with a line-anchored brief ready to paste into an agent

Features

Real repos, in the browser Reads .git via the File System Access API — refs, loose objects, packfiles (ofs/ref deltas), the index, trees. All client-side.
Three review modes Working tree vs HEAD, a single commit, or any two branches/commits.
A diff that feels right Myers line diff with word-level intra-line highlights, collapsible context, syntax highlighting.
A file list that works Quick filters, per-file reviewed checkmarks, add/delete/size at a glance.
Comments with intent Multi-line selection, severity tags, full-width inline display.
AI-ready export Copy the brief to the clipboard or download it as Markdown.
Keyboard-first Review a whole change without leaving the home row.
Demo built in Every feature works the moment the page loads — no folder required.

Privacy

diff is a fully static single page. No backend, no account, no telemetry.

  • Nothing is transmitted. Code, diffs, and comments live in browser memory; there is no server to send them to.
  • Nothing phones home. No analytics, no cookies, no third-party requests — fonts are self-hosted.
  • Read-only, one folder. The app asks for read access to the folder you pick, and only that folder.
  • Works offline once loaded.

The Content-Security-Policy pins every fetch destination to the same origin — the guarantees are enforced by your browser, not just promised in a README.

Quick start

Open diff.rxt.io and click Open folder. The folder picker needs a Chromium-based browser (Chrome, Edge, Arc, Brave…); others can still explore the demo.

About the browser prompt: Chrome phrases read-only access as "view and copy files" — "copy" just means reading bytes into the page to render the diff. Nothing is uploaded; the CSP makes outbound requests impossible.

To run it yourself:

npm install
npm run dev      # http://localhost:5173

Self-hosting is the same story: npm run build emits a static dist/ you can put anywhere — no environment variables, no server runtime.

How it works

  1. showDirectoryPicker grants read-only access to the folder you choose.
  2. An in-browser git reader (git-fs.ts) resolves refs (loose + packed-refs), inflates objects with fflate, resolves packfile deltas, parses the index, and walks trees.
  3. Working-tree files are SHA-1 hashed via crypto.subtle to detect changes — untracked files honor .gitignore.
  4. A diff engine (diff-engine.ts) builds the side-by-side model: Myers line diff, word-level refinement.

React + TypeScript + Vite + Tailwind, with shadcn/ui primitives. The UI sets Roboto / Roboto Mono — Gerrit's typefaces — because the design borrows shamelessly from the best code-review tool ever shipped.

Keyboard shortcuts

Keys Action
Move between changed files
Space Mark current file reviewed
c Comment on selected line(s)
Switch severity while composing
⌘ ↵ Save comment
g Generate feedback
/ Focus the file filter
r Refresh from disk
Esc Clear selection / close dialog

Select lines by dragging down the new (right) side, or click + Shift-click.

Contributing

PRs welcome — npm install && npm run dev is the whole setup, and npm run build type-checks.

License

MIT © rxt.io

About

Local-first git diff reviewer — review code in your browser, export AI-ready feedback. Nothing leaves your machine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors