Skip to content

API Reference ​

claude-telemetry has three main components, each with its own interface. This section documents all commands, endpoints, and data formats.

Components ​

Agent CLI ​

The Python agent that runs on each PC. It reads Claude Code's JSONL logs and syncs data to Supabase.

Agent CLI Reference →

Worker Endpoints ​

The Cloudflare Worker that proxies requests between the dashboard and Supabase. Handles authentication, authorization, and data access.

Worker Endpoints →

Supabase Schema ​

The PostgreSQL database schema used to store usage data. Managed through Supabase with Row-Level Security.

Tables:

TableDescription
usage_dataCore table storing all session and token data
auth.usersSupabase-managed user authentication table

Key columns in usage_data:

ColumnTypeDescription
idUUIDPrimary key
machine_idTEXTUnique identifier for the source machine
machine_nameTEXTHuman-friendly machine label
session_idTEXTClaude Code session identifier
timestampTIMESTAMPTZWhen the session occurred
modelTEXTModel used (e.g., "opus-4", "sonnet-4")
input_tokensBIGINTInput tokens consumed
output_tokensBIGINTOutput tokens consumed
cache_read_tokensBIGINTCache read tokens
cache_write_tokensBIGINTCache write tokens
cost_usdNUMERIC(10,6)Calculated cost in USD
project_pathTEXTDirectory where Claude Code was run
duration_secondsINTEGERSession duration
metadataJSONBAdditional session metadata
created_atTIMESTAMPTZRecord creation timestamp

Released under the MIT License.