Local dashboard for exploring Pi usage telemetry, costs, tokens, and sessions.
  • TypeScript 85.8%
  • CSS 14%
  • HTML 0.2%
Find a file
dikkadev 9e94816f16 feat(dashboard): surface prompt token and cache hit metrics across analytics views
This adds prompt-token and cache-hit-rate aggregates throughout the dashboard so the UI can report cache effectiveness more accurately in summaries, timelines, model breakdowns, and forecast insights.
2026-06-18 14:08:20 +02:00
.dev/wip fix(forecast): train on calendar days and drop partial-day trend biasing 2026-05-31 13:49:13 +02:00
scripts refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +02:00
server feat(dashboard): surface prompt token and cache hit metrics across analytics views 2026-06-18 14:08:20 +02:00
src feat(dashboard): surface prompt token and cache hit metrics across analytics views 2026-06-18 14:08:20 +02:00
.env.example feat(app): add imagination mode for model price what-if analysis using models.dev pricing API 2026-06-18 14:02:42 +02:00
.gitignore Initial public release 2026-05-20 19:32:19 +02:00
index.html Initial public release 2026-05-20 19:32:19 +02:00
package.json feat(app): add imagination mode for model price what-if analysis using models.dev pricing API 2026-06-18 14:02:42 +02:00
pnpm-lock.yaml refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +02:00
README.md feat(app): add imagination mode for model price what-if analysis using models.dev pricing API 2026-06-18 14:02:42 +02:00
tsconfig.json refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +02:00
vite.config.ts feat(app): add imagination mode for model price what-if analysis using models.dev pricing API 2026-06-18 14:02:42 +02:00

pi usage atlas

A local web dashboard for exploring pi usage telemetry: cost, token mix, models, workspaces, sessions, web-tool calls, and short-term forecasts.

The app is designed to run on your own machine against your own SQLite telemetry files. It does not include telemetry data, secrets, or private machine paths.

Features

  • Daily usage, cost, token, session, and workspace summaries
  • Model and project breakdowns with filtering
  • Token-type cost composition for input, output, cache-read, and cache-write usage
  • Web-tool timeline and error/latency summaries when web-tool telemetry is available
  • Forecast lab for projecting near-term usage and cost from recent activity

Requirements

  • Vite+ (vp) for dev/build/check commands and Node.js runtime management
  • pnpm for package management, delegated through vp
  • A pi usage database, usually at ~/.pi/agent/data/usage.sqlite
  • Optional web-tool telemetry database, usually at ~/.pi/agent/data/web-tools.sqlite

Configure data paths

By default the API reads pi's standard per-user data files:

~/.pi/agent/data/usage.sqlite
~/.pi/agent/data/web-tools.sqlite

Override those paths with environment variables when your databases live elsewhere:

cp .env.example .env
# edit .env if needed

Available variables:

Variable Purpose
USAGE_DB_PATH Path to usage.sqlite
WEB_TOOLS_DB_PATH Path to web-tools.sqlite
PORT API server port; defaults to 4174

The Vite+ dev client uses fixed port 55173 with strictPort enabled, so local-router can point at it consistently.

Develop

vp install
vp run dev

vp run dev starts the Node API server and the Vite+ React client at http://127.0.0.1:55173. Vite+ proxies /api/* to the API server.

The pinned local-router route is http://pi-usage.localhost.

Build

vp build

The production build is written to dist/. To run the API/static server against a built app:

vp run serve

Then open http://127.0.0.1:4174 unless you changed PORT.

Repository hygiene

The repository intentionally ignores generated and local-only files such as node_modules/, dist/, TypeScript build info, .env*, and local SQLite database files. Do not commit telemetry databases; they can contain local project names, timestamps, prompts, or other private usage metadata.

License

No license has been selected yet. Add one before inviting reuse or accepting contributions.