Featured answer
Give me an overview of magpie
magpie is an app and local gateway that lets you choose which model a coding agent such as Claude Code or Codex runs on, by editing each agent's own config file so it can use any provider you have added. It is written mainly in Go, with JavaScript for the web interface. The core code sits in the internal directory, which holds 7588 of the project's 8168 files, where internal/cli/main.go is the command line entry point and internal/gui/app.go starts the desktop window. The gateway listens at 127.0.0.1:3425 and accepts OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini requests, translating between them including streaming and tool calls, with provider handling under internal/provider. The layers by file count are CLI, API, Middleware, Application, Config, Service, and Docs & Tooling, and the site directory with site/worker.js is kept separate from the app code. To start reading, begin with internal/cli/main.go and internal/gui/app.go, then internal/provider for how providers are handled.
| Layer | Files |
|---|---|
| CLI | 67 |
| API | 4 |
| Middleware | 4 |
| Application | 142 |
| Config | 29 |
| Service | 1690 |
| Docs & Tooling | 312 |
Basis: Inferred · knowledge graph· as of 1e28577