@0xkobold/pi-autoupdate

Automatically detect and install pi updates on startup

Packages

Package details

extension

Install @0xkobold/pi-autoupdate from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@0xkobold/pi-autoupdate
Package
@0xkobold/pi-autoupdate
Version
0.1.0
Published
Mar 24, 2026
Downloads
38/mo · 4/wk
Author
moikapy
License
unknown
Types
extension
Size
18.8 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

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

README

@0xkobold/pi-autoupdate

Automatically checks for pi updates on startup and offers to install them.

Features

  • Auto-check on startup: Checks npm for the latest version on each pi start
  • Smart reminders: Remembers if you dismissed an update and only nags you for new versions
  • Prompts before update: Asks for confirmation before running npm install
  • Persistent status widget: Shows update status below the editor at all times
  • Manual check: Use /check-update to check anytime
  • Dismiss update: Use /dismiss-update to skip the current version
  • Clear pending: Use /clear-update to remove saved state

Installation

pi install npm:@0xkobold/pi-autoupdate

Or add to your settings:

{
  "packages": ["npm:@0xkobold/pi-autoupdate"]
}

Usage

Automatic Updates

On startup, pi checks npm for the latest version. If an update is available:

  1. You'll see a confirmation dialog: "Update to vX.Y.Z?"
  2. A persistent widget below the editor shows: 📦 Update available: vX.Y.Z
  3. Click Yes to install, No to postpone

If you click No, the extension remembers and won't bother you until a newer version is released.

Status Widget

The extension displays a persistent widget below the editor showing current update status:

State Widget Display
Update available 📦 Update available: v1.2.3
Pending (from previous session) 📦 Update available: v1.2.3 (pending since 3/20/2026)
Up to date ✓ pi is up to date (v1.2.3)
After dismiss ⏭️ Update dismissed until next release
After successful update ✓ Updated to v1.2.3

Manual Commands

  • /autoupdate - Toggle autoupdate on/off or show current status
  • /check-update - Check for updates and install if available
  • /dismiss-update - Skip this version (won't prompt again until next release)
  • /clear-update - Clear saved update state

How It Works

  1. On session_start, the extension checks npm for the latest version
  2. It compares against the currently installed version
  3. If an update exists and wasn't dismissed, prompts the user and shows in widget
  4. If confirmed, runs npm install -g @mariozechner/pi-coding-agent
  5. After install, tells you to restart pi

State Files

State is stored in ~/.pi/:

  • autoupdate-state.json - Pending update info (version, changelog URL, detected date)
  • autoupdate-current-version.txt - Dismissed version number
  • autoupdate-settings.json - Extension settings (enabled/disabled)