StatsAI docs
Overview
How StatsAI collects local AI usage logs, syncs private dashboard data, and shows a cross-device dashboard.
Last updated: June 9, 2026
What StatsAI does
StatsAI is a local-first AI usage collector with an optional hosted dashboard. The open-source Rust CLI reads provider logs on each machine, normalizes them into one schema, and syncs private dashboard data such as usage rollups and hosted task snapshots to your account.
You get cross-device totals, provider breakdowns, subscription value views, and activity heatmaps — without sending prompts, model responses, or raw log lines to the server.
How the pieces fit together
| Piece | Role |
|---|---|
| statsai CLI | Scans local provider logs, stores normalized usage in SQLite, prepares sync batches |
| Device pairing | One-time browser authorization per machine |
| Hosted API | Authenticates devices, validates sync_batch.v1 and sync_batch.v2, deduplicates, stores rollups and task snapshots |
| Dashboard | Reads compact task and analytics responses — no raw event scan in the browser |
Supported providers
StatsAI normalizes local logs from tools like Claude Code, Codex, Cursor, and Copilot into a single usage model. Additional adapters can be added over time without changing the dashboard schema.
Typical workflow
- Install the CLI on each machine you want to track.
- Run
statsai auth loginto pair the device with your account. - Scan local logs with
statsai scan(or runstatsai daemon --watchin the background). - Sync rollups and task snapshots with
statsai sync --sink http --since-last. - Open the dashboard to see totals across devices and accounts.
Where to go next
| Guide | What you'll learn |
|---|---|
| Getting started | Install, pair a device, scan, and run your first sync |
| CLI reference | Common commands for scan, report, source, and sync workflows |
| Privacy model | What stays local vs what syncs as rollups |
| Sync contract | Batch schema, privacy defaults, and API response shape |