Installation guide
openai/codex installation guide
Apache-2.0 OpenAI coding-agent platform centered on the standalone Codex CLI, with desktop and IDE entry points, Python and TypeScript SDKs, structured and streaming turns, persistent sessions, model-visible tools, and OS-specific sandbox enforcement; it is an alternative or companion to Claude Code rather than a Claude Code extension.
Install OpenAI Codex CLI on macOS Tahoe (Apple silicon)
What this repository is
`openai/codex` is the official, Apache-2.0-licensed repository for **Codex CLI**, which OpenAI describes as a lightweight coding agent that runs locally in your terminal. It can inspect and work with a project from the command line. The repository also contains SDKs and contributor infrastructure, but ordinary Mac users do not need to clone the repository or build its Rust source to install the CLI.
Relationship to Claude Code
**Classification: unclassified.** The supplied first-party files describe Codex CLI as OpenAI’s own local coding agent. They do not document this repository as a Claude Code plugin, skill, MCP server, hook, or other Claude Code extension. Treat Codex CLI as a separate coding-agent product rather than an add-on to Claude Code. A different catalog entry, `openai/codex-plugin-cc`, is identified as the Claude Code plugin; that is not the repository covered by this guide.
Compatibility note for your Mac
Apple-silicon Macs use the `arm64` architecture. The repository’s release documentation explicitly provides a macOS Apple-silicon archive named `codex-aarch64-apple-darwin.tar.gz`, and its main installation command is documented for Mac and Linux.
The supplied files do **not** state a minimum macOS version or explicitly certify macOS Tahoe. This guide therefore uses the repository’s documented macOS installation path, but it cannot claim a Tahoe-specific compatibility guarantee that the source does not provide.
Before you begin
You need:
- An Apple-silicon Mac running macOS Tahoe.
- Internet access for downloading Codex and signing in.
- A terminal window.
- An account or credential accepted by Codex.
For the recommended sign-in route, OpenAI says to use a ChatGPT Plus, Pro, Business, Edu, or Enterprise plan. API-key use is also supported, but the repository points to separate authentication documentation for its additional setup; no undocumented API-key setup commands are included here.
To open Terminal, use Spotlight Search, type **Terminal**, and open the Terminal application. Commands in this guide should be pasted into Terminal one at a time.
Recommended installation: OpenAI’s standalone installer
The repository documents one command for installing Codex CLI on Mac or Linux. Copy and paste it into Terminal, then press Return:
curl -fsSL https://chatgpt.com/codex/install.sh | shThis command downloads OpenAI’s installation script and sends it to the shell. The documentation says the standalone installer downloads from `https://releases.openai.com/codex` by default. If the metadata or an asset is unavailable there, it falls back to GitHub Releases.
Because this is a downloaded script executed through the shell, confirm that you are comfortable using the repository’s documented installer before proceeding. This guide does not add flags, elevated privileges, or other commands not present in the supplied first-party instructions.
When the installer finishes, start Codex with:
codexIf Codex opens, installation is complete. This launch command is also the repository’s documented way to get started; it serves as the available source-supported check that the executable can run.
Sign in with ChatGPT
After running `codex`, follow the on-screen interface and select **Sign in with ChatGPT**. Complete the browser-based sign-in when prompted, then return to Terminal if necessary.
OpenAI recommends this route for using Codex as part of an eligible ChatGPT Plus, Pro, Business, Edu, or Enterprise plan. The exact interactive screens may change, so follow the labels displayed by Codex rather than expecting a particular sequence beyond the documented **Sign in with ChatGPT** choice.
Once sign-in succeeds and the Codex interface is available in Terminal, the basic setup is finished.
Optional fallback: force GitHub Releases
Normally, you should use the recommended installer command above. If its normal download source is unavailable and you specifically want to force the installer to use GitHub Releases, the repository documents this alternative:
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false shThis sets the installer option only for that invocation. Do not run both installer commands merely for completeness. Use this fallback when you need the documented GitHub Releases path instead of the default source.
Afterward, launch Codex as usual:
codexAlternative installation with Homebrew
If Homebrew is already installed and working on your Mac, the repository provides this cask command:
brew install --cask codexThen start Codex:
codexThis guide does not include a Homebrew installation command because none appears in the supplied repository files. If Terminal reports that `brew` is unavailable, use the recommended standalone installer instead of following an undocumented Homebrew setup procedure.
Alternative installation with npm
If npm is already installed and working, the repository also documents a global npm installation:
npm install -g @openai/codexThen launch the CLI:
codexThe supplied CLI instructions do not state a Node.js version requirement for this installation route. A separate TypeScript SDK in the repository requires Node.js 18 or newer, but that SDK requirement should not be presented as a documented requirement for every Codex CLI installation method.
Choose **one** installation method: standalone installer, Homebrew, or npm. Installing the same CLI through several package managers can make it unclear which copy your terminal launches.
Optional desktop-app experience
The repository says that users wanting the desktop-app experience can run:
codex appThis is optional and is not required for terminal use. The repository also links to a Codex App webpage, but the CLI itself is started with `codex`.
Manual Apple-silicon release option
The repository documents a manual download route through the latest GitHub Release. For your Mac, the appropriate archive is:
- `codex-aarch64-apple-darwin.tar.gz`
Each release archive contains one executable whose name includes the platform. The README says you will likely want to rename that executable to `codex` after extracting it. However, the supplied files do not provide complete copy-paste commands for downloading, extracting, renaming, and placing the executable on macOS. To honor the requirement not to invent commands, this guide does not supply a manual Terminal sequence.
For a layperson, use the standalone installer unless you specifically need to manage the release binary yourself.
What you do not need for normal installation
You do not need to install the repository’s Python or TypeScript SDK just to use Codex CLI. Those packages are for developers embedding Codex in applications:
- The Python package is `openai-codex`.
- The TypeScript package is `@openai/codex-sdk`, requires Node.js 18 or newer, and wraps the CLI.
Likewise, the repository’s Docker, dev-container, Bazel, Cargo, V8, and contributor workflow material is for developing Codex itself or running specialized containers. It is not part of the ordinary Apple-silicon Mac installation described by the root README.
First-use and safety expectations
Codex is an agent that works with local projects. Pay attention to the working directory and to any permissions or approvals shown in the interface. The repository says the macOS core expects Apple’s `/usr/bin/sandbox-exec`, and describes filesystem and network access as controlled by a sandbox policy. That is implementation context, not a reason to bypass prompts or add undocumented configuration.
Start with a project whose contents you understand, read proposed changes, and keep normal backups or version-control practices. Do not paste secrets into prompts unless your intended workflow and account policies allow it.
Troubleshooting within the supplied evidence
If the normal installer cannot retrieve its download, try the documented GitHub Releases fallback command shown above. If a Homebrew or npm command is unavailable, use the standalone installer rather than inventing prerequisite-installation steps.
The supplied files do not document Tahoe-specific fixes, a CLI diagnostic command, an uninstall command, or an update command. They also do not provide source-supported shell commands for repairing your `PATH`. If `codex` does not launch after an installer reports success, consult the official Codex documentation linked from the repository or the repository’s GitHub issue tracker rather than applying unsupported commands.
Final checklist
- Open Terminal.
- Run one documented installation method—preferably the standalone installer.
- Launch the program with `codex`.
- Select **Sign in with ChatGPT** and finish authentication.
- Begin using Codex from the terminal, or optionally run `codex app` for the app experience.
That completes the source-supported installation path for Codex CLI on an Apple-silicon Mac.