pi-auto-update
Automatically update installed Pi packages and Pi itself when a Pi session starts.
Package details
Install pi-auto-update from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-auto-update- Package
pi-auto-update- Version
0.1.8- Published
- Oct 20, 2026
- Downloads
- 767/mo · 46/wk
- Author
- eiei114
- License
- MIT
- Types
- extension
- Size
- 31.8 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions/auto-update.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Auto Update
Keep installed Pi packages and Pi itself current automatically at process startup.
What this is
Pi Auto Update is a TypeScript Pi package that runs Pi's own update commands once when a new Pi process starts. It updates installed package extensions first, then checks Pi itself, without replacing Pi's built-in updater.
Features
- Runs
pi update --extensionsbeforepi update. - Waits for each update step to finish before starting the next one.
- Automatically runs once per Pi process, not again after
/reload,/new,/resume, or/fork. - Skips automatic updates when
PI_OFFLINE=1orPI_AUTO_UPDATE=0. - On Windows, defers extension updates when an active Pi runtime may hold package files open.
- Provides
/auto-update-nowfor an explicit update check. - Reports failures in the Pi UI without aborting session startup.
Install
Install the published npm package with Pi:
pi install npm:pi-auto-update
Pin a specific version when you want reproducible installs:
pi install npm:pi-auto-update@0.1.4
Install into the current project instead of your user Pi settings:
pi install npm:pi-auto-update -l
Or install from GitHub:
pi install git:github.com/eiei114/pi-auto-update
Try it without permanently installing:
pi -e npm:pi-auto-update
Quick start
After installation, restart Pi. On process startup, Pi Auto Update runs:
pi update --extensions
pi update
Run both checks manually at any time:
/auto-update-now
On Windows, npm cannot replace an extension package while an active Pi runtime
(including the pi-intercom broker) is using files inside that package. When
that runtime is detected, the extension step is deferred and the Pi update
still runs. If npm reports EBUSY (-4082 or 4294963214), close Pi
runtimes and run pi update --extensions from a shell.
Try the local checkout without permanently installing it:
pi -e .
Package contents
| Path | Purpose |
|---|---|
extensions/auto-update.ts |
Startup update hook and /auto-update-now command |
docs/release.md |
Trusted Publishing and release flow |
README.md |
GitHub and npm package entrypoint |
CHANGELOG.md |
Versioned release notes |
LICENSE |
MIT license |
Development
npm install
npm run ci
npm run smoke:pi
npm pack --dry-run
PI_AUTO_UPDATE=0 pi -e .
Run only the installed-package smoke when changing package metadata or startup loading behavior:
npm run test:installed-smoke
The installed-package smoke test packs the local package, installs the tarball
into a temporary Pi agent directory, and checks package loading with
PI_OFFLINE=1.
npm run smoke:pi separately launches the locally pinned Pi CLI in RPC mode,
loads the packed extension, runs its manual update command, verifies handled
failures and a second-process restart/cleanup, and exercises the native host
shell. The actual Pi host and extension handler run in isolated Pi/npm
directories; temporary updater shims record both commands and prevent real
package or Pi updates. The error case removes the shims to verify handled
failures. The smoke makes no model requests. CI runs it as part of npm run ci.
Release
This package is set up for npm Trusted Publishing, so no NPM_TOKEN is required.
npm version patch
git push
See docs/release.md for setup details.
Docs
docs/release.md— Trusted Publishing and automated release detailsROADMAP.md— current status and planned work
Security
Installing this package opts the machine into automatic code updates from Pi and every package source configured in Pi. Review and trust those sources before installing this extension.
Pi packages can execute code with your local permissions. For vulnerability reporting, see SECURITY.md.
Links
- npm: https://www.npmjs.com/package/pi-auto-update
- GitHub: https://github.com/eiei114/pi-auto-update
- Issues: https://github.com/eiei114/pi-auto-update/issues
License
MIT