Skip to content

Dev Hooks

Hatem Soliman edited this page Nov 28, 2026 · 3 revisions

Dev Hooks

Khor listens on 127.0.0.1:47017, only on this Mac. The helper ~/.khor/bin/khor-event <name> sends it an event.

Install

./hooks/install-hooks.sh

It backs up each file, then adds:

Source Event Effect
Claude Code Stop hook claude-done Sound and a gold burst over the Burj
Claude Code Notification hook claude-waiting Sound, fish gather at the glass
zsh, a command fails error Errors 1 to 3: a short sound
zsh, 4th failure in a row and after error Sounds escalate (streak-4 to streak-7) and a storm builds
zsh, a command succeeds success Clears the streak, with a relief sound and fireworks if it was 4 or more

Ctrl-C (exit code 130) never counts as an error. Change where escalation starts with errorStreakStart in Settings.

An error streak and the success that clears it

Git commits (optional, per repository)

cp hooks/git-post-commit /path/to/repo/.git/hooks/post-commit

Each commit sends the flamingos on a lap.

Your own events

Any name made of letters, numbers and dashes works:

~/.khor/bin/khor-event deploy-done

It plays deploy-done.mp3 from your sounds folder. See Sounds.

Undo

Remove the two Khor entries from ~/.claude/settings.json. Delete the block between # >>> khor >>> and # <<< khor <<< in ~/.zshrc. Backups end in .bak-khor.

Clone this wiki locally