Make hooks configurable for remote/VM deployments

All hooks now use CLAUDE_MONITOR_URL environment variable to allow
configuration for remote deployments. Defaults to http://localhost:8000
for local development.

Changes:
- All hooks now read CLAUDE_MONITOR_URL from environment
- Added README.md with installation instructions for local and remote setups
- Includes troubleshooting guide for common issues

Usage:
  export CLAUDE_MONITOR_URL="http://vm-ip:8000"
  cp -r .claude/hooks/* ~/.claude/hooks/
  chmod +x ~/.claude/hooks/*.sh

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
felix.zoesch
2025-12-15 16:16:43 +01:00
parent e19f500fb0
commit 8b35d95e9b
7 changed files with 121 additions and 6 deletions

View File

@@ -24,10 +24,13 @@ PAYLOAD=$(jq -n \
}')
# Send to backend API (asynchronous, non-blocking)
# Use CLAUDE_MONITOR_URL environment variable or default to localhost
MONITOR_URL="${CLAUDE_MONITOR_URL:-http://localhost:8000}"
curl -X POST \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
http://localhost:8000/api/events \
"${MONITOR_URL}/api/events" \
--max-time 2 \
--silent \
--show-error \