Skip to content

Installation

opencodex ships as a single CLI, ocx. It runs as a small local HTTP server (built on Bun) and never sends your traffic anywhere except the provider you configure.

RequirementWhy
Bun ≥ 1.1 (recommended) or Node ≥ 20ocx runs on the Bun runtime; the service runner invokes bun.
OpenAI Codex (CLI, App, or SDK)The client opencodex sits in front of. opencodex writes to $CODEX_HOME/config.toml (default ~/.codex/config.toml).
A provider account or API keyAnthropic, xAI, Kimi, Ollama Cloud, OpenRouter, an OpenAI-compatible endpoint, or your ChatGPT login.
Terminal window
# With npm (recommended)
npm install -g @bitkyc08/opencodex
# With Bun
bun install -g @bitkyc08/opencodex

Verify the binary is on your PATH:

Terminal window
ocx --help

To hack on opencodex itself:

Terminal window
git clone https://github.com/lidge-jun/opencodex.git
cd opencodex
bun install
bun run dev # starts the proxy in dev mode (src/cli.ts start)

The web dashboard lives in gui/ and runs separately:

Terminal window
cd gui && bun install && bun dev
PathPurpose
~/.opencodex/config.jsonYour providers, default provider, port, and options.
~/.opencodex/ocx.pidPID of the running proxy (single-instance guard).
~/.opencodex/auth.jsonStored OAuth credentials (when you ocx login).
~/.opencodex/catalog-backup.jsonPristine Codex model catalog, backed up before any edit.
$CODEX_HOME/config.tomlopencodex appends a [model_providers.opencodex] table here on ocx init (defaults to ~/.codex/config.toml).

Continue to the Quickstart to configure your first provider, or read How It Works for the architecture.