pi-repo-move
Move the current repo and keep its Pi session history connected.
Package details
Install pi-repo-move from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-repo-move- Package
pi-repo-move- Version
0.1.6- Published
- Sep 10, 2026
- Downloads
- 826/mo · 467/wk
- Author
- probabilityengineer
- License
- MIT
- Types
- extension
- Size
- 27 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-repo-move
One of my diet context engineering and workflow extensions. Explore the complete collection: https://www.npmjs.com/~probabilityengineer
Move the current repo and keep its Pi session history connected.
pi-repo-move gives Pi a guarded /repo-move command for moving the active repository directory while preserving session continuity. It performs preflight checks before mutation, blocks unsafe path relationships, detects dirty Git working copies, moves the repository, records move evidence, and offers to create an exact-session restart script in the new location.
It is intentionally narrow: pi-repo-move owns filesystem repo moves. Session-only moves remain separate.
Install
From npm:
pi install npm:pi-repo-move
From GitHub:
pi install git:github.com/ProbabilityEngineer/pi-repo-move
For project-local install, add -l:
pi install -l npm:pi-repo-move
Command
/repo-move <target>
Behavior:
- source is the current repo root/current cwd repo
- target is the new repo path
- preflight runs before mutation
- hard blockers print diagnostics and stop without changes
- dirty Git working copies ask for confirmation
- after a successful move, Pi switches the live process into the exact relocated session in the target repository
- it also writes an executable timestamped recovery script under
~/.pi/agent/repo-move/restart-scripts/and updateslatest.sh - the script changes to the target directory and resumes the exact relocated session with
exec pi --session ... - if the current session has a meaningful display name, the script also restores it with
--name - if live switching is unavailable or cancelled, use the restart script or fallback command:
cd '<target>'
pi -c
The current relocated session is touched before restart guidance is shown, so the pi -c fallback selects it from the target cwd bucket. Timestamped scripts are retained for recovery; latest.sh always points to the newest one.
Move records append normal move evidence to the shared session-move manifest:
~/.pi/agent/session-move/manifests/relocations.jsonl
Legacy top-level manifests remain readable by downstream tools but are not rewritten. Records include first-class repo-move fields:
{
"operationType": "repo_move",
"tool": "pi-repo-move",
"sourceRepo": "/old/repo",
"targetRepo": "/new/repo"
}
Hard blockers
/repo-move <target> stops before mutation when:
- target already exists
- target equals source
- target is inside source
- source is inside target
- source repo root cannot be found
- target parent cannot be created or written
- current Pi session file is missing
If the jj or git working copy is dirty, /repo-move asks whether to continue instead of blocking.
Prompt overhead
pi-repo-move registers one focused slash command and does not inject dynamic repository status into prompts.