One script. One bridge. Codex CLI talks to DeepSeek. No YAML, no Go, no pain.
The official way to connect Codex and DeepSeek is this guide from DeepSeek. It works, but it's long: install Go, clone Moon Bridge, hand-write a config.yml, generate Codex config with CLI flags, manage the proxy process yourself. For someone who just wants things to work, that's a lot.
This repo turns all of that into one script. Same result, no engineering degree required. DIY, but fast.
Codex CLI v0.134+ only speaks the OpenAI Responses API (/v1/responses).
DeepSeek only speaks Anthropic Messages API.
They can't talk. You get 404 Not Found.
A script that installs and runs Moon Bridge as a local proxy. It translates Responses ↔ Anthropic so Codex and DeepSeek understand each other. One command, everything automated.
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 + codexGet your API key: platform.deepseek.com/api_keys
Auto (one click) — start.sh launches moon-bridge if it's not running, then opens Codex:
bash codex-deepseek/scripts/start.shManual — start moon-bridge yourself, then run Codex:
~/moon-bridge/moonbridge --config ~/moon-bridge/config.yml &
codexAlways-on — add moon-bridge to macOS Login Items so it starts when you log in:
- System Settings → General → Login Items & Extensions
- Click + → navigate to
~/moon-bridge/moonbridge - Add argument:
--config ~/moon-bridge/config.yml
This repo is also a Claude Code skill. Install once, then just ask Claude to set everything up:
cp -r codex-deepseek ~/.claude/skills/Then in Claude Code:
> connect Codex to my DeepSeek API key
Claude will run the setup, start the bridge, and configure Codex — all in one go.
Codex CLI ──Responses──→ Moon Bridge ──Anthropic──→ DeepSeek
localhost:38440 api.deepseek.com
| File | Does |
|---|---|
scripts/setup.sh |
Installs everything (Go, moon-bridge, config, build) |
scripts/start.sh |
Launches moon-bridge + Codex |
SKILL.md |
Claude Code skill definition |
| Problem | Fix |
|---|---|
connection refused |
Moon Bridge isn't running |
401 |
Bad API key — check ~/moon-bridge/config.yml |
| Port 38440 busy | lsof -ti:38440 | xargs kill |