Install Codex

Install the Codex CLI if you work in a terminal or want scripting and CI. Install the ChatGPT desktop app if you want projects, parallel chats, and a review pane in one window. Install the IDE extension if you live in VS Code, Cursor, or Windsurf. All three share sign-in and config.toml, so you can use more than one.

Which one should you install?

Codex CLIChatGPT desktop app (Codex)IDE extension
Where it runsYour terminalA desktop windowInside your editor
Best forTerminal workflows, scripts, CI with codex execSeveral projects at once, worktrees, scheduled tasks, built-in browserFocused edits on the files you have open
PlatformsmacOS, Linux, WindowsmacOS, Windows, Linux (preview)VS Code, Cursor, Windsurf; JetBrains and Xcode through their own integrations
InstallOne-line installer, npm, or Homebrewchatgpt.com/download or Microsoft StoreEditor marketplace
GuideInstall the CLIInstall the desktop appInstall in your editor

Not sure? Start with the CLI. It’s a small install, it shows exactly what Codex is doing, and everything you configure carries over to the other two.

Before you install

  1. Account. You’ll sign in with a ChatGPT account on a plan that includes Codex, or with an OpenAI API key billed at API rates. See ChatGPT sign-in or API key.
  2. Git. Optional but recommended. Codex uses it for reviewing and reverting changes. OpenAI suggests making a Git checkpoint before and after each task.
  3. Your OS. Check what your machine supports with our system check.

After you install

In this section

  • Install the Codex CLI Step-by-step Codex CLI install with OpenAI's standalone installer, npm, or Homebrew, then sign in and run codex for the first time.
  • Install the Codex desktop app Codex's desktop experience now lives in the ChatGPT desktop app. How to install it on macOS, Windows, or Linux and start a Codex chat in a project folder.
  • Install Codex in your editor How to add the Codex IDE extension to VS Code, Cursor, or Windsurf, and how to enable Codex in JetBrains IDEs and Xcode, with links to each official listing.
  • Use Codex with WSL2 on Windows Run Codex in WSL2 on Windows: switch the desktop app's agent to WSL, install the CLI inside Linux, share config with CODEX_HOME, and avoid the WSL1 trap.
  • Update or uninstall Codex Update the Codex CLI with the same method you installed it with, update the desktop app on each OS, and remove Codex cleanly, including your ~/.codex data.

Questions people ask

Can I install the CLI and the desktop app together?

Yes. OpenAI's docs say the CLI and IDE extension share the same configuration layers and cached login. MCP server settings are shared across the desktop app, CLI, and IDE extension on the same machine.

Do I need Node.js to install Codex?

Only if you choose the npm install method. The official standalone installers and Homebrew don't need Node.js.

Sources

We link to the official source for every instruction on this page. If anything here disagrees with them, trust the official source and tell us.