yetone/magpie
magpie is a cross-platform menu bar app, TUI and CLI that lets you view and switch the model each installed AI coding agent (Claude Code, Codex, Gemini CLI, OpenCode, Cursor, Copilot CLI, Goose, Pi, etc.) is configured to use, editing each agent's config file surgically without disturbing comments or formatting. It runs a local gateway (127.0.0.1:3425) that translates between OpenAI Chat Completions, OpenAI Responses and Anthropic Messages APIs so every agent can point at one endpoint and use any provider's models, including routing groups that spread requests across multiple keys/subscriptions with configurable routing strategies (smart, order, rotate, usage). It can also reuse existing subscriptions (Claude Code, Codex/ChatGPT, Copilot, Devin, Gemini CLI) as providers for other agents without exposing or copying credentials, and supports encrypted profile backup/restore.
What it claims
magpie is a small cross-platform tool (menu bar app, terminal UI, and CLI) that lets you pick which model each AI coding agent on your machine uses — Claude Code, Codex, Gemini CLI, OpenCode, Pi, Goose, Cursor, Copilot CLI and others — from one screen. It runs a local gateway on 127.0.0.1:3425/v1 that speaks the OpenAI chat completions, OpenAI Responses and Anthropic Messages APIs, and forwards each request to whichever vendor serves the chosen model, translating between APIs (streaming and tool calls included). MIT licensed. Binary is under 15 MB with the desktop app (system webview via Wails), 7 MB for the terminal-only build; macOS, Linux, Windows.
How it works
Every agent points at magpie's single endpoint and picks from one catalog; agents never hold vendor keys or URLs. Add a provider (preset key-paste for Anthropic, OpenAI, DeepSeek, Kimi, GLM, Ollama, OpenRouter, etc., or a custom name+base-URL) and its models appear in every agent's picker as provider/model. Model lists are fetched live from each vendor, with the models.dev catalog filling in names and reasoning efforts. Config files are edited surgically and atomically — only the changed key is touched, comments/ordering preserved in settings.json, config.toml, opencode.jsonc, config.yaml.
Two notable mechanisms:
- Subscriptions as providers. Signing in to Claude Code, Codex (ChatGPT), Copilot, Devin, Gemini CLI lets other agents borrow those models with no key copied. magpie reads the agent's own credentials each time and stores only your model picks.
- Claude subscription path. Because Anthropic classifies another agent's system prompt as third-party traffic, magpie drives the genuine local
claudebinary for Claude-subscription generations, bridging the caller's tools over MCP. Cursor, Grok, and Devin similarly run through their own CLIs.
Routing groups let several models (one or many providers) be picked as one group/<id>, with routing strategies smart (default), order, rotate, usage, and a stays= session-affinity control.
flowchart TD
A[Agent] -->|provider/model at :3425| G[magpie gateway]
G -->|API matches| V[Vendor API direct]
G -->|API differs| T[Translate then forward]
G -->|Claude subscription| C[Local claude binary + MCP]
G -->|group/id| R[Route over member keys/accounts]How to use it
curl -fsSL https://usemagpie.ai/install.sh | shOr from source:
go install github.com/yetone/magpie@latestBuild targets: make build (desktop app, needs cgo + webview), make app (macOS menu-bar app), make cli (terminal-only, no cgo, cross-compiles). Linux app build needs libgtk-3-dev and libwebkit2gtk-4.1-dev.
Core commands:
magpie provider add deepseek sk-…
magpie claude opus
magpie codex deepseek/deepseek-chat
magpie group add "Opus anywhere" models=claude/claude-opus-5-5,copilot/claude-opus-5.5 routing=order stays=session
magpie save work # snapshot all agents as a profile
magpie use workProviders/keys live in ~/.config/magpie/providers.json (0600). Encrypted backups via magpie backup (AES-256-GCM, PBKDF2-SHA256); subscriptions are not included and must be re-signed-in per machine.
Limits
- Windows and Linux builds are not signed (SmartScreen may warn); only Mac releases are notarised.
- Claude subscription use requires Claude Code installed and signed in — magpie cannot serve those models any other way.
- Antigravity accounts risk suspension: Google may suspend an account it sees used outside Antigravity; magpie warns and advises using a disposable account. Gemini CLI sign-in now requires a named Google Cloud project (Code Assist Standard/Enterprise).
- Agents read config at startup, so switches only take effect in a new session; Codex must be restarted after a switch.
- The gateway auth "key" is cosmetic (any value works) since it only listens on loopback.
Organisations named here
Technologies named here
- Go
- magpie
- Claude Fable 5.1
- GPT-6 Astra
- Claude Code
- Codex
- Gemini 3.1 Pro
- Gemini CLI
- Claude Sonnet 5
- Claude Haiku 4.5
- OpenCode
- MiMo Code
- GLM-5.2
- pi
- Claude Fable 5
- Claude Opus 5.5
- Goose
- Cursor
- gpt-5.5
- Copilot CLI
- GPT-5.6 Sol
- Crush
- Kimi K2.5
- DeepSeek V4 Flash
- omp
- Hermes Agent
- deepseek-chat
- Devin
- Claude Sonnet 4.5
- Antigravity
- Wails
- swe-2-max
- models.dev
- lobehub/icons
- Ollama
- LM Studio
- OpenRouter
- grok CLI
- Cursor Agent
- Google Code Assist API
- Model Context Protocol
- Copilot
Techniques named here
- Surgical config editing
- Unified gateway API translation
- Routing groups
- Session stickiness
- Subscription harness driving for Claude
- Live model discovery
- Profile snapshotting
- Encrypted backup/restore
- Deep-link provider import
Related in ai-infra
kerpopule/hermes-jev-skills
Wire It, Run It, Deploy It: AI Workflows in Gradio
