pi-done
Pi package that adds a /done command to reset to the default git branch, pull, and start a new session.
Package details
Install pi-done from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-done- Package
pi-done- Version
0.1.0- Published
- May 8, 2026
- Downloads
- 19/mo · 3/wk
- Author
- robzolkos
- License
- MIT
- Types
- extension
- Size
- 6.2 KB
- Dependencies
- 0 dependencies · 1 peer
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
pi-done
A small pi package that adds a /done command.
/done is for wrapping up work in a git repository. It checks that the working tree is clean, returns to the repository's default branch, pulls the latest changes, and starts a fresh pi session.
What it does
When you run /done, the extension:
- Runs
git status --porcelainand stops if there are uncommitted or untracked changes. - Finds the default branch from
origin/HEAD, then falls back tomainormaster. - Checks out that branch.
- Runs
git pull --ff-only. - Starts a new pi session.
Installation
pi install npm:pi-done
Usage
Inside pi, run:
/done
If your working tree is dirty, /done will refuse to switch branches. Commit or stash first, then run /done again.
Package layout
This package uses pi's npm package manifest format:
{
"keywords": ["pi-package"],
"pi": {
"extensions": ["./src/index.ts"]
}
}
Pi loads TypeScript extensions through its runtime loader, so the package ships the source file directly.
Development
npm install
npm run check
npm run pack:dry-run
The extension entry point is src/index.ts.
License
MIT
Publishing
This repository is ready to publish as an unscoped npm package:
npm publish