Back to home

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

PieceRole
statsai CLIScans local provider logs, stores normalized usage in SQLite, prepares sync batches
Device pairingOne-time browser authorization per machine
Hosted APIAuthenticates devices, validates sync_batch.v1 and sync_batch.v2, deduplicates, stores rollups and task snapshots
DashboardReads 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

  1. Install the CLI on each machine you want to track.
  2. Run statsai auth login to pair the device with your account.
  3. Scan local logs with statsai scan (or run statsai daemon --watch in the background).
  4. Sync rollups and task snapshots with statsai sync --sink http --since-last.
  5. Open the dashboard to see totals across devices and accounts.

Where to go next

GuideWhat you'll learn
Getting startedInstall, pair a device, scan, and run your first sync
CLI referenceCommon commands for scan, report, source, and sync workflows
Privacy modelWhat stays local vs what syncs as rollups
Sync contractBatch schema, privacy defaults, and API response shape