@moguw/pi-stats-dashboard0.1.3
Local usage and behavior dashboard for Pi agent sessions
Untested on omp
This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.
Reports 0
No reports yet.
Readme
pi-stats-dashboard
A local, privacy-first /stats dashboard for Pi. It reads Pi's persisted JSONL sessions and opens a browser dashboard with lifetime, today, 7-day, and 30-day usage.
GitHub repository · npm package
Vendored into Mieluoxxx/pi-ext from suryavamsi6/pi-stats-dashboard @
3ee97be— packagev0.1.3plus the unreleased dashboard change from that commit (Show token usage categories separately). OnlyREADME.md,LICENSE,artifacts/,extensions/,src/, andtest/from upstream are tracked here; the upstreamflake.nix/flake.lockNixOS packaging and GitHub Actions workflow are not.Local changes on top of upstream: responsive desktop layout fixes in
src/dashboard.htmlso panels, tables, and chart labels no longer overflow their container; count abbreviation (K/M/B) instead of raw numbers; the upstream mobile breakpoints (max-width: 850px/430px) removed; and the upstream "Data health" panel replaced by an error-type breakdown (src/aggregate.jserrorType()groups raw provider error messages into buckets — aborts, timeouts, HTTP status codes, context overflow, stream interruptions).src/server.jsre-readsdashboard.htmlon every page request and reloadssrc/aggregate.jswhen its file changes, so panel edits show up without restarting Pi.

Install
From the monorepo root:
pi -e ./extensions/pi-stats-dashboard
Or install the published package:
pi install npm:@moguw/pi-stats-dashboard
Then run Pi and use /stats.
Included metrics
- Input, output, reasoning, cache read/write, total tokens, recorded cost, requests, and errors
- Activity chart: hourly bars for Today, daily bars for 7-day, GitHub-style heatmap for 30 days (row) and Lifetime (week-columns calendar); breakdowns by model, provider, project, agent, and tool
- Local-only behavior counters for user messages: yelling, profanity, anguish, correction, repetition, and blame
- Error breakdown by type: aborts, timeouts, HTTP status codes, context overflow, stream interruptions
Costs are the values recorded by providers and may be zero or unavailable. They are estimates, not invoices. Pi does not persist reliable historical latency, TTFT, tokens/sec, or subscription-window data, so those are intentionally not fabricated.
The server binds to 127.0.0.1, uses a random URL token, and returns aggregate data only. Prompt and response text is never retained or returned; behavior analysis happens in memory.
Development
pi -e .
pnpm test
pnpm run check
pnpm pack --dry-run
This package intentionally uses Node built-ins and no runtime dependencies. The generated tarball is publish-ready; npm publication and repository creation are not automated.