Codex DeepSeek — Bridge Automático
veritasian/codex-deepseek
One-script bridge: Codex CLI → DeepSeek com zero configuração manual
Ver no GitHubScript único que conecta Codex CLI ao DeepSeek, automatizando instalação de dependências, configuração do Moon Bridge, geração de proxy local e sincronização de credenciais. Elimina 20+ minutos de setup manual com YAML e Go.
Instalação
npx convez-ai veritasian/codex-deepseek1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Usar Codex CLI com modelos DeepSeek mais baratos
- Automatizar setup de proxy local para protocolos de API incompatíveis
- Integração terminal entre ferramentas CLI legadas e novos provedores
Veredito

Solução pragmática para economia de custos em fluxo CLI já consolidado. Script bem estruturado reduz atrito operacional, mas exige conta ativa em DeepSeek e compreensão básica de proxy/APIs.
README
A tradução para o português deste README ainda está na fila.
Codex desktop + DeepSeek — One-Script Bridge
You want Codex CLI but don't want to pay OpenAI. DeepSeek is cheaper and faster — but the two speak completely different protocols. This repo gives you a single script that builds the bridge, writes the config, and launches everything. CLI power, DeepSeek prices, zero manual setup.
Pain Point
You want to use Codex CLI — it's fast, terminal-native, and free with OAuth. But it only connects to OpenAI models. DeepSeek V4 offers comparable quality at a fraction of OpenAI's cost. Problem: Codex speaks Responses API, DeepSeek speaks Anthropic Messages API. They literally can't communicate. You get 404 Not Found.
The official DeepSeek guide walks you through the fix manually — install Go, clone Moon Bridge, hand-edit config.yml, run CLI flags, manage a background proxy. Works, but takes 20+ minutes of YAML and frustration.
Solution
One script, end to end. Clone this repo, run setup.sh, and you have a working Codex→DeepSeek connection. The script handles every step: it checks prerequisites (Go, Node, Codex CLI), clones Moon Bridge, writes the config with your API key, builds the binary, generates your ~/.codex/config.toml, and starts the proxy in the background.
Quickstart
git clone https://github.com/veritasian/codex-deepseek.git
bash codex-deepseek/scripts/setup.sh # prompts for your DeepSeek API key
bash codex-deepseek/scripts/start.sh # launches moon-bridge + codex
Get your API key: platform.deepseek.com/api_keys
How It Works
Codex CLI ──Responses API──→ Moon Bridge ──Anthropic API──→ DeepSeek
localhost:38440 (local proxy) api.deepseek.com
| Step | What the script does |
|---|---|
| 1. Prerequisites | Checks Go, Node, Codex CLI. Installs missing ones via Homebrew. |
| 2. Moon Bridge | Clones from GitHub (or git pull if already cloned) |
| 3. Config | Writes ~/moon-bridge/config.yml with your API key (chmod 600) |
| 4. Build | go build the moonbridge binary |
| 5. Codex | Backs up existing ~/.codex/config.toml, generates a new one pointing to the bridge |
| 6. Launch | Starts moonbridge in background on port 38440, ready for Codex |
Daily Use
One-click auto:
bash codex-deepseek/scripts/start.sh
Manual:
~/moon-bridge/moonbridge --config ~/moon-bridge/config.yml &
codex
Login item (starts on boot):
System Settings → General → Login Items → + → ~/moon-bridge/moonbridge — add argument: --config ~/moon-bridge/config.yml
Bonus: Claude Code Skill
This repo includes a SKILL.md. Install it and Claude handles the entire setup with natural language:
cp -r codex-deepseek ~/.claude/skills/
> connect Codex to my DeepSeek API key
Files
| File | Purpose |
|---|---|
scripts/setup.sh | Full setup: clone → config → build → launch |
scripts/start.sh | Quick launcher: starts moon-bridge if needed, opens Codex |
SKILL.md | Claude Code skill for automatic triggering |
Inspiration
This project is based on the official DeepSeek + Codex integration guide. That guide walks through the full manual setup — install Go, clone Moon Bridge, write config.yml by hand, generate Codex config via CLI, manage the proxy process. This repo wraps the same steps into one script.
Troubleshooting
| Symptom | Fix |
|---|---|
connection refused | Moon Bridge isn't running — start it first |
401 Unauthorized | Wrong API key — check ~/moon-bridge/config.yml |
| Port 38440 already in use | lsof -ti:38440 | xargs kill |
codex: command not found | npm install -g @openai/codex |