Z.AI Coding Coding plan — 10% OFF recurring discount with token ROK78RJKNW
Claim offer →

Open-source tool

Use any AI provider
with Codex.

Codex is locked to the Responses API. Almost nobody uses that. This script points Codex at any model — local, hosted, or proxy — through the OpenAI-compatible endpoint every provider already speaks.

One tool, two experiences

Use it your way — terminal native or full desktop app

Codex CLI

Terminal
~ codex "Refactor auth module"
▸ Analyzing codebase...
▸ Found 3 files to modify

src/auth/login.ts
Updated JWT validation logic
src/auth/middleware.ts
Simplified token refresh flow
tests/auth.test.ts
Added 2 new test cases

~ codex --auto-edit "Add rate limiting"

Codex Desktop

GUI
Codex — my-project
Dashboard
Files
Terminal
Settings
U
Refactor the auth module and add rate limiting
C
Done! Updated 3 files: JWT validation, token refresh flow, and added rate limiting with tests. ✓
Ask Codex anything...

Works with

openai ollama openrouter together nvidia groq z.ai any proxy

How it works.

Three steps. No npm, no Docker, no config files you'll forget about.

01

Clone and run

Download the script. Run it. It asks which provider you want, grabs your API_KEY, and writes the config for Codex to pick up.

02

Set your model

Pick from presets — gpt-4.1, llama3, deepseek-chat — or type any model name your provider supports.

03

Launch Codex

The script sets OPENAI_BASE_URL and OPENAI_API_KEY, then drops you into the Codex REPL. Everything just works.

# download and run
$ curl -sL https://rommark.dev/codex-launcher.sh | bash

# pick your provider
> Provider? ollama
> Model? llama3

# done. codex opens with your model.
codex --model llama3 --provider openai

Supported providers.

Anything that speaks /v1/chat/completions works.

ProviderBase URLWorks
OpenAIapi.openai.com/v1
Ollamalocalhost:11434/v1
OpenRouteropenrouter.ai/api/v1
Together AIapi.together.xyz/v1
NVIDIA NIMintegrate.api.nvidia.com/v1
Groqapi.groq.com/openai/v1
z.aiapi.z.ai/v1
Any proxyyour-server/v1

What you're getting.

The details that matter.

Zero dependencies

Plain bash. No Node, no Python, no package manager. Runs on any machine with curl.

Model presets

Common models per provider baked in. Override with any string your provider accepts.

Config persistence

Writes ~/.codex/config.json once. Re-run to switch providers. No orphaned state.

Local-first

Ollama works out of the box. No API key, no cloud, no telemetry. Your code stays local.

Proxy-friendly

Point at any OpenAI-compatible proxy — LiteLLM, Helicone, your own server.

One command undo

Delete the config file. Codex reverts to defaults. No uninstaller, no cleanup.

Open source. No tracking. No analytics.

Just a script.

View on GitHub ›