Back to home

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

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, deduplicates, stores rollups
DashboardReads 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

  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 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