Skip to content

peak-flow/GitPeek

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GitPeek

A fast, local git diff viewer that runs in your browser. Single binary, zero dependencies.

GitPeek screenshot

Features

  • 4 diff modes — Staged, Uncommitted, Branch compare, Commit view
  • File sidebar — Click a file to isolate its diff, click again to show all
  • Keyboard shortcutsR refresh, J/K navigate files, [/] navigate hunks, 1-4 switch modes, Esc show all
  • Nord dark theme — Auto light mode based on system preference
  • No background processes — Manual refresh only, no file watchers

Install

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

Cross-compile

# 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 .

macOS Gatekeeper

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.

Usage

cd /path/to/any/git/repo
gitpeek

Opens 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)

How it works

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/branches
  • GET /api/status

No Node.js. No external dependencies. No build step for the frontend.

License

MIT

About

GitPeek is a zero-dependency Go tool that turns Git diffs into a fast local web UI. Compare staged, uncommitted, branch, or commit changes with keyboard-driven navigation and a clean developer-focused interface.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors