Skip to main content

Installation

Codex CLI can be installed using npm, Homebrew, or by downloading pre-built binaries for your platform.

System requirements

Before installing Codex CLI, ensure your system meets these requirements:
Codex CLI does not work directly on Windows. You must use Windows Subsystem for Linux (WSL2). See the WSL installation guide.

Installation methods

1

Install globally with npm

Install Codex CLI globally using your preferred package manager:
Never run sudo npm install -g. If you encounter permissions errors, fix your npm permissions instead.
2

Verify installation

Verify that Codex is installed correctly:
You should see the version number printed to your terminal.

Verify your installation

After installation, verify that Codex is working by running:
You should see the help output with available commands and options.

Next steps

1

Authenticate

Now that Codex is installed, set up authentication to start using the CLI.
2

Complete the quickstart

Follow the quickstart guide to run your first commands.