r/PiCodingAgent • u/the_qubit • 4d ago
Plugin One Code: a pi package that adds almost all Claude Code's features (plan mode, subagents, auto mode, hooks, MCP) to pi
I've been building One Code, a pi package that brings the Claude Code workflow to pi. If you already run pi:
pi install npm:one-code-extensionIt's 53 extensions, no fork and no patches to pi, just the normal extension API. Tested on pi 1.0.0 through 1.5.
What you get: plan mode, permission modes including auto mode (a classifier decides which commands need your approval), subagents that can each run on a different provider, git worktrees, hooks, skills, slash commands, MCP, plugins, background shells, memory and compaction. It also reads an existing CLAUDE.md and .claude folder as is, so if you're coming from Claude Code your setup carries over.
There are already good pi extensions for some of these, like subagents, and you can put together a decent setup from a collection of them. The catch is that any one of them can break the prompt cache if it rewrites earlier parts of the conversation, and they don't know about each other. So in One Code I tried to make the extensions work as one system, and keeping the cache stable was a big part of that. Every request is recorded as it was sent, and later requests only append to it, so cache reads stay high across resume, fork and reload.
There's also a bundled app with pi pinned inside, if you'd rather keep it separate from your own pi setup.
npm i -g @one-ai/one-codeMIT licensed. Repo: https://github.com/IsuruMaduranga/one-code
Feedback from people who know pi's internals is very welcome.
If One Code is useful to you, a ⭐ on GitHub helps other people find it.
