lidge-jun/opencodexPublic

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

AI summary: Universal proxy translating proprietary requests from locked-down AI apps to any local or cloud LLM.

Stars
16.8K
+168 today
Forks
1.3K
Watchers
25
Open issues
83
Open PRs
63
Contributors
~197
Commits
11.6K
Branches
48

TypeScriptMITCreated Jun 18, 2026Last push 2d agoLatest release v2.64.0+667 stars this week+3.8K this month

Quick answers

What is opencodex?
Universal proxy translating proprietary requests from locked-down AI apps to any local or cloud LLM.
What does opencodex do?
OpenCodex acts as a highly capable translation layer and proxy that intercepts requests from heavily locked-down AI applications like Claude Code or Grok Build. It seamlessly routes these intercepted calls to arbitrary local or cloud LLMs of the user's choosing, translating protocols on the fly. The tool exposes a standardized API endpoint that dynamically adapts proprietary provider formats—including streaming, tool calls, and images—into formats compatible with open models. This powerful capability allows developers to effectively bypass hardcoded vendor locks and use their preferred models in otherwise severely restricted tools, while safely pooling accounts.
Who is opencodex for?
Power users, AI developers, and security researchers who demand absolute control over which models back their AI coding applications. It is perfect for those looking to heavily optimize their API costs or utilize local, privacy-preserving models.
How do I get started with opencodex?
npm install -g @bitkyc08/opencodex && ocx start
How popular is opencodex on GitHub?
lidge-jun/opencodex has 16,801 stars and 1,263 forks on GitHub, and gained 667 stars in the last 7 days.
What license does opencodex use?
lidge-jun/opencodex is released under the MIT license.

Star history

since Jul 29, 2026
05K10K15KJul 2026Aug 2026Sep 2026Oct 2026
16.8K stars as of Oct 2, 2026. Measured daily since Jul 29, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
SepOctNovDecJanFebMarAprMayJunJulAugSepMonWedFri2025-09-28: 0 commits2025-09-29: 0 commits2025-09-30: 0 commits2025-10-01: 0 commits2025-10-02: 0 commits2025-10-03: 0 commits2025-10-04: 0 commits2025-10-05: 0 commits2025-10-06: 0 commits2025-10-07: 0 commits2025-10-08: 0 commits2025-10-09: 0 commits2025-10-10: 0 commits2025-10-11: 0 commits2025-10-12: 0 commits2025-10-13: 0 commits2025-10-14: 0 commits2025-10-15: 0 commits2025-10-16: 0 commits2025-10-17: 0 commits2025-10-18: 0 commits2025-10-19: 0 commits2025-10-20: 0 commits2025-10-21: 0 commits2025-10-22: 0 commits2025-10-23: 0 commits2025-10-24: 0 commits2025-10-25: 0 commits2025-10-26: 0 commits2025-10-27: 0 commits2025-10-28: 0 commits2025-10-29: 0 commits2025-10-30: 0 commits2025-10-31: 0 commits2025-11-01: 0 commits2025-11-02: 0 commits2025-11-03: 0 commits2025-11-04: 0 commits2025-11-05: 0 commits2025-11-06: 0 commits2025-11-07: 0 commits2025-11-08: 0 commits2025-11-09: 0 commits2025-11-10: 0 commits2025-11-11: 0 commits2025-11-12: 0 commits2025-11-13: 0 commits2025-11-14: 0 commits2025-11-15: 0 commits2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 0 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 0 commits2025-12-17: 0 commits2025-12-18: 0 commits2025-12-19: 0 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 0 commits2025-12-25: 0 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 0 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 0 commits2026-01-01: 0 commits2026-01-02: 0 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 0 commits2026-01-06: 0 commits2026-01-07: 0 commits2026-01-08: 0 commits2026-01-09: 0 commits2026-01-10: 0 commits2026-01-11: 0 commits2026-01-12: 0 commits2026-01-13: 0 commits2026-01-14: 0 commits2026-01-15: 0 commits2026-01-16: 0 commits2026-01-17: 0 commits2026-01-18: 0 commits2026-01-19: 0 commits2026-01-20: 0 commits2026-01-21: 0 commits2026-01-22: 0 commits2026-01-23: 0 commits2026-01-24: 0 commits2026-01-25: 0 commits2026-01-26: 0 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 0 commits2026-01-31: 0 commits2026-02-01: 0 commits2026-02-02: 0 commits2026-02-03: 0 commits2026-02-04: 0 commits2026-02-05: 0 commits2026-02-06: 0 commits2026-02-07: 0 commits2026-02-08: 0 commits2026-02-09: 0 commits2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 0 commits2026-02-13: 0 commits2026-02-14: 0 commits2026-02-15: 0 commits2026-02-16: 0 commits2026-02-17: 0 commits2026-02-18: 0 commits2026-02-19: 0 commits2026-02-20: 0 commits2026-02-21: 0 commits2026-02-22: 0 commits2026-02-23: 0 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 0 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 0 commits2026-03-02: 0 commits2026-03-03: 0 commits2026-03-04: 0 commits2026-03-05: 0 commits2026-03-06: 0 commits2026-03-07: 0 commits2026-03-08: 0 commits2026-03-09: 0 commits2026-03-10: 0 commits2026-03-11: 0 commits2026-03-12: 0 commits2026-03-13: 0 commits2026-03-14: 0 commits2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 0 commits2026-04-22: 0 commits2026-04-23: 0 commits2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 0 commits2026-04-27: 0 commits2026-04-28: 0 commits2026-04-29: 0 commits2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 0 commits2026-05-04: 0 commits2026-05-05: 0 commits2026-05-06: 0 commits2026-05-07: 0 commits2026-05-08: 0 commits2026-05-09: 0 commits2026-05-10: 0 commits2026-05-11: 0 commits2026-05-12: 0 commits2026-05-13: 0 commits2026-05-14: 0 commits2026-05-15: 0 commits2026-05-16: 0 commits2026-05-17: 0 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 0 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 52 commits2026-06-19: 147 commits2026-06-20: 136 commits2026-06-21: 87 commits2026-06-22: 28 commits2026-06-23: 9 commits2026-06-24: 70 commits2026-06-25: 104 commits2026-06-26: 26 commits2026-06-27: 68 commits2026-06-28: 95 commits2026-06-29: 141 commits2026-06-30: 69 commits2026-07-01: 56 commits2026-07-02: 30 commits2026-07-03: 49 commits2026-07-04: 7 commits2026-07-05: 31 commits2026-07-06: 12 commits2026-07-07: 41 commits2026-07-08: 9 commits2026-07-09: 53 commits2026-07-10: 69 commits2026-07-11: 40 commits2026-07-12: 68 commits2026-07-13: 26 commits2026-07-14: 38 commits2026-07-15: 38 commits2026-07-16: 43 commits2026-07-17: 43 commits2026-07-18: 102 commits2026-07-19: 33 commits2026-07-20: 73 commits2026-07-21: 49 commits2026-07-22: 148 commits2026-07-23: 221 commits2026-07-24: 143 commits2026-07-25: 160 commits2026-07-26: 285 commits2026-07-27: 193 commits2026-07-28: 57 commits2026-07-29: 53 commits2026-07-30: 104 commits2026-07-31: 258 commits2026-08-01: 212 commits2026-08-02: 223 commits2026-08-03: 264 commits2026-08-04: 206 commits2026-08-05: 279 commits2026-08-06: 264 commits2026-08-07: 283 commits2026-08-08: 202 commits2026-08-09: 267 commits2026-08-10: 189 commits2026-08-11: 120 commits2026-08-12: 117 commits2026-08-13: 141 commits2026-08-14: 192 commits2026-08-15: 158 commits2026-08-16: 137 commits2026-08-17: 228 commits2026-08-18: 280 commits2026-08-19: 83 commits2026-08-20: 191 commits2026-08-21: 148 commits2026-08-22: 130 commits2026-08-23: 39 commits2026-08-24: 28 commits2026-08-25: 67 commits2026-08-26: 139 commits2026-08-27: 97 commits2026-08-28: 106 commits2026-08-29: 81 commits2026-08-30: 75 commits2026-08-31: 47 commits2026-09-01: 71 commits2026-09-02: 111 commits2026-09-03: 51 commits2026-09-04: 90 commits2026-09-05: 381 commits2026-09-06: 360 commits2026-09-07: 448 commits2026-09-08: 185 commits2026-09-09: 134 commits2026-09-10: 104 commits2026-09-11: 266 commits2026-09-12: 405 commits2026-09-13: 285 commits2026-09-14: 99 commits2026-09-15: 110 commits2026-09-16: 119 commits2026-09-17: 68 commits2026-09-18: 167 commits2026-09-19: 54 commits2026-09-20: 107 commits2026-09-21: 74 commits2026-09-22: 28 commits2026-09-23: 101 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits
12,375 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    16,801 stars

  • Breakout launch

    16,801 stars in 108 days

  • Very active

    12,375 commits in 52 weeks

  • Community-driven

    ~197 contributors

  • Well documented

    High community health score

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

What opencodex does

OpenCodex acts as a highly capable translation layer and proxy that intercepts requests from heavily locked-down AI applications like Claude Code or Grok Build. It seamlessly routes these intercepted calls to arbitrary local or cloud LLMs of the user's choosing, translating protocols on the fly. The tool exposes a standardized API endpoint that dynamically adapts proprietary provider formats—including streaming, tool calls, and images—into formats compatible with open models. This powerful capability allows developers to effectively bypass hardcoded vendor locks and use their preferred models in otherwise severely restricted tools, while safely pooling accounts.

Power users, AI developers, and security researchers who demand absolute control over which models back their AI coding applications. It is perfect for those looking to heavily optimize their API costs or utilize local, privacy-preserving models.

  • Universal Protocol Translation: Intercepts and translates API calls seamlessly between proprietary apps and 40+ LLM providers.
  • ChatGPT Account Pooling: Manages multiple ChatGPT subscriptions for Codex auth, intelligently routing sessions to avoid rate limits.
  • Virtual Model Combos: Creates virtual model IDs that enable failover or weighted round-robin distribution across multiple backends.
  • Web Dashboard Interface: Provides a comprehensive UI to manage providers, configure routing, and view live request logs and tokens.
  • Web Search Sidecars: Equips non-OpenAI models with internet search and vision capabilities by proxying through a ChatGPT login.
  • Strict Memory Bounding: Employs aggressive garbage collection and bounded memory tracking to ensure the proxy runs lightly.

Where teams use it

Bypassing Vendor Lock-in

Forcing Claude Code or Grok Build to utilize a locally hosted Llama 3 or DeepSeek model instead of their default engines.

API Rate Limit Mitigation

Pooling multiple ChatGPT accounts and automatically routing incoming Codex requests to the account with the most available quota.

Multi-Agent Orchestration

Configuring sub-agents within an IDE that silently failover to backup providers if the primary LLM API goes down.

Traffic Inspection

Using the web dashboard to intercept, monitor, and debug the exact prompts and token counts being sent by closed AI tools.

Getting started: npm install -g @bitkyc08/opencodex && ocx start

README

main branch

opencodex — universal provider proxy for Codex, Claude Code, Claude Desktop and Grok Build

make codex open!

Universal provider proxy for OpenAI Codex, Claude Code, Claude Desktop & Grok Build
Two commands, and every one of them runs any LLM you point it at.

Follow @claudeebum on X Latest desktop release npm version license node version

Download OpenCodex for macOS Download OpenCodex for Windows Download OpenCodex for Linux

Desktop app (beta): macOS universal .dmg · Windows x64 .msi · Linux x86_64 .AppImage / .deb. Prefer the terminal? Install the CLI:

npm install -g @bitkyc08/opencodex
ocx start

Claude Code, running any model

The picker is stock Claude Code. The brain behind it isn't.

Claude Code running a routed model through opencodex — the status bar shows gpt-5.6-luna-medium as the active model

Codex, running any model

Pick a provider and go — same workflow, different brain.

opencodex demo — running a task in the Codex app on a routed non-OpenAI model

Claude Desktop, running any model

Opus answers, then hands the task to a GPT-5.6 Sol subagent.

Claude Desktop answering as Claude Opus 4.8, then dispatching a GPT-5.6 Sol subagent through opencodex

Grok Build, running any model

Sol drives the session and calls a Kimi K3 subagent.

Grok Build running GPT-5.6 Sol through opencodex and calling a Kimi K3 subagent

English · Français · 한국어 · 简体中文 · 繁體中文 · Русский · 日本語 · Türkçe · 📖 Full documentation →

opencodex is a lightweight local proxy that translates Codex's Responses API into whatever your provider speaks — streaming, tool calls, reasoning tokens, images, in both directions. Use Claude, Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama, or any other LLM with Codex, Claude Code, Claude Desktop, and Grok Build. It can also manage a ChatGPT account pool for Codex auth: add accounts, refresh their quotas in the dashboard, and let new sessions auto-route to the lowest-usage healthy account while existing threads stay pinned to the account that started them.

Quick start

Desktop app (beta)

The desktop app is the same proxy and dashboard in a native window, with a tray and bundled ocx. It attaches to a proxy that is already running, or starts its bundled one, and the dashboard stays on the proxy port (http://localhost:10100 unless you configured another). Pick the file for your platform from the latest release:

Platform File Notes
macOS 13+ (Apple Silicon and Intel) OpenCodex-<version>-macos.dmg Universal build, signed with a Developer ID and notarized
Windows (x64) OpenCodex-<version>-windows-x64.msi Not code-signed yet: SmartScreen asks once, choose More info → Run anyway
Linux (x86_64) OpenCodex-<version>-linux-x86_64.AppImage or -linux-amd64.deb The tray needs an AppIndicator-capable desktop

Every file has a .sha256 next to it on the release page. On macOS 14+ the app also ships a WidgetKit extension that shows proxy status, today's usage and provider quotas; the snapshot model it renders lives in app/ (MenuBarCore). To build the app yourself, run bun install && bun run build:gui at the repository root, then in desktop/ run bun install && bun run prepare-sidecar && bun run prepare-widget && bun run build:local on macOS, or bun install && bun run prepare-sidecar && bun run build:local on Windows and Linux (the widget step needs macOS). The Desktop App guide and the macOS Menu Bar App guide cover first launch, and AGENTS_INSTALL.md lists everything written to disk.

Personal install (CLI)

npm install -g @bitkyc08/opencodex   # Node 18+; the Bun runtime is bundled automatically
ocx start                         # proxy + dashboard on localhost:10100

Use ocx service to run it in the background.

Open http://localhost:10100 and configure everything in the web dashboard — add providers (40+ built-ins, or any OpenAI-compatible endpoint), pick models, manage accounts. ocx gui re-opens the dashboard at any time.

ChatGPT account pool

opencodex can also manage a ChatGPT account pool for Codex auth. Add multiple ChatGPT / Codex accounts, refresh their 5h / weekly / 30d quota in the dashboard. Under quota routing, new sessions can use the lowest-usage healthy account; round-robin and fill-first use their own policies. Existing Codex threads normally retain affinity to the account that started them, so long SSH, tmux, or mobile-connected sessions do not jump accounts mid-conversation — but quota re-evaluation, failover, account exclusion, affinity expiry, or 401/403 and 429 recovery can rebind them. Give the accounts a selection order when one of them — usually your Codex Desktop login — should only be reached for once the others are drained.

Sponsors

Sponsors keep opencodex maintained across every upstream protocol change. Interested? See SPONSORS.md.

OrcaRouter Thanks to OrcaRouter for sponsoring this project! OrcaRouter is one OpenAI-compatible AI gateway for production AI: adaptive routing that grades every prompt and sends it to the model that clears your bar, automatic failover, routing rules as code, zero-markup provider pricing with prompt caching, and guardrails, an agent firewall, and request logs on every call across 200+ models. Pick OrcaRouter in the Add provider picker or run ocx provider add orcarouter; orcarouter/auto is the adaptive router.
PackyCode Thanks to PackyCode for sponsoring this project! PackyCode is a stable, high-performance API relay provider, offering relay services for Claude Code, Codex, Gemini, and more. With automatic failover, smart routing, and unlimited concurrency, it turns AI into a real productivity tool. Register via this link and get started! Pick PackyCode in the Add provider picker or run ocx provider add packycode.
PackyCode 是一家稳定、高效的 API 中转服务商,提供 Claude Code、Codex、Gemini 等多种中转服务。具备自动故障转移、智能路由和无限并发等多种功能,让 AI 编程成为真正的生产力工具。点此链接注册,立即开始使用!

Docker Compose

The repository ships a digest-pinned, non-root Compose build. The build generates and verifies the canonical compatibility manifest from the selected Git snapshot. A local clone needs Git and Docker Compose; a remote Git context needs Docker Compose. Neither path needs host Bun or a preparation step. Initialize the data-plane token once through stdin and start the hub:

git clone https://github.com/lidge-jun/opencodex.git
cd opencodex
docker compose build
openssl rand -hex 32 | docker compose run --rm -T hub bun run docker/bootstrap-token.ts
docker compose up -d
curl --fail --silent http://127.0.0.1:10100/healthz
curl --fail --silent http://127.0.0.1:10100/readyz

The default host binding is 127.0.0.1:10100. Remote exposure requires explicit OPENCODEX_BIND_ADDRESS=<LAN-or-Tailscale-IP> docker compose up -d; 0.0.0.0 opts into all host interfaces. Restrict access with a firewall and an authenticated TLS/tailnet frontend. The generated JSON stays untracked. The build context admits only .git/index and .git/HEAD — the inventory git ls-files reads, about 1 MB rather than the full object store — and they are visible only to the build-only manifest stage through a read-only mount, so no COPY includes .git. An existing host-generated manifest is still accepted only after validation; otherwise the build generates one itself. The build rejects stale manifests, missing or mismatched files, extra source files, and symlinks. It checks every recorded SHA-256 against the build context and copied runtime files, including package.json, bun.lock, and the specifically included scripts/model-metadata.source.json.

A remote Git context needs BuildKit to retain Git metadata. This Compose build fragment selects the remote snapshot and passes the required built-in argument:

services:
  hub:
    pull_policy: build
    build:
      context: https://github.com/lidge-jun/opencodex.git#main
      dockerfile: Dockerfile
      target: runtime
      args:
        BUILDKIT_CONTEXT_KEEP_GIT_DIR: "1"

The token and mutable state stay in the ocx-state named volume; no credential is placed in the image, Compose file, environment, or shell arguments. See the Remote Hub deployment guide for provider setup, authenticated acceptance checks, remote management, and rollback.

Install from source (latest dev)

macOS / Linux:

curl -fsSL https://bun.sh/install | bash
git clone -b dev https://github.com/lidge-jun/opencodex.git
cd opencodex && ~/.bun/bin/bun install
~/.bun/bin/bun run build:gui
~/.bun/bin/bun run src/cli/index.ts start

Windows (PowerShell):

irm bun.sh/install.ps1 | iex
git clone -b dev https://github.com/lidge-jun/opencodex.git
cd opencodex; bun install
bun run build:gui
bun run src/cli/index.ts start

Source install runs the latest dev branch. Memory ownership patches, runtime GC improvements, and unreleased fixes are available here before they reach the npm package.

For agents
npm install -g @bitkyc08/opencodex
ocx start     # or `ocx service`
ocx init      # interactive setup: writes ~/.opencodex/config.json and wires Codex

ocx init never starts the proxy; start it first (or after — either order works, but headless commands like ocx provider add and ocx combo set talk to the live proxy and exit nonzero when it is unreachable). ocx status / ocx doctor / ocx health report the running state.

Agents installing or running opencodex: read AGENTS_INSTALL.md. An interactive ocx start may ask once whether to star this repository — that is the user's decision, never an agent's. The CLI suppresses the prompt for agent-driven runs and the API refuses them with 403 agent_consent_required.

Supported platforms

OS Status Service manager Desktop app (beta)
macOS (arm64 / x64) Fully supported launchd Universal .dmg
Linux (x64 / arm64) Fully supported systemd (user unit) x86_64 .AppImage / .deb
Windows (x64) Fully supported Task Scheduler (hidden) / opt-in native service (--native, WinSW) x64 .msi

The CLI install requires Node 18+; the desktop app needs neither Node nor Bun. The Bun runtime is bundled on npm install — no separate Bun install needed, no WSL needed on Windows. If npm blocked the bundled runtime's install scripts, see the installation docs.

Highlights

  • Use any LLM with Codex, Claude Code, Claude Desktop, and Grok Build — 40+ providers out of the box, each keeping its own native UI.

  • Pool ChatGPT accounts — thread affinity, quota-aware auto-switching, cooldown and fail-closed auth handling.

    Provider-policy note: Account pooling is for routing and operational resilience only; it does not guarantee protection from provider rate limits, enforcement, suspension, or other account actions. OpenCodex does not endorse using additional accounts to circumvent provider limits or sharing account credentials between people. You are responsible for complying with each provider's current terms. See the Codex Auth account-pool guidance and OpenAI's current Terms of Use.

  • Combos — one virtual model id with failover or weighted round-robin across providers. See the combo guide.

  • Sub-agents on any model — feature routed models in Codex's sub-agent picker, with v1/v2 surface control and fallback chains. See the sub-agent guide.

  • Log in once, skip the API key — OAuth for xAI, Anthropic, and Kimi; or forward codex login, paste a key, or use ${ENV_VAR} references.
  • Web search & vision sidecars — non-OpenAI models get real web search and image understanding through a sidecar over your ChatGPT login.
  • See what's happening — the dashboard shows providers, OAuth status, model selection, and a live request log with cache token counts.
  • Clean exit, zero residue — ocx stop restores Codex to its original configuration.
  • Bounded memory ownership — every long-lived cache, ring buffer, and protocol-translation store has a finite cap, byte budget, or active reconciliation. No unbounded Map or Set survives a config reload.
Memory ownership details

OpenCodex tracks 36 categories of process-retained state. Each has a documented bound:

  • 12 retained stores (request log, debug rings, image cache, model cache, vision descriptions, cursor blobs, responses continuation, etc.) are byte-accounted and evicted by the app-owned memory budget (default 256 MiB).
  • 4 observed buffers (translator accumulators, image/OAuth/Grok tails) are monitored for in-flight byte pressure without eviction.
  • 24 state-store registrations handle expiry sweeps (60 s interval) and config-generation reconciliation so stale provider/account keys are removed.
  • Path and fingerprint memos (workspace metadata, hardened identities, installation salts, mode-hint capabilities) use insertion-order LRU caps (8–128 entries).
  • Model-cache generation tombstones are deleted after reconciliation; a global generation increment prevents stale in-flight discoveries from repopulating removed providers.
  • Lab event-id deduplication runs under a ledger lock from disk, with no process-level RAM index.

Run GET /api/system/memory (with the admin token) to inspect live retained bytes, eviction counters, and watchdog samples.

Model routing

Target any configured provider and model with the provider/model syntax:

codex -m "anthropic/claude-opus-5" "Explain this stack trace"
codex -m "google/gemini-3-pro" "Write unit tests for auth.ts"
codex -m "ollama/llama3" "Refactor this function"

Omit the provider/ prefix to use the default provider or auto-match by model name pattern. Provider model ids containing / are exposed with inner slashes aliased to -; the raw full-slash form keeps working too. Details: model routing docs.

Providers & adapters

OpenAI (ChatGPT login or API key), Anthropic, Google Gemini, xAI, Kimi, Azure OpenAI, Ollama (local + Cloud), Cursor (experimental), and every OpenAI-compatible endpoint — plus DeepSeek, Groq, OpenRouter, Together, Fireworks, Cerebras, Mistral, Hugging Face, NVIDIA NIM, MiniMax, Qwen Cloud, Qoder Global and CN (official PAT + CLI), SiliconFlow, and more. Full list: ocx init or the provider docs.

CLI

ocx init                       # interactive setup (writes config, wires Codex, offers the shim)
ocx start [--port 10100] [--socks5 [host:port] | --socks5-off]  # SOCKS5 defaults to socks5://127.0.0.1:10808
ocx stop                       # stop + restore native Codex
ocx service [install|repair|restart|start|stop|status|uninstall|remove]  # background service
ocx codex-shim install         # start the proxy on demand whenever `codex` launches
ocx health [--json]            # check immediate proxy liveness
ocx ready [--json] [--wait [--timeout <seconds>]]  # check post-sync readiness
ocx status                     # is the proxy running?
ocx gui                        # open the web dashboard
ocx provider <...>             # manage providers (list/add/edit/test/remove)
ocx account <...>              # manage ChatGPT accounts & API-key pools
ocx combo <...>                # manage failover / round-robin combos
ocx v2 <...>                   # multi-agent v1/v2 surface controls
ocx update [--tag preview]     # update opencodex

A start whose preferred port is busy stops and names the holder instead of moving to another port, so it can never leave a second proxy running beside the first. Free the port, or name a different one with --port. Full reference: CLI docs.

Health and readiness

GET /healthz reports immediate proxy liveness. The unauthenticated GET /readyz endpoint reports post-sync readiness with the sanitized JSON identity {service, version, uptime, pid, port, status}. It returns 200 when status is ready; pending and terminal failed return 503 with Retry-After: 1.

ocx ready [--json] [--wait [--timeout <seconds>]] performs one probe by default. --wait polls for up to 45 seconds by default, but exits immediately when it observes terminal failed; --timeout <seconds> sets a 1–300 second limit, requires --wait, and accepts only positive integers. CLI --json output is {ready, status, pid, port}, where status is ready, pending, failed, or unreachable.

Exit Result
0 Ready
1 Not ready: pending, failed, timeout, or unreachable
64 Invalid arguments

An older proxy without /readyz fails closed as unreachable with exit 1, while ocx health remains compatible.

Autostart: service vs shim

Use the service (ocx service) for an always-on proxy that restarts on crash. Use the shim (ocx codex-shim install) for lightweight, on-demand startup without a background daemon. Remove them with ocx service uninstall / ocx codex-shim uninstall.

Uninstall

ocx uninstall                  # stop, remove service/shim, restore native Codex, clean up state
npm uninstall -g @bitkyc08/opencodex

Remote access

By default opencodex binds to 127.0.0.1 and needs no extra authentication. Binding beyond loopback ("hostname": "0.0.0.0") requires a bearer token — the proxy refuses to start without OPENCODEX_API_AUTH_TOKEN, and every client request must carry it as x-opencodex-api-key. Details: configuration reference.

Documentation

The public docs — install, providers, routing, combos, sub-agents, sidecars, integrations, and the CLI/config/management-API references — are built from docs-site/ and published to opencodex.me.

Maintainer source-of-truth notes live under structure/, contributor setup in CONTRIBUTING.md, and security reporting in SECURITY.md. Report undisclosed vulnerabilities privately through GitHub private vulnerability reporting, not a public issue. That form is the only technical channel — there is no security email. Follow-ups stay in the private report itself; a public issue may carry coordination only, never vulnerability details. Acknowledging a report is not the same as triaging it, and no first-response target is promised.

Development

Source development requires the bun CLI on your PATH. This is separate from the published npm package's bundled Bun runtime, which is used only by installed ocx commands.

git clone https://github.com/lidge-jun/opencodex.git
cd opencodex
bun install
bun run typecheck
bun run test

See Contributing.

Contributor work that landed through a maintainer carry or reimplementation, where the commit does not name its original author, is recorded in CREDITS.md.

Disclaimer

opencodex is an independent, community-maintained project and is not affiliated with or endorsed by OpenAI, Anthropic, or any other provider.

Some providers — notably Anthropic (Claude) — may suspend or restrict accounts that route API traffic through third-party proxies. Use at your own risk (UAYOR). Before connecting a provider, review its Terms of Service to confirm that proxy-based access is permitted. The opencodex maintainers are not responsible for any account actions taken by upstream providers.

License

MIT

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Discussions

all 23

Releases and announcements

257 total
  1. v2.64.0v2.64.0Sep 23, 20261.6K downloads

    Published to npm as `@bitkyc08/[email protected]` with dist-tag `latest`. ## New Features - Grok-4.7 parity with grok-4.6 across xAI, Devin, OpenCode Go, Command Code and Cursor (#5599) - Native Claude fast mode wire with standard-speed downgrade (#5604) - Claude usage-reset ticket badge and spend dialog on Anthropic OAuth rows (#5632) - Load native GPT models from providers.openai.models (#5645) - Default roster to the GPT-6 trio (#5640) - Autosave featured subagent roster edits (#5644) - Word the latest-dev box as the condition the gate enforces (#5471) ## Bug Fixes - Carry luvs01 small fixes (Qoder offsets, malformed UTF-8 cyber stop, reauth unknown_flow, Raycast probe, pool golden, no-renames) (#5600) - Bundle luvs01 client, catalog, prompt and account-pool fixes (L6) (#5609) - Draw one timeline series per model across pool accounts (#5587) - Carry six small luvs01 fixes (crash guard, Kiro estimate, loopback proxy, OAuth, remote hub docs) (#5598) - Bundle L5 continuation, retry and usage boundary work (#5608) - Carry luvs01 service and security hardening stacks (#5610) - Stop MiMo tool calls leaking as text, route Claude over Messages, re-aggregate the catalog (#5611) - Read

  2. v2.64.0-preview.20260923v2.64.0-preview.20260923Sep 23, 2026pre-release5 downloads

    Published to npm as `@bitkyc08/[email protected]` with dist-tag `preview`. ## New Features - Grok-4.7 parity with grok-4.6 across xAI, Devin, OpenCode Go, Command Code and Cursor (#5599) - Native Claude fast mode wire with standard-speed downgrade (#5604) - Claude usage-reset ticket badge and spend dialog on Anthropic OAuth rows (#5632) - Load native GPT models from providers.openai.models (#5645) - Default roster to the GPT-6 trio (#5640) - Autosave featured subagent roster edits (#5644) - Word the latest-dev box as the condition the gate enforces (#5471) ## Bug Fixes - Carry luvs01 small fixes (Qoder offsets, malformed UTF-8 cyber stop, reauth unknown_flow, Raycast probe, pool golden, no-renames) (#5600) - Bundle luvs01 client, catalog, prompt and account-pool fixes (L6) (#5609) - Draw one timeline series per model across pool accounts (#5587) - Carry six small luvs01 fixes (crash guard, Kiro estimate, loopback proxy, OAuth, remote hub docs) (#5598) - Bundle L5 continuation, retry and usage boundary work (#5608) - Carry luvs01 service and security hardening stacks (#5610) - Stop MiMo tool calls leaking as text, route Claude over Messages, re-aggregate the cata

  3. v2.63.0v2.63.0Sep 22, 2026765 downloads

    Published to npm as `@bitkyc08/[email protected]` with dist-tag `latest`. ## New Features - Add Claude Opus 5.5 pricing, 1M context and provider rows (#5577) - Add Claude Opus 5.5 ahead of Kiro, opencode-zen and fast tiers (#5581) - List GPT-6 Sol and Luna, gate GPT-6 Astra Minor (#5580) - Add GPT-6 Sol and Luna ahead of every GPT-5.6 Sol provider except Cursor (#5584) ## Bug Fixes - Support preview MSI and universal macOS packaging (#5526) - Preserve packaged CLI and assemble universal sidecar (#5530) - Correct lipo architecture verification arguments (#5535) - Align checksum and Tauri signature verification (#5544) - Accept Windows binary checksum records (#5550) - Publish the GitHub release only after its verified assets attach (#5555) - Consolidate quarantine and replay allocation fixes (#5507) - Consolidate native control bounds, authorization and Lite catalogs (#5508) - Preserve user edits and harden restore diagnostics (#5506) - Keep credentials and private hosts out of diagnostic and config output (#5573) - Bind tenant hosts to the transmitted key and sanitize Connect trailers (#5574) - Bound search replay ownership, reset replacement answers, and sidecar sends (#5575) -

  4. v2.63.0-preview.20260923v2.63.0-preview.20260923Sep 22, 2026pre-release53 downloads

    Published to npm as `@bitkyc08/[email protected]` with dist-tag `preview`. ## New Features - Add Claude Opus 5.5 pricing, 1M context and provider rows (#5577) - Add Claude Opus 5.5 ahead of Kiro, opencode-zen and fast tiers (#5581) - List GPT-6 Sol and Luna, gate GPT-6 Astra Minor (#5580) - Add GPT-6 Sol and Luna ahead of every GPT-5.6 Sol provider except Cursor (#5584) ## Bug Fixes - Support preview MSI and universal macOS packaging (#5526) - Preserve packaged CLI and assemble universal sidecar (#5530) - Correct lipo architecture verification arguments (#5535) - Align checksum and Tauri signature verification (#5544) - Accept Windows binary checksum records (#5550) - Publish the GitHub release only after its verified assets attach (#5555) - Consolidate quarantine and replay allocation fixes (#5507) - Consolidate native control bounds, authorization and Lite catalogs (#5508) - Preserve user edits and harden restore diagnostics (#5506) - Keep credentials and private hosts out of diagnostic and config output (#5573) - Bind tenant hosts to the transmitted key and sanitize Connect trailers (#5574) - Bound search replay ownership, reset replacement answers, and sidec

  5. v2.62.0-preview.20260923v2.62.0-preview.20260923Sep 22, 2026pre-release11 downloads

    Published to npm as `@bitkyc08/[email protected]` with dist-tag `preview`. ## Bug Fixes - Carry the draft-then-publish release fix to preview (#5557) ## Other Changes - Prepare 2.62.0-preview.20260923 version metadata (#5565) ## Changelog Full Changelog: https://github.com/lidge-jun/opencodex/compare/v2.61.0...v2.62.0-preview.20260923 - #5557 fix(release): carry the draft-then-publish release fix to preview @lidge-jun - #5565 release: prepare 2.62.0-preview.20260923 version metadata @lidge-jun

Code frequency

additions and deletions
+578.6K-578.6KWeek of 2026-06-14: +36,080 linesWeek of 2026-06-14: -6,197 linesWeek of 2026-06-21: +54,173 linesWeek of 2026-06-21: -4,288 linesWeek of 2026-06-28: +72,790 linesWeek of 2026-06-28: -43,673 linesWeek of 2026-07-05: +61,029 linesWeek of 2026-07-05: -23,146 linesWeek of 2026-07-12: +73,560 linesWeek of 2026-07-12: -18,265 linesWeek of 2026-07-19: +280,936 linesWeek of 2026-07-19: -105,382 linesWeek of 2026-07-26: +441,650 linesWeek of 2026-07-26: -212,692 linesWeek of 2026-08-02: +578,564 linesWeek of 2026-08-02: -439,039 linesWeek of 2026-08-09: +212,761 linesWeek of 2026-08-09: -30,054 linesWeek of 2026-08-16: +182,067 linesWeek of 2026-08-16: -79,071 linesWeek of 2026-08-23: +124,475 linesWeek of 2026-08-23: -12,087 linesWeek of 2026-08-30: +17,656 linesWeek of 2026-08-30: -3,216 linesJun 14, 2026Aug 30, 2026
+2.1M lines added, -977.1K removed over the last year.

Commits per week

last 52 weeks
19020Week of 2025-09-28: 0 commitsWeek of 2025-10-05: 0 commitsWeek of 2025-10-12: 0 commitsWeek of 2025-10-19: 0 commitsWeek of 2025-10-26: 0 commitsWeek of 2025-11-02: 0 commitsWeek of 2025-11-09: 0 commitsWeek of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 0 commitsWeek of 2025-12-14: 0 commitsWeek of 2025-12-21: 0 commitsWeek of 2025-12-28: 0 commitsWeek of 2026-01-04: 0 commitsWeek of 2026-01-11: 0 commitsWeek of 2026-01-18: 0 commitsWeek of 2026-01-25: 0 commitsWeek of 2026-02-01: 0 commitsWeek of 2026-02-08: 0 commitsWeek of 2026-02-15: 0 commitsWeek of 2026-02-22: 0 commitsWeek of 2026-03-01: 0 commitsWeek of 2026-03-08: 0 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 0 commitsWeek of 2026-04-26: 0 commitsWeek of 2026-05-03: 0 commitsWeek of 2026-05-10: 0 commitsWeek of 2026-05-17: 0 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 0 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 335 commitsWeek of 2026-06-21: 392 commitsWeek of 2026-06-28: 447 commitsWeek of 2026-07-05: 255 commitsWeek of 2026-07-12: 358 commitsWeek of 2026-07-19: 827 commitsWeek of 2026-07-26: 1162 commitsWeek of 2026-08-02: 1721 commitsWeek of 2026-08-09: 1184 commitsWeek of 2026-08-16: 1197 commitsWeek of 2026-08-23: 557 commitsWeek of 2026-08-30: 826 commitsWeek of 2026-09-06: 1902 commitsWeek of 2026-09-13: 902 commitsWeek of 2026-09-20: 310 commitsSep 28, 2025Sep 20, 2026
12.4K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 106 commitsSun 1:00 — 79 commitsSun 2:00 — 86 commitsSun 3:00 — 87 commitsSun 4:00 — 52 commitsSun 5:00 — 85 commitsSun 6:00 — 35 commitsSun 7:00 — 32 commitsSun 8:00 — 49 commitsSun 9:00 — 48 commitsSun 10:00 — 90 commitsSun 11:00 — 65 commitsSun 12:00 — 64 commitsSun 13:00 — 53 commitsSun 14:00 — 58 commitsSun 15:00 — 54 commitsSun 16:00 — 72 commitsSun 17:00 — 58 commitsSun 18:00 — 64 commitsSun 19:00 — 84 commitsSun 20:00 — 98 commitsSun 21:00 — 88 commitsSun 22:00 — 67 commitsSun 23:00 — 45 commitsMon 0:00 — 83 commitsMon 1:00 — 87 commitsMon 2:00 — 67 commitsMon 3:00 — 60 commitsMon 4:00 — 22 commitsMon 5:00 — 27 commitsMon 6:00 — 26 commitsMon 7:00 — 78 commitsMon 8:00 — 36 commitsMon 9:00 — 34 commitsMon 10:00 — 58 commitsMon 11:00 — 52 commitsMon 12:00 — 76 commitsMon 13:00 — 69 commitsMon 14:00 — 63 commitsMon 15:00 — 48 commitsMon 16:00 — 57 commitsMon 17:00 — 54 commitsMon 18:00 — 81 commitsMon 19:00 — 53 commitsMon 20:00 — 60 commitsMon 21:00 — 65 commitsMon 22:00 — 47 commitsMon 23:00 — 48 commitsTue 0:00 — 46 commitsTue 1:00 — 72 commitsTue 2:00 — 46 commitsTue 3:00 — 23 commitsTue 4:00 — 39 commitsTue 5:00 — 33 commitsTue 6:00 — 25 commitsTue 7:00 — 27 commitsTue 8:00 — 22 commitsTue 9:00 — 57 commitsTue 10:00 — 57 commitsTue 11:00 — 72 commitsTue 12:00 — 70 commitsTue 13:00 — 53 commitsTue 14:00 — 28 commitsTue 15:00 — 32 commitsTue 16:00 — 30 commitsTue 17:00 — 34 commitsTue 18:00 — 40 commitsTue 19:00 — 40 commitsTue 20:00 — 54 commitsTue 21:00 — 46 commitsTue 22:00 — 21 commitsTue 23:00 — 23 commitsWed 0:00 — 33 commitsWed 1:00 — 50 commitsWed 2:00 — 63 commitsWed 3:00 — 49 commitsWed 4:00 — 35 commitsWed 5:00 — 46 commitsWed 6:00 — 33 commitsWed 7:00 — 27 commitsWed 8:00 — 44 commitsWed 9:00 — 59 commitsWed 10:00 — 62 commitsWed 11:00 — 96 commitsWed 12:00 — 58 commitsWed 13:00 — 34 commitsWed 14:00 — 43 commitsWed 15:00 — 42 commitsWed 16:00 — 57 commitsWed 17:00 — 31 commitsWed 18:00 — 56 commitsWed 19:00 — 67 commitsWed 20:00 — 44 commitsWed 21:00 — 52 commitsWed 22:00 — 44 commitsWed 23:00 — 49 commitsThu 0:00 — 68 commitsThu 1:00 — 45 commitsThu 2:00 — 45 commitsThu 3:00 — 28 commitsThu 4:00 — 27 commitsThu 5:00 — 25 commitsThu 6:00 — 34 commitsThu 7:00 — 32 commitsThu 8:00 — 48 commitsThu 9:00 — 86 commitsThu 10:00 — 34 commitsThu 11:00 — 51 commitsThu 12:00 — 25 commitsThu 13:00 — 69 commitsThu 14:00 — 63 commitsThu 15:00 — 49 commitsThu 16:00 — 57 commitsThu 17:00 — 48 commitsThu 18:00 — 57 commitsThu 19:00 — 71 commitsThu 20:00 — 43 commitsThu 21:00 — 64 commitsThu 22:00 — 65 commitsThu 23:00 — 59 commitsFri 0:00 — 79 commitsFri 1:00 — 77 commitsFri 2:00 — 95 commitsFri 3:00 — 69 commitsFri 4:00 — 66 commitsFri 5:00 — 39 commitsFri 6:00 — 37 commitsFri 7:00 — 44 commitsFri 8:00 — 75 commitsFri 9:00 — 57 commitsFri 10:00 — 58 commitsFri 11:00 — 84 commitsFri 12:00 — 98 commitsFri 13:00 — 62 commitsFri 14:00 — 37 commitsFri 15:00 — 46 commitsFri 16:00 — 38 commitsFri 17:00 — 29 commitsFri 18:00 — 46 commitsFri 19:00 — 31 commitsFri 20:00 — 56 commitsFri 21:00 — 105 commitsFri 22:00 — 103 commitsFri 23:00 — 123 commitsSat 0:00 — 85 commitsSat 1:00 — 78 commitsSat 2:00 — 63 commitsSat 3:00 — 50 commitsSat 4:00 — 54 commitsSat 5:00 — 50 commitsSat 6:00 — 46 commitsSat 7:00 — 35 commitsSat 8:00 — 41 commitsSat 9:00 — 35 commitsSat 10:00 — 47 commitsSat 11:00 — 71 commitsSat 12:00 — 102 commitsSat 13:00 — 154 commitsSat 14:00 — 133 commitsSat 15:00 — 49 commitsSat 16:00 — 63 commitsSat 17:00 — 48 commitsSat 18:00 — 47 commitsSat 19:00 — 59 commitsSat 20:00 — 58 commitsSat 21:00 — 72 commitsSat 22:00 — 80 commitsSat 23:00 — 77 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits6,737 (58%)
Community commits4,881 (42%)

11,618 commits in total over the last year.

DateListRankStars gained
Jul 23, 2026daily#14+5
Jul 22, 2026daily#21+4
  • freeCodeCamp/freeCodeCamp

    freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.

    456.7K stars · TypeScript

  • openclaw/openclaw

    The AI that really does things. Any OS. Any Platform. The lobster way. 🦞

    391.3K stars · TypeScript

  • affaan-m/ECC

    The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

    272.8K stars · JavaScript

  • NousResearch/hermes-agent

    The agent that grows with you

    251.2K stars · Python

  • anomalyco/opencode

    The open source coding agent.

    211.7K stars · TypeScript

  • n8n-io/n8n

    Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

    206.7K stars · TypeScript