Skip to main content
Codex CLI is OpenAI’s official command-line coding agent. Connect it to ClearMaas via a custom provider in config.toml or environment variables.

Prerequisites

  • Codex CLI installed (npm install -g @openai/codex or via installer)
  • A ClearMaas API key starting with sk-

Quick setup via environment variables

The fastest way to get started:
(Older Codex versions may recognize OPENAI_API_BASE instead of OPENAI_BASE_URL �?set whichever your version expects.)

Setup via config.toml

For persistent configuration, create ~/.config/codex/config.toml:
Then set the API key in your environment:

Adding a second provider (Anthropic)

You can define multiple providers and switch between them:
Switch providers with the -c CLI flag:

Choosing a model

Set the default model in config.toml:
Or override per-invocation:
Available prefixes for routing to different providers:

Adding custom headers

If your ClearMaas setup requires additional headers:

Verification

Check your ClearMaas dashboard to confirm the request was routed.

See also