Skip to content

Repository files navigation

Code Diffs

A tiny, fast desktop viewer for uncommitted git changes. Point it at a repository and it shows the working tree as a GitHub-style review: side-by-side or unified diffs with syntax highlighting, a file tree, and one tab per repository.

The use case is deliberately simple: keeping an eye on what AI coding agents are doing to your repos. When Claude Code, Cursor, Codex, or any other agent is editing across one or more repositories, leave Code Diffs open next to your terminal. Each repo gets a tab, and the view refreshes whenever the window regains focus — so after every agent turn you can glance over exactly what changed, like reviewing a pull request. It is read-only by design: it never writes to your repositories, and nothing leaves your machine.

screenshot

Features

  • GitHub-style diffs — red/green line backgrounds, word-level change emphasis, and both split (side-by-side) and unified layouts.
  • Syntax highlighting via Shiki with the GitHub light/dark themes.
  • Dark, light, and follow-system themes.
  • File tree of the working-tree changes with per-file status (modified / added / deleted / renamed) and a filter box.
  • Tabs — one per repository; open repos persist across launches.
  • Review-style scrolling — all files stacked with sticky headers; collapse files; very large diffs start collapsed and render lazily.
  • Context expansion — click on a hunk header (or below the last hunk) to reveal unchanged lines, 20 at a time, like GitHub.
  • Lightweight — built with Tauri 2 on the system webview. The macOS app bundle is about 6 MB.

What it shows

The working tree compared against HEAD (staged and unstaged changes together), plus untracked files rendered as additions. Binary files and pure renames are labeled rather than diffed. It shells out to your installed git — there is no bundled git implementation.

Setup

Prerequisites:

  • Rust (stable) — or mise install if you use mise; this repo pins Rust in mise.toml
  • Node.js 20+
  • git on your PATH
  • On Linux: the Tauri prerequisites (webkit2gtk and friends)

Then:

npm install
npm run tauri dev                    # run in development
npm run tauri dev -- -- ~/some/repo  # develop against a specific repo

Building

npm run tauri build

Bundles land in src-tauri/target/release/bundle/ (.app and .dmg on macOS, .deb/.rpm/AppImage on Linux, .msi/.exe on Windows).

Usage

Launch the app inside a repo, or pass repo paths as arguments:

# macOS example — alias the binary inside the bundle:
alias diffs='"/Applications/Code Diffs.app/Contents/MacOS/code-diffs"'

diffs            # open the repo containing the current directory
diffs ~/a ~/b    # open two repos in tabs

In the app: File → Open Repository… (or ⌘O / Ctrl+O), or the button next to the tabs. refreshes manually; focusing the window refreshes automatically.

Contributing

Issues and pull requests are welcome. The code is intentionally small: a thin Rust backend (src-tauri/src/main.rs) that runs git commands, and a vanilla TypeScript frontend (src/) with no framework.

License

MIT

About

A tiny, fast desktop viewer for uncommitted git changes.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages