codefa is an ultra-fast, local-first proxy and management suite designed to connect autonomous AI coding agentsβsuch as Claude Code and OpenAI Codexβto any OpenAI-compatible AI provider (NVIDIA NIM, DeepSeek, OpenRouter, Mistral, Ollama, LM Studio, Kimi, MiniMax, and more).
Featuring an interactive terminal launcher, a modern responsive Admin UI on port 8090, and live HTTP access log streaming, codefa gives you total control over model routing, provider API keys, and server diagnostics.
- β‘ Interactive Terminal Launcher (
codefa): Arrow-key navigation (β/β) to seamlessly launch Claude Code, Codex CLI, or Server Only. - π οΈ Responsive Admin Control Panel: Beautiful glassmorphism Web UI running on
http://127.0.0.1:8090/adminwith full Dark & Light mode support. - π Live Server Logs Stream: Complete real-time capture of Uvicorn HTTP access logs, API payloads, and internal routing events.
- π€ Universal Coding Agent Compatibility: Pre-configured support for both Anthropic Claude Code and OpenAI Codex CLI.
- π 100% Local & Secure: API keys remain strictly stored in your local
~/.codefa/.envfile with zero telemetry leakage. - ποΈ Optimized Performance: Built on Python 3.14, FastAPI, Loguru, and uvloop for minimal resource overhead.
curl -fsSL https://codefa.foshati.com/install.sh | bashirm https://codefa.foshati.com/install.ps1 | iexcodefa serverRun codefa in your terminal to open the interactive selection menu:
codefaUse the β and β arrow keys to highlight your choice, then press Enter:
- Claude Code: Launches Anthropic Claude Code CLI configured with
codefaproxy. - Codex CLI: Launches OpenAI Codex CLI configured with
codefaproxy. - Server Only: Starts the background proxy server and opens the Admin UI on port
8090.
You can also bypass the menu and launch directly:
codefa claude # Direct launcher for Claude Code
codefa codex # Direct launcher for Codex CLI
codefa server # Start server & open Admin UI
codefa status # Show whether the background server is running
codefa stop # Stop the auto-started background server
codefa-init # Initialize ~/.codefa/.env configcodefa claude / codefa codex start one shared server in the background, detached from the terminal, if none is running. It keeps running when the client exits, so several terminals can use it at once; stop it with codefa stop. If startup fails, the real error is printed, and the full output is kept in ~/.codefa/logs/server-console.log.
| Provider | Description | Example Model |
|---|---|---|
| NVIDIA NIM | Accelerated NIM microservices | nvidia_nim/meta/llama-3.3-70b-instruct |
| Anthropic | Native Claude Messages API (no conversion: thinking, caching, server tools) | anthropic_api/claude-sonnet-4-5 |
| OpenAI | OpenAI GPT models (Chat Completions) | openai_api/gpt-5 |
| OpenRouter | Unified multi-provider gateway | open_router/auto |
| Gemini | Google Gemini API | gemini/gemini-2.5-flash |
| Vertex AI | Google Cloud Vertex AI | vertex/gemini-2.5-flash |
| DeepSeek | DeepSeek V3 & R1 models | deepseek/deepseek-chat |
| Mistral | Mistral AI API endpoints | mistral/mistral-large-latest |
| Mistral Codestral | Codestral IDE endpoint | mistral_codestral/codestral-latest |
| OpenCode Zen | OpenCode Zen API | opencode/claude-3-5-sonnet |
| OpenCode Go | OpenCode Go API | opencode_go/claude-3-5-sonnet |
| Vercel AI Gateway | Vercel AI Gateway | vercel/openai/gpt-4o |
| Amazon Bedrock | Amazon Bedrock Mantle | bedrock/anthropic.claude-3-5-sonnet-20241022-v2:0 |
| Hugging Face | Hugging Face Router | huggingface/meta-llama/Llama-3.3-70B-Instruct |
| Cohere | Cohere API | cohere/command-r-plus |
| GitHub Models | GitHub Models endpoint | github_models/gpt-4o |
| Wafer | Wafer AI Pass | wafer/claude-3-5-sonnet |
| Kimi | Moonshot Kimi API | kimi/moonshot-v1-8k |
| Kimi Code | Kimi Code Subscription | kimi_code/kimi-k1.5 |
| MiniMax | MiniMax AI API | minimax/MiniMax-Text-01 |
| Cerebras | Cerebras Inference Engine | cerebras/llama3.1-70b |
| Groq | Groq LPU Inference | groq/llama-3.3-70b-versatile |
| SambaNova | SambaNova Cloud | sambanova/Meta-Llama-3.3-70B-Instruct |
| Fireworks | Fireworks AI | fireworks/accounts/fireworks/models/llama-v3p3-70b-instruct |
| Cloudflare | Workers AI catalog | cloudflare/@cf/meta/llama-3.3-70b-instruct |
| Z.ai | Z.ai GLM Coding Plan | zai/glm-4 |
| Ollama Cloud | Ollama Cloud remote | ollama_cloud/llama3.3 |
| TokenRouter | TokenRouter Unified Gateway | tokenrouter/claude-3-5-sonnet |
| LM Studio | Local LM Studio server | lmstudio/local-model |
| llama.cpp | Local llama.cpp server | llamacpp/local-model |
| Ollama | Local Ollama instance | ollama/llama3.3:latest |
- Anthropic (
anthropic_api/..., keyANTHROPIC_API_KEY): requests are forwarded natively to the Claude Messages API, with no conversion. Thinking signatures, prompt caching,anthropic-betafeatures, exact token usage, and Anthropic's ownweb_search/web_fetchserver tools work just as they do when calling Anthropic directly. Requests the API rejects (thinking type, effort, beta flags) are corrected and retried automatically. - OpenAI (
openai_api/..., keyOPENAI_API_KEY): GPT models over Chat Completions with named reasoning effort. Parameters a specific model rejects (for examplereasoning_effortortemperature) are detected from the API error and dropped automatically, and non-chat models are hidden from model pickers.
Both support a per-provider HTTP proxy (ANTHROPIC_PROXY, OPENAI_PROXY) for regions where the APIs are not directly reachable.
Access the Admin UI anytime at http://127.0.0.1:8090/admin.
Configure API keys, model choices, rate limits, and proxies for all supported AI providers in a responsive, theme-aware Web UI:
Monitor live HTTP requests, status codes, and routing events in real time:
codefa automatically injects proxy environment variables for seamless integration with Anthropic Claude Code:
Run Codex CLI with custom models and local provider routing:
codefa acts as a local bridge between client protocol requests (Anthropic Messages API & OpenAI Responses API) and downstream AI provider endpoints:
To uninstall codefa:
curl -fsSL "https://raw.githubusercontent.com/Foshati/codefa/main/scripts/uninstall.sh" | sh& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Foshati/codefa/main/scripts/uninstall.ps1")))This verifies every CODEFA command is gone.
Distributed under the MIT License. See LICENSE for more information.
Created with β€οΈ by Foshati






