Codex

Codex is OpenAI’s AI coding tool for understanding code, building features, and fixing bugs. The desktop app offers a graphical interface, while the CLI fits terminal workflows.

Install the Codex desktop app or CLI

Choose how you plan to use Codex. The desktop app and CC Switch do not require Node.js; Node.js LTS is only needed for Codex CLI.

CLIENT
Codex desktop app

Download the official client for your operating system.

Download Codex desktop app

Loading...

HELPER
CC Switch desktop app

Manage Codex configurations and quickly switch API keys and Base URLs.

Download CC Switch desktop app

Loading...

Using Codex CLI? Expand this sectionCLI users only

Codex CLI requires Node.js LTS. Desktop app users can skip this section.

RUNTIME
Node.js LTS

The runtime required for the command-line version.

Download Node.js

Loading...

PowerShell / Terminal
npm i -g @openai/codex
codex --version
If your terminal cannot find a command, close it, open a new window, and try again.
  1. 1
    Open API keys in the dashboard

    Create a key if this is your first time. If you already have an active key, open its edit panel directly.

  2. 2
    Choose the Codex desktop app or CLI

    In the key creation dialog or editor, select Choose how to use Codex, then choose the desktop app or CLI. The system prepares the matching client. CLI users also need Node.js LTS.

  3. 3
    Allow CC Switch to open and verify the setup

    If the browser asks whether to use ccswitch:// to open an external application, allow it. Follow the prompts in CC Switch. When setup is complete, make sure the NUSI configuration appears and its Base URL matches the current endpoint in the dashboard.

    NUSI and Base URL selected under OpenAI Codex in CC Switch
    Confirm that the NUSI configuration is selected and its Base URL matches the current dashboard endpoint.
For manual setup, connect Codex through config.tomlUse this or CC Switch
WINDOWS%USERPROFILE%\.codex\config.toml
MACOS / LINUX~/.codex/config.toml

Create or edit config.toml, replacing the model ID with a currently available value from the console. Save the API key in the environment variable OPENAI_API_KEY. Do not write it into the configuration file:

config.toml
model = "YOUR_MODEL_ID"
model_provider = "nusi"

[model_providers.nusi]
name = "NUSI"
base_url = "https://nusi.si/v1"
wire_api = "responses"
env_key = "OPENAI_API_KEY"

Complete your first test

  1. 1
    Restart the tool

    If you use the desktop app, quit and reopen Codex. If you use the CLI, reopen PowerShell on Windows or Terminal on macOS, then run codex.

  2. 2
    Open a test folder

    Open a readable test project. On the first run, Codex may ask for permission to access the folder or run a command. Review each request before you approve it.

First test prompt
Do not modify any code yet. Read the current project structure first, then identify the entry file and main directories.
If Codex can read the folder and reply, Codex, your API key, CC Switch, and the NUSI connection are working together. “Operation not permitted” means macOS has not granted Codex or your terminal access to the project files. Enable Files and Folders or Full Disk Access, then retry.

Troubleshoot common failures

IssueWhat to do
Still using the old address after switching

Fully quit Codex or close the terminal. Check that NUSI is selected in CC Switch, then reopen it.

401, 403, or an invalid key error

Check the key's status in the console. If it was deleted, has expired, or may have been exposed, create a new key and update your configuration.

Can't find codex command

Check that Node.js LTS and Codex CLI are installed, reopen your terminal, then run codex --version.

Can't read project files

Check Files and Folders or Full Disk Access in system settings, then retry in the same test folder.

NUSI Setup Guides · Updated regularly ·