Skip to main content

Crate diffier

Crate diffier 

Source
Expand description

diffier: a live diff feed for Claude Code edits.

diffier hook, registered in Claude Code’s settings, snapshots files before each edit and appends the hook payload to a JSONL spool. The TUI tails the spool, diffs the snapshot against the file on disk, and renders the result.

Modules§

app
TUI state: the card feed, scrolling, follow mode, and the spool tail loop.
diff
Unified diff computation and classification.
event
Tolerant model of a Claude Code hook payload as written to the spool.
hook
The diffier hook subcommand: consume one Claude Code hook payload.
install
Register and remove the diffier hook entries in Claude Code settings.
paths
Filesystem locations shared between diffier hook and the monitor.
render
Turn a CardInput into styled terminal lines, via delta or a plain fallback.
session
Turn a stream of hook events for one directory into edit cards.
snapshot
Resolve the pre-edit content for a PostToolUse event.
spool
Reading the JSONL spool: full replay scans and incremental tailing.
ui
Drawing: a body of visible feed lines and a one-line status bar.