Install
Install with PiG
pig install npm:@mblarsen/pi-workmux-renameInstall with Pi
pi install npm:@mblarsen/pi-workmux-renamePackages 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": [
"./index.ts"
]
}README
Written by the package's publisher, shown as published in version 0.1.1 (README.md). PiG does not review it.
workmux-rename
Rename the current workmux worktree without leaving the active Pi conversation behind.
Usage
| Command | Description |
|---|---|
/workmux-rename <new-name> | Rename the current worktree and move this Pi session into its new directory |
/workmux-rename --branch <new-name> | Also rename the underlying git branch |
/workmux-rename -b <new-name> | Short form of --branch |
The extension intentionally supports only workmux's current-worktree form. Renaming another worktree cannot meaningfully move the current Pi session with it.
How it works
- Captures the linked worktree's stable Git admin directory.
- Runs
workmux rename [--branch] <new-name>with argument-safe process execution. - Resolves the renamed directory from Git's updated
gitdirpointer, avoiding stale process cwd values. - Writes a complete live-session snapshot into Pi's session bucket for the renamed directory, including fresh sessions Pi has not flushed to disk yet.
- Relaunches Pi in the renamed directory and trashes the old session after the replacement starts.
This follows the lifecycle used by pi-move-session. If the current /tree selection is not the persisted branch tip, the command warns before renaming because the replacement reopens at the persisted tip.
Requirements
workmuxavailable onPATH- A persisted Pi session
- A non-main workmux worktree
trashis recommended; without it, the original session file is retained rather than permanently deleted
Install
pi install npm:@mblarsen/pi-workmux-rename
Then run /reload or restart Pi.