TL;DR

Magpie (yetone/magpie) is an MIT-licensed Go app that does one thing: it lists every AI coding agent installed on your machine next to the model it is currently set to, and lets you click to change it. Behind that single screen sits a local gateway on 127.0.0.1:3425 that speaks the OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Gemini APIs and translates between them. That is what makes the headline combinations possible: Codex on DeepSeek, Claude Code on Kimi, Gemini CLI on GLM, OpenCode on your Claude Max subscription.

The author is yetone, the developer behind avante.nvim (the Cursor-style AI plugin for Neovim), which explains both the polish and the speed: the repo was created on 2026-09-23 and by 2026-09-28 it had shipped 281 releases, crossed 1,465 stars and closed most of its ~150 issues within hours.

Key facts as of 2026-09-28:

  • Stars / forks: 1,465 / 90; 5 open issues out of 147 filed
  • Size: under 15 MB for the desktop app (system webview via Wails), 7 MB for the terminal-only build
  • Platforms: macOS (signed and notarised), Linux, Windows (unsigned builds for now)
  • Agents managed: 23 rows, from Claude Code and Codex to Goose, Crush, Hermes Agent, ZCode and Devin
  • Price: free; keys and configs stay in ~/.config/magpie/providers.json

Verdict: if you run two or more CLI agents and more than one provider or subscription, Magpie removes a genuinely annoying class of config-file surgery, and its routing groups are more capable than anything comparable. If you run one agent on one vendor key, it is a nice menu-bar toy you do not need.

Quick reference

Repogithub.com/yetone/magpie
Website / docsusemagpie.ai
Stars / forks1,465 / 90 (2026-09-28)
LicenseMIT
LanguageGo; plain HTML/CSS/JS over the system webview (Wails), no frontend framework
Installcurl -fsSL https://usemagpie.ai/install.sh | sh or go install github.com/yetone/magpie@latest
Gatewayhttp://127.0.0.1:3425 (MAGPIE_ADDR to change); OpenAI, Anthropic and Gemini APIs
Config touched~/.claude/settings.json, ~/.codex/config.toml, ~/.gemini/settings.json, ~/.config/opencode/opencode.json(c) and others
Releasesyetone/magpie-releases (v0.1.281 at time of writing)

What it is

Every CLI coding agent stores its model choice in a different file with a different shape. Claude Code wants ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and a stack of ANTHROPIC_DEFAULT_*_MODEL variables inside the env block of settings.json. Codex wants a [model_providers.x] table and a model_catalog_json in TOML. OpenCode wants a provider entry in JSONC; Goose and Hermes Agent want YAML. If you use three agents and want all of them on a DeepSeek key this week and on your Claude subscription next week, you are hand-editing six files.

Magpie replaces that with one screen. The terminal version shows the idea in nine lines:

  ◉ magpie

  ▸ Claude Code   claude-fable-5-1[1m]        ~/.claude/settings.json
    Codex         gpt-6-astra   effort medium
    Gemini CLI    gemini-3.1-pro
    OpenCode      anthropic/claude-sonnet-5   small anthropic/claude-haiku-4-5
    Pi            openrouter/z-ai/glm-5.2:batch
    Goose         anthropic/claude-sonnet-5
    Cursor        auto
    Copilot CLI   claude-fable-5

  ↑↓ agent  ·  ←→ field  ·  ↵ change  ·  s save profile  ·  p profiles  ·  q quit

Pick a row, press Enter, choose a model. Magpie writes the change into that agent’s own config file, touching only the keys it needs; the README’s claim that comments, ordering and indentation survive matches what I saw in a config.toml with hand-written [profiles.*] sections. Writes are atomic, so a crash mid-save does not leave you with half a JSON file.

The same screen exists three ways: a menu-bar panel (magpie tray), a normal window, and magpie tui for a terminal. There is also a plain CLI, which is the form most people will end up scripting:

magpie ls                              # every agent and its current settings
magpie claude opus                     # native model, removes the gateway env vars
magpie codex deepseek/deepseek-chat    # any catalog model, through the gateway
magpie codex effort high
magpie claude haiku deepseek/deepseek-v4-flash   # one Claude Code tier on its own model
magpie save work && magpie use work    # profiles: snapshot and restore everything

Agent names accept prefixes (cc, oc, gem), and bare effort levels like magpie codex xhigh are recognised.

Three things collided in September 2026.

First, the number of serious CLI agents stopped being two. Magpie’s agent table has 23 rows, and several of them (ZCode, DeepSeek Harness, Grok Build, OpenHanako, Alma, Cindy) did not exist in the spring. We have reviewed a few of them here: Pi, Goose, DeepSeek Harness and ZCode. Anyone who tries the new ones ends up with half a dozen config files.

Second, the model market got cheap at the top and crowded in the middle. DeepSeek V4, Kimi K2.5 and GLM 5.2 are good enough for most coding turns, so “run Codex’s harness on a DeepSeek key” is now a rational cost decision rather than a hack. Magpie’s presets list reads like a tour of that market: Anthropic, OpenAI, Gemini, DeepSeek, Kimi, GLM, MiniMax, StepFun, Qwen, Tencent Cloud Token Plan, Mistral, Groq, xAI, OpenRouter, Together, Fireworks, SiliconFlow, AiHubMix, 302.AI, Ollama and LM Studio.

Third, subscriptions became the scarce resource. A Claude Max or ChatGPT Pro plan is a fixed-price allowance that most people do not fully use in a single agent. Magpie’s sharpest feature is turning a signed-in agent into a provider that every other agent can use.

Key features

The gateway

Every model Magpie knows is spelled provider/model and served from the local gateway. Agents never hold vendor keys or vendor URLs; they hold the string magpie as an API key (the gateway only listens on loopback, so any value works) and a base URL. The endpoints:

PathAPI
/v1/chat/completionsOpenAI Chat Completions
/v1/responsesOpenAI Responses
/v1/messages, /v1/messages/count_tokensAnthropic Messages
/v1beta/models/{model}:generateContentGoogle Gemini (plus streamGenerateContent, countTokens)
/v1/models, /v1beta/modelsthe catalog

Requests pass straight through when the vendor speaks the agent’s API and are translated otherwise, streaming, tool calls and reasoning included. Each /v1/models entry also carries reasoning and supported_reasoning_levels, so an agent like Codex that has an effort slider knows which levels are legal. Anything with a base-URL setting can use it, not only the 23 managed agents:

export OPENAI_BASE_URL=http://127.0.0.1:3425/v1 OPENAI_API_KEY=magpie
export ANTHROPIC_BASE_URL=http://127.0.0.1:3425 ANTHROPIC_API_KEY=magpie
export GOOGLE_GEMINI_BASE_URL=http://127.0.0.1:3425 GEMINI_API_KEY=magpie

curl -s http://127.0.0.1:3425/v1/models | jq '.data[].id' | head

MAGPIE_DEBUG=1 logs every translated call, and the Gateway tab in the app shows recent requests with copyable snippets for shell, curl, Python and Node.

Subscriptions as providers

Sign in to Claude Code, Codex (ChatGPT), Copilot, Devin, Grok Build or Cursor, and that login appears in magpie providers as signed in as …, with its models available to every other agent as claude/claude-sonnet-5, codex/gpt-5.5, copilot/claude-sonnet-4.5, devin/swe-2-max. Magpie reads the agent’s own credentials each time, refreshes tokens the way the agent does, and stores nothing except your model picks; claude /logout and the provider disappears.

The Claude case is the interesting one, and the README is unusually candid about it. Anthropic classifies another agent’s system prompt as third-party traffic even when the OAuth request otherwise looks like Claude Code, so Magpie does not forge requests. Instead it drives the genuine local claude binary for every Claude-subscription generation, bridges the caller’s tools into that live turn over MCP, and feeds tool results back into the same process. This requires Claude Code to be installed and signed in, and it is why Pi or OpenCode “on your Claude plan” works without a key.

This bridge is also where the sharpest bug report landed. Issue #121 found 139 leftover magpie-claude-<random> temporary project directories polluting ~/.claude/projects on a Windows machine. yetone shipped --no-session-persistence plus a scoped cleanup in v0.1.220 the same day, with a described sandbox verification against Claude Code 2.1.283.

Routing groups, rules and intent routing

A routing group is several models, from one provider or many, that an agent picks as one name: group/<id>. This is where Magpie leaves the “config switcher” category:

magpie group add "Opus anywhere" \
  models=claude/claude-opus-5-5,copilot/claude-opus-5.5 \
  routing=order stays=session
magpie group set opus-anywhere models+=openrouter/anthropic/claude-opus-5.5 routing=usage
magpie claude group/opus-anywhere

routing= is smart (default: among subscriptions with quota left, the one whose allowance renews soonest), order, rotate or usage. stays= controls how long a conversation sticks to the account that answered it, defaulting to auto, which keeps a turn on one key while the vendor’s prompt cache is still worth something. Add a second provider that serves a model you already have and Magpie builds group/auto-<model> on its own. Groups nest up to eight deep, with loop detection.

Rules send a turn to a specific member by condition: token count (estimated from request size or the vendor’s last count), presence of an image, reasoning requested, originating agent, or an intent. Intent routing, documented as of v0.1.99, works like this: you describe each kind of request in a few words, and a small classifier model you choose reads the user’s latest message once per turn and answers with a number.

magpie group rule add coder use=deepseek/deepseek-v4-flash intent="a quick question" classifier=groq/llama-3.1-8b-instant
magpie group rule add coder use=deepseek/deepseek-v4-pro   intent="writing or fixing tests"
magpie group rule coder          # numbered rules and the classifier

The docs give exact numbers: the classifier has 8 seconds, answers are cached 10 minutes by message hash, a failing classifier rests 30 seconds, and a typical call was 212 tokens in and 1 out at 323 ms. Only the first request of a turn waits; tool rounds inside the turn do not. Up to about 4,000 characters of your message go to the classifier’s provider, so the docs suggest an Ollama or LM Studio model if that matters. There are no embeddings, keyword lists or training, which is the right call for something you need to be able to predict from the Routing tab.

Vendors and relays can hand users a ready-made provider as magpie://import?preset=deepseek&key=sk-… or an https://usemagpie.ai/import#… link with the parameters in the URL fragment, which browsers never send to a server. Magpie shows what would be added and saves nothing until you press Add.

Architecture

The tree tells the story: internal/gui (137 files), internal/provider (123), internal/gateway (76), internal/agent (58), plus smaller packages for sessions, edit (the surgical config writer), davsync (WebDAV sync between machines, added after issue #127), redact and claudebridge. The desktop app is Wails over the system webview, which is why the binary is under 15 MB; make cli builds without cgo and cross-compiles anywhere.

Config edits are per-agent adapters. Claude Code gets env vars, removed again when you pick a native model. Codex gets a [model_providers.magpie] table and a magpie-models.json catalog so Magpie’s models appear in Codex’s own picker. Provider-scoped agents (OpenCode, Pi, Goose, Crush, omp, Hermes) get a magpie provider entry. Gemini CLI has its auth switched between API key, Google account and Vertex.

Community reaction

Magpie has not had a Show HN yet; its growth so far is GitHub Trending (476 stars on day one, 1,319 by the morning of 2026-09-28) and the Chinese developer community, where most issues are filed. The issue tracker is the best signal of how the project is run:

  • Issue #3 (day one) asked for separate models per Claude Code tier. Shipped in v0.1.9: magpie claude haiku deepseek/deepseek-v4-flash, writing ANTHROPIC_DEFAULT_{OPUS,SONNET,HAIKU,FABLE}_MODEL.
  • Issue #129 reported that v0.1.239 silently dropped the [model_providers.magpie] table from config.toml when switching Codex back to a native model, which broke old Codex threads with Model provider 'magpie' not found. Root-caused and fixed in v0.1.246 with a new explicit “login method” toggle for Codex.
  • Issue #141 is a detailed report from a user (relus-cy) on Codex MultiAgentV2: a Magpie-served lead’s subagent never received its task because of encrypted_function_args handling. The patch and tests went in as submitted, with co-author credit, in v0.1.267.
  • Issue #120 asked why Codex models were reported at 272K context; the answer explains that 272K is the ChatGPT backend’s default and that GPT-6 models can be set to 872K per model in the provider’s context-window field (v0.1.215 for subscription accounts).

Response times of under a day on nearly every thread, with reproduction steps quoted back, are rare for a five-day-old repo.

Getting started

# macOS / Linux
curl -fsSL https://usemagpie.ai/install.sh | sh

# add a vendor key and a local server
magpie provider add deepseek sk-…
magpie provider add ollama
magpie provider test deepseek        # one tiny request per API, with latency

# point agents at models
magpie codex deepseek/deepseek-chat
magpie claude moonshot/kimi-k2.5
magpie opencode claude/claude-sonnet-5   # from your signed-in Claude Code

# snapshot it
magpie save cheap

Two things to know before you start. Agents read their config at launch, so a switch applies to the next session (Codex also rebuilds its model list at start-up, so restart the app). And Magpie never reads keys from your shell environment: OPENAI_API_KEY in your .zshrc does nothing until you add it as a provider. Every build self-updates in the background; magpie update does it from a terminal.

Who should use it

Use it if you run two or more of Claude Code, Codex, Gemini CLI, OpenCode, Pi or their peers; if you hold more than one subscription or key and want quota-aware failover; or if you want a single local endpoint for scripts and editor extensions that read the same ~/.claude or ~/.codex config.

Skip it if you use one agent with one vendor and are happy; if your organisation forbids proxying a Claude or ChatGPT subscription into other tools (see limitations); or if you need a server-side, multi-user gateway. Magpie is single-user and loopback-only by design.

Limitations

  • Subscription terms. Routing a Claude, ChatGPT, Copilot or Cursor plan into other agents is something the vendors tolerate to varying degrees. The README itself warns that Google may suspend an Antigravity account it sees used outside Antigravity, and asks you to use one you can afford to lose. Google also no longer serves Gemini CLI sign-in to individual accounts, only Code Assist Standard/Enterprise with a GCP project.
  • The Claude bridge is heavy. Each Claude-subscription generation spawns the real claude binary. It works, and tool bridging over MCP is clever, but it is slower than a direct API call and depends on Claude Code’s own CLI flags staying stable.
  • Release velocity cuts both ways. 281 releases in five days means fixes land fast and behaviour changes under you; issue #129 was a regression introduced and fixed within a day.
  • Windows and Linux builds are unsigned, and much of the issue discussion is in Chinese, which may slow English-speaking users searching for answers.
  • No Show HN or Reddit thread yet, so third-party reports are thin. Treat the routing-group claims as documented rather than independently benchmarked.

Comparison with alternatives

Magpiecc-switchclaude-code-routerOmniRoute
FormMenu bar + TUI + CLI, Go/WailsDesktop app (Tauri)Node service + CLISelf-hosted web gateway
Agents managed23Claude Code, Codex, OpenCode, OpenClaw, Grok Build, HermesClaude Code focus, expandingAny OpenAI-compatible client
Local gateway with API translationYes: OpenAI, Anthropic, GeminiPartialYesYes
Subscriptions as providersClaude, ChatGPT, Copilot, Devin, Grok, CursorClaude, CodexVia pluginsNo
Routing groups with rules and intent classificationYesNoRouter config fileBasic fallback
Config editingSurgical, atomic, comments preservedProfile swapsOwn confign/a
Stars1.5K (5 days)138K37KSee review

cc-switch is the incumbent by a wide margin and the tool issue #129 explicitly asked Magpie to imitate. Magpie’s answer is depth over breadth: fewer years, more routing.

FAQ

Does Magpie store my API keys or send them anywhere? Keys live in ~/.config/magpie/providers.json, readable by you alone, and go only to the vendor you added them for. Agents never see vendor keys; they see the string magpie and a loopback URL. The gateway does not listen outside 127.0.0.1 unless you run magpie web --lan.

Can I use my Claude Max subscription in OpenCode or Pi through Magpie? Yes. Sign in to Claude Code on the machine, and claude/claude-sonnet-5 and its siblings appear in every agent’s picker. Magpie drives the real claude binary for those requests and bridges tools over MCP, so Claude Code must stay installed.

Why does Codex still show the old model after I switched? Codex reads its config and model list at start-up. Restart the Codex app or open a new codex session. The same applies to every agent: running sessions keep the model they started with.

Does it work on Linux and Windows? Yes. Linux gets the desktop app if WebKitGTK 4.1 is installed, otherwise the CLI/TUI. Windows uses the built-in WebView2 runtime. Only the macOS builds are signed and notarised today.

Is intent routing sending my prompts to another model? Only the text of your latest message (up to ~4,000 characters), once per turn, to the classifier you chose. Pick an Ollama or LM Studio model as classifier to keep it local. Magpie keeps a hash and the answer in memory for 10 minutes and logs nothing.

How is this different from setting ANTHROPIC_BASE_URL myself? You can do that for one agent. Magpie does it for 23, translates between three API families, adds quota-aware failover across accounts, and undoes the change cleanly when you pick a native model again.

Sources