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

@saifymatteo/pi-session-rename

v0.3.0

Published

Generate session titles from the first prompt using configured models.

Readme

pi-session-rename

Generated session title in the footer and terminal title

After the first prompt, the session gets a generated title. It appears in the footer and in the terminal tab title.

Automatically title main interactive sessions from the first submitted prompt and optionally mirror the name to a Herdr tab. Manual names take precedence; failed generation retries on later prompts.

Running locally

From the monorepo root:

pi -e ./packages/pi-session-rename

Warning: this extension uses your existing Pi resources and settings unless you load it in an isolated home (see the root README). Do not load two copies of the same extension (for example an older standalone file alongside this package): commands and hooks can duplicate. The package never installs or relocates personal settings.

Commands and shortcuts

No slash commands or shortcuts are registered. Submit a real prompt (including /skill:name args) in a main TUI session to trigger generation. Existing generated or manual names suppress further requests.

Settings and storage

Reads <agent-dir>/extensions/session-rename.json on each request, where <agent-dir> is PI_CODING_AGENT_DIR or ~/.pi/agent. Expected keys: model and optional fallbackModels, each entry {"provider", "id", "thinking"?, "baseUrl"?} (the pi-blackhole model shape). thinking is off/minimal/low/medium/high/xhigh/max, default low. An entry with baseUrl is called directly over the OpenAI Chat Completions API with the auth.json credential for its provider (key, else access; none means keyless), so providers registered by other extensions (e.g. 9router) work without those extensions loaded; thinking is sent as reasoning_effort capped at high. Other entries go through Pi's model registry. Entries are tried in order: when a reply fails (an error, cut off by the token limit, or not title JSON), the next entry is asked, and a warning appears only when all fail. With thinking on, a request may use up to 4,096 output tokens so reasoning models have room to finish. Legacy "provider/model-id" strings, fallbacks, and a top-level thinking default still load. A missing file is created once with only the $schema line. That line points editors at schemas/session-rename.schema.json and is ignored at runtime.

{
  "$schema": "https://raw.githubusercontent.com/saifymatteo/pi-extensions/main/packages/pi-session-rename/schemas/session-rename.schema.json",
  "model": { "provider": "my-router", "id": "some/model:free", "baseUrl": "https://router.example/v1", "thinking": "low" },
  "fallbackModels": [{ "provider": "openrouter", "id": "openrouter/free", "thinking": "off" }]
}

There is no implicit model default and no personal configuration is bundled. Herdr recovery state stays at ~/.pi/herdr-tab-state.json even with a custom agent directory. Uses HERDR_ENV=1 and HERDR_TAB_ID for tab mirroring.

Privacy and operations

Sends up to 4,000 prompt characters and the current generated title to the configured provider using Pi credentials (the auth.json entry for baseUrl entries); never assistant/tool output. Requests have a 60-second deadline and may incur cost. Writes session name/ownership entries, watches the session file, and may invoke the external herdr executable to rename/restore tabs. Recovery state contains original tab labels. Isolation of the agent directory alone does not isolate the fixed Herdr state path; unset Herdr variables when testing.

Compatibility

Node.js >=24 for development checks; run extensions through Pi's TypeScript loader. Host imports are wildcard peers, not bundled runtime copies. Only main tui sessions run; PI_ORCHESTRATOR_CHILD=1, PI_SUBAGENT=1, and PI_CHILD=1 disable the factory. Entries without a baseUrl require Pi model registry/streaming APIs. Herdr support is optional and requires its CLI. No settings file is moved beside the packaged source.

See NOTICE.md for provenance. Tests use the monorepo's TypeScript dev dependency and VM loader; they do not contact services or write to user-home resources.