@lanquarden/pi-dev-worktrees

Pi extension for isolated branch workspaces — git worktrees via wtp and optional devcontainer targeting

Packages

Package details

extension

Install @lanquarden/pi-dev-worktrees from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@lanquarden/pi-dev-worktrees
Package
@lanquarden/pi-dev-worktrees
Version
0.5.3
Published
Jun 10, 2026
Downloads
1,232/mo · 289/wk
Author
lanquarden
License
MIT
Types
extension
Size
104.3 KB
Dependencies
1 dependency · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

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

README

@lanquarden/pi-dev-worktrees

A pi extension that provides isolated branch workspaces using git worktrees (via wtp) and optional devcontainer targeting.

Features

  • Worktree isolation — create/switch/remove git worktrees per branch; all bash commands run inside the active worktree
  • Devcontainer targeting — start, stop, rebuild, and route bash commands into the project's devcontainer
  • File tool routing — read/write/edit with relative paths automatically route to the active worktree
  • Composable — worktree + devcontainer combine: commands run in the container at the worktree path
  • HOST: escape hatch — prefix any command with HOST: to bypass all routing
  • Git/gh passthrough — git, gh, and find commands always run on the host

Install

pi install npm:@lanquarden/pi-dev-worktrees

Requirements

Commands

Command Description
/worktree [set] <branch> Create or switch to a wtp-managed worktree
/worktree off Deactivate worktree routing
/worktree status Snapshot of all worktrees and container status
/worktree remove <branch> Remove a worktree
/worktree prune Clear stale worktree metadata
/worktree init Interactively create .wtp.yml
/worktree hooks ... Manage post-create hooks
/devcontainer on Start or reuse the devcontainer
/devcontainer off Disable container targeting (leaves container running)
/devcontainer stop Stop the container entirely
/devcontainer rebuild Rebuild the container image (--build-no-cache)
/devcontainer logs Tail the startup log

See the repo README for full documentation.

Dashboard Plugin

For pi-agent-dashboard integration, install @lanquarden/pi-dev-worktrees-dashboard-plugin.