
AI coding agents like Claude Code and OpenAI Codex CLI are excellent — but each one is wired to its vendor's API. If you want to try Claude Code with DeepSeek, run Codex against a local Ollama model, or switch to whichever provider is fastest this week, you are on your own.
codefa fixes that. It is an open-source (MIT), local-first proxy and control center that connects coding agents to any OpenAI-compatible provider — NVIDIA NIM, OpenRouter, Gemini, DeepSeek, Mistral, Groq, Ollama, LM Studio, Kimi, MiniMax and many more.
codefa sits on your machine between the agent and the provider:
textClaude Code ─┐ ┌─▶ OpenRouter ├─▶ codefa (localhost) ─┼─▶ DeepSeek / Gemini / Groq … Codex CLI ─┘ protocol translation └─▶ Ollama / LM Studio (local)
The agent speaks its native protocol — the Anthropic Messages API for Claude Code, the OpenAI Responses API for Codex. codefa translates those requests to whatever the downstream provider understands, and routes them to the model you picked. The agent never knows the difference.
macOS / Linux
bashcurl -fsSL https://codefa.foshati.com/install.sh | bash
Windows (PowerShell)
powershellirm https://codefa.foshati.com/install.ps1 | iex
Running the same command again updates codefa in place.
Run codefa and you get a clean arrow-key menu:
If you prefer to skip the menu:
bashcodefa claude # launch Claude Code through codefa codefa codex # launch Codex CLI through codefa codefa server # start the proxy and open the Admin UI codefa-init # create ~/.codefa/.env
You don't need to export environment variables or edit agent config files — codefa injects the right proxy settings when it launches the agent.
Open http://127.0.0.1:8090/admin and you get a responsive control panel (with dark and light mode) to:
That last point matters more than it sounds. When an agent "just hangs", the live logs show you immediately whether the provider rate-limited you, rejected the model name, or timed out.
Model names follow a simple provider/model pattern:
| Provider | Example model |
|---|---|
| OpenRouter | open_router/auto |
| DeepSeek | deepseek/deepseek-chat |
| Gemini | gemini/gemini-2.5-flash |
| Groq | groq/llama-3.3-70b-versatile |
| NVIDIA NIM | nvidia_nim/meta/llama-3.3-70b-instruct |
| Ollama (local) | ollama/llama3.3:latest |
| LM Studio (local) | lmstudio/local-model |
The full list in the README covers almost 30 providers, including Vertex AI, Amazon Bedrock, Hugging Face, Cohere, GitHub Models, Cerebras, SambaNova, Fireworks, Cloudflare Workers AI, Z.ai and llama.cpp.
~/.codefa/.env on your machine.codefa is written in Python 3.14 on FastAPI, with uvloop and Loguru. The goal is that the proxy adds no noticeable latency between keystroke and token, and uses very little memory while it idles in the background.
I wanted to use the best agent UX with whichever model made sense for the task — a cheap fast model for refactors, a strong model for architecture, a local model for private code. Hard-wiring each agent to one vendor made that painful. codefa turns the model into a setting instead of a lock-in.
Comments
Sign in to leave a comment or like this post