A focused, fullscreen, side-by-side git review tool.
hawkshaw walks you through the unstaged changes in a working tree, one file at
a time, and lets you render a verdict on every hunk before you commit.
When it exits, the index is staged exactly as you decided. You run
git commit yourself.
curl -fsSL https://slobodan.me/hawkshaw/install.sh | sh
I review a lot of AI-generated code. You do the same. The terminal tools that
already exist pull in two directions. Full git clients like lazygit and gitui do
everything, so they put a busy general-purpose interface between you and the code.
git diff and git add -p do too little: no real scrolling,
no fullscreen reading mode. And their keyboard navigation is not great.
hawkshaw takes one job. It puts a large diff in front of you, hunk by hunk, and
keeps the interface out of the way while you work through it. The scope stays narrow
on purpose. There is no branch management, no log browsing, no sidebar. You read the
change, you decide, you move on, with vim and bat muscle memory.
bat muscle memory: j/k to scroll,
y/n to decide, ? when you forget.
Full keymap ↓git status, from the in-repo
.gitignore to your global ignore configuration. i adds an
untracked file to .gitignore without leaving the review.| Keys | Action |
|---|---|
| j / k, ↓ / ↑ | scroll a line |
| F / B | full page down / up |
| Ctrl-d / Ctrl-u, Space / b | half page down / up |
| g / G, Home / End | top / bottom |
| J / K | next / previous hunk |
| h / l, ← / → | previous / next file |
| t | cycle view: auto, split, inline |
| y / n | stage / skip the current hunk |
| Y / N | stage / skip every remaining hunk in the file |
| dd | discard the current hunk (confirm) |
| DD | discard the whole file back to HEAD (confirm) |
| u | undo the last verdict |
| c | copy the file path and current hunk (as a diff) to the clipboard |
| r | refresh (re-read git status) |
| i / I | add an untracked file, or its directory, to the root .gitignore |
| ? | help overlay |
| q | quit (warns if hunks are undecided) |
Discards destroy work and always ask first. Binary files take whole-file verdicts with the same keys.
curl -fsSL https://slobodan.me/hawkshaw/install.sh | sh
The script detects your OS and architecture (Linux and macOS, x86_64 and arm64),
downloads the matching binary from the latest GitHub release, verifies its SHA-256
against the release checksums before installing anything, and puts
hawkshaw in ~/.local/bin (or /usr/local/bin
when run as root).
Running hawkshaw in Docker is the recommended setup. Pin both the script and the binary to the same tag, so nothing moves underneath you:
# Dockerfile
RUN curl -fsSL https://github.com/stojanovic/hawkshaw/releases/download/v0.1.0/install.sh \
| VERSION=0.1.0 PREFIX=/usr/local sh
You need a Rust toolchain. There is no system libgit2 to install
first, since git2 builds a bundled copy.
git clone https://github.com/stojanovic/hawkshaw.git
cd hawkshaw
cargo install --path .
hawkshaw reads an optional TOML config file, by default from
~/.hawkshaw/config.toml. Point it somewhere else with
--config. Both keys are optional, and a missing file is fine.
theme = "default" # default | minimal | noir
view = "auto" # auto | split | inline
default is a dark, syntax-friendly scheme with green and red bands
on the focused changed lines. minimal is high-contrast text with no
background fills. noir goes black-and-white, film-noir greyscale,
monochrome down to the syntax — the switch at the top of this page is a nod to
it.
auto reads the terminal width and takes the side-by-side split at
120 columns or wider, unified inline below that, re-adapting live as you resize,
a tmux split included.
I built hawkshaw (no, Claude Code and Codex built it) while working on Competitor Tracker, an app that tracks your competitors and sends you a list of the most important changes every Monday. Competitor Tracker speaks in a film-noir detective voice, so the same noir detective theme carried over to this tool.
Hawkshaw is an old slang word for a detective. It goes back to the detective character Hawkshaw in Tom Taylor's 1863 play The Ticket-of-Leave Man, and it later titled Gus Mager's early twentieth-century newspaper comic strip Hawkshaw the Detective. Of all the noir-detective names on the shortlist, this one sounds good, types easily, sticks in memory, and is unique enough.