Codex CLI Setup Guide
1. Open the config directory
Codex's config directory is .codex, located in your home directory. Open it according to your OS:
text
Press Win + R, enter the following and hit Enter:
%userprofile%\.codexbash
# Option 1: open directly from the terminal
open ~/.codex
# Option 2: in Finder press Cmd + Shift + G, enter ~/.codex and hit Enterbash
# Enter the config directory in a terminal
cd ~/.codex
# To open in a file manager (GNOME example)
xdg-open ~/.codexYou'll see the directory contents. If there's no config.toml / auth.json, create them manually and open them.
TIP
If the .codex directory doesn't exist yet, run codex once in the terminal to auto-generate it, or create the directory manually.
2. Edit config.toml
config.toml is the core config file — used to configure the API URL, the model, and features like reasoning depth.
Write the following into config.toml:
toml
model_provider = "cctq_codex"
model = "gpt-5.6-sol"
plan_mode_reasoning_effort = "xhigh"
model_reasoning_effort = "high"
disable_response_storage = true
supports_websockets = false
[model_providers.cctq_codex]
name = "cctq_codex"
base_url = "https://www.cctq.ai/v1"
wire_api = "responses"
requires_openai_auth = truebase_url: the relay request URL — set it tohttps://www.cctq.ai/v1(must end with/v1).model: the model to use — set as needed.
3. Edit auth.json
auth.json holds your API key. Write the following into auth.json:
json
{
"OPENAI_API_KEY": "sk-***"
}OPENAI_API_KEY: your token — replacesk-***with your actual key.
Save, reopen the terminal, and run codex to start.
