Show HN: One Code, almost all of Claude Code's features on pi, with any model An independent open-source project called One Code recreates Claude Code's coding workflow on top of pi while letting users plug in any model or provider, released free under the MIT license as the npm package @one-ai/one-code. One Code carries over subagents, Git worktrees, auto mode, plan mode, permissions and context management in the harness, and reads existing CLAUDE.md and .claude/ configuration directly with no import step, falling back to AGENTS.md when no CLAUDE.md exists. It requires Node.js 22.19 or later, supports Anthropic, OpenAI, Gemini, OpenRouter or local models with mid-session switching via /model, and is developed and verified on macOS, Linux and Windows; features depending on Claude Code's hosted or desktop services are outside its scope. Claude Code with the model slot left open. The full workflow, open source, on any model or provider. One Code rebuilds the Claude Code workflow around the model you choose. Subagents, Git worktrees, auto mode, plan mode, permissions, and context management all live in the harness, so they come along whatever model you put in it. Your CLAUDE.md , skills, commands, agents, and permission rules carry over with no import step. If you already use Claude Code, nothing here needs relearning. Pick a model, give it a task, review its plan, and let it work. Switch models mid-session, or give each subagent its own model and provider: a frontier model on the main task, a cheaper one for exploration and tests. One Code is an independent, open-source implementation built on pi https://github.com/earendil-works/pi . It recreates the coding workflow; features that depend on Claude Code's hosted or desktop services are outside its scope. User guide https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/README.md · Reuse your Claude Code setup https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/bring-your-claude-code-setup.md · Differences from Claude Code https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/differences-from-claude-code.md · Command reference https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/reference.md Install Node.js 22.19 or later , then run: npm install -g @one-ai/one-code cd your-project onecode Inside One Code, run /login to connect a provider, then /model to choose a model. You can also supply an API key through an environment variable such as ANTHROPIC API KEY , OPENAI API KEY , or OPENROUTER API KEY . One Code reads an existing CLAUDE.md and .claude/ configuration directly. If a directory has no CLAUDE.md , it falls back to AGENTS.md . For a new project, run /init to draft a CLAUDE.md . To check your setup, run onecode doctor or /doctor report inside a session. The report lists provider credentials, model assignments, detected configuration, and missing programs. Run /doctor for a checkup with agent-assisted fixes. One Code is developed on macOS and verified on macOS, Linux, and Windows. WSL works too. For the native Windows setup and what has been checked there, see the Windows guide https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/windows.md . One Code is free under the MIT license. Model access, usage charges, and rate limits depend on your provider. See Providers and models https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/providers-and-models.md for connection options. Homebrew , which installs Node.js for you: brew install isurumaduranga/one-ai/onecode Windows installer , which installs Node.js and One Code: powershell -c "irm https://raw.githubusercontent.com/IsuruMaduranga/one-code/master/install.ps1 | iex" Existing pi installation : pi install npm:one-code-extension The @one-ai/one-code https://www.npmjs.com/package/@one-ai/one-code app package bundles a pinned version of pi and provides the onecode command. The one-code-extension https://www.npmjs.com/package/one-code-extension package uses your existing pi installation and is tested against pi versions 1.0.0 through 1.5. For the extension package, use pi in place of onecode . The app opens in a full-screen terminal interface by default. See the installation guide https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/installation.md for display settings and more installation details. - Choose models by task. Use Anthropic, OpenAI, Gemini, OpenRouter, or a local model. Switch the main model mid-session with /model . - Mix providers in one session. Give the main agent and each subagent their own model and provider, without configuring a routing gateway. - Reuse your Claude Code configuration. One Code reads project instructions, skills, commands, agents, plugins, permission rules, and Model Context Protocol MCP server configuration. There is no import step. - Adapt guidance to the model. Four capability tiers adjust prompting and tool guidance, with more explicit instructions for smaller models. - Extend the harness. One Code is a pi https://github.com/earendil-works/pi package built from extensions. Add your own extensions, themes, and settings. - Inspect and change the code. The project is open source under the MIT license https://github.com/IsuruMaduranga/one-code/blob/master/LICENSE . You can point Claude Code at another endpoint with ANTHROPIC BASE URL . If that endpoint supports the API Claude Code expects, this can be enough to use an alternative model in a familiar interface. The override changes where requests go. It does not, by itself, adapt the prompts, provider features, authentication, or supporting model calls to the model receiving them. Your endpoint or gateway has to bridge those gaps. One Code builds that adaptation into the harness: - Different providers for different agents. A URL override points requests at one endpoint. To route those requests across providers, you need a gateway. One Code connects each agent to its own provider directly. The main agent can use a frontier model while subagents use a cheaper model elsewhere. - Prompts matched to the model. Changing the endpoint does not change the instructions sent to the model. One Code uses four capability tiers to adjust prompting and tool guidance. Smaller and local models receive more explicit playbooks and structured search tools. - Native caching support. Providers use different caching mechanisms. An API-compatible response alone does not establish that a gateway preserves caching behavior. One Code uses native provider integrations, keeps prompt prefixes stable, and shows the cache hit rate in the footer. - Account sign-ins as well as API keys. Changing a URL does not add a provider's sign-in flow. One Code signs in with the accounts you already have Claude Pro and Max, ChatGPT, GitHub Copilot, OpenRouter, Kimi, xAI, and Radius , and you can mix them with API-key connections in the same session. - Tools and supporting calls that account for the provider. Web search, deferred tools, reasoning, and background model calls need more than an endpoint change. One Code provides shared tool interfaces and selects supporting models from the provider's catalog, subject to capability requirements. - Auto mode on any provider. Claude Code's auto mode now sends each tool call to the API server for a safety check, using a request field the endpoint has to support. Claude Code keeps its local classifier as a fallback only for a while LiteLLM's notes https://docs.litellm.ai/blog/claude-code-server-side-auto-mode give October 23, 2026 , so an endpoint without that support can leave auto mode unavailable. One Code runs its own two-stage classifier on a model from your provider, so auto mode works wherever your models run. - An open harness you can change. One Code's prompts, tools, and workflows are implemented as pi extensions. You can inspect them, change their behavior, and add your own. Use a URL override when one compatible endpoint covers your needs. Use One Code when you want the Claude Code workflow with model choice built into the prompts, tools, authentication, and agent coordination. See Differences from Claude Code https://github.com/IsuruMaduranga/one-code/blob/master/docs/guide/differences-from-claude-code.md for the full comparison and compatibility boundaries. Keep your preferred model on the main task and delegate exploration, tests, or review to another model or provider. 1. Choose the main model with /model . 2. Set the default model for subagents and workflow agents with /subagent