hawkshaw

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

Demo video

Screenshots

hawkshaw's side-by-side split view: old code on the left with red removal bands, new code on the right with green addition bands
Side-by-side split: old left, new right, changed lines aligned
hawkshaw's unified inline view: removed lines stacked over added lines in one full-width column
Unified inline view for narrower terminals
The help overlay listing every key over a dimmed diff
Keyboard navigation: the ? help overlay
A split-view diff with the status line reading: copied file and current hunk to clipboard
c copies the hunk as a diff, ready for a second opinion
The minimal theme: high-contrast colored text on black with no background fills
The minimal theme: high-contrast text, no background fills
The noir theme: the same diff rendered entirely in greyscale
The noir theme: film-noir greyscale

Why

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.

What you get

Keyboard navigation

KeysAction
j / k, / scroll a line
F / Bfull page down / up
Ctrl-d / Ctrl-u, Space / bhalf page down / up
g / G, Home / Endtop / bottom
J / Knext / previous hunk
h / l, / previous / next file
tcycle view: auto, split, inline
y / nstage / skip the current hunk
Y / Nstage / skip every remaining hunk in the file
dddiscard the current hunk (confirm)
DDdiscard the whole file back to HEAD (confirm)
uundo the last verdict
ccopy the file path and current hunk (as a diff) to the clipboard
rrefresh (re-read git status)
i / Iadd an untracked file, or its directory, to the root .gitignore
?help overlay
qquit (warns if hunks are undecided)

Discards destroy work and always ask first. Binary files take whole-file verdicts with the same keys.

Install

Prebuilt binary

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

Docker (recommended)

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

From source

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 .

Configuration

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.

The name

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.