Pi Extensions Workspace
New extension
extensions/{name}/package.json— template belowextensions/{name}/index.tsbun install
package.json
{
"name": "@bugabinga/pi-ext-{name}",
"version": "0.0.0",
"private": true,
"type": "module",
"main": "index.ts",
"peerDependencies": {
"@earendil-works/pi-coding-agent": "*"
}
}
Add only deps actually imported by the extension.
Prefer peerDependencies for Pi packages (@earendil-works/*).
Run bun install after any structural change.
Imports
| Package | Provides | Use |
|---|---|---|
@earendil-works/pi-coding-agent |
SDK — ExtensionAPI, types, ctx | Always (peer dep) |
@earendil-works/pi-tui |
TUI components, truncateToWidth, Key | Rendering |
@bugabinga/pi-ext-* |
— | **Never |
import
from
other
extensions** |