You can download Codex on a PC in three official ways: the ChatGPT app with 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, and you pay for the model: with a ChatGPT subscription or per token with an API key. Below: official addresses, system requirements, and connecting through codexkey.
Three Codex surfaces: app, CLI and extension
The word "Codex" in searches means different things, and the authors of fake pages exploit that. As of October 29, 2026 OpenAI has four entry points:
| Surface | Where to get it | API-key sign-in |
|---|---|---|
| ChatGPT app (Codex mode) | chatgpt.com/download, plus the Microsoft Store on Windows | yes, "Sign in another way" |
| Codex CLI | the chatgpt.com/codex script, 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". Now the OpenAI documentation calls the program the ChatGPT desktop app, and Codex is a mode inside it. Searches for "codex app", "codex desktop" and "codex application" lead exactly there. The codex app command from the repository README opens the page of that same app.
What to pick on a first install. The app is handy if you want a graphical interface, parallel chats and file preview. The CLI is for the terminal, scripts and CI: the codex exec command runs the agent without a dialog. The extension suits people who sit in VS Code all day and do not want to switch windows. You can install everything at once, because the settings live in one directory, ~/.codex.
Where to download Codex officially
The app for macOS, Windows and Linux
OpenAI sends macOS and Windows users to chatgpt.com/download. On Windows there is also an install from the Microsoft Store, which looks like this on the command line:
winget install --id 9PLM9XGG6VKS -s msstore
For Linux OpenAI has a separate guide. The app is still a preview there; Ubuntu 24.04 and 26.04, Debian 13, Fedora 43 and 44, and Arch Linux are supported. .deb and .rpm packages exist for x64 and ARM64.
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"
Alternatives through package managers:
npm install -g @openai/codex
brew install --cask codex
Ready-made archives for every platform sit on the releases page of the openai/codex repository. We wrote a detailed Windows walkthrough with the usual install errors in Installing Codex CLI on Windows, Mac and Linux, so we do not repeat it here.
VS Code extension
In the editor, look 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 have built-in integrations. If the extension hangs on Windows, OpenAI advises installing Visual Studio Build Tools with the C++ component and the x64 Visual C++ Redistributable, then fully restarting VS Code. For anyone who searched "codex vs code": the extension runs inside the editor, not instead of it.
How to update Codex
You install a new version with the same command as the first one. For the script and npm, repeat the install; Homebrew has its own command:
brew upgrade --cask codex
The Linux app updates through the distribution's package manager: sudo apt install --only-upgrade chatgpt on Ubuntu and Debian, sudo dnf upgrade --refresh chatgpt on Fedora, sudo pacman -Syu on Arch. Keep the CLI version fresh: some features are tied to the number, for example GPT-6.1 Terra needs Codex CLI 0.159.0 or newer.
System requirements for Codex on a PC
We found no single requirements table: the data is scattered across documentation pages and the repository.
| Platform | What OpenAI states |
|---|---|
| Windows | Windows 11 recommended; Windows 10 on a best-effort basis, version 1809 or newer required; WSL is not required, 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, 8 GB recommended, Git 2.23+ for the built-in PR helpers |
| Linux (app) | Ubuntu, Debian, Fedora, Arch from the list above; Computer Use is not available in the preview |
The repository names WSL2 for Windows, while a documentation page describes a native run in PowerShell. We follow the second, which is more detailed. The review panel in the app needs Git. We did not find the minimum macOS version for the app in the documentation.
How to connect Codex to codexkey instead of a subscription
By default Codex asks you to sign in with a ChatGPT account. You do not have to: Codex accepts an API key, and the API address can be replaced in the settings. It is the same route described in the article on an API key instead of a subscription, only here step by step for a PC.
- Sign up at codexkey, top up your balance by Russian card, SBP (the Russian Faster Payments System) or crypto, and create a key
sk_cdx_.... - If the
.codexdirectory 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 = "codexkey"
[model_providers.codexkey]
name = "codexkey"
base_url = "https://api.codexkey.online/v1"
wire_api = "responses"
requires_openai_auth = true
- Put the key in
~/.codex/auth.json:
{ "OPENAI_API_KEY": "sk_cdx_YOUR_KEY" }
- Run
codexin your project folder. To pick a model quickly:codex --model gpt-6.1-sol.
According to the codexkey guide, one settings file is read by the CLI, the app and the extension, and an installed CLI is only needed by people who work in the terminal. After editing, 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 the variable. But for an app launched from the menu or the Dock, a variable from ~/.zshrc may not show up, so auth.json is simpler for the app and the extension. Which model to set is covered in Codex models: Sol, Astra, Luna, and what Astra is and what it costs is explained in What is GPT-6 Astra. Current IDs are on the models page.
If Codex does not start after installation
Four typical causes and what to check:
- The
codexcommand is not found. Open a new terminal window: the path to the binary updates only in new sessions. - PowerShell refuses to run the script. Run the whole install command, with
-ExecutionPolicy ByPass: the link toinstall.ps1alone is not enough. - It asks you to sign in to ChatGPT although you have a key. Check that
config.tomlsits in~/.codex(on Windows in%USERPROFILE%\.codex) and thatmodel_providermatches the table name in[model_providers.*]. - An error about an unknown model. The
modelvalue goes to codexkey as is, so the ID must match the catalog. Check againstGET https://api.codexkey.online/v1/models.
One more thing for Windows: WSL1 has not been supported since Codex 0.115, so you need WSL2.
Fake Codex builds: how to avoid malware
The word "download" attracts plenty of traps. On August 17, 2026, PhishFort described a campaign: a sponsored link for the search "codex mac download" led to a shared chat on the real chatgpt.com domain, and the chat told 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 from this in practice:
- Do not trust ads above the search results. Go straight to chatgpt.com/download or github.com/openai/codex.
- Never paste commands from other people's chats and pages into a terminal, even when the domain looks familiar: anyone can publish a shared chat on chatgpt.com.
- A string of random letters and digits in a command is a reason to stop.
- The npm package is called
@openai/codex. Check the name character by character: similar packages belong to someone else.
We do not discuss installers from Telegram channels, "cracked" builds, or versions with the subscription check disabled. You do not need them: an API key gives legal access to Codex models without a ChatGPT subscription.
FAQ
How do I download Codex on a PC?
Pick a surface. The ChatGPT app with Codex mode is downloaded at chatgpt.com/download, the CLI is installed with npm install -g @openai/codex or the script from chatgpt.com/codex, and the extension is found in the editor's marketplace by the ID openai.chatgpt. The download is free, and you pay for the model.
Does Codex on Windows need WSL?
No. Per OpenAI's documentation Codex runs natively on Windows: the agent executes commands in PowerShell inside a sandbox. Choose WSL if you need Linux tools or your workflow already lives in WSL2. Windows 11 is recommended, and Windows 10 version 1809 or newer is supported on a best-effort basis.
How is the Codex app different from the CLI and the extension?
They are three interfaces to one agent. The app suits parallel chats, Git work and file preview, the CLI suits the terminal and scripts, and the extension suits work inside the editor. Cloud Codex in the browser is separate and requires a ChatGPT sign-in.
Download Codex for free: is it paid?
The client itself is free, and the CLI is open under the Apache-2.0 license. You pay for the models: with a ChatGPT plan or per token with an API key. On Free and Go the app offers GPT-6 Luna; details are in Codex for free.
How do I install Codex in VS Code?
Open Extensions, find the OpenAI extension by the ID openai.chatgpt, install it and sign in. To work through codexkey, after installing add the provider to ~/.codex/config.toml and the key to auth.json, then restart the editor. The extension also works in Cursor and Windsurf.
Does Codex work in Russia?
Signing in directly through ChatGPT is unreliable: Russia is not on the list of countries where OpenAI supports the API. So for a PC install we suggest the setup with a codexkey API key and payment in rubles by Russian card or SBP. More in Codex in Russia in 2026.