Skip to content

Codex CLI

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:

cmd
winget install OpenJS.NodeJS.LTS
cmd
choco install nodejs-lts
cmd
scoop install nodejs-lts

Open a new terminal:

cmd
node -v
npm -v
cmd
npm install -g @openai/codex@latest
cmd
codex --version

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.

  1. Create and enter the configuration directory.

    cmd
    mkdir %USERPROFILE%\.codex
    cd %USERPROFILE%\.codex
  2. Create or update config.toml.

    Use the OpenAI-compatible Base URL with /v1 at the end.

    toml
    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
  3. Create or update auth.json.

    Replace sk-your-token with a token from the Codex group.

    json
    {
    "OPENAI_API_KEY": "sk-your-token"
    }
  4. Close all Codex terminal windows, open a new terminal, then start Codex from your project.

    cmd
    cd your-project-folder
    codex