Pi extensions¶
- ID
pi- Home page
- Platforms
🐧 Linux · 🍎 macOS · 🪟 Windows
- Operations
installed·install·upgrade·upgrade_all·remove- purl types
pkg:pi- CLI name
pi- Issues and PRs
- Source
The extension manager of the Pi coding agent (https://pi.dev), which installs packages that add tools and resources to the agent.
A package is a source spec carrying its scheme, npm:@scope/name or
git:github.com/user/repo or a URL or a local path, and that spec is what
every verb takes: the listing prints it, and install, remove and the
single-package update all accept it, so ids round-trip without translation.
Parsing notes, verified against pi 0.84.2 on macOS:
Bare
pi updateupdates pi itself, not the packages:--selfis its documented default when no target is given.upgrade_alltherefore names--extensionsexplicitly, andupgrade_oneuses--extension <source>, which was checked to name the package it is given rather than sweeping everything.The listing is a two-line record, the source spec then the directory it resolved to, under a
User packages:heading. Only the first carries the id, so the pattern keys on the two-space indent that the four-space path line and the unindented heading both fail.The inventory carries no version, only a spec and a path, which is a supported shape rather than a gap:
installed_versionis optional, the same readingrustupandpyenvsettled.An empty inventory prints
No packages installed.and exits0, so it is honest rather than a failure.
Caution
pi list reports user and project packages together and takes no scope
flag, where install and remove both take -l to choose. Run from a directory
carrying a .pi/settings.json, the inventory therefore includes that
project’s packages alongside the machine’s. Anywhere else it is user-scoped,
which is what mpm wants.
What mpm adds to pi¶
mpm reaches across every manager at once, not pi alone: mpm installed and mpm outdated cover pi alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.
Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.
Your pi commands, in mpm¶
You already know pi: each operation maps one-to-one onto mpm, in an interface shared by every manager.
To… |
With |
With |
|---|---|---|
List what’s installed |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.
Operations¶
Operation |
Supported |
|---|---|
|
✓ |
|
|
|
|
|
|
|
✓ |
|
✓ |
|
✓ |
|
✓ |
|
|
|
|
|
Selecting and configuring pi¶
Deselect pi for a single run with --no-pi, or persist the choice in your configuration:
[mpm]
pi = false
Keep it enabled but tune how mpm drives it with a per-manager override:
[mpm.managers.pi]
timeout = 900
mpm config-template pi prints every overridable attribute as a ready-to-paste block.
Recipes¶
A few jobs you would otherwise script around pi, one mpm command each:
Snapshot and clone a machine:
mpm --pi dump pi.toml, thenmpm restore pi.tomlon the next one.Export a compliance SBOM:
mpm --pi sbom(CycloneDX by default,--spdxfor SPDX).
Privilege escalation¶
mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.
None of its operations needs root.
See privilege escalation for the full policy.
Cooldown¶
State of Pi extensions’s release-age gating, from the cooldown support table:
Status: ❌ None (a source spec names no version, let alone a date)
A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:
Registry: Pi package sources
Retraction: Upstream withdrawal: a package is a source spec resolved straight from npm or a git remote, so it is withdrawn wherever that source lives rather than through any index pi owns
Publish date: ❌ the listing records a spec and a path, with no version and no date
With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.
Version probe¶
The version is probed by running:
$ pi --version
0.84.2
and extracted with:
r"(?P<version>\d+\.\d+\.\d+)"
Reference traces¶
Raw native outputs captured in the bundled definition: the reference mpm’s parsers were written against. If you know Pi extensions well and a transcript below looks wrong, or a newer release changed its output format, report it.
$ pi list
User packages:
npm:@earendil-works/pi-telemetry
/tmp/mpm-drive/.pi/agent/npm/node_modules/@earendil-works/pi-telemetry
Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --pi installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.
Changelog¶
8.0.0.dev0(unreleased)Add Pi extensions manager, with inventory, install, remove and upgrade of the packages that extend the Pi coding agent.