No description
  • TypeScript 81.5%
  • CSS 18.2%
  • HTML 0.3%
Find a file
dikkadev 7293d3ae66 refactor(runtime): migrate app and tooling from Bun to Node.js
This replaces Bun-specific APIs and tooling with the Node.js runtime, pnpm lockfile, and Vite+ command flow so the app can run and be documented consistently without a Bun dependency.
2026-05-20 20:27:57 +02:00
scripts refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +02:00
server refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +02:00
src build(frontend): migrate vite workflows to vite-plus 2026-05-20 19:38:45 +02:00
.env.example Initial public release 2026-05-20 19:32:19 +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 refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +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 refactor(runtime): migrate app and tooling from Bun to Node.js 2026-05-20 20:27:57 +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 build(frontend): migrate vite workflows to vite-plus 2026-05-20 19:38:45 +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

Develop

vp install
vp run dev

vp run dev starts the Node API server and the Vite+ React client. Vite+ proxies /api/* to the API server.

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.