Skip to content

Dev Hooks

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

Dev Hooks

Khor listens on 127.0.0.1:47823. Only programs on your Mac can reach it, and requests from web pages are refused.

Set it all up

./hooks/install-hooks.sh

It backs up each file before changing it and is safe to run again.

Step What it does
khor-event Installs ~/.khor/bin/khor-event, a small wrapper around curl
Claude Code Adds Stop → done and Notification → waiting to ~/.claude/settings.json, unless they're already there
zsh Adds a marked block to ~/.zshrc: a failed command sends error, a successful one sends success. Ctrl-C isn't counted
git Prints how to install hooks/git-post-commit in a repository

To undo the zsh hook, delete the block between # >>> khor >>> and # <<< khor <<<.

Events

Event What happens
done Victory sound, a fish leaps, the falcon swoops, and the error streak resets
waiting The fish line up near the glass and blow bubbles
error Adds one to the error streak: short memes, then from the Nth in a row a long meme and a sandstorm
success Ends the streak. After a long streak: fireworks, the falcon and the streak-broken sound
commit Flamingos take off
iftar The iftar cannon
whale-shark, falcon, flamingos, fireworks, feed Summons
reset Clears the streak quietly
snapshot Saves snapshot-N.jpg of each screen to ~/Library/Application Support/Khor/
anything else Plays a clip with that name from the sounds folder

1.0 names still work: claude-done, claude-waiting, git-commit, iftar-cannon.

~/.khor/bin/khor-event error
curl -s http://127.0.0.1:47823/event/commit

Set when the long meme starts in the menu, under Long meme. The default is 4.

Clone this wiki locally