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

@hank-warren/pi-auto-name

v0.3.0

Published

Names each Pi session after its work (3-5 words) on the first turn and every second turn after, using the session's own model; /rename regenerates it.

Readme

@hank-warren/pi-auto-name

Names each Pi session after the work it is doing, so /resume, the terminal title, and anything that reads it (such as Herdr's agent list) show statusline cache fix instead of a blank or a directory name.

Install

pi install npm:@hank-warren/pi-auto-name

Try it for a single run without installing:

pi -e npm:@hank-warren/pi-auto-name

Do not install this standalone package on a host that also installs the aggregate hank-warren/pi-extensions Git package; that would load the extension twice.

Behaviour

  • Automatic, and it keeps up. When the first turn settles, the extension asks for a 3-5 word title and sets it as the session name, then refreshes it after every second turn (turns 1, 3, 5, …), so the name follows a session that drifts. An unchanged title writes nothing. The count restarts when a session is resumed.
  • Hand-set names stick. Automatic renames only replace a name the extension set itself (it records which, so this survives resume and fork). A name set with /name, or one that predates the extension, is left alone.
  • /rename regenerates the name from the conversation as it stands now, replacing whatever is there, and hands the name back to the automatic renames. /name <text> still sets a name by hand.
  • Same model. The title comes from the session's current model, at the session's current thinking level. There is nothing to configure.
  • Small input. The model sees a digest of the current branch: the project directory, the first request, the last few requests, and the latest reply, each truncated to a few hundred characters.
  • Interactive only. The automatic name is skipped in print, JSON, and RPC modes, which covers subagent children.

Herdr

Inside a Herdr pane the name is also reported as the pane token session_name, so a sidebar row can show just the name, without the π - … - <dir> decoration pi puts in the terminal title. Add it to the Agent rows in the Herdr config of the machine you view the sidebar from (with herdr --remote, that is the local client):

[ui.sidebar.agents]
rows = [
  ["workspace", "state_icon", { token = "state_text", dim = true }],
  [{ token = "$session_name", dim = true }],   # hidden while the session is unnamed
]

The token follows every name change — the automatic name, /rename, /name, a resumed or forked session — and is cleared when pi quits. Reports are single short socket writes to the pane's own Herdr server, bounded by a 500 ms timeout; failures are ignored. Outside Herdr nothing is sent.

What it touches

Nothing in the conversation. The title request is a standalone model call: it is not added to the transcript, never enters the model's context, and uses no session id or prompt-cache retention, so it cannot disturb the session's cache. The only session writes are the name itself — the same session_info entry /name appends — and a small pi-auto-name custom entry recording which name the extension set. Pi sends neither to the model.

Because the call bypasses the session, its token usage is not recorded in the session's usage totals.

Licence

MIT