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:| Requirement | Details |
|---|---|
| Operating systems | macOS 12+, Ubuntu 20.04+/Debian 10+, or Windows 11 via WSL2 |
| Node.js | 16 or newer (Node 20 LTS recommended for npm installation) |
| Git (recommended) | 2.23+ for built-in PR helpers |
| RAM | 4 GB minimum (8 GB recommended) |
Installation methods
- npm
- Homebrew
- Binary download
- Build from source
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.Verify your installation
After installation, verify that Codex is working by running:Next steps
Authenticate
Now that Codex is installed, set up authentication to start using the CLI.
Complete the quickstart
Follow the quickstart guide to run your first commands.