pi-tmux-window-name
v0.4.2
Published
Automatically name tmux windows for pi coding sessions
Maintainers
Readme
pi-tmux-window-name
Auto-name tmux windows and session titles for pi coding sessions.
Installation
From npm (after publish):
pi install npm:pi-tmux-window-nameFrom git:
pi install git:github.com/default-anton/pi-tmux-window-nameOr run without installing:
pi -e npm:pi-tmux-window-name
# or
pi -e git:github.com/default-anton/pi-tmux-window-nameWhat it does
- Watches session lifecycle and the first user prompt.
- Generates two names from the prompt:
- tmux window title: concise 3–4 words.
- pi session name: longer 8–12 word summary for
/resumescanning.
- Persists the session name with
pi.setSessionName(...). - Persists the short tmux title in a custom session entry for reliable restore.
- Renames the current tmux window (when running inside tmux).
- Adds
/renameto recompute names from the current branch conversation so far. - If generation fails or output is invalid, leaves session/tmux names unchanged.
Extension behavior
- Names are generated once per session, then reused when switching/resuming sessions.
/renametakes no arguments and rebuilds the name from user and assistant message text in the current branch./renameignores reasoning blocks, tool calls/results, and images.- On
session_start/session_switch, tmux restore prefers the stored short title and falls back to a compacted session name. - Name normalization strips punctuation and keeps alphanumeric words.
- Set
PI_TMUX_WINDOW_NAME_DISABLED=1to disable the extension completely, including tmux renames and the/renamecommand. This is useful for sub-agents.
Development
npm run pack:checkLicense
Apache-2.0
