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

pi-insights

v0.3.0

Published

AI coding assistant session analytics and insights for Pi

Readme

pi-insights

License: MIT Version

Session analytics and AI-powered insights for Pi — understand your AI coding workflow, identify friction, and continuously tailor your agent experience.

Background

Inspired by Claude Code's insights feature. Discovering patterns and shortcomings across past sessions, then using those findings to iteratively refine the agent experience, is incredibly powerful. Since Pi coding agent offers virtually unlimited customization potential — skills, extensions, hooks, AGENTS.md — this kind of self-aware feedback loop matters even more here. pi-insights closes that loop.

Quick Start

pi install npm:pi-insights

Then use /insights in any Pi session to view your session overview.

Commands

| Command | Description | |---------|-------------| | /insights [days\|all] | Recent session overview in TUI (default: 30 days; press r for full HTML report) | | /insights:session | Analyze the current session in TUI (press r for HTML report) | | /insights:report [--session \| --history [days\|all]] | Generate a full HTML report directly | | /insights:clear-cache | Clear cached AI facet analysis results |

Features

Session Analytics

  • Usage statistics — messages, tool calls, files modified, token usage, git activity
  • Interaction timing — user response latency and assistant response time distributions
  • Error breakdown — categorized tool errors (permission denied, file not found, syntax errors, etc.)
  • Activity heatmap — GitHub-style daily session activity visualization
  • Token usage trends — input/output token consumption over time
  • Response time analysis — distribution buckets and hourly usage patterns

AI-Powered Analysis

  • Session facets — LLM-generated analysis per session (goal, outcome, satisfaction, friction, session type)
  • Personalized insights — interaction style, what works, friction points, actionable suggestions
  • AGENTS.md recommendations — tailored suggestions for improving your agent configuration
  • Ecosystem suggestions — skills, extensions, and hooks worth creating based on your workflow

Reports

  • TUI dashboard — interactive terminal overview with key metrics
  • HTML export — shareable reports with embedded charts and detailed analysis

How It Works

Session Logs (.jsonl)
        │
        ▼
   ┌─────────┐     ┌──────────────┐
   │ Parser   │────▶│  Statistics  │
   │ (utils)  │     │  (stats)     │
   └─────────┘     └──────┬───────┘
                          │
              ┌───────────┼───────────┐
              ▼           ▼           ▼
         ┌────────┐  ┌────────┐  ┌──────────┐
         │Heatmap │  │Charts  │  │Facets    │
         │        │  │        │  │(analysis)│
         └───┬────┘  └───┬────┘  └────┬─────┘
             │           │            │
             ▼           ▼            ▼
         ┌────────────────────────────────┐
         │      Report Generator          │
         │   (TUI + HTML output)          │
         └────────────────────────────────┘
  1. Parse — reads Pi session .jsonl logs, extracts metadata (tokens, tools, files, timing)
  2. Compute — aggregates statistics across sessions (totals, trends, distributions)
  3. Analyze — sends per-session context to an LLM for facet extraction (cached to avoid redundant calls)
  4. Report — generates an interactive TUI dashboard and/or exportable HTML report

Requirements

  • Pi coding agent
  • A configured model with API key (required for AI-powered facet analysis)

⚠️ Beta

This project is in early beta — the analysis methodology, report format, and caching strategy are still evolving. Treat generated insights as directional rather than authoritative, and watch your token usage: AI facet analysis makes LLM calls per session and can consume significant credits on large histories.

Development

# Clone and link locally
git clone https://github.com/RimuruW/pi-insights.git
cd pi-insights
pi install ./pi-insights

# Run tests
npm test

License

MIT