pi-auto-update

Automatically update installed Pi packages and Pi itself when a Pi session starts.

Packages

Package details

extension

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.4
Published
Aug 24, 2026
Downloads
477/mo · 32/wk
Author
eiei114
License
MIT
Types
extension
Size
14.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

Join dotfield.xyz on Discord

CI Publish npm version npm downloads License: MIT Pi package Trusted Publishing

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 --extensions before pi 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=1 or PI_AUTO_UPDATE=0.
  • On Windows, defers extension updates when an active Pi runtime may hold package files open.
  • Provides /auto-update-now for 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 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 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 push

See docs/release.md for setup details.

Docs

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

License

MIT