You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ThreadingHTTPServer serves static files and three API endpoints:
GET /api/usage?tool=&from=&to=&project=&refresh= — aggregated usage as JSON
GET /api/export.csv — same data as CSV download
GET /api/projects — available Claude Code project directories
Generator functions parse log sources into UsageEvent dataclasses:
Claude JSONL — reads ~/.claude/projects/**/*.jsonl, deduplicates by message ID, resolves project name from cwd field
Codex sessions — reads ~/.codex/sessions/*.jsonl, deduplicates by total-token tuple
Codex SQLite — reads ~/.codex/logs_2.sqlite, queries response.completed events, deduplicates by response ID
GitHub Copilot — reads %TEMP%/VSGitHubCopilotLogs/*.chat.log, extracts EventType(11) JSON with input/output/cached/reasoning token counts and model name
OpenCode — reads ~/.local/share/opencode/opencode.db, parses part table step-finish records and message table token data with per-step granularity
summarize() aggregates events across 5 period types (daily, weekly, monthly, yearly, total)