Bridge server management for Claude Code Anywhere notifications
/plugin marketplace add blueraai/claude-code-anywhere/plugin install claude-code-anywhere@blueraThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Implementation details for managing the notification bridge server.
Important: The Plugin Root path from command context must be used for server commands.
${CLAUDE_PLUGIN_ROOT} is only available in hooks, not skill/command execution.
See GitHub #9354.
All commands use the port from the port file (written by server on startup):
PORT=$(cat "<plugin-root>/port" 2>/dev/null)
[ -z "$PORT" ] && { echo "Server not started (no port file)"; exit 1; }
curl -s "http://localhost:$PORT/api/status"
Use the plugin root path from command context:
cd "<plugin-root>" && nohup bun run server >> logs/server.log 2>&1 &
Wait for ready (up to 5 seconds):
for i in 1 2 3 4 5; do curl -s "http://localhost:$PORT/api/status" >/dev/null 2>&1 && break || sleep 1; done
pkill -f "bun run server" 2>/dev/null || true
curl -s -X POST "http://localhost:$PORT/api/enable"
curl -s -X POST "http://localhost:$PORT/api/disable"
curl -s -X POST "http://localhost:$PORT/api/send" \
-H 'Content-Type: application/json' \
-d '{"sessionId": "'$CLAUDE_SESSION_ID'", "event": "Notification", "message": "Test message from Claude Code. Your notification setup is working!"}'
Server logs: logs/YY-MM-DD.log in plugin directory.
If notifications fail:
EMAIL_USER, EMAIL_PASS, EMAIL_RECIPIENT (or TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID)