by lidge-jun
Universal provider proxy for OpenAI Codex — use any LLM with Codex CLI, App, and SDK
# Add to your Claude Code skills
git clone https://github.com/lidge-jun/opencodexGuides for using cli tools skills like opencodex.
opencodex is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by lidge-jun. Universal provider proxy for OpenAI Codex — use any LLM with Codex CLI, App, and SDK. It has 207 GitHub stars.
opencodex's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/lidge-jun/opencodex" and add it to your Claude Code skills directory (see the Installation section above).
opencodex is primarily written in TypeScript. It is open-source under lidge-jun on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh opencodex against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Use Claude, Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama, or any other LLM with Codex — without waiting for OpenAI to add support.
opencodex is a lightweight local proxy that translates Codex's Responses API into whatever your provider speaks. Streaming, tool calls, reasoning tokens, images — everything works, in both directions.
It can also manage a ChatGPT account pool for Codex auth. Add multiple ChatGPT / Codex accounts, refresh their 5h / weekly / 30d quota in the dashboard, and let new sessions auto-route to the lowest-usage healthy account. Existing Codex threads stay pinned to the account that started them, so long SSH, tmux, or mobile-connected sessions do not jump accounts mid-conversation.
Codex CLI / App / SDK ──/v1/responses──▶ opencodex ──▶ Any provider
│
Anthropic · Google · xAI · Kimi · Ollama Cloud · Groq
OpenRouter · Azure · DeepSeek · GLM · …and OpenAI itself
flowchart LR
codex[Codex session<br/>CLI, App, SSH, mobile] --> proxy[opencodex]
proxy --> existing{Existing thread?}
existing -->|yes| pinned[Keep the same<br/>ChatGPT account]
existing -->|new session| quota[Refresh quota<br/>5h, weekly, 30d]
quota --> pick[Pick lowest-usage<br/>healthy account]
pick --> upstream[ChatGPT / Codex backend]
pinned --> upstream
upstream --> outcomes[Quota / auth outcome]
outcomes -->|429| cooldown[Cooldown + failover]
outcomes -->|401 / 403| reauth[Mark reauth needed]
cooldown --> quota
| OS | Status | Service manager |
|---|---|---|
| macOS (arm64 / x64) | Fully supported | launchd |
| Linux (x64 / arm64) | Fully supported | systemd (user unit) |
| Windows (x64) | Fully supported | Task Scheduler |
Requires Node 18+. The Bun runtime is bundled automatically on npm install — no separate Bun install needed. All three platforms work natively (no WSL needed on Windows).
# Install (bundles the Bun runtime automatically — only Node 18+ required)
npm install -g @bitkyc08/opencodex
# Interactive setup (writes config, injects into Codex, and offers autostart shim install)
ocx init
# Start the proxy
ocx start
# If you skipped it during init, install the on-demand autostart shim later
ocx codex-shim install
# Use Codex normally — it now routes through opencodex
codex "Write a hello world in Rust"
opencodex bundles the Bun runtime as a dependency and runs it via a Node launcher, so you do not need to install Bun yourself. If you see a "bundled Bun runtime is missing" error, the install skipped lifecycle scripts or optional dependencies. Reinstall without those flags:
npm install -g @bitkyc08/opencodex # no --ignore-scripts, no --omit=optional
The fastest way to add a provider is through the web dashboard:
ocx gui
This opens the dashboard at http://localhost:10100. From there:
/v1/models endpointYour new provider is ready to use immediately. No restart needed.
You can also add providers through ocx init (interactive CLI) or by editing ~/.opencodex/config.json directly.
Target any configured provider and model using the provider/model syntax:
# Use Claude Opus through Anthropic
codex -m "anthropic/claude-opus-4-8" "Explain this stack trace"
# Use Gemini through Google
codex -m "google/gemini-3-pro" "Write unit tests for auth.ts"
# Use GLM through Ollama Cloud
codex -m "ollama-cloud/glm-5.2" "Write a SQL migration"
# Use a local model through Ollama
codex -m "ollama/llama3" "Refactor this function"
When you omit the provider/ prefix, opencodex routes to the default provider — or auto-matches based on the model name pattern (e.g., claude-* routes to Anthropic, gpt-* routes to OpenAI).
Routed models also appear in the Codex App model picker with per-model reasoning effort controls:
Open Codex Auth in the dashboard to add pool accounts and choose which account should handle the next Codex session. opencodex keeps two separate behaviors:
codex login, paste an API key, or use ${ENV_VAR} references — your call.gpt-5.4-mini sidecar over your ChatGPT login.ocx stop (or the dashboard's Stop button) shuts down the proxy, stops the background service if one is installed, and restores Codex to its original configuration. Plain codex works exactly as it did before — no leftover config, no orphaned processes.| Provider | Adapter | Auth |
|---|---|---|
| OpenAI (ChatGPT login) | openai-responses |
forward (no key) |
| OpenAI (API key) | openai-responses |
key |
| Umans AI Coding Plan | anthropic |
key |
| Anthropic Claude | anthropic |
oauth / key |
| xAI Grok | openai-chat |
oauth / key |
| Kimi (Moonshot) | openai-chat |
oauth / key |
| Google Gemini | google |
key |
| Azure OpenAI | azure-openai |
key |
| Ollama Cloud + 17-provider catalog | openai-chat |
key |
| Ollama / vLLM / LM Studio (local) | openai-chat |
key (usually blank) |
| Any OpenAI-compatible endpoint | openai-chat |
key |
Plus DeepSeek, Groq, OpenRouter, Together, Fireworks, Cerebras, Mistral, Hugging Face, NVIDIA NIM, MiniMax, Qwen Portal, and more. See the full list with ocx init or in the provider docs.
ocx init # interactive setup
ocx start [--port 10100] # start the proxy; falls back to a free port if busy
ocx stop # stop + restore native Codex
ocx restore # restore without stopping (alias: ocx eject)
ocx uninstall # remove service/shim/config and restore native Codex
ocx ensure # start if needed + refresh Codex config/cache
ocx sync # refresh models + re-inject into Codex
ocx codex-shim install # run `ocx ensure` whenever `codex` is launched
ocx status # is t