← Catalog

pi-tty7-tab-namer

Auto-name pi sessions with an LLM and sync the name to the tty7 tab title. Manual /name always wins.

Package

Install

Install with PiG

pig install npm:pi-tty7-tab-namer

Install with Pi

pi install npm:pi-tty7-tab-namer
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "extensions/*.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.4 (README.md). PiG does not review it.

Multiple session tabs auto-named by pi-tty7-tab-namer in the tty7 tab bar

pi-tty7-tab-namer

pi extension · names sessions automatically with an LLM, synced to tty7 tab titles

MIT License pi package npm version npm downloads

English · 简体中文

Install

Prerequisite: run pi inside the tty7 terminal (this extension only activates in a tty7 environment).

pi install npm:pi-tty7-tab-namer

That's it — nothing else to do. Names are also written to session metadata, so they show up readable in the /resume session list.

Usage

ScenarioBehavior
First message in a new sessionTab automatically shows a short (≤10 char) title
Loading an unnamed historical sessionNames the whole session from the last 10 messages, not just the newly appended one
/name customTab updates immediately, and auto-naming stops for that session
Manually renaming the tab in tty7Session name syncs immediately, and auto-naming stops (same as /name)
Resuming a named sessionTab shows the name immediately
Quitting piTab falls back to the default tty7 title

Features

  • Auto-naming: on the first message, calls the current session model in parallel to summarize intent into a title, without blocking the conversation
  • Two-way sync: manual tab rename in tty7 → writes the pi session name; naming inside pi → updates the tab
  • Manual wins: after /name or a manual tty7 rename, auto-naming never overrides
  • Full lifecycle: tab title follows the session name on new / resume / fork / quit
  • Race-safe: switching or quitting while a naming request is in flight discards the result, never writing to the wrong session; 20s timeout with automatic retry on the next turn
  • Subagent isolation: when the main session spawns subagents, child sessions never touch the tab title or session name (compatible with all pi sub-session mechanisms, e.g. pi-subagents and the built-in Task tool)

FAQ

Does it work in other terminals (iTerm2, etc.)?

Not currently — this extension targets tty7 only.

Does it auto-rename after multiple turns?

A session is named once (unless done manually).

Does the model call cost money?

Each naming run is one tiny request (a few hundred tokens), triggered only the first time for an unnamed session.

Development

git clone https://github.com/ifyour/pi-tty7-tab-namer
cd pi-tty7-tab-namer
npm test          # self-check for title sanitization logic
pi -e .           # try locally

License

MIT