Repository navigation
Quick Start
Wallace Ricardo edited this page Jun 3, 2026
·
2 revisions
Get claude-code-graphql running and recording your Claude Code activity.
make buildProduces bin/claudegql.
Run in the foreground (blocks terminal):
make runOr in the background (recommended — logs go to claudegql.log):
make run-bgYou should see:
server: http://localhost:8765/graphql
playground: http://localhost:8765/playground
hook: POST http://localhost:8765/hook
docs: http://localhost:8765/docs
Register the hooks in ~/.claude/settings.json so Claude Code starts sending events:
make install-hooksThis adds claudegql record as the hook command for these event types:
PreToolUse · PostToolUse · Stop · SubagentStop · Notification · SessionStart · SessionEnd · UserPromptSubmit · PreCompact · PostCompact
Send a test event:
make record-testThen query with the built-in CLI:
claudegql query '{ hooks(limit: 1) { id eventType recordedAt } }'
claudegql query '{ sessions(limit:5) { id status cwd model lastSeenAt } }'Print the compact schema for ad-hoc exploration or LLM context:
claudegql schemaOr open the Playground at http://localhost:8765/playground and run:
{
stats {
totalSessions
totalHooks
hooksByEventType { eventType count }
}
}make stop- Session Intelligence — discover active work, skills used, subagents, edits, prompts, errors, and token usage
- Sessions API — query your coding sessions
- Hooks API — filter and paginate raw events
- Search — full-text search across all hook data
- Environment Variables — configure the server