StatsAI docs
Overview
How StatsAI collects local AI usage logs, syncs sanitized rollups, 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 metadata-only rollups to your private dashboard.
You get cross-device totals, provider breakdowns, subscription value views, and activity heatmaps — without sending prompts, file paths, 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, deduplicates, stores rollups |
| Dashboard | Reads compact rollup 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 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 |