magpie

One local gateway that points Claude Code, Codex and Gemini CLI at any model, and fails over when a quota runs out

What it is

magpie is an MIT-licensed local gateway in Go by yetone: about 32k stars on GitHub, created in September 2026 and still shipping daily in November. It solves a narrow but persistent problem. Every coding agent keeps its model configuration in its own file, with its own format, key and base URL, so the subscription you pay for often works in exactly one agent. magpie folds all of that into a menu bar app plus one local gateway: pick any model for any agent from a single list, and it edits the one key that actually takes effect in that agent’s config. Providers can be an API key, a local model, or the Claude, ChatGPT, Copilot, Gemini or Grok plan you are already signed into. When a quota runs out, the provider’s next account takes over, and a routing group moves on to another model or provider without the agent ever seeing an error. With masking enabled in settings (off by default), keys, passwords and emails in a prompt are masked on the machine before the request leaves it and restored in the reply. It runs as a menu bar app, window, TUI, web UI and CLI on macOS, Windows and Linux, plus Docker and Termux, with plugins kept in a separate community repository.

Highlights

  • Switch models for every coding agent from one list, editing the single key that actually takes effect in each agent’s config
  • Subscriptions, API keys and local models all work as providers, including Claude, ChatGPT, Copilot, Gemini and Grok plans
  • When a quota runs out it moves to the next account or routing group without surfacing an error to the agent
  • With masking on, keys, passwords and emails are hidden locally before a prompt leaves the machine and restored on the way back
  • Menu bar app, window, TUI, web UI and CLI, plus Docker and Termux
  • MIT licensed, one-command install, and uninstalling restores your agents’ original configuration

How to use

Install with the official script (fetch install.sh from usemagpie.ai with curl and hand it to sh), download the signed and notarised Mac app from usemagpie.ai, or use go install or the Docker image. Open it, add providers under Providers by picking a preset and pasting a key, or sign in to a subscription you already pay for. Then set a model per agent on the Agents page and magpie writes the matching config for you; for multi-account or multi-model fallback, order the priorities inside a routing group. On shared machines, turn on masking under Privacy before production use and decide whether uninstalling should restore each agent’s original config.

License

Released under MIT. Read the terms before commercial use or redistribution, especially if you plan to offer it as a service.