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

@salahnecibi/pi-next

v1.0.0

Published

Next-generation enhancement suite for pi coding agent. Agent orchestration dashboard, semantic compaction, streaming tools, inspector pane, live diffs, and package search.

Readme

pi-next 🚀

Next-generation enhancements for pi coding agent.

Agent orchestration dashboard, semantic compaction, streaming tools, inspector pane, live diffs, and package search — all in one pi package.

pi install npm:@salahnecibi/pi-next

Restart pi, and you're ready. Run /pi-next-status to verify.


Components

| Priority | Component | Description | Access | |----------|-----------|-------------|--------| | 🔴 P0 | Orchestration Dashboard | Real-time TUI dashboard showing subagent status, tool calls, duration | Auto-widget + /dashboard | | 🔴 P0 | Semantic Compaction 2.0 | Structured compaction preserving decisions, files, errors, action items | Auto (hooks) + /compact-status | | 🟡 P1 | Streaming Tool Protocol | stream_bash tool with real-time output to LLM + TUI | Tool: stream_bash | | 🟡 P1 | Inspector Pane | Context usage, tool timeline, cost breakdown | Ctrl+I or /inspector | | 🟢 P2 | Live Diff Viewer | Unified diffs on write/edit tool calls | Auto + /diff | | 🟢 P2 | pi Search | Discover pi packages from npm | /pi-search <query> + pi-search CLI |


Commands

/pi-next-status              — Show all components and load state
/pi-next-toggle <name>       — Enable/disable a component
/dashboard                   — Open agent orchestration dashboard
/inspector                   — Toggle inspector (or Ctrl+I)
/compact-status              — Show compaction statistics
/compact-pin <entry-id>      — Pin entry to survive compaction
/diff [file]                 — Show recent file diffs
/pi-search <query>           — Search npm for pi packages
/pi-info <package>            — Show package details

Keyboard

| Key | Action | |-----|--------| | Ctrl+I | Toggle inspector pane |


How It Works

Orchestration Dashboard (P0)

When you launch subagents via pi-subagents, the dashboard widget appears above the editor showing:

╭─ pi-next Orchestration Dashboard ─────────────────────────╮
│ ● Active Agents:                                           │
│   ▶ reviewer             12s      3 tools [tool: read]     │
│   ▶ worker               45s      8 tools                   │
│ ──────────────────────────────────────────────────          │
│   ✓ scout               2 tools, 1 turn                    │
╰────────────────────────────────────────────────────────────╯

No setup needed — it hooks into tool_call and tool_execution_* events automatically.

Semantic Compaction 2.0 (P0)

When pi compacts context (auto or manual), this extension intercepts the session_before_compact event and produces a structured summary that preserves:

  • Decisions made — extracted from text patterns ("we decided X", "approved Y")
  • Files changed — tracked from edit/write tool calls
  • Errors encountered — extracted error messages
  • Action items — remaining todo items

Use /compact-pin <entry-id> to mark specific entries as permanent (survive compaction).

Streaming Tools (P1)

The stream_bash tool wraps bash execution with real-time streaming:

  • Output pipes to both the LLM and the TUI simultaneously
  • Progress updates every ~3 chunks so the LLM can react mid-execution
  • Respects abort signals (cancel with Escape)
  • 50KB auto-truncation with tail preservation

Use instead of bash for: test suites, builds, installs, long-running scripts.

Inspector Pane (P1)

Press Ctrl+I or run /inspector to see:

╭─ pi-next Inspector ───────────────────────────────────────╮
│ Model: deepseek/deepseek-v4-flash                          │
│ Context: 45,231 tokens                                     │
│   system: 8,120 tok                                        │
│   tools: 2,340 tok                                         │
│ ──────────────────────────────────────────────────          │
│ Recent tools (23 total):                                    │
│   ✓ read  path: src/index.ts                                │
│   ✓ bash  npm test -- --watch                                │ 12s
│   ✗ write path: dist/output.json                              │
╰────────────────────────────────────────────────────────────╯

Diff Viewer (P2)

Every edit and write tool call snapshots the file before modification. After the tool completes, it computes a unified diff and shows key added/removed lines in notifications.

pi Search (P2)

Search npm for pi packages without leaving pi:

/pi-search web            # Find web-related pi packages
/pi-search pdf --limit 5  # Top 5 PDF packages
/pi-info @dotdotgod/pi    # Show package details

Also available as a standalone CLI: pi-search <query>


Architecture

pi-next/
├── package.json                     # npm + pi package manifest
├── README.md                        # This file
├── LICENSE                          # MIT
├── bin/
│   └── pi-search.mjs                # Standalone CLI for package search
├── src/
│   ├── index.ts                     # Main entry: orchestrates all components
│   ├── orchestration-dashboard.ts   # P0: Agent orchestration TUI widget
│   ├── semantic-compaction.ts       # P0: Structured compaction hooks
│   ├── streaming-tools.ts           # P1: stream_bash tool
│   ├── inspector-pane.ts            # P1: Context/tool/cost inspector
│   ├── diff-viewer.ts              # P2: Live diff on file edits
│   └── pi-search.ts                # P2: Package search commands
└── skills/
    └── pi-next/
        └── SKILL.md                 # Skill: teaches LLM how to use pi-next

Development

# Clone and install
git clone https://github.com/pi-packages/pi-next.git
cd pi-next
npm install

# Test locally with pi
pi -e ./src/index.ts

# Publish new version
npm version patch
npm publish

Requirements

  • pi >= 0.80.0
  • Node.js >= 18 (for fetch)

License

MIT