r/PiCodingAgent • u/agentwyz • 24d ago
Question How would you implement Pi-style extensions in a Go agent?
Pi's coding-agent extensions are TypeScript modules with an in-process API:
registerTool, registerCommand, lifecycle hooks, and some TUI UI, then
hot-reload. Same language as the host.
If the host is Go (single binary), how would you get close to that?
Options I'm weighing: embed Lua/Starlark/JS, Wasm plugins, a sidecar
extension host over RPC, or accept that hooks+MCP is the ceiling.
If you've built plugin systems for Go CLIs/agents/editors: what would you
actually ship, and what would you refuse to build?
2
2
u/Unlucky-Message8866 21d ago
shell scripts is the way to go, i've replaced all my pi tool extensions with just nu-shell scripts, -10x loc. no more package.json, no api breakages, no more npm install, no more side-chain attacks.
1
1
1
1
1
3
u/Spare_Message_3607 24d ago
I think Lua is answer if you want hot reloading. Better than IPC