pi-auto-update
v0.1.4
Published
Automatically update installed Pi packages and Pi itself when a Pi session starts.
Downloads
799
Maintainers
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-updatePin a specific version when you want reproducible installs:
pi install npm:[email protected]Install into the current project instead of your user Pi settings:
pi install npm:pi-auto-update -lOr install from GitHub:
pi install git:github.com/eiei114/pi-auto-updateTry it without permanently installing:
pi -e npm:pi-auto-updateQuick start
After installation, restart Pi. On process startup, Pi Auto Update runs:
pi update --extensions
pi updateRun both checks manually at any time:
/auto-update-nowOn 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 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-smokeThe smoke test packs the local package, installs the tarball into a temporary Pi
agent directory, loads it through Pi's package resource loader with
PI_OFFLINE=1, and asserts startup/reload handling does not invoke pi update
or touch the user's real Pi settings.
Release
This package is set up for npm Trusted Publishing, so no NPM_TOKEN is required.
npm version patch
git pushSee 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
