npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@observal/pi-insights

v1.2.3

Published

Pi Insights extension — generates a personal usage insights report from your Pi session history

Downloads

631

Readme

Pi Insights header showing weekly changes and navigation

Pi Insights

Personal usage analytics for the Pi coding agent. Scans your session history, extracts deterministic stats and LLM-powered facets, then generates a self-contained HTML report covering your workflows, friction points, and suggestions for improvement.

Built by the Observal team while developing our agent observability platform. We needed to understand how we actually use Pi across hundreds of sessions, what patterns emerge, and where we waste time or money. This extension is the result.

Install

From npm (recommended):

pi install npm:@observal/pi-insights

From source:

git clone https://github.com/BlazeUp-AI/pi-insights.git
pi install ./pi-insights

Try without installing:

pi -e npm:@observal/pi-insights

Usage

Run the command inside any Pi session:

/pi-insights

The report opens in your browser automatically.

Flags

| Flag | Description | |------|-------------| | --refresh / -r | Invalidate all cached LLM facet extractions and re-run them | | --no-open | Generate the report without opening it in the browser | | --since <N>d | Only analyze sessions from the last N days (e.g. --since 7d) | | --md | Output a Markdown report instead of opening the HTML version |

Examples

# Normal run (uses caches, fast on re-runs)
/pi-insights

# Force re-extraction of all session facets
/pi-insights --refresh

# Generate without auto-opening
/pi-insights --no-open

# Only analyze the last 7 days
/pi-insights --since 7d

# Export as Markdown (for Slack, docs, etc.)
/pi-insights --md

What the Report Shows

Session stats at a glance

Tokens, cost, lines changed, commits, tool errors, parallel sessions, and more.

Stats grid showing sessions, messages, tokens, cost, lines, commits

Context-aware suggestions with copyable prompts

Suggests features, skills, and config additions tailored to your actual workflow. References your real projects and tools.

Features to try section with lifecycle hooks and skills suggestions

"Stop Doing" section

Tells you what patterns are costing you time or money, with concrete alternatives.

Consider Stopping section with three anti-patterns and green alternatives

Model spend analysis

Identifies overspend (Opus on simple tasks) and underspend (Sonnet failing on complex work), with a recommendation and estimated savings.

Model efficiency showing overspend, underspend, and recommendation

What Makes This Different

Most Pi insight extensions dump flat aggregates into an LLM prompt and get the same generic report every time. This one is temporal-aware:

  • Week-over-week diffs: see what actually changed, not a static portrait
  • Decay-weighted charts: recent sessions have more influence on friction/satisfaction/outcome charts (10-day half-life)
  • Trajectory detection: are your costs/errors improving, worsening, or stable?
  • Anomaly detection: spikes in cost or errors are surfaced with context
  • Resolved vs ongoing friction: only surfaces problems you still have, not ones you fixed
  • Context-aware suggestions: reads your existing AGENTS.md, installed skills, extensions, and packages. Will not suggest what you already have.
  • Negative suggestions: tells you what to stop doing, not just what to add

How It Works

The pipeline runs in five phases:

  1. Scan all Pi session log files
  2. Extract stats deterministically from each session (tool counts, tokens, languages, git activity, response times)
  3. LLM facet extraction per session to classify goals, outcomes, satisfaction, and friction
  4. Aggregate with decay weighting, compute diffs, detect anomalies and transitions, gather user context
  5. Generate insights using 8 parallel LLM prompts (with temporal and user context injected) plus a synthesis prompt, then render a self-contained HTML report

Results are cached in ~/.pi/agent/usage-data/:

| Path | Contents | |------|----------| | session-meta/<id>.json | Deterministic stats, cached permanently | | facets/<id>.json | LLM-extracted facets, cached permanently (clear with --refresh) | | report.html | Last generated report | | report.md | Last markdown export (when using --md) |

Requirements

  • Pi v0.74.0 or later
  • An active model configured in Pi (used for both facet extraction and insight generation)

License

AGPL-3.0-only