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

@pify/btw

v0.5.2

Published

By-the-way side conversations for pi: a read-only, codebase-aware side agent in a widget, without derailing the main session

Readme

@pify/btw

CI npm version npm downloads

By-the-way side conversations for pi: ask a read-only, codebase-aware side agent anything while the main agent keeps working — without derailing the session or polluting its context.

Part of the Pify suite. Install with pify install btw or pi install npm:@pify/btw.

Why

Halfway through a long task you want to know something — what does this helper actually do, is there a test for this path, why is that config shaped that way. Asking the main agent costs you twice: the question and its answer stay in the context forever, and the agent you interrupted now has to find its way back to what it was doing.

A side conversation answers the question somewhere else. It reads the same codebase, it never writes, and the main thread never sees it unless you decide it should.

Commands

| Command | Description | |---|---| | /btw [--save] <question> | Ask in the current side thread, which inherits the main session's context. --save also writes the exchange as a visible session note — saved silently, never provoking a main-agent turn even mid-task. | | /btw:new [question] | Start a fresh side thread. | | /btw:tangent [--save] <question> | A contextless side thread — no main-session context, fresh perspective. Switching between /btw and /btw:tangent clears the thread. | | /btw:clear | Dismiss the widget and clear the thread. | | /btw:inject [instructions] | Send the full thread to the main agent — queued as a follow-up if it is busy — then reset. | | /btw:summarize [instructions] | Summarise the thread with a model, send the summary to the main agent, then reset. Refused while a side answer or another summarize is still running. | | /btw:model [<provider> <model> <api> \| clear] | Show or set a BTW-only model override. | | /btw:thinking [off\|minimal\|low\|medium\|high\|xhigh\|max \| clear] | Show or set a BTW-only thinking override. |

How it works

Each side question runs in an in-memory pi sub-session, seeded in contextual mode with the main session's conversation. It inherits your project's system prompt and context files but loads no extensions — so it cannot recurse — and only read-only tools: read, grep, find, ls.

Answers stream into a widget above the editor, and it works while the main agent is busy.

Completed exchanges are persisted as hidden custom entries in the session file: visible to you in the widget, invisible to the main agent, and rebuilt into a thread on restart. Model and thinking overrides are persisted per session the same way. A saved --save note is never fed back into a later side session either — the side agent does not re-read its own notes.

The widget shows a reasoning model's thinking only while it streams (just the tail), then collapses it to a 💭 thought N lines marker once the answer lands, so a long reasoning block never pushes the editor off-screen.

Cancelling or clearing BTW aborts only the sub-session. It never touches the main agent's turn. Changing the model or thinking level mid-answer cancels the in-flight side question (it is not persisted) and tells you so; finished exchanges stay.

Honest about what it cannot do

A model with no write tool will sometimes narrate the edit anyway, or print tool-call JSON as text. Nothing happens on disk, but the widget reads as though something did — and /btw:summarize would carry that fiction into the main session, where it becomes something the main agent believes.

So: emitted tool-call syntax is stripped, an answer that still claims a change gets a read-only side conversation: nothing was changed footer, and the summariser is instructed to describe proposals as proposals.

Cheaper questions

/btw:model and /btw:thinking run side questions on a smaller model or a lower thinking level than the main thread. A question about where something lives does not need the model you are paying for the refactor.

Development

bun install
bun test              # unit tests over the pure modules, plus command tests against a stub host
bunx tsc --noEmit     # strict typecheck, including the extension entry
pi -e .               # load into a live pi session

Requires Node >= 22.19.0 or Bun for development. At runtime pi loads the raw TypeScript through jiti.

License

MIT © Pify maintainers