Use ccusage to export your Claude Code usage and submit it to the leaderboard.
Run this command in your terminal to submit your current usage:
npx ccusage@latest --json | curl -X POST "https://burnrate.autonomoustech.ca/api/usage/submit" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d @-
Replace YOUR_API_KEY with your actual API key from registration.
Step 1: Create the hook script
cat > ~/.claude/hooks/scripts/burnrate.sh << 'EOF'
#!/bin/bash
API_KEY="YOUR_API_KEY"
API_URL="https://burnrate.autonomoustech.ca/api/usage/submit"
npx ccusage@latest --json | curl -X POST "$API_URL" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_KEY" \
-d @-
echo "✅ Usage submitted to burnrate"
EOF
Step 2: Make it executable
chmod +x ~/.claude/hooks/scripts/burnrate.sh
Step 3: Configure Claude Code hooks
cat > ~/.claude/settings.json << 'EOF'
{
"hooks": {
"SessionEnd": [
{
"type": "command",
"command": "~/.claude/hooks/scripts/burnrate.sh"
}
]
}
}
EOF
Step 4: Test it
~/.claude/hooks/scripts/burnrate.sh