magpie-pi
Magpie community plugin integration for Pi
Package details
Install magpie-pi from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:magpie-pi- Package
magpie-pi- Version
0.3.1- Published
- Nov 27, 2026
- Downloads
- 611/mo · 611/wk
- Author
- noah-dev
- License
- UNLICENSED
- Types
- extension
- Size
- 13.5 MB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extension/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
magpie-pi
English | 简体中文
Bring magpie's community plugin integrations to Pi through a lightweight extension and a local host. Uses Pi's native SDK over stdio, without an HTTP gateway or Pi core changes.
Derived from yetone/magpie, with its OpenCode host extracted without modifications. Thanks to the original author and maintainers.
Installation
Requires Pi 1.6.0.
pi install npm:magpie-pi
pi
The package includes a prebuilt supervisor. The first plugin installation or startup downloads Bun once (~25–40 MB) and stores it under bun/ in the state directory.
Usage
- Enter
/magpie-pluginsin Pi. - Choose Search and install, search for
cursororworkbuddy, select a package and version, then confirm. - Exit and restart Pi. If multiple instances share the state directory, exit all of them before restarting.
- Enter
/loginand select the service. - Enter
/modelto select a model and start chatting.
Use ↑/↓ to navigate, Enter to confirm, and Esc to cancel. The menu also supports viewing installed plugins, installing by package name, and uninstalling. Pi's built-in providers remain available.
Third-party plugins run with your user privileges; install only plugins you trust. Real Cursor/WorkBuddy accounts remain unverified.
State and credentials
Configuration is created automatically in ~/.local/share/magpie-pi; manual JSON editing is not needed for menu-managed plugins.
MAGPIE_PI_STATE: override the state directory with an absolute path.MAGPIE_PI_BUN: override the Bun executable.MAGPIE_PI_BUN_MIRROR: where to download Bun from:github(default),npmmirror,npmmirror-cdn, or an HTTPS base URL that servesbun-v<version>/<file>.zip. Downloads from every source are checked against pinned SHA-256 sums./logout: disables the provider without deleting plugin credentials; use/loginto enable it again.
Embedding
Hosts that run Pi through its SDK with one shared model runtime for many sessions (for example a GUI backend) should not load the extension per session. Use the embedding API instead: it starts the plugin host once and returns Pi provider definitions to register in the host's own runtime.
import {startMagpie, PluginManager} from "magpie-pi/embed";
const magpie = await startMagpie(); // {providers, errors, close}
for (const provider of magpie.providers) modelRuntime.registerProvider(provider.id, provider);
// After installing or removing plugins with PluginManager, close() and start again to apply them.
await magpie.close();
Configuration and plugin problems are returned in errors instead of being thrown. startMagpie() sets MAGPIE_PI_EMBEDDED=1, so the Pi extension stays inactive in that process even if a user also installed it as a Pi package. Login uses Pi's AuthInteraction protocol, so the host's own login UI drives plugin sign-in.
License
The project's own license is currently UNLICENSED. The extracted host retains its upstream MIT license in vendor/LICENSE.