Codex CLI

Codex CLI is OpenAI’s coding agent for the terminal. Use it to read code, change files, and run commands in local projects.

  1. 1
    Download and Install

    Visit the NUSI·ONE download page. Windows (x64) and macOS 14 or later on Apple silicon are supported. Download and install the package for your system.

    The macOS and Windows download buttons on the NUSI·ONE download page.
  2. 2
    Sign In and Select a Key

    Sign in to NUSI in the client. Open Settings at the lower left and select an available key you created under Account & Keys. If you have none, create one in API keys.

    The Account & Keys list in Settings, with the active key selected.
  3. 3
    Find Codex CLI

    Open Assistant Management in Settings and find Codex CLI. Follow the installation prompts; if it is already installed, continue.

    Find Codex CLI and its installation status in Assistant Management.
  4. 4
    Open a Project and Start a Conversation

    Select a project or Independent conversation, choose New conversation and Codex CLI, then select an available model and send “Hello”. After receiving a reply, check the call in Usage.

    Select Codex CLI from the New conversation menu.

Option 2: Install and Configure Codex CLI Yourself

Skip this section if you use NUSI·ONE. Complete these steps in your own terminal, keeping the API key in an environment variable and the connection URL in the configuration file.

  1. 1
    Install and Check Codex CLI

    If Node.js is missing, download the LTS release from Node.js, install it, and open a new terminal. Then run these commands one at a time:

    PowerShell / Terminal
    npm install -g @openai/codex
    codex --version

    Continue once the Codex version appears. If the command is not found, close and reopen the terminal, then check again.

  2. 2
    Configure the Connection

    Open the configuration file below. If it does not exist, create the .codex folder and config.toml file; do not save it as config.toml.txt. Preserve existing settings and merge the fields below.

    WINDOWS%USERPROFILE%\.codex\config.toml
    MACOS / LINUX~/.codex/config.toml
    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"

    Replace YOUR_MODEL_ID with an available model ID that supports Responses from Models. Use the Base URL supplied by the console, including /v1. OPENAI_API_KEY is the variable name; do not replace it with the full key.

  3. 3
    Set the API Key in Your Terminal

    Copy an available key you created from API keys. Replace YOUR_NUSI_API_KEY below with the full value and use the command for your system. Keep the key out of config.toml and source control.

    macOS / Linux

    Terminal
    export OPENAI_API_KEY="YOUR_NUSI_API_KEY"

    Windows PowerShell

    PowerShell
    $env:OPENAI_API_KEY = "YOUR_NUSI_API_KEY"

    These commands apply only to the current terminal and programs it starts. Run Codex in that same terminal. After closing it, set the variable again in the new window.

  4. 4
    Open Your Project and Verify

    Replace the example path with your project’s path and start Codex. Review any file-access or command-permission prompt before allowing it.

    macOS / Linux

    Terminal
    cd "/path/to/your/project"
    codex

    Windows PowerShell

    PowerShell
    Set-Location "C:\path\to\your\project"
    codex

    In the interactive prompt, send this simple request first:

    Plain Text
    Reply only: connection successful.

    After receiving a reply, check the time, model, and status in Usage. Confirm the matching record before continuing with your project.

    If the key is missing, check that Codex started in the same terminal where you set it. If the model is unavailable, check its ID and Responses support. For authentication, balance, permission, or rate-limit issues, follow FAQ & Troubleshooting.