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-parallel-sessions

v0.2.8

Published

Run multiple live sessions in parallel in pi agent

Readme

pi-sessions

pi-sessions turns one Pi process into an in-process live-session multiplexer.

Multiple Pi sessions can stay alive concurrently. Exactly one session owns the terminal at a time. Switching away stops only the inactive TUI, with its agent runtime still running in background.

pi-sessions switcher UI

Install

pi install npm:pi-parallel-sessions

Or install directly from GitHub:

pi install git:github.com/liushihao456/pi-sessions

Command

Only one slash command is exposed:

  • /sessions — open the session switcher.

Shortcut:

  • Ctrl-R — open the same session switcher without typing /sessions.

All session operations happen inside that switcher.

Switcher keys

  • type normally — filter live sessions.
  • / or Ctrl-P / Ctrl-N — move selection.
  • Enter — switch to selected live session. Selecting parent switches back to parent.
  • Ctrl-O — open FileExplorer; selecting a folder creates a new child session in that folder and switches to it.
  • Ctrl-R — open a one-off resume flow; selecting a saved Pi session opens it as a live child and switches to it.
  • Ctrl-K — stop selected live child session.
  • Esc — close switcher.

Runtime model

parent Pi process
  └─ pi-sessions live-session multiplexer
      ├─ parent: existing InteractiveMode
      ├─ child A: AgentSessionRuntime + InteractiveMode
      ├─ child B: AgentSessionRuntime + InteractiveMode
      └─ child C: AgentSessionRuntime + InteractiveMode

Child sessions are real native InteractiveMode instances, not embedded panels. When active, child UI is full-screen and native Pi slash-command UI works as usual.

/quit keeps native behavior and exits the whole Pi process.

Path locks

All live sessions share one in-process lock manager. Before write/edit/mutating shell tools run, pi-sessions checks for conflicting path locks and blocks conflicting writes.

This prevents two live sessions from editing the same path tree at once.