Create new Claude hook that ensure pnpm run dev is running

This commit is contained in:
Konstantin Wohlwend 2025-08-25 12:42:13 -07:00
parent 5f7573bcbd
commit 2fa26f83cd

View File

@ -16,6 +16,16 @@
},
"includeCoAuthoredBy": false,
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "if ! curl -s --connect-timeout 1 http://localhost:8102 >/dev/null 2>&1; then echo -e '\\n\\n\\033[1;31mCannot reach backend on port 8102! Please run `pnpm run dev` before querying Claude Code\\033[0m\\n\\n' >&2; exit 2; fi"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|MultiEdit|Write",