Usage
CLI commands, flags, and examples.
Run inside any git repository:
diffhubThis starts a local server and opens the diff viewer in your browser.
| Command | Description |
|---|---|
serve | Start DiffHub server (default) |
cmux | Open in cmux browser split pane |
| Flag | Default | Description |
|---|---|---|
-p, --port <port> | 2047 | Port to serve on |
-r, --repo <path> | cwd | Path to the git repository |
-b, --base <branch> | auto | Base branch to diff against |
--no-open | — | Skip automatic browser open |
# Use a different base branch
diffhub --base develop
# Point at a repo in another directory
diffhub --repo ~/projects/my-app
# Use a different port
diffhub --port 3000
# Don't open the browser automatically
diffhub --no-openDiffHub auto-detects the base branch in this priority order:
origin/mainorigin/masterorigin/developorigin/devmain, master, develop, devOverride with --base <branch> or the DIFFHUB_BASE environment variable.