A fast, local git diff viewer that runs in your browser. Single binary, zero dependencies.
- 4 diff modes — Staged, Uncommitted, Branch compare, Commit view
- File sidebar — Click a file to isolate its diff, click again to show all
- Keyboard shortcuts —
Rrefresh,J/Knavigate files,[/]navigate hunks,1-4switch modes,Escshow all - Nord dark theme — Auto light mode based on system preference
- No background processes — Manual refresh only, no file watchers
Requires Go 1.21+.
git clone https://github.com/peak-flow/GitPeek.git
cd GitPeek/gitpeek
go build -ldflags="-s -w" -o gitpeek .Add to your PATH:
# Copy
cp gitpeek /usr/local/bin/
# Or symlink (rebuilds take effect immediately)
ln -sf "$(pwd)/gitpeek" /usr/local/bin/gitpeek# Apple Silicon
GOOS=darwin GOARCH=arm64 go build -ldflags="-s -w" -o gitpeek-arm64 .
# Intel Mac
GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o gitpeek-amd64 .
# Universal binary (both architectures)
lipo -create -output gitpeek gitpeek-arm64 gitpeek-amd64
# Linux
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o gitpeek-linux .If you receive a pre-built binary, macOS may block it. Fix with one of:
- Right-click > Open (first time only)
- System Settings > Privacy & Security > Allow Anyway
xattr -d com.apple.quarantine /path/to/gitpeek
Building from source avoids this entirely.
cd /path/to/any/git/repo
gitpeekOpens your browser automatically with a random port. Override with --port:
gitpeek --port 3000| Flag | Description |
|---|---|
--port |
Server port (default: random) |
--no-open |
Don't auto-open browser |
--dir |
Git repo path (default: current directory) |
Single Go binary (~6MB) with the web UI embedded via go:embed. Runs a local HTTP server with 3 endpoints:
GET /api/diff?mode={staged|uncommitted|branch|commit}&ref={branch|sha}GET /api/branchesGET /api/status
No Node.js. No external dependencies. No build step for the frontend.
MIT
