Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.ruoli.dev/llms.txt

Use this file to discover all available pages before exploring further.

Codex is an AI coding agent by OpenAI that runs in the terminal.

Installation

npm install -g @openai/codex
Open CC Switch and add a RuoLi configuration:
FieldValue
API URLhttps://ruoli.dev/v1
API KeyYour Key
Select Codex and click Apply.

Manual Configuration

Edit ~/.codex/config.toml:
model = "claude-sonnet-4-20250514"
model_provider = "ruoli"

[model_providers.ruoli]
name = "RuoLi"
base_url = "https://ruoli.dev/v1"
env_key = "RUOLI_API_KEY"
wire_api = "responses"
Set the environment variable:
export RUOLI_API_KEY=sk-YOUR-KEY

Switch Models

Change the model field in config.toml, or specify it at launch:
codex --model gpt-4o
You can also switch models in CC Switch.
Official Documentation: developers.openai.com/codex