tokemetry docs

Architecture

tokemetry is a self-hosted telemetry path from local Claude Code usage evidence to private server analytics.

Runtime model

Collectors run on each development machine. They read local usage metadata, normalize counters, queue events when offline, and send idempotent ingest requests to a private server.

Claude Code JSONL / stats cache / OAuth limit source
        |
Collector daemon + local SQLite queue
        | WireGuard or HTTPS
FastAPI server + Postgres
        |
Dashboard / REST API / WebSocket / alerts

Repository boundaries

Shared models and provider abstractions live in packages/core. The collector belongs in apps/collector, ingest and analytics in apps/server, the product dashboard in apps/dashboard, and this public website in apps/website.

Provider strategy

Claude Code is the first target because subscription-window visibility is the immediate need. Provider abstractions keep pricing, provenance, and collection logic from becoming Claude-specific throughout the core.