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-ncb

v1.0.2

Published

๐Ÿš€ pi-next โ€” The ultimate next-gen enhancement suite for pi coding agent. Agent orchestration dashboard with real-time TUI, semantic compaction 2.0 that preserves decisions & files, streaming bash protocol with live output, context/tool/cost inspector, li

Downloads

449

Readme

pi-next-ncb ๐Ÿš€

The ultimate next-gen enhancement suite for pi coding agent.

Transform pi into a full-featured agent IDE with real-time agent orchestration visibility, intelligent compaction, streaming tool output, and deep session introspection.

pi install npm:@salahnecibi/pi-next-ncb

Restart pi โ†’ /pi-next-status โ†’ you're in the next generation.


What You Get

| Pri | Component | What It Does | How To Access | |-----|-----------|-------------|---------------| | ๐Ÿ”ด P0 | Orchestration Dashboard | Real-time TUI showing every subagent, its status, tool calls, and duration โ€” live | Auto-widget + /dashboard | | ๐Ÿ”ด P0 | Semantic Compaction 2.0 | Structured compaction that preserves decisions, file changes, errors, and action items instead of vague summaries | Auto on compaction + /compact-status | | ๐ŸŸก P1 | Streaming Tool Protocol | stream_bash โ€” runs commands with output streaming to both the LLM and TUI in real-time | Tool: stream_bash | | ๐ŸŸก P1 | Inspector Pane | Context token breakdown, tool call timeline with durations, cost estimates โ€” visible instantly | Ctrl+I or /inspector | | ๐ŸŸข P2 | Live Diff Viewer | Snapshots files before edits, computes unified diffs after โ€” see exactly what changed | Auto + /diff | | ๐ŸŸข P2 | pi Package Search | Search npm for pi packages without leaving your terminal | /pi-search <query> + CLI |


Commands Reference

General

/pi-next-status              โ€” Show all components with load state โœ“ / โ—‹
/pi-next-toggle <name>       โ€” Enable/disable any component

Dashboard & Inspector

/dashboard                   โ€” Open agent orchestration dashboard
Ctrl+I  or  /inspector       โ€” Toggle context/tool/cost inspector pane

Compaction

/compact-status              โ€” Show compaction statistics & history
/compact-pin <entry-id>      โ€” Pin a message so compaction never loses it

Diffs

/diff [file]                 โ€” Show recent unified diff from tool execution

Package Discovery

/pi-search <query>           โ€” Search npm for pi packages
/pi-info <package>            โ€” Show detailed package info
/pi-install <source>         โ€” Quick install shorthand

Deep Dive

๐ŸŽ›๏ธ Orchestration Dashboard (P0)

When you launch subagents via pi-subagents, a live TUI widget appears above the editor:

โ•ญโ”€ pi-next Orchestration Dashboard โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ โ— Active Agents:                                           โ”‚
โ”‚   โ–ถ reviewer             12s      3 tools [tool: read]     โ”‚
โ”‚   โ–ถ worker               45s      8 tools                   โ”‚
โ”‚ โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€          โ”‚
โ”‚   โœ“ scout               2 tools, 1 turn                    โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

No config needed. Hooks into tool_call, tool_execution_start/end, and turn_start events automatically. Shows:

  • Status icons: โ— queued, โ–ถ running, โธ paused, โœ“ done, โœ— failed
  • Elapsed time per agent
  • Tool call count and current tool name

๐Ÿง  Semantic Compaction 2.0 (P0)

When pi auto-compacts or you run /compact, this intercepts session_before_compact and builds a structured summary:

| Extracted | From | Example | |-----------|------|---------| | Decisions | Pattern matching ("we decided X", "approved Y") | โ€ข Use PostgreSQL for the new schema | | Files | edit/write tool call tracking | write: src/db/migrations/001_init.sql | | Errors | Error/exception pattern detection | โš  TypeError: Cannot read property 'x' of undefined | | Action Items | Todo/follow-up patterns | โ˜ Update the API docs for the new endpoint |

Use /compact-pin <entry-id> to mark entries as permanent โ€” they survive all future compactions.

๐ŸŒŠ Streaming Tool Protocol (P1)

A new stream_bash tool that wraps bash execution with:

  • Real-time streaming โ€” output is piped to both the LLM and the TUI simultaneously
  • LLM mid-execution awareness โ€” the model sees progress updates every ~3 chunks
  • Abort signal support โ€” press Escape to cancel, and the partial output is preserved
  • Smart truncation โ€” 50KB limit keeps tail output, drops middle

Use it instead of bash for: npm test, long builds, deployment scripts, multi-minute installations.

๐Ÿ” Inspector Pane (P1)

Press Ctrl+I or run /inspector for an instant breakdown:

โ•ญโ”€ 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                              โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ“ Live Diff Viewer (P2)

Every edit and write tool call snapshots the target file before modification. After execution, a unified diff is computed showing:

--- a/src/app.ts
+++ b/src/app.ts
@@ -10,5 +10,8 @@
   const port = 3000;
+  const db = await connect();
   app.listen(port);

Key changed lines are shown in notifications โ€” /diff for the full view.

๐Ÿ”Ž pi Package Search (P2)

Search npm for pi packages without leaving your editor:

/pi-search web                  โ†’  Finds web-related pi packages
/pi-search pdf --limit 5       โ†’  Top 5 PDF-processing packages  
/pi-search agent --sort downloads  โ†’  Most popular agent packages
/pi-info @dotdotgod/pi          โ†’  Detailed package info

Also works as a standalone terminal command:

pi-search web
pi-search info @salahnecibi/pi-next-ncb

Requirements

| Dependency | Version | |-----------|---------| | pi-coding-agent | >= 0.80.0 | | Node.js | >= 18 | | Terminal | Any ANSI-capable (most modern terminals) |


Architecture

pi-next-ncb/
โ”œโ”€โ”€ 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: loads & coordinates all components
โ”‚   โ”œโ”€โ”€ orchestration-dashboard.ts  โ† P0: TUI agent dashboard
โ”‚   โ”œโ”€โ”€ 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 tool execution
โ”‚   โ””โ”€โ”€ pi-search.ts                โ† P2: npm package discovery commands
โ””โ”€โ”€ skills/
    โ””โ”€โ”€ pi-next/
        โ””โ”€โ”€ SKILL.md            โ† Skill: teaches LLM how to use pi-next features

Development

git clone https://github.com/salahnecibi/pi-next-ncb.git
cd pi-next-ncb
npm install

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

# Publish
npm version patch
npm publish

License

MIT โ€” Use it, fork it, ship it.