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

v0.2.52

Published

pi coding agent with the pi-plus override layer (pipi CLI)

Readme

plus-cli

The pi-plus CLI surface, on top of the shared override core in ../plus. Direct updates to any other folder under packages/ are forbidden — upstream packages stay pristine so they can be synced/updated without merge conflicts.

The published npm artifact is pi-plus (https://www.npmjs.com/package/pi-plus); it installs a single global command, pipi — deliberately not pi (pi-plus must not own pi's command). Library hosts embedding pi in-process use the separate pi-plus-sdk package built from ../plus-api.

What this layer adds on top of the shared core

The context-detection/compaction/reasoning overrides and the twelve non-TUI extensions (subagent, tasks, memory, plan, ask-user, hooks, context-guard, recap, diagram, /cd, /init, web-search) live in ../plus and are shared with the SDK. This package adds the CLI-only pieces:

  1. Hub profiles (src/coding-agent/main.ts wrapper, backed by @earendil-works/pi-hub = ../hub) — named pi profiles (provider/models/thinking/token/base URL) stored in ~/.pi/profiles.json, materialized into isolated agent dirs under ~/.pi/pi-hub/profiles/<name>/. Adds pipi profile …, pipi use / pipi unuse, and the pipi --as <name> flag. The wrapper resolves the profile, sets PI_CODING_AGENT_DIR in-process (read lazily by getAgentDir()), and delegates to the original main. pipi profile add <name> -p <provider> with no credential — or pipi profile add/update <name> --sign-in for an explicit sign-in that overwrites the profile token — invokes the provider's interactive login (OAuth page / API-key setup) against the profile dir via hub's injected login hook, using loginProvider from ../plus/src/auth/login.ts (the same entry pi-plus-sdk re-exports for embedded hosts); the TUI /login is disabled by core redirect wrappers in favour of this flow.
  2. Shell completion (src/completion/) — pipi completion <bash|zsh> prints a completion script covering the whole CLI: hub subcommands (with dynamic profile/model names from ~/.pi/profiles.json) plus pi's native commands and flags.
  3. Usage print (src/coding-agent/cli/args.ts wrapper) — pipi --help gains a "Profile commands (pi-plus)" section.
  4. Welcome banner (src/coding-agent/ui/banner.ts) — pipi's TUI startup header is a CC-style banner with a block-character π+ mark: condensed logo by default, boxed variant with Extensions/Skills feeds, compact/plain degradation on narrow terminals, resumed <id> · <title> on resume/fork.
  5. Vim modal editing (src/coding-agent/ui/vim/, core subset ported from pi-vimmode, MIT, (c) 2026 pekochan069) — insert/normal/visual/visual-line modes, motions with counts, d c y operators, undo/redo, prompt search. Enable with "vim": true in settings or toggle with /vim.
  6. Settings selector rows (src/coding-agent/ui/settings-selector.ts wrapper) — /settings gains "Auto-compact threshold", "Context floor", and "Context window cap" rows (persisted in the piPlus block of the base agent settings.json via the shared core's context/plus-settings.ts).
  7. Tab title + busy spinner (src/extensions/tab-title/) — the terminal window/tab title brands as pi+ - [sessionName -] cwdBasename with a braille spinner while the agent or compaction is working. TUI mode only.
  8. Plain tool blocks (src/extensions/plain-tools/) — strips background fills from tool result blocks so tool status reads as text (words, never colored blocks).
  9. Fancy content-change diffs (src/extensions/fancy-diff/) — takes over the TUI rendering of edit and write: syntax-highlighted diff bodies, colored +/- markers, a dim line-number gutter, +N −M change stats with a language badge, bold word-level emphasis on modified lines, and a ⋮ separator for elided context. A write that overwrites an existing file renders as an old-vs-new diff (the pre-image is captured in a tool_call handler before execution; new files keep the streaming content preview). No background fills, consistent with plain tool blocks.
  10. Session change report (src/extensions/changes/) — /changes prints the cumulative content diff of every file the agent changed this session, including files git cannot show: brand-new (untracked) files render as all-added diffs and deletions as all-removed. A tool_call handler snapshots each file's original content at the agent's first touch; the command diffs those baselines against the current files on disk and appends the report as a custom transcript entry (never in LLM context, re-rendered with the fancy-diff styling, persists across session restore). Optional argument filters paths by substring (/changes src/foo). Changes made through the bash tool are not tracked. TUI only.
  11. Auto-fold history (src/coding-agent/ui/auto-fold-history.ts) — rolling fold of the transcript: as the agent starts each new assistant message mid-run, the previous step's thinking and finished tool rows collapse (thinking to the "Thinking... (ctrl+o to expand)" hint label, tools back to their standard preview), and a new user message folds all previous turns. The live step (streaming assistant message + in-flight tools) is always excluded, so output stays open while it's still relevant; resume and compaction replays fold everything before the last user turn. thinking folds and unfolds exactly like tool output: the fold syncs both flags (toolOutputExpanded false, hideThinkingBlock true — so neither ctrl+o nor ctrl+t ever dead-presses), new components inherit them (after a fold a fresh tool row starts collapsed and a fresh assistant message starts with hidden thinking, mid-run included — reveal via ctrl+o, ctrl+t or a click), and ctrl+o sweeps the whole transcript for both kinds, streaming component included, like upstream's tool sweep; clicking re-opens a single folded block. With PI_AUTO_FOLD_HISTORY=0 the whole feature is off and ctrl+o behaves exactly like upstream (tool output only); verbose startup never folds. CLI-only — pi-plus-sdk hosts (e.g. the desktop app) do their own folding.
  12. Resume list hides headless sessions (src/coding-agent/ui/session-selector.ts wrapper) — the session picker reached by pipi --resume, pipi -r and the TUI /resume drops transcripts the host marked interactive: false (the marker itself lives in ../plus/src/coding-agent/core/session-manager.ts), so SDK and automation runs stop crowding out the chats you actually had. Unmarked sessions stay listed, and --session <id> / -r <id> still resolve a headless transcript: only the display list is filtered, applied to the resolved list and to the partial lists rendered while a scan is still running. Side effect: a headless session cannot be renamed or deleted from the picker.

The CLI identifies as pipi (pi-plus) in CLI text via the shared config wrapper's APP_NAME shadow; the terminal tab title brands as pi+ via APP_TITLE.

Running from sources

./pipi --no-env   # pi (pi-plus) from TypeScript sources with the override layer active

loader/hooks.mjs is a Node module-customization hook that maps @earendil-works/* to packages/*/src and redirects the overridden upstream modules to the wrappers (shared core redirects in ../plus/loader/redirects.mjs, CLI redirects in loader/redirects.mjs). Importers inside any packages/plus* dir are never redirected, so wrappers can import the true original via relative path without a loop.

Compiled artifact (npm)

build.mjs bundles pipi into dist/npm/ — a self-contained staging tree that npm link / npm publish operate on (this package itself stays private). The bundle applies the redirect tables at bundle time via the shared plugin in ../plus/build/redirect-plugin.mjs and funnels every packages/*/src import with a compiled dist/ counterpart to that dist file (singleton preservation). --no-env is preserved via a banner scrub.

npm run build:offline            # at the repo root, first
npm run build                    # in packages/plus-cli
npm publish --access public --ignore-scripts   # in packages/plus-cli/dist/npm

The staged package is CLI-only: a pipi bin and no . export, so import "pi-plus" fails by design — library hosts use pi-plus-sdk.

Known limitations of the compiled artifact:

  • pipi server / pipi client experimental subcommands (PI_EXPERIMENTAL=1) spawn sibling JS files that are not emitted next to the bundle; use source-mode ./pipi for those.
  • docs/ and examples/ are not shipped, so /docs-style paths into them are absent.

Tests

npx vitest run   # from packages/plus-cli; unit tests under test/ (faux streamFn, no real APIs)