{"_id":"@carter-mcalister/pi-worktrunk","name":"@carter-mcalister/pi-worktrunk","dist-tags":{"latest":"0.4.1"},"versions":{"0.4.1":{"name":"@carter-mcalister/pi-worktrunk","version":"0.4.1","description":"Worktrunk-backed worktree extension for Pi Coding Agent","author":{"name":"Carter McAlister"},"type":"module","exports":{".":"./src/index.ts"},"repository":{"type":"git","url":"git+https://github.com/CarterMcAlister/pi-packages.git","directory":"packages/pi-worktrunk"},"bugs":{"url":"https://github.com/CarterMcAlister/pi-packages/issues"},"homepage":"https://github.com/CarterMcAlister/pi-packages/tree/main/packages/pi-worktrunk#readme","publishConfig":{"access":"public"},"keywords":["pi-package","pi-extension","git-worktrees","worktrunk"],"scripts":{"format":"bunx @biomejs/biome check --write .","lint":"bunx @biomejs/biome check .","typecheck":"bunx tsc -p tsconfig.json --noEmit","test":"bun test","check":"bun run lint && bun run typecheck && bun run test"},"pi":{"extensions":["./src/index.ts"]},"dependencies":{"@zenobius/pi-extension-config":"^0.2.0","typebox":"^1.0.81"},"peerDependencies":{"@mariozechner/pi-coding-agent":"*","@mariozechner/pi-tui":"*"},"devDependencies":{"@biomejs/biome":"^2.3.13","@mariozechner/pi-coding-agent":"*","@mariozechner/pi-tui":"*","@types/node":"^20.11.5","bun-types":"latest","typescript":"^5.9.3"},"license":"MIT","_id":"@carter-mcalister/pi-worktrunk@0.4.1","gitHead":"9de37af096662ce9015ef8757363a5f1894813b3","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-ANgEr07fYXNrq1NynBZCNccYNLCqohIS81xe/OeMUDsOWGM3/IH+rgF6vFNyJb4WjWhPrQTbtfuTWPT66DYyiA==","shasum":"3cdac99200a1c9380c3cb51233e396e940ddea0f","tarball":"https://registry.npmjs.org/@carter-mcalister/pi-worktrunk/-/pi-worktrunk-0.4.1.tgz","fileCount":30,"unpackedSize":83112,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@carter-mcalister%2fpi-worktrunk@0.4.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDlMIooLSLLDnCZ7YVkiEsOGLFDmTVbS6qR0h4m2TCR3AiBm2vx2OVXLJ6sGvAo6hg9BRcv9Jl5kIllxlOH5rsIGag=="}]},"_npmUser":{"name":"carter-mcalister","email":"carterm126@gmail.com"},"directories":{},"maintainers":[{"name":"carter-mcalister","email":"carterm126@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-worktrunk_0.4.1_1775993128658_0.2942038791210484"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-12T11:25:28.550Z","0.4.1":"2026-04-12T11:25:28.789Z","modified":"2026-04-12T11:25:29.214Z"},"maintainers":[{"name":"carter-mcalister","email":"carterm126@gmail.com"}],"description":"Worktrunk-backed worktree extension for Pi Coding Agent","homepage":"https://github.com/CarterMcAlister/pi-packages/tree/main/packages/pi-worktrunk#readme","keywords":["pi-package","pi-extension","git-worktrees","worktrunk"],"repository":{"type":"git","url":"git+https://github.com/CarterMcAlister/pi-packages.git","directory":"packages/pi-worktrunk"},"author":{"name":"Carter McAlister"},"bugs":{"url":"https://github.com/CarterMcAlister/pi-packages/issues"},"license":"MIT","readme":"# `@carter-mcalister/pi-worktrunk`\n\nWorktrunk-backed worktree management for [Pi Coding Agent](https://github.com/badlogic/pi-mono).\n\nThis extension keeps a familiar `/worktree ...` command surface inside Pi, but it now delegates worktree behavior to [Worktrunk](https://worktrunk.dev/worktrunk/) instead of calling `git worktree` directly.\n\n## What changed\n\n`pi-worktrunk` is now a thin wrapper around `wt`:\n\n- `/worktree create` → `wt switch --create --no-cd`\n- `/worktree list` → `wt list --format=json`\n- `/worktree remove` → `wt remove`\n- `/worktree status` / `/worktree cd` use `wt list --format=json`\n\nThe extension **no longer reads** `~/.pi/agent/pi-worktrees-settings.json`.\n\nRuntime behavior now comes from Worktrunk config files:\n\n- user config: `~/.config/worktrunk/config.toml`\n- project config: `.config/wt.toml`\n\n## Install\n\n### 1. Install the Pi extension\n\n```bash\npi install npm:@carter-mcalister/pi-worktrunk\n```\n\n### 2. Install Worktrunk\n\nmacOS / Linux (Homebrew):\n\n```bash\nbrew install worktrunk\n```\n\nOr follow the upstream install instructions:\n\n- https://worktrunk.dev/worktrunk/\n- https://github.com/max-sixty/worktrunk\n\n### 3. Install Worktrunk shell integration\n\n```bash\nwt config shell install\n```\n\n### 4. Create Worktrunk config\n\nUser config:\n\n```bash\nwt config create\n```\n\nProject config:\n\n```bash\nwt config create --project\n```\n\nIf Pi is already running, use `/reload` after installing the extension.\n\n## Quick start\n\nIn Pi:\n\n```text\n/worktree init\n/worktree create feature/auth-refactor\n/worktree list\n/worktree status\n/worktree cd feature/auth-refactor\n/worktree remove feature/auth-refactor\n```\n\n## Command reference\n\n| Command | Behavior |\n| --- | --- |\n| `/worktree init` | Show Worktrunk setup guidance |\n| `/worktree settings` | Show Worktrunk config info via `wt config show` |\n| `/worktree create <branch>` | Create a worktree via Worktrunk |\n| `/worktree list` | List worktrees and optionally switch via Worktrunk |\n| `/worktree status` | Show the current worktree from Worktrunk JSON output |\n| `/worktree cd <name>` | Print the matching worktree path |\n| `/worktree remove <name>` | Remove a worktree via Worktrunk |\n| `/worktree prune` | Deprecated; use Worktrunk-native cleanup flows |\n| `/worktree templates` | Deprecated; use Worktrunk template docs |\n\nAliases retained:\n\n- `/worktree ls` → `/worktree list`\n- `/worktree rm` → `/worktree remove`\n- `/worktree config` → `/worktree settings`\n- `/worktree vars` / `/worktree tokens` → `/worktree templates`\n\n## Configuration\n\nThis extension does **not** maintain its own runtime config anymore.\n\nUse Worktrunk config instead:\n\n### User config\n\n`~/.config/worktrunk/config.toml`\n\nExample:\n\n```toml\nworktree-path = \"{{ repo_path }}/.worktrees/{{ branch | sanitize }}\"\n\n[projects.\"github.com/org/repo\"]\nworktree-path = \".worktrees/{{ branch | sanitize }}\"\n```\n\n### Project config\n\n`.config/wt.toml`\n\nExample:\n\n```toml\n[pre-start]\ndeps = \"bun install\"\n\n[post-start]\neditor = \"zellij action new-tab --name {{ branch | sanitize }} --cwd {{ worktree_path }}\"\n\n[list]\nurl = \"http://localhost:{{ branch | hash_port }}\"\n```\n\nSee Worktrunk docs for full configuration:\n\n- https://worktrunk.dev/config/\n- https://worktrunk.dev/hook/\n- https://worktrunk.dev/switch/\n- https://worktrunk.dev/list/\n- https://worktrunk.dev/remove/\n\n## Removed extension-owned features\n\nThe Worktrunk-backed version intentionally drops behavior that duplicated Worktrunk:\n\n- `~/.pi/agent/pi-worktrees-settings.json`\n- repo pattern matching / matching strategies\n- extension-managed `onCreate`, `onSwitch`, `onBeforeRemove`\n- extension-managed branch generators\n- `/worktree create --generate`\n- `/worktree create --name`\n- extension template preview for custom hook variables\n\nIf you used those features before, migrate them to Worktrunk config and hooks.\n\n## Notes\n\n- This extension expects `wt` to be installed and available on `PATH`.\n- Pi keeps the `/worktree` command surface, but Worktrunk is now the source of truth.\n- For directory switching in your shell, Worktrunk shell integration is still required.\n\n## Credits\n\nThis package is a maintained fork of [`@zenobius/pi-worktrees`](https://github.com/zenobi-us/pi-worktrees).\n\nCredit to Zenobius for the original project and foundation this fork builds on.\n\n## Development\n\n```bash\nmise install\nbun install\nmise run check\n```\n","readmeFilename":"README.md","_rev":"1-1a45a510131160b6519042bf578f61ff"}