Skip to content

Deploy Codex CLI

Codex CLI is OpenAI's command-line coding assistant. You can use it with NewtCode's OpenAI-compatible API.

Prerequisites

  • Node.js v22+ installed
  • A NewtCode account with credits

Installation

bash
npm install -g @openai/codex

Configuration

macOS / Linux

bash
export OPENAI_BASE_URL=https://newtcode.cc/v1
export OPENAI_API_KEY=your_api_key_here

Add to ~/.bashrc or ~/.zshrc for persistence.

Windows (PowerShell)

powershell
$env:OPENAI_BASE_URL = "https://newtcode.cc/v1"
$env:OPENAI_API_KEY = "your_api_key_here"

Launch

bash
codex

Supported Models

  • gpt-4o
  • gpt-4o-mini
  • o3-mini
  • claude-sonnet-4-20250514 (via OpenAI-compatible format)

TIP

Codex CLI works best with GPT-4o models for code generation tasks.

Powered by NewtCode