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

@fradser/pi-btw

v0.2.10

Published

Side questions for Pi — /btw answers in a read-only overlay, never entering the session history. Unlike Claude Code's /btw, it can actually call read-only tools (read, grep, find, ls) to verify facts in the codebase.

Readme

@fradser/pi-btw

Side questions for Pi — /btw <question> answers a quick side question in a full-width overlay directly covering the main session input area, without interrupting the current task and without ever entering the session history.

Why btw

Claude Code's /btw answers from conversation context only — it cannot call tools, so "what does function X do?" gets answered from what the model happens to remember. btw fixes that:

  1. Tool-capable. The side question runs in a fresh child Pi process that CAN call read-only tools (read, grep, find, ls) to verify facts in the actual codebase.
  2. Strictly read-only. Only read, grep, find, ls are allowed. bash, edit, and write are always excluded — a side question can look, but can never touch.
  3. Zero history pollution. The child runs with --no-session and the /btw command is consumed by the extension (never recorded as a session message). The exchange is gone the moment the display clears.

Install

pi install npm:@fradser/pi-btw

Restart pi, then use /btw <question> in interactive mode.

Usage

/btw what does the --force flag do on git push?
/btw where is the retry logic for the API client?
/btw how do we handle pagination in this repo?

The answer appears in a full-width popup anchored to the bottom of the terminal (directly covering the main session input area), with height adapting to the content:

  • Spinner while the read-only child answers (same model as your session; override with the BTW_MODEL env var, e.g. BTW_MODEL=anthropic/claude-sonnet-4-5).
  • Multi-turn conversation. Type follow-up questions directly in the overlay input prompt and press enter to continue the side thread.
  • esc closes (or cancels while loading).
  • ↑/↓ scroll, pgup/pgdn page, home/end jump.
  • Short answers shrink the panel; long answers cap at ~40% of the terminal height and remain scrollable without adding a hidden-line count to the answer.
  • The footer shows aggregated token usage and cost for the side conversation.

Mouse-wheel scrolling is not available: in pi's fullscreen TUI the wheel is owned by the chat viewport (pi consumes all mouse events before extensions can see them). If you want the wheel to scroll extension panels, that needs a pi core feature — the package uses keyboard scrolling instead.

The question is answered with the last ~4 user/assistant messages of the current session as compact read-only context (capped at 4000 characters), so it can answer about what you are working on right now — and then verify it against the actual files. Answers are kept concise: the child is instructed to stay within 150 words or 600 characters, use at most five short bullets, and avoid report-style summaries.

Design

| Piece | What it does | |-------|--------------| | src/spawner.ts | Spawns pi --print --mode json --no-session --no-extensions with --tools read,grep,find,ls --exclude-tools bash,edit,write; parses the JSONL stream into the final answer + usage. | | src/context.ts | Builds a compact most-recent-first excerpt of session user/assistant messages (4 messages, capped at 4000 chars). | | src/overlay.ts | The interactive popup: loading spinner → answer, esc closes, arrows/pgup/pgdn/home/end scroll, height adapts to content (capped at ~40% of the terminal). | | index.ts | Package-root entry point that loads the extension. | | src/index.ts | Registers the /btw command and wires context → child process → overlay. |

Requirements

  • pi interactive (TUI) mode — the display needs a terminal.
  • The same provider credentials as your main session (the child reuses your env).

License

MIT