Skip to content

Repository files navigation

codefa logo

codefa

The High-Performance Local AI Proxy & Control Center for Coding Agents

VersionPythonLicense


🚀 Overview

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.

codefa interactive terminal menu

Interactive borderless CLI selection menu in terminal


✨ Features

  • 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/admin with 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/.env file with zero telemetry leakage.
  • 🏎️ Optimized Performance: Built on Python 3.14, FastAPI, Loguru, and uvloop for minimal resource overhead.

📦 Installation

1. Install Or Update

macOS / Linux

curl -fsSL https://codefa.foshati.com/install.sh | bash

Windows PowerShell

irm https://codefa.foshati.com/install.ps1 | iex

2. Start The Server

codefa server

⚡ Quick Start

1. Launching codefa

Run codefa in your terminal to open the interactive selection menu:

codefa

Use the and arrow keys to highlight your choice, then press Enter:

  • Claude Code: Launches Anthropic Claude Code CLI configured with codefa proxy.
  • Codex CLI: Launches OpenAI Codex CLI configured with codefa proxy.
  • Server Only: Starts the background proxy server and opens the Admin UI on port 8090.

Direct Subcommands

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-init # Initialize ~/.codefa/.env config

## Choose A Provider

ProviderDescriptionExample Model
NVIDIA NIMAccelerated NIM microservicesnvidia_nim/meta/llama-3.3-70b-instruct
OpenRouterUnified multi-provider gatewayopen_router/auto
GeminiGoogle Gemini APIgemini/gemini-2.5-flash
Vertex AIGoogle Cloud Vertex AIvertex/gemini-2.5-flash
DeepSeekDeepSeek V3 & R1 modelsdeepseek/deepseek-chat
MistralMistral AI API endpointsmistral/mistral-large-latest
Mistral CodestralCodestral IDE endpointmistral_codestral/codestral-latest
OpenCode ZenOpenCode Zen APIopencode/claude-3-5-sonnet
OpenCode GoOpenCode Go APIopencode_go/claude-3-5-sonnet
Vercel AI GatewayVercel AI Gatewayvercel/openai/gpt-4o
Amazon BedrockAmazon Bedrock Mantlebedrock/anthropic.claude-3-5-sonnet-20241022-v2:0
Hugging FaceHugging Face Routerhuggingface/meta-llama/Llama-3.3-70B-Instruct
CohereCohere APIcohere/command-r-plus
GitHub ModelsGitHub Models endpointgithub_models/gpt-4o
WaferWafer AI Passwafer/claude-3-5-sonnet
KimiMoonshot Kimi APIkimi/moonshot-v1-8k
Kimi CodeKimi Code Subscriptionkimi_code/kimi-k1.5
MiniMaxMiniMax AI APIminimax/MiniMax-Text-01
CerebrasCerebras Inference Enginecerebras/llama3.1-70b
GroqGroq LPU Inferencegroq/llama-3.3-70b-versatile
SambaNovaSambaNova Cloudsambanova/Meta-Llama-3.3-70B-Instruct
FireworksFireworks AIfireworks/accounts/fireworks/models/llama-v3p3-70b-instruct
CloudflareWorkers AI catalogcloudflare/@cf/meta/llama-3.3-70b-instruct
Z.aiZ.ai GLM Coding Planzai/glm-4
Ollama CloudOllama Cloud remoteollama_cloud/llama3.3
TokenRouterTokenRouter Unified Gatewaytokenrouter/claude-3-5-sonnet
LM StudioLocal LM Studio serverlmstudio/local-model
llama.cppLocal llama.cpp serverllamacpp/local-model
OllamaLocal Ollama instanceollama/llama3.3:latest

🎨 Admin UI & Control Center

Access the Admin UI anytime at http://127.0.0.1:8090/admin.

Providers Configuration

Configure API keys, model choices, rate limits, and proxies for all supported AI providers in a responsive, theme-aware Web UI:

codefa Admin UI Providers page

Live Server Logs

Monitor live HTTP requests, status codes, and routing events in real time:

codefa Admin UI Live Server Logs

🤖 Coding Agents Integration

Claude Code

codefa automatically injects proxy environment variables for seamless integration with Anthropic Claude Code:

Claude Code CLI with codefa proxy

OpenAI Codex CLI

Run Codex CLI with custom models and local provider routing:

Codex CLI with codefa proxy
codefa Model Picker

🏗️ Architecture & Workflow

codefa acts as a local bridge between client protocol requests (Anthropic Messages API & OpenAI Responses API) and downstream AI provider endpoints:

codefa Architecture & Workflow Diagram

🗑️ Uninstallation

To uninstall codefa:

macOS / Linux

curl -fsSL "https://raw.githubusercontent.com/Foshati/codefa/main/scripts/uninstall.sh"| sh

Windows PowerShell

& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Foshati/codefa/main/scripts/uninstall.ps1")))

This verifies every CODEFA command is gone.


📄 License

Distributed under the MIT License. See LICENSE for more information.

Created with ❤️ by Foshati

About

Codefa, The High-Performance Local AI Proxy & Control Center for Coding Agents

Resources

Contributing

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages