Codex CLI
Codex CLI is the terminal entry for OpenAI Codex. With Qiuqiu Token, use the automated tools first, and only fall back to manual commands when needed.
Prerequisites
- Node.js 18+ and
npmare only required when you install manually with npm.
Recommended Path
- Windows users should try AI Tool Auto Installer first.
- If the installer does not apply, use CC Switch Quick Config to write the Qiuqiu Token provider, Codex token, Base URL, and model.
- Continue with the manual steps below only when needed.
Install and Configure
Prepare balance and the Codex Base URL in Quick Start, then create a Codex token in Create an API Token.
Windows
If the installer or CC Switch has already configured Codex, open your project folder and run codex to verify.
Install Node.js
Install Node.js LTS from nodejs.org or use one package manager:
winget install OpenJS.NodeJS.LTS
choco install nodejs-lts
scoop install nodejs-ltsnode -v
npm -vInstall Codex CLI
npm install -g @openai/codex@latestcodex --versionStart Codex
cd your-project-folder
codexManual Configuration
Create the configuration directory:
- Windows:
%USERPROFILE%\.codex - macOS / Linux:
~/.codex
mkdir %USERPROFILE%\.codex
cd %USERPROFILE%\.codexCreate config.toml
Create config.toml in the configuration directory:
model_provider = "qiuqiutoken"
model = "gpt-5.4"
model_reasoning_effort = "xhigh"
network_access = "enabled"
disable_response_storage = true
[model_providers.qiuqiutoken]
name = "OpenAI"
base_url = "https://api.qiuqiutoken.com/v1"
wire_api = "responses"
requires_openai_auth = trueCreate auth.json
Create auth.json in the same directory and replace the sample value with your Codex token key.
{
"OPENAI_API_KEY": "PASTE_CODEX_TOKEN_KEY"
}Verification
- The terminal recognizes
codex. config.tomlcontains the Qiuqiu Token provider withwire_api = "responses"andrequires_openai_auth = true.auth.jsoncontains the Codex token key.- Codex CLI starts in a project directory and completes a small request.
- The Qiuqiu Token console shows usage.
FAQ
codexdoes not exist: add the npm global bin directory to PATH and reopen the terminal.- It still connects to the default service: confirm that
.codex/config.tomlpoints to the Qiuqiu Token API. - Authentication fails: confirm that you are using a Codex token group and not
default.
