Codex CLI Offline Installation Guide

An offline installation guide for Codex CLI across Windows and macOS, including package layout, setup scripts, common issues, and how to prepare a lower-cost API key.

Codex CLI Offline Installation Guide

This guide is meant for first-time users who want to install Codex CLI without relying on a stable external network and start using it immediately after setup.

Who this guide is for

People who want to try Vibe Coding without depending on a strong network connection

First-time Codex CLI users who want a clean installation path

Teams that need a portable offline package for coworkers or friends

What to prepare before installation

The target computer should already have Node.js and npm. Check them first in the terminal.

node -v
npm -v

Package layout

The offline bundle is divided by platform: windows-x64, macos-arm64, and macos-x64. Each folder includes the main package, the platform runtime package, installation scripts, and setup scripts.

Identify your platform first

Windows

Most standard Windows machines should use windows-x64.

macOS

Use macos-arm64 for Apple Silicon and macos-x64 for Intel Macs. On macOS, uname -m tells you which one you have.

uname -m

Windows x64 installation steps

Step 1: enter the offline installation directory

cd "your-path\codex-npm-offline\windows-x64\npm-offline"

Step 2: run the installation script

.\install-codex-windows-x64.cmd

Step 3: install manually if needed

npm install -g .\codex-npm-0.121.0-alpha.6.tgz @openai/codex-win32-x64@file:.\codex-npm-win32-x64-0.121.0-alpha.6.tgz

Step 4: verify that installation succeeded

codex --version

Run the setup script

.\run-codex-setup.cmd

After installation, the setup script will ask for your Base URL and API key.

It writes configuration into the main Codex config and auth files, and usually creates backups before overwriting existing ones.

~/.codex/config.toml
~/.codex/auth.json

macOS Apple Silicon installation

cd "/your-path/codex-npm-offline/macos-arm64/npm-offline"
bash ./install-codex-macos-arm64.sh

If you prefer manual installation, you can install the main package and the platform-specific package with npm.

npm install -g ./codex-npm-0.121.0-alpha.6.tgz @openai/codex-darwin-arm64@file:./codex-npm-darwin-arm64-0.121.0-alpha.6.tgz

macOS Intel installation

cd "/your-path/codex-npm-offline/macos-x64/npm-offline"
bash ./install-codex-macos-x64.sh

npm install -g ./codex-npm-0.121.0-alpha.6.tgz @openai/codex-darwin-x64@file:./codex-npm-darwin-x64-0.121.0-alpha.6.tgz

Common issues

Codex command not found after installation

Close the current terminal, open a new one, and run codex --version again.

Windows blocks the script

Use the setup script entry because it invokes PowerShell with ExecutionPolicy Bypass.

macOS says the script is not executable

Run the shell scripts through bash directly instead of double-clicking them.

How to get a lower-cost and stable API key

If you still need a provider key, register, inspect model groups and prices, create an API token, then copy the Base URL and API key into the setup flow.

Shortest usage path

Install the correct platform package

Run the setup script and enter Base URL plus API key

Start Codex with codex or use codex --yolo for a more direct execution mode

codex
codex --yolo