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

@moguw/pi-session-fork

v0.1.1

Published

Fork Pi sessions into Herdr panes or tabs, and run inline/outline side conversations

Readme

@moguw/pi-session-fork

Fork the current Pi session into a Herdr pane or tab, and run side questions inline (entering the context) or outline (staying outside the context).

/btw                        fork the current session into a right-hand Herdr pane
/btw inline [question]      ask in this session, entering the context
/btw outline [question]     ask in this session, staying outside the context
/btw tab                    fork the current session into a new Herdr tab
/btw help                   show usage

Requirements

  • Pi interactive TUI mode
  • Pi running inside Herdr (a pane with HERDR_ENV=1)
  • A persisted Pi session (not --no-session)
  • herdr and pi on PATH

Install

pi install npm:@moguw/pi-session-fork

From this repository:

pi install /path/to/pi-ext/extensions/pi-session-fork

Then reload Pi (/reload).

Commands

/btw — fork into a right-hand pane

Splits the current Herdr pane to the right and starts pi --fork <session> in the new pane. The original session keeps running untouched; the fork gets its own persisted session file derived from the current state.

/btw tab — fork into a new tab

Creates a new Herdr tab in the current workspace and starts pi --fork <session> in its root pane.

/btw inline [question] — ask in-context

Submits the question as a regular user message in the current session: it appears in the transcript, enters the context, and triggers a normal agent turn. With no question argument, a dialog collects it first. Anything not matching a subcommand is treated as an inline question, so /btw why does this fail just works.

/btw outline [question] — ask out-of-context

Answers the question with a direct model call that never touches the session context:

  • The current, compaction-aware conversation is snapshotted and passed as read-only reference context.
  • The answer inherits the current model and thinking level.
  • The result is appended as a custom entry (pi.appendEntry), which renders in the transcript — collapsed to a one-line preview, expandable to the full answer — but does not participate in LLM context (per Pi's custom-entry semantics).
  • No user or assistant messages are added to the session, and no context is consumed on subsequent turns.

How it works

  • Herdr interaction goes through the herdr CLI (pane split, tab create, pane run) with JSON-envelope parsing, following the same conventions as the other @moguw session packages.
  • Forking uses pi --fork <session-file> deliberately, not Pi's ctx.fork(): the original pane keeps its session and its running agent.
  • The outline renderer registers under the pi-session-fork.outline custom entry type.

Development

pnpm install
pnpm run check

License

MIT