Codex Installation and Configuration
Installation
npm install -g @openai/codexVerify Installation
codexWindows Configuration
Step 1: Create Configuration Folder and Files
-
Navigate to the
.codexfolder in your user directory, for example:C:\Users\xxxxxx\.codex- Note: If you cannot see this folder, you may need to enable the option to show hidden items in Windows
-
If the
.codexfolder does not exist, manually create the folder, then createconfig.tomlandauth.jsonfiles- Note the file types and ensure they have the correct file extensions
Step 2: Configure config.toml
Create or edit the config.toml file with the following content:
model_provider = "cubence"
model = "gpt-5"
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.cubence]
name = "cubence"
base_url = "https://api.cubence.com/v1"
wire_api = "responses"
requires_openai_auth = trueStep 3: Configure auth.json
Create or edit the auth.json file with the following content:
{
"OPENAI_API_KEY": "echo your key here"
}Note: Please replace your key here with the API Key created on the platform
Step 4: Start Using
After configuration, you can invoke it in the terminal:
codexmacOS Configuration
Step 1: Installation
Open terminal and execute:
npm install -g @openai/codexStep 2: Create Configuration Files
Create ~/.codex/config.toml and ~/.codex/auth.json files
Note: Please replace the API Key in the configuration with the API Key created on the platform
Step 3: Configure config.toml
model_provider = "cubence"
model = "gpt-5"
model_reasoning_effort = "high"
disable_response_storage = true
[model_providers.cubence]
name = "cubence"
base_url = "https://api.cubence.com/v1"
wire_api = "responses"
requires_openai_auth = trueStep 4: Configure auth.json
{
"OPENAI_API_KEY": "your api key"
}Note: Please replace your api key with the API Key created on the platform
Step 5: Restart Terminal
After successful configuration, be sure to restart the terminal before launching codex.
Step 6: Start Using
codex