← Catalog

@mblarsen/pi-workmux-rename

Rename the current workmux worktree and move its Pi session.

Extension

Install

Install with PiG

pig install npm:@mblarsen/pi-workmux-rename

Install with Pi

pi install npm:@mblarsen/pi-workmux-rename
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": [
    "./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

CommandDescription
/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

  1. Captures the linked worktree's stable Git admin directory.
  2. Runs workmux rename [--branch] <new-name> with argument-safe process execution.
  3. Resolves the renamed directory from Git's updated gitdir pointer, avoiding stale process cwd values.
  4. 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.
  5. 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

  • workmux available on PATH
  • A persisted Pi session
  • A non-main workmux worktree
  • trash is 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.