pi-retune

One-command session renamer toggle for pi (retune/restore).

Package details

extension

Install pi-retune from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-retune
Package
pi-retune
Version
0.2.2
Published
Apr 21, 2026
Downloads
129/mo · 4/wk
Author
jrryfn
License
MIT
Types
extension
Size
38.3 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-retune

One-command session naming toggle for pi.

  • Run /retune to auto-name old sessions (repo-scoped by default).
  • Run /retune again to restore the original names (only if the session name is still what retune set).

Install

pi install npm:pi-retune

Usage

Happy path

  • /retune (auto apply)
  • /retune again (auto restore)

Options

  • --review open a plan editor to edit/skip items before applying
  • --dry preview plan only
  • --scope repo|cwd|all
  • --limit 200
  • --since 30d (or ISO date like 2026-01-01)
  • --template "#{moduleOrRepo} - {primaryTask|caveman|truncate:28}"
  • --no-model never call a model
  • --all include already-named sessions (overwrite)

Template placeholders

Supported placeholders (all are optional in templates):

  • {moduleOrRepo} fallback module slug (from {moduleName}, else packages/<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} extracted ABC-123 or #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.