r/PiCodingAgent • u/the_qubit • 21d 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.
5
u/kelvie 21d ago
MCP is already in pi though?
2
u/kantorcodes1 19d ago
When auto mode decides whether to ask for approval, does it classify the full command and its arguments or a shorter summary?
2
u/bit_shifting_is_sexy 21d ago
Why? Just use claude code if you like it so much
7
u/Ideabile 21d ago
Cool! Do you have an estimate what is the token usage vs how effective does the task / quality of work on comparable models?
1
u/MuzafferMahi 19d ago
I tried this, but qwen 3.8 flash next failed 5 tool calls in a row (usually it never does) and got stuck on random stuff. I really wanted this to work :/ Good job tho!
1
u/supercachai 18d ago
How many tokens does it insert into the sys prompt?
1
u/ayongpm 18d ago
53 extension in one? Maintaining them all would be hard I'd imagine. Still, good job! Compiling pi using `pi-bolt` might be the way I believe to get the best performance of this big setup.
3
u/OneMoreName1 19d ago
This is cool, I was trying to do something similar myself but lost interest
1
u/saltyourhash 21d ago
Hefty