on main help sign in
docs(hooks): add name field
aadb7e7Kieran Klukas
docs/hooks/README.md+5
@@ -139,6 +139,7 @@ and project-level, with project level hooks taking precedence.
139 "hooks": {
139 "hooks": {
140 "PreToolUse": [
140 "PreToolUse": [
141 {
141 {
142+ "name": "no-rm-rf", // friendly name shown in the TUI
142 "matcher": "bash", // regex tested against the tool name
143 "matcher": "bash", // regex tested against the tool name
143 "command": "./hooks/my-hot-hook.sh", // the path to the hook
144 "command": "./hooks/my-hot-hook.sh", // the path to the hook
144 "timeout": 10, // in seconds; default 30
145 "timeout": 10, // in seconds; default 30
@@ -600,6 +601,10 @@ Each entry under a `hooks.<EventName>` array:
600
601
601```jsonc
602```jsonc
602{
603{
604+ // string. Optional. Friendly display name shown in the TUI. Falls back to
605+ // command when omitted.
606+ "name": "no-rm-rf",
607+
603 // string. Optional. Regex tested against the tool name. Omit to match all.
608 // string. Optional. Regex tested against the tool name. Omit to match all.
604 "matcher": "^bash$",
609 "matcher": "^bash$",
605
610