pi-done

Pi package that adds a /done command to reset to the default git branch, pull, and start a new session.

Packages

Package details

extension

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

npm version

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:

  1. Runs git status --porcelain and stops if there are uncommitted or untracked changes.
  2. Finds the default branch from origin/HEAD, then falls back to main or master.
  3. Checks out that branch.
  4. Runs git pull --ff-only.
  5. 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