Codex CLI
Manual install
Section titled “Manual install”If your machine does not have the codex command yet, install Codex CLI for your system first. If Codex CLI is already installed, go straight to manual setup.
Download the Node.js installer from nodejs.org, or choose one package-manager command:
winget install OpenJS.NodeJS.LTSchoco install nodejs-ltsscoop install nodejs-ltsOpen a new terminal:
node -v
npm -vnpm install -g @openai/codex@latestcodex --versionDownload the Node.js installer from nodejs.org, or install it with Homebrew:
brew install nodenode -v
npm -vnpm install -g @openai/codex@latestYou can also install it with Homebrew cask:
brew install --cask codexcodex --versionUse the Linux installation guidance on nodejs.org or install it from NodeSource, then continue.
node -v
npm -vnpm install -g @openai/codex@latestcodex --versionManual setup
Section titled “Manual setup”If you are not using CC Switch, create config.toml and auth.json in the user-level .codex directory: config.toml defines the provider, model, and Base URL, while the token is stored in auth.json in the same directory. Do not put this setup in a project-local .codex/config.toml.
-
Create and enter the configuration directory.
mkdir %USERPROFILE%\.codex cd %USERPROFILE%\.codexmkdir -p ~/.codex cd ~/.codexmkdir -p ~/.codex cd ~/.codex -
Create or update
config.toml.Use the OpenAI-compatible Base URL with
/v1at the end.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.net/v1" wire_api = "responses" requires_openai_auth = true -
Create or update
auth.json.Replace
sk-your-tokenwith a token from the Codex group.{ "OPENAI_API_KEY": "sk-your-token" } -
Close all Codex terminal windows, open a new terminal, then start Codex from your project.
cd your-project-folder codexcd your-project-folder codexcd your-project-folder codex
