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

@d3ara1n/pi-editor-shell

v0.15.0

Published

Replaces pi's default editor and status bar with a unified rounded-corner shell embedding status info in the border

Readme

pi-editor-shell

npm version npm downloads license

Replaces pi's default editor and status bar with a unified rounded-corner shell drawn with box-drawing glyphs (╭╮││╰╯), with status info embedded in the border. The frame and spinner use only standard Unicode; border icons use Nerd Font glyphs or standard Unicode symbols and are overridable — see Configuration.

What shows up where

  • Top border — activity ·  model ·  thinking-level (left) + pinned extension statuses (right, via pinnedStatus config). The activity indicator shows a phase-aware spinner while working and  Nm while idle — see Activity indicator.
  • Bottom border — ctx NN%/NNk|N.NM · ⚡cacheRead(total)  hitRate% · NN.N e2e t/s · N.NNN ·  N ·  N (left) + ~/Projects (main +2 ~1 *4) (right, shows git branch plus staged, unstaged, and untracked file counts when in a repo; inside a linked worktree the branch carries an @<name> tag, e.g. (feature-x @feature-x +2 ~1), so sibling worktrees of one repo are told apart at a glance). The cache-read segment stays hidden until the session has cached reads; after that, a zero latest reading colors the whole segment red, including its icon and session total. The hit-rate segment stays muted at 90% or above, turns amber below 90%, and red below 50%. Response throughput defaults to client-observed end-to-end visible-text throughput, including local request preparation, network and queue latency, hidden reasoning, and visible generation. It can instead show generation throughput or be hidden; see Throughput display. A new turn clears the previous measurement, so unavailable samples never leave stale data in the border. Session cost includes assistant, tool, compaction, and branch-summary usage; the dollar segment is hidden when the provider reports no priced usage.  N counts persisted user messages and  N counts successful compactions on the current session branch. Session hit rate and detailed response timing are available via /editor-shell:status.
  • Below shell — Auto-wrapping extension status line (all setStatus entries not pinned to the top)
  • Border color follows pi's thinking-level / bash-mode indicator automatically.

All segments are re-read from live session state on every paint, so switching thinking level or burning context updates the frame on the next render with no extra wiring. The activity indicator precedes the model label; its width follows its content.

Configuration

In ~/.pi/agent/settings.json under the editorShell key:

{
  "editorShell": {
    "pinnedStatus": ["subagent", "access-denied"],
    "tpsDisplay": "end-to-end",
    "icons": {
      "model": "robot ",
      "cache": "\uf0e7"
    }
  }
}

Icon values are used verbatim as prefixes: every template joins the icon and its content without inserting a space. Include any desired trailing padding in the icon value itself. Some terminals use a following space to render wide Nerd Font glyphs at full size; this depends on the glyph, font, and terminal, not just the icon family. Set a slot to "" to hide its icon without leaving icon padding. Custom overrides replace the entire prefix, including its padding.

Default icons

| Slot | Glyph | Icon source | Trailing spaces | |------|-------|-------------|-----------------| | model | | oct-cpu | 1 | | thinking | | oct-light_bulb | 1 | | context | | oct-cache | 1 | | cache | ⚡ | oct-zap | 0 | | hitRate | | oct-goal | 1 | | cost | | fa-dollar_sign | 0 | | turn | | oct-comment_discussion | 1 | | compaction | | oct-iterations | 1 | | timer | | oct-clock | 1 | | folder | | fa-folder_open | 1 |

Branch counters

The  N segment counts persisted user messages on the current session branch. Tool loops do not increase it, while steering and follow-up prompts count when they enter the branch. The  N segment counts successful compactions on the same branch; failed or aborted attempts are not persisted and do not count. Both values are rebuilt from branch history, so restored sessions, edited history, and branch switches show the correct branch-local counts. Like the other optional stats, each segment stays hidden while its count is zero.

Activity indicator

The first segment of the top border shows the session's activity:

  • Working — a spinner follows the current phase: thinking, outputting, tool-call generation, or tool execution. Its color follows the border.
  • Idle —  Nm counts whole minutes since the full agent run settled, including any automatic retries or queued continuations. It starts at 0m; 4m covers 4:00 through 4:59.
  • Fresh session — the segment and its separator stay hidden until the first run starts.

A restored session seeds idle time from its newest conversational entry timestamp; bootstrap and bookkeeping entries do not count. One session-owned clock advances the spinner every 100 ms while working and checks idle time every second while idle. It repaints only when the displayed frame, minute, or color changes, and stays stopped before the first activity. Durations use wall-clock timestamps, so delayed ticks do not accumulate timing errors. Rebuilding the editor preserves the activity state and animation.

Idle text uses the theme's muted tone by default. When the current model declares a prompt-cache lifetime (promptCache in pi's model catalog, PI_CACHE_RETENTION=long selects the long tier), it turns amber within the last tenth of that lifetime and red past it as a cache-age hint. Models without a declared lifetime stay muted.

Model display

How the model is labeled in the top-left border ("name" by default):

{
  "editorShell": {
    "modelDisplay": "name"
  }
}

| Value | Example | |-------|---------| | "name" (default) | Claude Opus 4.8 | | "provider-id" | anthropic/claude-opus-4-8 |

"name" uses model.name; a model with no name falls back to its id, so the slot never goes blank.

Throughput display

Choose the response-throughput metric shown in the bottom border ("end-to-end" by default):

{
  "editorShell": {
    "tpsDisplay": "end-to-end"
  }
}

| Value | Border label | Measurement | |-------|--------------|-------------| | "end-to-end" (default) | e2e t/s | Visible output tokens divided by total turn duration, including wait time and hidden reasoning | | "generation" | gen t/s | Visible tokens after the first divided by the time from first visible text to response completion | | "none" | — | Hides response throughput from the border |

Both throughput values, time to first visible text, total response time, visible-token count, and token source remain available via /editor-shell:status. Generation samples below 10 visible tokens or 250 ms are reported as unavailable. Responses containing tool calls cannot provide a portable text-token split. If reasoning is active but the provider does not supply a usable positive reasoning-token count, both throughput values are reported as unavailable rather than treating hidden tokens as visible output.

Commands

| Command | Description | |---------|-------------| | /editor-shell:status | Show debug info: config, extension statuses, cache totals, response wait time, end-to-end and generation throughput, token source, and session cost |

How it works

The default pi editor only draws a horizontal line above and below the input area (no side borders), and a separate footer renders the status bar. This extension replaces both — it wraps the built-in CustomEditor, renders it at width - 2, wraps every line with left/right glyphs, and embeds the status bar information (extension statuses) below the shell. The total width is unchanged. Border color follows pi's borderColor (which encodes thinking level / bash mode), so the shell stays semantically consistent and reacts to theme changes automatically.

When the autocomplete popup is open, the divider between editor content and popup items becomes a T-junction (├─┤) carrying the context/cwd info, closing everything into one connected card with two panes. Below MIN_WIDTH (20 columns), it falls back to the default editor.

Installation

pi install npm:@d3ara1n/pi-editor-shell

Or add to ~/.pi/agent/settings.json:

{
  "extensions": [
    "/absolute/path/to/pi-extensions/packages/pi-editor-shell"
  ]
}

Caveats

  • Mutually exclusive with other editor-replacing extensions (border-status-editor, rainbow-editor, modal-editor, …). Disable those when enabling this one — setEditorComponent is last-writer-wins.
  • When the content scrolls, pi's native ↑ N more / ↓ N more indicators are replaced by the embedded status text (status takes precedence).
  • Falls back to the default editor below MIN_WIDTH (20 columns).
  • The custom shell and its activity clock run only in TUI mode; RPC, print, and JSON modes retain their host UI.

Dependencies

None.