pi-updater
v0.3.0
Published
Codex-style auto-updater for pi. Checks for new versions on startup and prompts to install.
Downloads
1,371
Readme
pi-updater
A lightweight, Codex-style auto-updater for pi with fast, cache-first startup checks.
- npm: https://www.npmjs.com/package/pi-updater
- repo: https://github.com/tonze/pi-updater
Note: Automatic installation currently supports npm-based pi installs only.
What it does
On startup: if a newer version is available, shows a prompt:
- Update now — install with npm, then auto-restart pi on the current session
- Skip — dismiss until next session
- Skip this version — don't ask again until a newer version appears
After a successful update, pi-updater asks whether to restart immediately. If confirmed, pi relaunches seamlessly on the current session. In non-interactive modes or if auto-restart fails, it falls back to a manual restart message.
In the background (once per run): performs one live npm check and can show the prompt in the same session when a new release is detected.
/update: manually check for updates (always fetches fresh from npm, unless PI_OFFLINE is set).
How version checks work
pi-updater uses a cache-first approach to keep startup fast:
- On startup, cached version data is checked instantly.
- One background live fetch refreshes the cache.
- If the background fetch finds a newer version, pi-updater can prompt in the same session.
- Automatic checks are skipped when
PI_SKIP_VERSION_CHECKorPI_OFFLINEis set.
Install
pi install npm:pi-updaterOr from git:
pi install git:github.com/tonze/pi-updaterUsage
Use /update inside pi to manually check for updates and install them.
Environment flags
Disable automatic version checks:
export PI_SKIP_VERSION_CHECK=1Or run in offline mode (also disables automatic checks):
export PI_OFFLINE=1Updating this package
pi updateLicense
MIT
