You can download Codex in three official ways: the ChatGPT desktop app with a Codex mode for macOS, Windows and Linux, the command-line Codex CLI, and an extension for VS Code, Cursor and Windsurf. The download itself is free. What costs money is the model behind it, paid for by a ChatGPT plan or by tokens on an API key. Below you will find the official addresses, install commands, requirements, and a route for people whose country or card does not work with OpenAI's sign-in. If the CLI is what you need, Install Codex CLI on Windows, Mac and Linux goes deeper on commands and errors for each system.
Four ways Codex shows up: app, CLI, extension and cloud
"Codex" in a search box means several things, and fake download pages exploit that. As of November 10, 2026, OpenAI has four entry points.
| Surface | Where to get it | Sign in with an API key |
|---|---|---|
| ChatGPT desktop app (Codex mode) | chatgpt.com/download, plus the Microsoft Store on Windows | yes, "Sign in another way" |
| Codex CLI | install script at chatgpt.com/codex, npm, Homebrew, GitHub Releases | yes, codex login --with-api-key |
| Editor extension | Marketplace, ID openai.chatgpt | yes, "Use API Key" |
| Codex cloud (web) | chatgpt.com/codex | no, ChatGPT sign-in only |
Codex used to ship as a separate Codex app. OpenAI's current docs call the program the ChatGPT desktop app and make Codex a mode inside it. OpenAI's release notes date the merge of the Codex app into the ChatGPT desktop app to July 9. Searches for "codex app" or "codex desktop" end up in the same place, and the codex app command in the CLI repository's README opens the page of that same app.
Which one to pick on a first install? The app suits you if you want a graphical interface, parallel chats and file previews. The CLI is for the terminal, scripts and CI: codex exec runs the agent without a dialog. The extension fits people who sit in VS Code all day and do not want to switch windows. Nothing stops you from installing all three, because their settings live in one folder, ~/.codex.
Where to download Codex from
The app for macOS, Windows and Linux
For macOS and Windows OpenAI points to chatgpt.com/download. On Windows the app is also in the Microsoft Store, and the command line version looks like this:
winget install --id 9PLM9XGG6VKS -s msstore
The Linux app is a preview. OpenAI's Linux guide lists Ubuntu 24.04 and 26.04, Debian 13, Fedora 43 and 44, and current Arch Linux. There are .deb and .rpm packages for x64 and ARM64, and an install script for Arch. Computer Use is not in the Linux preview yet. Linux updates come through the package manager: sudo apt install --only-upgrade chatgpt on Ubuntu and Debian, sudo dnf upgrade --refresh chatgpt on Fedora, sudo pacman -Syu on Arch.
Codex CLI
OpenAI's installer for macOS and Linux:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
For Windows, in a new PowerShell window:
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
Package managers work too:
npm install -g @openai/codex
brew install --cask codex
Ready-made files sit on the releases page of the openai/codex repository on GitHub. Release 0.167.0 from November 6, 2026 has codex-aarch64-apple-darwin.tar.gz and codex-x86_64-apple-darwin.tar.gz for Mac, codex-x86_64-unknown-linux-musl.tar.gz and an arm64 twin for Linux, and codex-x86_64-pc-windows-msvc.exe with an ARM64 variant for Windows. The README lists only macOS and Linux archives, but the Windows files are in the release.
The VS Code extension
Search the editor for the extension with the ID openai.chatgpt; OpenAI calls it the Codex IDE extension. It works in Visual Studio Code, Insiders, Cursor and Windsurf. Xcode and JetBrains IDEs have their own built-in integrations. If the extension hangs on Windows, OpenAI suggests installing Visual Studio Build Tools with the C++ workload and the x64 Visual C++ Redistributable, then fully restarting VS Code. If you were searching for "codex vs code", the answer is that the extension runs inside the editor, not instead of it.
Updating Codex
Update with the same command you used to install. For the script and npm, run the install again. Homebrew has its own:
brew upgrade --cask codex
Keep the CLI current, because some features are tied to a version number. For example, GPT-6.1 Terra needs Codex CLI 0.159.0 or newer.
Where the CLI lands and which version is current
The macOS and Linux script puts codex in ~/.local/bin and adds that folder to PATH through your shell profile: ~/.zprofile on macOS with zsh, ~/.bashrc on Linux with bash. The Windows script installs codex in %LOCALAPPDATA%\Programs\OpenAI\Codex\bin and adds the folder to your user PATH. Both work on x64 and ARM64. The scripts fetch files from releases.openai.com/codex and fall back to GitHub Releases if that fails. To force GitHub, set CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false.
On November 10, 2026 the latest CLI version is 0.167.0, in npm and on GitHub alike. The @openai/codex package declares Node.js 16 or newer in its package.json.
System requirements for Codex
We did not find one requirements table. The data is scattered across documentation pages and the repository.
| Platform | What OpenAI says |
|---|---|
| Windows | Windows 11 recommended; Windows 10 on a best-effort basis, version 1809 or newer required; WSL is optional, the agent runs in PowerShell inside a sandbox |
| Windows, new MXC sandbox | Windows 11 24H2 (build 26100.9278) or 25H2 (26200.9278), or newer |
| CLI, per the repository's docs/install.md | macOS 12+, Ubuntu 20.04+ or Debian 10+, 4 GB RAM minimum and 8 GB recommended, Git 2.23+ for the built-in PR helpers |
| Linux (app) | Ubuntu, Debian, Fedora and Arch from the list above; Computer Use is not available in the preview |
For Windows the repository says WSL2, while a documentation page describes native PowerShell. We follow the second, which is more detailed. WSL1 stopped being supported with Codex 0.115, so if you use WSL you need WSL2. The review panel in the app needs Git. We did not find a minimum macOS version for the app in the documentation.
When ChatGPT sign-in is not available where you live
By default Codex asks you to sign in with a ChatGPT account. That is one of two doors. The other is an API key, and the CLI, the app and the extension all accept one. OpenAI bills API usage at standard API rates through your platform account, not through a ChatGPT plan.
Both doors can be closed by geography. OpenAI publishes a list of supported countries and territories for its API, and its page warns that accessing or offering access outside that list may get your account blocked or suspended. The list does not include, among others, China, Russia, Belarus, Iran, Cuba, Syria or Venezuela. We could not open OpenAI's page on where ChatGPT itself is available, so check it directly. Payment is a separate matter, because both a plan and API credit need a card the provider accepts.
If that is your situation, or if you simply want one key that works with Codex and with other models, you can point Codex at a gateway. Claudexia is a third-party service that exposes OpenAI-style endpoints on its own address. You pay Claudexia, create a sk_cdx_... key, and Codex sends requests there. It does not sell ChatGPT subscriptions and it does not make a promise about what any provider's terms allow in your country. Read those terms before you decide.
Connect Codex to Claudexia
The same setup works for the CLI, the app and the extension, since they share one settings folder. Check the Codex guide in the docs for the canonical file.
- Create an account, top up the balance with a local card, Visa or Mastercard, SBP in Russia, or USDT, BTC and ETH, and create a
sk_cdx_...key. - If the
.codexfolder does not exist yet, create it:mkdir -p ~/.codexon macOS and Linux,New-Item -ItemType Directory -Force "$HOME\.codex"in PowerShell. Open~/.codex/config.toml(on Windows%USERPROFILE%\.codex\config.toml) and add:
model = "gpt-6-sol"
model_reasoning_effort = "high"
model_provider = "claudexia"
[model_providers.claudexia]
name = "Claudexia"
base_url = "https://api.claudexia.tech/v1"
wire_api = "responses"
requires_openai_auth = true
- Put the key in
~/.codex/auth.json:
{ "OPENAI_API_KEY": "sk_cdx_YOUR_KEY" }
- Run
codexin a project folder. To pick a model quickly:codex --model gpt-6.1-sol.
After you edit the file, close the app and the extension completely and open them again. If you would rather not keep the key in a file, replace requires_openai_auth with env_key = "CODEX_KEY" and set that variable. An app launched from the Dock or the Start menu may not see a variable exported in ~/.zshrc, so auth.json is simpler for the app and the extension. Model choice is discussed in GPT-5.6 Sol and Terra, and current IDs live on the models page.
If Codex will not start after installation
Four common causes and checks:
- The
codexcommand is not found. Open a new terminal window. The path to the binary updates only for new sessions. - PowerShell refuses to run the script. Run the install command in full, with
-ExecutionPolicy ByPass. A bare link toinstall.ps1is not enough. - It asks for a ChatGPT sign-in although you have a key. Check that
config.tomlsits in~/.codex(on Windows%USERPROFILE%\.codex) and thatmodel_providermatches the table name under[model_providers.*]. - An unknown-model error. The
modelvalue reaches Claudexia as written, so it must match the catalog. Compare it withGET https://api.claudexia.tech/v1/models.
Fake Codex builds and how to avoid malware
The word "download" attracts traps. On August 17, 2026 PhishFort described a campaign: a sponsored link for the query "codex mac download" led to a shared chat on the real chatgpt.com domain, and the chat asked you to paste a command with a long base64 string into Terminal. The command downloaded the MacSync stealer, which takes passwords, Keychain data and wallets.
What follows in practice:
- Do not trust ads above the results. Go straight to chatgpt.com/download or github.com/openai/codex.
- Do not paste commands from someone else's chat or page into a terminal, even on a familiar domain: anyone can publish a shared chat on chatgpt.com.
- A string of random letters and digits inside a command is a reason to stop.
- The npm package is called
@openai/codex. Match the name character by character, since look-alike packages have different owners.
We do not discuss installers from Telegram channels, "cracked" builds or versions with the subscription check removed. You do not need them: an API key gives access to Codex models without a ChatGPT plan.
FAQ
How do I download Codex on a PC?
Pick a surface. The ChatGPT app with its Codex mode comes from chatgpt.com/download, the CLI installs with npm install -g @openai/codex or the script at chatgpt.com/codex, and the extension is found by its ID openai.chatgpt in the editor's marketplace. Downloading is free; you pay for the model.
Does Codex on Windows need WSL?
No. According to OpenAI's docs, Codex runs natively on Windows: the agent executes commands in PowerShell inside a sandbox. People pick WSL when they need Linux tools or their workflow already lives in WSL2. Windows 11 is recommended, and Windows 10 version 1809 or newer is supported on a best-effort basis.
How does the Codex app differ from the CLI and the extension?
They are three interfaces to one agent. The app suits parallel chats, Git work and file previews. The CLI fits terminals and scripts, and the extension fits work inside an editor. Codex cloud in the browser is separate and needs a ChatGPT sign-in.
Is Codex free to download, and is it free to use?
The client is free, and the CLI is open source under the Apache-2.0 license. The models cost money: a ChatGPT plan or tokens through an API key. On Free and Go, OpenAI's pricing page lists GPT-6 Luna in the desktop app, subject to rollout.
How do I install Codex in VS Code?
Open Extensions, search for the OpenAI extension with ID openai.chatgpt, install it and sign in. To work through Claudexia, add the provider to ~/.codex/config.toml and the key to auth.json, then restart the editor. The extension also runs in Cursor and Windsurf.
Can I use Codex from a country OpenAI does not support?
Signing in through ChatGPT may not work, and OpenAI warns that access outside its supported list can lead to a blocked account. A gateway key replaces the OpenAI sign-in in the config above, but we cannot tell you that it is allowed by OpenAI's terms where you live. Check those terms first.