A pi extension that adds an /upgrade command for upgrading the core pi-coding-agent CLI to the latest npm release.
pi install npm:pi-upgradeOr from GitHub:
pi install git:github.com/maxpetretta/pi-upgrade/upgrade
Flags:
/upgrade --force— reinstall even if already on latest/upgrade --dry-run— show what would run without doing it
After a successful upgrade, the extension shows a 5-second restart countdown and automatically relaunches pi on the current session in interactive TUI mode. In non-interactive modes, it falls back to the normal manual restart message.
- Finds the running
pibinary and walks up to itspackage.json - Detects the package manager from the install path (npm, pnpm, yarn, bun)
- Prefers the package manager sibling to the current Node runtime
- Checks the npm registry for the latest published version
- Runs the appropriate global install command
- Automatically relaunches pi on the current session after a successful upgrade when interactive TUI mode is available
- Otherwise tells you to restart pi afterward
/reload only reloads extensions, skills, prompts, and themes. The core pi runtime is already loaded in memory, so a process restart is needed to pick up the new version.
This package uses Bun for local development.
bun install
bun run lint
bun run typecheck
bun testMIT