默认监听 localhost:10100,改端口需自行配置;接入 Codex 需先在仪表盘 Connect 页打开开关或先运行 ocx init;切换 Claude Desktop 后需完全退出并重开应用才生效。
opencodex
lidge-junMIT活跃维护把任意 LLM(Claude、Gemini、Grok、DeepSeek、Ollama 等)统一代理给 Codex CLI、App、SDK 和 Claude Code 使用,省去为每个模型单独适配的麻烦。
Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code
npm install -g @bitkyc08/opencodex
ocx startREADME 未说明显存或 GPU 要求;作为本地代理运行,需 Node 18+,Bun 运行时随包自动捆绑。
本地网关把 Codex、Claude Code 等工具接到任意模型提供商
把任意 LLM(Claude、Gemini、Grok、DeepSeek、Ollama 等)统一代理给 Codex CLI、App、SDK 和 Claude Code 使用,省去为每个模型单独适配的麻烦。
核心能力
- 接受 Responses、Chat Completions、Anthropic Messages 三种 API 并翻译成上游协议
- 转发流式输出、工具调用、推理与图片,前提是客户端和模型支持
- 内置 40+ 提供商,也可接入任意 OpenAI 兼容端点
- 用 Web 仪表盘管理提供商、模型与账号
- 提供 ocx claude、ocx init 等命令一键接管现有 CLI 工具
容易踩的坑
- v2.99.0最新正式版2026-11-08 · 2026-11-08 05:26 UTC
Published to npm as
@bitkyc08/[email protected]with dist-taglatest.New Features
- Count streamed tool argument bytes incrementally (#8140)
- Add opt-in stored Codex turn reply reads (#8053)
- Measure fragmented NDJSON incrementally (#8277)
Bug Fixes
- Ship per-model effort ladders and fold native Chat ultra (#8259)
- Bound Windows overflow slices and preserve child cleanup (#8229)
- Hedge leftover-pin refusal and count in-flight readiness reads (#8261)
- Bound tool-call validation and document request limits (#8147)
- Preserve mandatory tool choices through routing and recovery (#8146)
- Preserve late Devin signatures for DSH clients (#8230)
- Batch affinity writes and confirm operator resets (#8020)
- Enforce root send ceilings at physical admission (#8149)
- Fix dashboard switch and combo layout regressions (#8269)
- Fix clipped Models rows and dashboard control layout (#8272)
- Accept unambiguous selected tool aliases (#8235)
- Sanitize Chat fields and normalize native thinking content (#8278)
- Fix omitted effort on dual-control Chat wires (#8279)
- Honor max omission before native ultra clamping (#8284)
- Align macOS traffic lights on Sequoia and keep chips rounded in WKWebView (#8285)
- Fix launcher signal race and chat-completions network flake (#8289)
- Keep masked account label validation linear (#8316)
Chores
- Stabilize Windows fixture setup and source checks (#8176)
- Isolate Codex CLI update fixture process scans (#8283)
- Include uninstall refusal reason in regression output (#8242)
Other Changes
- Open dev at 2.99.0 before releasing 2.98.0 (#8263)
- Clarify Desktop startup safety and mask OAuth account labels (#8271)
- Show app breakdowns and client chips (#8282)
- Promote frozen tip de411020ed to main as 2.99.0 (#8322)
Changelog
Full Changelog: https://github.com/lidge-jun/opencodex/compare/v2.98.0...v2.99.0
- #8020 fix(anthropic): batch affinity writes and confirm operator resets @luvs01
- #8053 feat(messaging): add opt-in stored Codex turn reply reads @HojooonKim
- #8140 perf(kiro): count streamed tool argument bytes incrementally @0disoft
- #8146 fix(responses): preserve mandatory tool choices through routing and recovery @luvs01
- #8147 fix(ollama): bound tool-call validation and document request limits @luvs01
- #8149 fix(workflows): enforce root send ceilings at physical admission @luvs01
- #8176 test: stabilize Windows fixture setup and source checks @luvs01
- #8229 test: bound Windows overflow slices and preserve child cleanup @lidge-jun
- #8230 fix(responses): preserve late Devin signatures for DSH clients @salihozkara
- #8235 fix(qoder): accept unambiguous selected tool aliases @juzijia
- #8242 test(config): include uninstall refusal reason in regression output @luvs01
- #8259 fix(mistral): ship per-model effort ladders and fold native Chat ultra @lidge-jun
- #8261 fix(link): hedge leftover-pin refusal and count in-flight readiness reads @lidge-jun
- #8263 chore(release): open dev at 2.99.0 before releasing 2.98.0 @github-actions[bot]
- #8269 Fix dashboard switch and combo layout regressions @lidge-jun
- #8271 Clarify Desktop startup safety and mask OAuth account labels @lidge-jun
- #8272 Fix clipped Models rows and dashboard control layout @lidge-jun
- #8277 perf(command-code): measure fragmented NDJSON incrementally @0disoft
- #8278 fix(mistral): sanitize Chat fields and normalize native thinking content @lidge-jun
- #8279 Fix omitted effort on dual-control Chat wires @lidge-jun
- #8282 Show app breakdowns and client chips @lidge-jun
- #8283 test: isolate Codex CLI update fixture process scans @lidge-jun
- #8284 Honor max omission before native ultra clamping @lidge-jun
- #8285 fix(desktop,gui): align macOS traffic lights on Sequoia and keep chips rounded in WKWebView @lidge-jun
- #8289 Fix launcher signal race and chat-completions network flake @lidge-jun
- #8316 fix(privacy): keep masked account label validation linear @lidge-jun
- #8322 release: promote frozen tip
- v2.99.0-preview.20261108pre-release2026-11-08 · 2026-11-08 05:03 UTC
查看更新说明
Published to npm as
@bitkyc08/[email protected]with dist-tagpreview.New Features
- Count streamed tool argument bytes incrementally (#8140)
- Add opt-in stored Codex turn reply reads (#8053)
- Measure fragmented NDJSON incrementally (#8277)
Bug Fixes
- Ship per-model effort ladders and fold native Chat ultra (#8259)
- Bound Windows overflow slices and preserve child cleanup (#8229)
- Hedge leftover-pin refusal and count in-flight readiness reads (#8261)
- Bound tool-call validation and document request limits (#8147)
- Preserve mandatory tool choices through routing and recovery (#8146)
- Preserve late Devin signatures for DSH clients (#8230)
- Batch affinity writes and confirm operator resets (#8020)
- Enforce root send ceilings at physical admission (#8149)
- Fix dashboard switch and combo layout regressions (#8269)
- Fix clipped Models rows and dashboard control layout (#8272)
- Accept unambiguous selected tool aliases (#8235)
- Sanitize Chat fields and normalize native thinking content (#8278)
- Fix omitted effort on dual-control Chat wires (#8279)
- Honor max omission before native ultra clamping (#8284)
- Align macOS traffic lights on Sequoia and keep chips rounded in WKWebView (#8285)
- Fix launcher signal race and chat-completions network flake (#8289)
- Keep masked account label validation linear (#8316)
Chores
- Stabilize Windows fixture setup and source checks (#8176)
- Isolate Codex CLI update fixture process scans (#8283)
- Include uninstall refusal reason in regression output (#8242)
Other Changes
- Open dev at 2.99.0 before releasing 2.98.0 (#8263)
- Clarify Desktop startup safety and mask OAuth account labels (#8271)
- Show app breakdowns and client chips (#8282)
- Promote frozen tip de411020ed to preview as 2.99.0-preview.20261108 (#8321)
Changelog
Full Changelog: https://github.com/lidge-jun/opencodex/compare/v2.98.0...v2.99.0-preview.20261108
- #8020 fix(anthropic): batch affinity writes and confirm operator resets @luvs01
- #8053 feat(messaging): add opt-in stored Codex turn reply reads @HojooonKim
- #8140 perf(kiro): count streamed tool argument bytes incrementally @0disoft
- #8146 fix(responses): preserve mandatory tool choices through routing and recovery @luvs01
- #8147 fix(ollama): bound tool-call validation and document request limits @luvs01
- #8149 fix(workflows): enforce root send ceilings at physical admission @luvs01
- #8176 test: stabilize Windows fixture setup and source checks @luvs01
- #8229 test: bound Windows overflow slices and preserve child cleanup @lidge-jun
- #8230 fix(responses): preserve late Devin signatures for DSH clients @salihozkara
- #8235 fix(qoder): accept unambiguous selected tool aliases @juzijia
- #8242 test(config): include uninstall refusal reason in regression output @luvs01
- #8259 fix(mistral): ship per-model effort ladders and fold native Chat ultra @lidge-jun
- #8261 fix(link): hedge leftover-pin refusal and count in-flight readiness reads @lidge-jun
- #8263 chore(release): open dev at 2.99.0 before releasing 2.98.0 @github-actions[bot]
- #8269 Fix dashboard switch and combo layout regressions @lidge-jun
- #8271 Clarify Desktop startup safety and mask OAuth account labels @lidge-jun
- #8272 Fix clipped Models rows and dashboard control layout @lidge-jun
- #8277 perf(command-code): measure fragmented NDJSON incrementally @0disoft
- #8278 fix(mistral): sanitize Chat fields and normalize native thinking content @lidge-jun
- #8279 Fix omitted effort on dual-control Chat wires @lidge-jun
- #8282 Show app breakdowns and client chips @lidge-jun
- #8283 test: isolate Codex CLI update fixture process scans @lidge-jun
- #8284 Honor max omission before native ultra clamping @lidge-jun
- #8285 fix(desktop,gui): align macOS traffic lights on Sequoia and keep chips rounded in WKWebView @lidge-jun
- #8289 Fix launcher signal race and chat-completions network flake @lidge-jun
- #8316 fix(privacy): keep masked account label validation
- v2.98.02026-11-07 · 2026-11-07 04:05 UTC
查看更新说明
Published to npm as
@bitkyc08/[email protected]with dist-taglatest.New Features
- List Perch as a reference-only directory entry (#7311)
- Design system v2 — redesigned dashboard, navigation and desktop app (#8105)
Bug Fixes
- Pin resolved homes in service definitions (#8111)
- 30 s background discovery, still-discovering answer for slow dashboard tests (#8125)
- Emulate structured output instead of refusing it (#8071)
- Serialize uninstall manifest updates under one cross-process lock (#8121)
- Tighten Kiro diagnostics and service log rotation (#8138)
- Remove owned paths relative to the config root (#8141)
- Validate legacy shim restore paths before restoring (#8143)
- Normalize Messages error responses and Anthropic headers (#8153)
- Normalize streamed Messages error events (#8164)
- Normalize direct context overflow errors with parity coverage (#8148)
- Lower ocx envelopes on native v1 compact (#8042) (#8151)
- Preserve pre-output hold across safe WS heartbeats (#8188)
- Pass completion summaries that follow tool results (#8154)
- Keep replayed images within each model's per-request cap (#8174)
- Flatten root tool schemas for Claude chat gateways (#8163)
- Make service definition probes portable (#8201)
- Join repeated tool outputs for one call (#8199)
- Release disposed SOCKS5 readers and timeout closures (#8203)
- Avoid retries for definite context overflow (#8211)
- Include Argon level with thought summaries (#8208)
- Preserve translated system cache boundary (#8212)
- Strip Lite marker from classic search (#8202)
- Report incomplete Anthropic search results (#8210)
- Separate consumer and upstream inactivity (#8213)
- Restore Windows fixture coverage (#8214)
- Preserve adapter body stall status (#8200)
- Isolate Codex profile cases on Windows (#8217)
- Isolate Windows uninstall privilege scenarios (#8218)
- Pair Windows job store route fixture (#8225)
- Use native homes in systemd probe fixtures (#8226)
- List router-known IDs with effective metadata (#8215)
- Prioritize critical credits in quota summary (#8223)
- Validate configuration before stopping services (#8227)
- Rebalance Ubuntu tests across five shards (#8233)
- Preserve default bind identity for guarded stops (#8221)
- Keep Desktop CLI selected when its executable is missing (#8240)
- Report skipped connected children as partial (#8248)
- Defer supervised client restart after apply (#8250)
- Report stale Child connection readiness (#8249)
- Preserve orphan token files for confirmed recovery (#8253)
- Address #8249/#8253 review follow-ups (#8256)
- Use native homes in launchd fixture (#8245)
- Pair Windows CLI update plan session (#8228)
Documentation
- Record #8176 credit lost in #8214's squash (#8219)
Chores
- Fix macOS catalog async fixtures (#8136)
- Security(desktop): bump updater to 2.14.1 and align Rust 1.90 (#8039)
- Honor ownership test platform exclusions on Bun (#8239)
- Retry busy first ownership registrations (#8238)
- Classify read-only config preflight (#8241)
- Give the sync-stop fixture the native CODEX_HOME spelling on Windows (#8265)
- Quarantine hosted Windows CI failures for 2.98.0 (#8264)
Other Changes
- Open dev at 2.98.0 before releasing 2.97.0 (#8135)
- Promote frozen tip 47f9e2dc42 to main as 2.98.0 (#8267)
Changelog
Full Changelog: https://github.com/lidge-jun/opencodex/compare/v2.97.0...v2.98.0
- #7311 feat(providers): list Perch as a reference-only directory entry @scy7796
- #8039 security(desktop): bump updater to 2.14.1 and align Rust 1.90 @luvs01
- #8071 fix(kiro): emulate structured output instead of refusing it @mushikingh
- #8105 feat(gui): design system v2 — redesigned dashboard, navigation and desktop app @Ingwannu
- #8111 fix(service): pin resolved homes in service definitions @omar391
- #8121 Serialize uninstall manifest updates under one cross-process lock @lidge-jun
- #8125 fix(qoder): 30 s background discovery, still-discovering answer for slow dashboard tests @lidge-jun
- #8135 ch
- v2.98.0-preview.20261107pre-release2026-11-07 · 2026-11-07 03:34 UTC
查看更新说明
Published to npm as
@bitkyc08/[email protected]with dist-tagpreview.New Features
- Preserve structural tool turns (#7561)
- Add Runcrate to the free directory (#7726)
- Avoid rescanning fragmented SSE records (#7766)
- Refresh connected Hermes configs after catalog changes (#7704) (#7719)
- Add confirmed POSIX CLI updates and durable job status (#7586)
- Label routed /v1/models rows from modelDisplayNames (#7817)
- Add
ocx codexlauncher mirroringocx claude(#7346) - Windows Remote Link Children and Child credential/connection attestation (#7832)
- Restore LazyCodex role models from a change history (#7693)
- Add proof-bound Windows CLI update planning (#7596)
- Use Bun 1.4.4 native type checking (#7632)
- Add T3 Code as an export and integration client (#7529)
- Revocable server-side remembered device sessions (#7593)
- Add protected Windows CLI update job storage (#7626)
- Apply Windows CLI updates with owned transactions (#7648)
- Add opt-in alias naming for Hermes and Command Code exports (#7867)
- Add per-source interception toggles (#7760)
- Show distinct first-response states on the provider overview (#7939)
- Skip Unicode folding for plain ASCII metadata (#7886)
- Per-client model visibility for the Desktop list (#7769)
- Add IAM Identity Center login to dashboard (#7690)
- Opt in to omitting disabled native models (#7889)
- Link completion probe failures to recovery, re-verification, and disconnect scope (#7947)
- Scan SSE inspection fragments incrementally (#7913)
- Test all models of a provider and disable the failures (#7742)
- Complete gracefully on max_output_tokens (#7770)
- Let the omo integration write the Responses dialect (#7890)
- Add keyless CC-Switch provider import with preview, apply and restore (#7935)
- Count snapshot text bytes incrementally (#7957)
- Move integrity scans off the serving thread (#7972)
- Tier role auto-assign candidates by measured capability in the role's task domain (#7624)
- Add opt-in MCP tools for stored Codex queues (#7999)
- Count fragmented NDJSON bytes incrementally (#8015)
- Home ocx sync fans out to linked Children (sync.home-fanout/1) (#8100)
- Orchestrated ocx update plan/apply contract (update.orchestrated/1) (#8103)
- Batch consumed stream chunk removal (#8049)
- List Perch as a reference-only directory entry (#7311)
- Design system v2 — redesigned dashboard, navigation and desktop app (#8105)
Bug Fixes
- Report a timed-out first-party rollback as incomplete (#7781)
- Publish the subscription lane's widest context rung for Grok 4.5-4.7 (#7701)
- Expire idle picker uploads while preserving backpressure (#7784)
- Preserve native Mistral thinking on replay (#7814)
- Preserve bounded ACL failure diagnostics (#7773)
- Preserve append-only client tool discovery on opted-in Responses routes (#7453)
- Frame retained requests before portable compaction checkpoints (#7822)
- Scope cooldown reprobes to reserving request (#7764)
- Honor Retry-After floor and recognize the Cloud Code Assist ToS account ban (#7819)
- Guard the MiniMax stale-roster refresh to official destinations (#7829)
- Forward Qoder CN images through shared coding-agent projection (#7536)
- Verify live Desktop recovery before CLI cold start (#7797)
- Harden long compaction recovery paths with the extended spelling (#7823)
- Expose native Fast selectors with 1M context (#7748)
- Align Claude Code 2.1.280 OAuth profile and isolate session/device IDs (#7838)
- Isolate pooled installation IDs, scrub turn-state on account switch, and align JSON token refresh (#7840)
- Isolate Antigravity session/replay and Cursor H2 pool/JWT sub scope (#7842)
- Harden multi-account pool cooldowns, affinity eviction, and deactivated exclusion (#7844)
- Relay OpenAI tool calls instead of ending on the first sentence (#7599)
- Explain elevated scheduler uninstall failures on Windows (#7825)
- Preserve replay refusal attribution on WebSocket ingress (#7830)
- Deliver upstream raw reasoning to Chat cl
- v2.97.02026-11-03 · 2026-11-03 12:22 UTC
查看更新说明
Published to npm as
@bitkyc08/[email protected]with dist-taglatest.New Features
- Home ocx sync fans out to linked Children (sync.home-fanout/1) (#8100)
- Orchestrated ocx update plan/apply contract (update.orchestrated/1) (#8103)
- Batch consumed stream chunk removal (#8049)
Bug Fixes
- Show both 5-hour and weekly meters for Max and Team accounts (#8088)
- Place round-robin conversations on accounts with quota headroom (#8092)
- Honest affinity labels and opt-in request-owned conversation affinity (#8080) (#8096)
- Bind header-less Messages bridge turns to one Codex pool account (carry #8028) (#8094)
- Keep Codex pool session pins across proxy restarts (#8098)
- Refuse links at SQLite store paths on Windows and rebalance CI shards for the new affinity tests (#8102)
- Keep Windows containment refusal at 126; correct the #8100 fan-out test fixture (#8106)
- Make the Windows batch shards green after #8103 (#8109)
- Reject inherited writes at Windows creation parents (#8011)
- Preserve quota-code provenance across wrappers and policy fallback (#8013)
- Honor web-search tool choice scope (#8018)
- Scope tool authority to current turn (#8027)
- Bound canonical patch prefix scanning (#8012)
- Serialize automatic v1 reconciliation with CLI updates (#8014)
- Read Artificial Analysis free model list before sunset (#8112)
- Count lowered hosted tool_search as declared (#8123)
- Retire a pool account's carried monthly window when WHAM shows none (#8120)
- Route local compaction checkpoints (#8119)
- Drop the unsupported output.encrypted_content include on Kimi Code Responses (#8122)
- Report prompt_eval_cached_count as cache-read input (#8124)
- Account for normalized inbound JSON (#8026)
- Require paired dashboard session for CLI updates (#8008)
- Export declared effort ladder and default to Kimi Code (#8126)
- Stop sibling discovery after revocation (#8024)
- Answer uncoded context-window refusals as prompt too long (#8128)
- Attest Codex listener before token injection (#8007)
- Report monthly Coding Plan quota (#8077)
- Keep profile keys OpenCodex does not manage (#8074)
- Report content-filter stops as non-retryable refusals (#8072)
- Avoid double charging live NDJSON buffers (#8047)
- Restore owned integrations before native signal exit (#8036)
- Hold selection ownership through dashboard feature toggles (#8009)
- Keep untyped assistant messages inside their tool-call turn (#8064)
- Unwrap one extra executable freeform body wrapper (#8048)
- Resubmit a finished answer on the completion retry (#8070)
- Fix non-ASCII Codex turn metadata headers (#8040)
Other Changes
- Open dev at 2.97.0 before releasing 2.96.0 (#8068)
- Serve an Ollama-compatible inbound API (#8099)
- Normalize upstream error details in request logs and Retry-After advice (#8104)
- Normalize Chat Completions client error bodies (#8108)
- Promote frozen tip 7b3bb7a257 to main as 2.97.0 (#8134)
Changelog
Full Changelog: https://github.com/lidge-jun/opencodex/compare/v2.96.0...v2.97.0
- #8007 fix(cli): attest Codex listener before token injection @luvs01
- #8008 fix(security): require paired dashboard session for CLI updates @luvs01
- #8009 fix(codex): hold selection ownership through dashboard feature toggles @luvs01
- #8011 fix(security): reject inherited writes at Windows creation parents @luvs01
- #8012 fix: bound canonical patch prefix scanning @luvs01
- #8013 fix(responses): preserve quota-code provenance across wrappers and policy fallback @luvs01
- #8014 fix(codex): serialize automatic v1 reconciliation with CLI updates @luvs01
- #8018 fix(advisor): honor web-search tool choice scope @luvs01
- #8024 fix(antigravity): stop sibling discovery after revocation @luvs01
- #8026 fix(server): account for normalized inbound JSON @luvs01
- #8027 fix(responses): scope tool authority to current turn @luvs01
- #8036 fix(link): restore owned integrations before native signal exit @luvs01
- #8040 Fix non-ASCII Codex turn metadata headers @visualbridg
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
npm install -g @bitkyc08/opencodex
ocx start
Claude Code, running any model
The picker is stock Claude Code. The brain behind it isn't.
Codex, running any model
Pick a provider and go — same workflow, different brain.
Claude Desktop, running any model
Opus answers, then hands the task to a GPT-5.6 Sol subagent.
Grok Build, running any model
Sol drives the session and calls a Kimi K3 subagent.
opencodex is a lightweight local gateway between your coding tools and your model providers. It accepts the Responses, Chat Completions and Anthropic Messages APIs and translates each request into whatever your provider speaks, carrying streaming, tool calls, reasoning and images where the client, model and provider support them. Use Claude, Gemini, Grok, GLM, DeepSeek, Kimi, Qwen, Ollama and other providers with Codex, Claude Code, Claude Desktop, Grok Build and the tools listed on the client support page.
Quick start
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.
Connect your tool
Connect the tool you already use:
| Tool | How to connect |
|---|---|
| Codex | Turn on the Codex switch on the dashboard's Connect page, then run codex as usual. On a local listener this points Codex's built-in provider at the proxy. From the terminal, run ocx init before adding providers in the dashboard and accept its Codex prompt. |
| Claude Code | With the claude CLI installed, run ocx claude. It starts the proxy if needed and launches Claude Code through it. |
| Claude Desktop | Run ocx claude desktop. On a new install it sets up the gateway profile for the whole app; an existing first-party setup is kept, and ocx claude desktop apply --gateway switches explicitly. See the Claude Code guide. Fully quit and reopen Claude Desktop after a switch. |
| Grok Build | On a local listener with Grok integration enabled, ocx start registers the models when ~/.grok exists; pick an ocx-* model in Grok Build. Remote setups: see the Grok Build guide. After adding providers, restart the proxy (or run ocx ensure when Codex autostart is enabled) to refresh the list. |
| Tools with a managed integration | Use the dashboard Connect page, or ocx integration client enable --client <id>. |
| Any other tool | Set a custom OpenAI-compatible base URL of http://localhost:10100/v1, or an Anthropic base URL of http://localhost:10100. |
The client support page lists which path each tool has and which protocol it speaks.
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 | Code signing via SignPath Foundation is rolling out (code signing policy); until a release is signed, 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.
Sponsors
Sponsors keep opencodex maintained across every upstream protocol change. Interested? See SPONSORS.md.
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#dev
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.
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.
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 interactiveocx startmay 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 with403 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.
- 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 stoprestores 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
MaporSetsurvives a config reload.
OpenCodex tracks process-retained state in the categories below. Each has a documented bound:
- 14 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), except the native control replay store, which is pinned and never evicted.
- 4 observed buffers (translator accumulators, image/OAuth/Grok tails) are monitored for in-flight byte pressure without eviction.
- 31 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.
JEV Auto routing (optional)
TypeSafe JEV can choose the first model and reasoning effort for an opt-in Combo while the normal
model picker and every direct route stay unchanged. Add the credential with ocx login jev, from
Providers → TypeSafe JEV → Add API key, or through TYPESAFE_API_KEY/JEV_API_KEY. Then open
Models → Combos → Create JEV Auto, choose the allowed target models, and check the exact efforts
JEV may select for each target. Leaving a target's effort setting untouched allows all efforts that
model currently advertises.
JEV is consulted only for jev-auto and only once per logical model call. Missing credentials,
network failures, or invalid decisions fail open to the first currently eligible target; caller
cancellation still cancels the request. Automated tests use a mocked TypeSafe endpoint and do not
validate a live JEV account.
A JEV Combo can instead ask a self-hosted decision model, such as Ollama's keyless tev1: add a
jev-decision provider whose baseUrl is the full /v1/systemone endpoint and set the Combo's
decisionProvider to it. TypeSafe credentials are never sent there. Details:
System One-compatible server.
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, OpenGateway, 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.
Advanced usage
Self-hosted options for power users. Review each provider's terms before you enable them.
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.
-
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.
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. The published npm package bundles its own
Bun runtime for installed ocx commands; package scripts may also resolve Bun through that bundled dependency.
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.
Code signing policy
Windows binaries are moving to Authenticode signing (#7207). The Windows Code Signing guide covers the rollout, how to verify a signature, and the full policy.
Free code signing provided by SignPath.io, certificate by SignPath Foundation.
- Committers and reviewers: lidge-jun
- Approvers: lidge-jun
- Privacy: This program will not transfer any information to other networked systems unless specifically requested by the user or the person installing or operating it.
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