Step 1: Install Codex CLI

First make sure Node.js is installed on your machine, then run:

npm i -g @openai/codex

After installation, verify it:

codex --version

Step 2: Find the global configuration directory

Codex CLI reads the .codex folder under the current system user’s home directory.

Open your terminal or command prompt (CMD), then run the command below to open that directory directly:

Run this command in CMD or PowerShell. It opens the folder in File Explorer and creates it automatically if it does not exist:

mkdir "%USERPROFILE%\.codex"
start "" "%USERPROFILE%\.codex"

Run this command in the terminal to create the folder and open it in Finder:

mkdir -p "$HOME/.codex"
open "$HOME/.codex"

(On Linux, replace open with xdg-open.)


Step 3: Write the configuration

In the .codex folder you just opened, create these two plain-text files without a .txt suffix:

The two files below handle endpoint configuration and authentication. Replace <your SU8 API Key> with your own key.

This file configures Codex CLI to use the SU8 Codes endpoint:

model_provider = "su8"
model = "gpt-5.5"
network_access = "enabled"
disable_response_storage = true
model_verbosity = "high"

[model_providers.su8]
name = "su8"
base_url = "https://www.su8.codes/v1"
wire_api = "responses"
requires_openai_auth = true

This file stores the API key you generated in the SU8 console:

{
  "OPENAI_API_KEY": "<your SU8 API Key>"
}

Configuration reload note:

  • After changing either file above, you must fully restart the client before the changes take effect. Restart VS Code, or stop the codex process in the terminal with Ctrl+C and start it again.
  • If the VS Code extension keeps reporting errors, first run codex in the terminal to check whether the CLI can connect. This helps narrow down whether the issue is network-related or IDE-related.