pi-updater

Codex-style auto-updater for pi. Checks for new versions on startup and prompts to install.

Packages

Package details

extension

Install pi-updater from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-updater
Package
pi-updater
Version
0.3.3
Published
May 22, 2026
Downloads
537/mo · 53/wk
Author
tonze
License
MIT
Types
extension
Size
24.9 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ],
  "image": "https://github.com/user-attachments/assets/89df2dad-8d91-464b-b3cb-dfd15bce1c06"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-updater

A lightweight, Codex-style auto-updater for pi with fast, cache-first startup checks.

Note: pi-updater installs the exact package/version returned by pi's update service with npm. This handles pi package-name migrations and avoids stale native self-update behavior while still keeping the interactive prompt/restart flow.

What it does

If a newer version is available, pi-updater shows a startup 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. Ephemeral --no-session runs stay ephemeral on restart.

/update: manually check for updates (always fetches fresh from pi's update service, unless PI_OFFLINE is set). It installs the exact npm package/version advertised by pi's update service and respects npm engine requirements, so upgrade Node.js first if the new pi release requires it.

How version checks work

pi-updater uses a cache-first approach to keep startup fast:

  1. On startup, cached version data is checked instantly.
  2. One background live fetch refreshes the cache from pi's update service.
  3. If the background fetch finds a newer version, pi-updater can prompt in the same session.
  4. Automatic checks are skipped when PI_SKIP_VERSION_CHECK or PI_OFFLINE is set.

Install

pi install npm:pi-updater

Or from git:

pi install git:github.com/tonze/pi-updater

Usage

Use /update inside pi to manually check for updates and install them.

Cache and dismissed-version state are stored in pi's configured agent directory and respect PI_CODING_AGENT_DIR.

Environment flags

Disable automatic version checks:

export PI_SKIP_VERSION_CHECK=1

Or run in offline mode (also disables automatic checks):

export PI_OFFLINE=1

Updating this package

pi update

License

MIT