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

@tbanowl/pi-exit

v0.1.1

Published

Exit pi with /exit, /e, /ex, /exi, or :q

Readme

pi-exit

A small pi extension that adds familiar ways to leave an interactive session.

Commands

The canonical command is /exit. These aliases have the same effect:

| Input | Meaning | | --- | --- | | /exit | Exit pi | | /e | Alias for /exit | | /ex | Alias for /exit | | /exi | Alias for /exit | | :q | Alias for /exit |

Matching is case-sensitive and applies to the complete trimmed input. For example, /exit now, /E, :q!, and :q foo are ordinary prompts rather than exit commands.

Only text entered by a person in pi's TUI can trigger this extension. RPC input, print/JSON modes, messages injected by other extensions, and prompts with image attachments are not intercepted.

Behavior

An exit input uses pi's graceful extension shutdown API, following the same shutdown path as the built-in /quit command. It does not call process.exit() directly and does not add a confirmation dialog.

If the agent is running, pi-exit first aborts the current operation and discards queued steering or follow-up messages, then requests graceful shutdown. The request is idempotent.

The slash autocomplete list contains only the canonical /exit entry. Aliases do not appear in autocomplete and are recognized when submitted.

Known timing difference from /quit

Pi queues ordinary extension input while session compaction is running. If /exit or an alias is submitted during compaction, it takes effect after compaction finishes. The built-in /quit command can exit immediately during that state.

Requirements

  • Node.js 22.19 or newer
  • @earendil-works/pi-coding-agent 0.84.x or compatible
  • @earendil-works/pi-tui 0.84.x or compatible

Installation

Install the npm package globally in pi so the commands are available in every project:

pi install npm:@tbanowl/pi-exit

You can also install the package directly from GitHub:

pi install git:github.com/tbanowl/pi-exit

Restart pi after installation. To remove the npm package:

pi remove npm:@tbanowl/pi-exit

To try the published package without installing it:

pi -e npm:@tbanowl/pi-exit

For local development, load the extension entry point from this checkout:

pi -e ./extensions/index.ts

Development

Install development dependencies and run all automated checks:

npm install
npm run check

Individual commands:

npm run typecheck
npm test

Manual TUI smoke test

  1. Start pi -e ./extensions/index.ts.
  2. Confirm slash autocomplete shows /exit but not /e, /ex, or /exi.
  3. Start a fresh pi process for each of /exit, /e, /ex, /exi, and :q; verify each exits without confirmation.
  4. Start a streaming answer, submit an exit alias, and verify generation is aborted before pi exits.
  5. Verify /exit now, /E, :q!, and :q foo are sent to the model rather than intercepted.
  6. Load a small observer extension with a session_shutdown handler and verify it receives { reason: "quit" } on exit.
  7. Start compaction, submit an exit alias, and verify pi exits after compaction finishes.
  8. Run pi install npm:@tbanowl/pi-exit (or install this checkout by absolute path before the first npm release), start pi from another directory, and repeat an exit check.

License

MIT