diff --git a/README.md b/README.md index b76594a..790b846 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,8 @@ Lazy, not negligent: trust-boundary validation, data-loss handling, security, an The most effort ponytail will ever ask of you: +The Claude Code and Codex plugins run two tiny Node.js lifecycle hooks, so `node` needs to be on your PATH (note for Nix/nvm users: it must be on the non-interactive shell's PATH). If it isn't, the skills still work, the always-on activation just stays quiet instead of erroring on every prompt. + ### Claude Code ``` diff --git a/hooks/hooks.json b/hooks/hooks.json index 962b852..483c3e1 100644 --- a/hooks/hooks.json +++ b/hooks/hooks.json @@ -6,8 +6,8 @@ "hooks": [ { "type": "command", - "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/ponytail-activate.js\"", - "commandWindows": "node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\ponytail-activate.js\"", + "command": "command -v node >/dev/null 2>&1 && node \"${CLAUDE_PLUGIN_ROOT}/hooks/ponytail-activate.js\" || exit 0", + "commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\ponytail-activate.js\" }", "timeout": 5, "statusMessage": "Loading ponytail mode..." } @@ -19,8 +19,8 @@ "hooks": [ { "type": "command", - "command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/ponytail-mode-tracker.js\"", - "commandWindows": "node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\ponytail-mode-tracker.js\"", + "command": "command -v node >/dev/null 2>&1 && node \"${CLAUDE_PLUGIN_ROOT}/hooks/ponytail-mode-tracker.js\" || exit 0", + "commandWindows": "if (Get-Command node -ErrorAction SilentlyContinue) { node \"$env:CLAUDE_PLUGIN_ROOT\\hooks\\ponytail-mode-tracker.js\" }", "timeout": 5, "statusMessage": "Tracking ponytail mode..." }