← Catalog

@geohar/pi-title

Configurable terminal title for the pi coding agent: session, folder, model, git branch, current tool and more.

Extension

Install

Install with PiG

pig install npm:@geohar/pi-title

Install with Pi

pi install npm:@geohar/pi-title
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": [
    "./src/index.ts"
  ]
}

README

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

pi-title

A pi extension that sets your terminal's tab title from parts you choose: session name, folder, model, thinking level, git branch, the tool running now, and a few more. It changes the title only when one of those parts changes.

π - fix-login-redirect - my-project
π | claude-opus-5-5 | my-session | my-project | high | feat/config

It does not show whether pi is busy. pi can already show that as a progress indicator in the tab (OSC 9;4, which Ghostty and some other terminals support). Turn it on in pi's settings.json:

{ "terminal": { "showTerminalProgress": true } }

Install

pi install npm:@geohar/pi-title

Or try it for one run:

pi -e npm:@geohar/pi-title

Commands

/pi-title opens a settings list, in the same style as pi's /settings:

  • Status: on or off for this session (Enter or Space switches it)
  • Components: what the title shows and in what order
  • Separator: the text placed between components
  • Reset to defaults: asks before restoring the default components and separator

Esc closes a submenu, then the list.

Each part can also be opened directly:

/pi-title              open the settings
/pi-title on           turn the title on for this session
/pi-title off          turn it off; pi's own title comes back on its next update
/pi-title components   choose and reorder components
/pi-title separator    change the separator (up to 5 characters)
/pi-title reset        restore the defaults

Components

The picker shows a live preview of the title above the list.

  • ↑ / ↓ move through the list
  • Enter / Space turns a component on or off
  • Ctrl+↑ / Ctrl+↓ moves it up or down (the title follows the list's order)
  • Esc saves and closes
IDShowsDefault
pi_symbolπon
sessionSession nameon
cwdWorking directory's folder nameon
modelCurrent modeloff
thinkingThinking leveloff
tokensContext token usageoff
turnTurn number, while the agent is workingoff
git_branchCurrent git branchoff
tools_countNumber of active toolsoff
current_toolThe tool running right nowoff

The default separator is " - ".

Configuration

The settings live in their own file, never in pi's settings.json:

  • ~/.pi/agent/pi-title.json (in $PI_CODING_AGENT_DIR when that is set). This is the only file /pi-title writes.
  • .pi/pi-title.json in a project. When present it is read instead of the global file. You edit it by hand.
{
  "separator": " | ",
  "components": [
    { "id": "pi_symbol", "enabled": true },
    { "id": "model", "enabled": true },
    { "id": "session", "enabled": true },
    { "id": "cwd", "enabled": true },
    { "id": "thinking", "enabled": true },
    { "id": "git_branch", "enabled": true }
  ]
}

Components you leave out are added after the ones you list, in their default state.

To start pi with the title turned off:

PI_TITLE_DISABLED=1 pi

1, true, yes and on all count.

Coming from pi-status

pi-title began as a fork of pi-status. If you used pi-status, your settings carry over: a pi-status.json is read when there is no pi-title.json next to it, and PI_STATUS_DISABLED still works. The first change you save goes to pi-title.json. Uninstall @thinkscape/pi-status so the two don't both set the title.

Credits

pi-title is based on pi-status by Thinkscape, MIT licensed. It keeps pi-status's title components and its component picker. It drops the spinner and the Ghostty-specific code, because pi now shows progress itself. It also moves the settings out of pi's settings.json into their own file, and rebuilds the menu on pi's settings components.

Development

bun install
bun run check   # tsc
bun test

Releasing

bun run release:patch   # check, bump, commit, tag (also :minor / :major)
git push origin main --tags

Pushing a v* tag publishes to npm through trusted publishing and creates a GitHub release. CI runs the type check, the tests and a dry-run pack on every push and pull request.