Skip to content
DiffHub

AI agents: fetch the documentation index at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.

Introduction

Review your branch in cmux or a browser.

Introduction

DiffHub is a local diff viewer for cmux.

It opens your branch in a browser split and compares it with the detected base branch, usually origin/main. If you do not use cmux, you can open the same view in a normal browser window.

Watch the demo (2 min)

Quick start

npx diffhub@latest cmux

That starts DiffHub and opens your branch diff in a cmux browser split.

npx diffhub@latest

Use that if you want a normal browser tab instead.

Global install

npm install -g diffhub

What you get

  • Branch diff against the right base branch. DiffHub uses the merge-base, so you see what your branch changed.
  • Split and unified views. Toggle with s.
  • Inline comments. Tag notes as [must-fix], [suggestion], [nit], or [question].
  • File sidebar. Filter files with / and scan per-file + and - stats.
  • Auto-refresh while you work. Keep the view open and see updates as files change.
  • Open in your tools. Right-click to jump into Zed, VS Code, Terminal, or Finder.

Requires Node.js 20.11 or later and a git repository with at least one commit. cmux mode expects cmux.app on macOS at /Applications/cmux.app.

Next steps

  • Usage - run DiffHub in cmux or a browser
  • Diff Views - review your whole branch or only uncommitted changes
  • Comments - leave review notes