@mblarsen/pi-workmux-rename
v0.1.0
Published
Rename the current workmux worktree and move its Pi session.
Readme
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-renameThen run /reload or restart Pi.
