omp packages

@anb98/pi-auto-title1.0.1

Pi extension that names each session from its first prompt and shows only that name as the terminal title.

anb98 Published 3 days ago MIT ~335 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-auto-title

A pi extension that names each new session after its first prompt and makes that name the terminal title.

Pi titles the terminal with the working directory, so every tab in a terminal or multiplexer sidebar (herdr, tmux) looks the same. With this extension the tab reads like Migración PostgreSQL 17 a 18.

Install

pi install npm:@anb98/pi-auto-title

Then reload open sessions:

/reload

Behavior

  • The first prompt of an unnamed session sets the session name right away to its first line, up to 50 characters.
  • In the background, a model writes a 3-6 word title in the prompt's language and replaces that name. If the call fails, the first-line name stays.
  • The terminal title shows only the session name.
  • Existing names are kept: names set with /name, by another extension, or in a resumed session.
  • Prompts starting with / or ! are skipped.
  • It runs only in the interactive TUI, not in --mode rpc, json, or print.

Configuration

Variable Default Description
PI_AUTO_TITLE_MODEL unset provider/model-id used to write the title. When unset, the session's current model is used.
export PI_AUTO_TITLE_MODEL=antigravity/gemini-3.8-flash

The value is split at the first /, so model ids that contain slashes work (openrouter/google/gemini-flash). If the model is not found, pi shows a warning and uses the session model.

No reasoning options are passed, so the provider's default applies. Each new session costs one short model call.

Development

npm test

The tests use Node's built-in test runner (Node 22.18+ for TypeScript type stripping) and need no dependencies.

License

MIT