Hookable is small programs for using arbitrary commands as Claude Code hook decisions.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: rename sdiff -> adiff

+7 -7
+7 -7
README.md
··· 35 35 Show a diff interactively and press `y`/`n` to decide: 36 36 37 37 ```bash 38 - hookable --interactive --cmd "sdiff before.rb after.rb" 38 + hookable --interactive --cmd "adiff before.rb after.rb" 39 39 ``` 40 40 41 41 Use a custom accept keybinding: ··· 44 44 hookable --interactive --cmd "git diff HEAD" --accept-key "ctrl+y" --reject-key "ctrl+n" 45 45 ``` 46 46 47 - Show a diff from a command that exits non-zero (e.g. `sdiff` exits 1 when files differ) and still wait for the user to accept or reject: 47 + Show a diff from a command that exits non-zero (e.g. `adiff` exits 1 when files differ) and still wait for the user to accept or reject: 48 48 49 49 ```bash 50 - hookable --interactive --no-exit-code --cmd "sdiff before.py after.py" 50 + hookable --interactive --no-exit-code --cmd "adiff before.py after.py" 51 51 ``` 52 52 53 53 ## Environment variables ··· 69 69 70 70 String values are unquoted; booleans, numbers, and nested objects are left as raw JSON. 71 71 72 - ## Using hookable with sdiff 72 + ## Using hookable with adiff 73 73 74 - [sdiff](https://github.com/acaloiaro/sdiff) is a side-by-side diff TUI that reads `HOOKABLE_*` environment variables directly. When invoked with no file arguments it constructs the diff from the hook payload automatically: 74 + [adiff](https://github.com/acaloiaro/adiff) is a side-by-side diff TUI that reads `HOOKABLE_*` environment variables directly. When invoked with no file arguments it constructs the diff from the hook payload automatically: 75 75 76 76 - **Edit** — diffs the current file against the result of applying `old_string → new_string` 77 77 - **Write** — diffs the current file against the new content ··· 84 84 "PreToolUse": [ 85 85 { 86 86 "matcher": "Edit", 87 - "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'sdiff -i'"}] 87 + "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'adiff -i'"}] 88 88 }, 89 89 { 90 90 "matcher": "Write", 91 - "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'sdiff -i'"}] 91 + "hooks": [{"type": "command", "command": "hookable --interactive --no-exit-code --cmd 'adiff -i'"}] 92 92 } 93 93 ] 94 94 }