pi-retune
v0.2.2
Published
One-command session renamer toggle for pi (retune/restore).
Maintainers
Readme
pi-retune
One-command session naming toggle for pi.
- Run
/retuneto auto-name old sessions (repo-scoped by default). - Run
/retuneagain to restore the original names (only if the session name is still what retune set).
Install
pi install npm:pi-retuneUsage
Happy path
/retune(auto apply)/retuneagain (auto restore)
Options
--reviewopen a plan editor to edit/skip items before applying--drypreview plan only--scope repo|cwd|all--limit 200--since 30d(or ISO date like2026-01-01)--template "#{moduleOrRepo} - {primaryTask|caveman|truncate:28}"--no-modelnever call a model--allinclude already-named sessions (overwrite)
Template placeholders
Supported placeholders (all are optional in templates):
{moduleOrRepo}fallback module slug (from{moduleName}, elsepackages/<name>, else{repo}){moduleName}model-derived module name (if configured){primaryTask}model-derived or heuristic task phrase (kept short; caveman-style by default){repo}repo folder name{branch}best-effort git branch (blank if unavailable){ticket}extractedABC-123or#123{taskType}feat|fix|refactor|docs|test|chore{created}{modified}dates (YYYY-MM-DD){messages}message count{id8}short session id
Modifiers:
|lower |upper |title |kebab |snake |sanitize |caveman |truncate:N |default:TEXT
Escape braces:
{{->{and}}->}
Configuration
Merged global -> project:
~/.pi/agent/retune.json<repo>/.pi/retune.json
Legacy names still supported:
~/.pi/agent/pi-retune.json<repo>/.pi/pi-retune.json
Example: see example.json.
