📖 Setup Guide
1️⃣ Get Your API Key
If you haven't already, create a free account and find your API key on the dashboard.
2️⃣ Install Claude Code Hooks
Method 1: One-Liner Install (Recommended)
Run this command in your terminal to install the Coding Buddy hooks automatically:
curl -sL https://coding-buddy.com/install/YOUR_API_KEY_HERE | python3
Method 2: Manual Hook Setup
Create a hook script that sends events to the bridge server. Save this as ~/.claude/hooks/send_status.py:
#!/usr/bin/env python3
"""Send Claude Code hook events to Coding Buddy bridge server."""
import json, sys, urllib.request
API_KEY = "YOUR_API_KEY_HERE"
URL = "https://coding-buddy.com/event"
def main():
payload = json.loads(sys.stdin.read())
event = payload.get("hook_event_name", "")
tool = payload.get("tool_name", "")
session = payload.get("session_id", "")
data = json.dumps({
"event": event,
"tool_name": tool,
"session_id": session
}).encode()
req = urllib.request.Request(
URL,
data=data,
headers={
"Content-Type": "application/json",
"X-API-Key": API_KEY
}
)
try:
urllib.request.urlopen(req, timeout=5)
except Exception:
pass
if __name__ == "__main__":
main()
Then add the hook to your Claude Code settings (~/.claude/settings.json):
{
"hooks": {
"SessionStart": [{ "type": "command", "command": "echo '{}' | python3 ~/.claude/hooks/send_status.py" }],
"SessionEnd": [{ "type": "command", "command": "echo '{}' | python3 ~/.claude/hooks/send_status.py" }],
"UserPromptSubmit": [{ "type": "command", "command": "echo '{}' | python3 ~/.claude/hooks/send_status.py" }],
"PreToolUse": [{ "type": "command", "command": "echo '{}' | python3 ~/.claude/hooks/send_status.py" }],
"PostToolUse": [{ "type": "command", "command": "echo '{}' | python3 ~/.claude/hooks/send_status.py" }],
"Stop": [{ "type": "command", "command": "echo '{}' | python3 ~/.claude/hooks/send_status.py" }]
}
}
3️⃣ Connect the Android App
- Download the Coding Buddy app from the Google Play Store (or sideload the APK)
- Open the app and tap Settings
- Enter your API key:
YOUR_API_KEY_HERE - Tap Connect — your buddy should come alive!
✅ Test Your Setup
Send a test event to verify everything works:
curl -X POST https://coding-buddy.com/event \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY_HERE" \
-d '{"event":"SessionStart"}'
If your app is connected, your buddy should react immediately.