Installation
You signed up for ChatGPT Plus, you have heard that Codex can write code across four different surfaces, and now you are staring at the downloads page wondering which one to install first. The answer: all three local surfaces take under 5 minutes combined, and they share the same authentication and configuration once set up.
What You’ll Walk Away With
Section titled “What You’ll Walk Away With”- The Codex App installed on macOS (Apple Silicon)
- The Codex CLI available globally via
codexcommand - The Codex IDE extension running in VS Code, Cursor, or Windsurf
- All three surfaces sharing the same
~/.codex/configuration directory - Verification that each surface launches and authenticates correctly
Install the Codex App (macOS)
Section titled “Install the Codex App (macOS)”The Codex App is a native macOS application for Apple Silicon Macs. It provides the richest experience: parallel threads, worktree isolation, built-in Git tools, automations, and an integrated terminal.
-
Download the DMG from persistent.oaistatic.com/codex-app-prod/Codex.dmg.
-
Open the DMG and drag Codex to your Applications folder.
-
Launch Codex from Applications. macOS may ask you to confirm opening an app from an identified developer — click Open.
-
Sign in with your ChatGPT account or OpenAI API key when prompted.
-
Select a project folder. Codex will remember this project for future sessions.
Install the Codex CLI
Section titled “Install the Codex CLI”The CLI is open-source, built in Rust, and runs on macOS, Linux, and Windows. Choose your preferred package manager.
npm install -g @openai/codexVerify the installation:
codex --versionUpgrade to the latest version later with:
npm install -g @openai/codex@latestbrew install codexVerify the installation:
codex --versionUpgrade later with:
brew upgrade codexAfter installing, run codex in a terminal. The first time you launch it, you will be prompted to sign in with your ChatGPT account or API key.
Install the IDE Extension
Section titled “Install the IDE Extension”The Codex IDE extension works with VS Code, Cursor, Windsurf, and JetBrains IDEs.
Install from the Visual Studio Code Marketplace or open VS Code and search for “Codex” in the Extensions panel.
After installation, the Codex icon appears in your left sidebar. Click it, sign in, and you are ready.
Install the extension by searching for “Codex” in Cursor’s extension panel or use cursor:extension/openai.chatgpt.
The activity bar in Cursor displays horizontally by default, which can hide the Codex icon. If you do not see it, look for collapsed items or pin the Codex extension in the bar.
Search for “Codex” in Windsurf’s extension panel or use windsurf:extension/openai.chatgpt.
For IntelliJ, PyCharm, WebStorm, Rider, and other JetBrains IDEs, install the JetBrains Codex integration from the JetBrains plugin page. It supports ChatGPT login, API keys, and JetBrains AI subscriptions.
Moving Codex to the Right Sidebar
Section titled “Moving Codex to the Right Sidebar”Most developers prefer the Codex panel on the right side of their editor, keeping the file explorer on the left.
In VS Code, simply drag the Codex icon from the left sidebar to the right. In Cursor, you may need to temporarily set the activity bar orientation to vertical in Workbench settings, restart, drag the icon, then reset to horizontal.
How the Surfaces Connect
Section titled “How the Surfaces Connect”All three local surfaces (App, CLI, IDE Extension) share the same configuration and credentials:
| Shared resource | Location |
|---|---|
| User config | ~/.codex/config.toml |
| Authentication | ~/.codex/auth.json or OS keyring |
| MCP servers | Defined in config.toml, shared by all surfaces |
| AGENTS.md | Read from ~/.codex/AGENTS.md (global) and project root (project-level) |
This means you only configure once. Set your approval policy in config.toml, and the App, CLI, and IDE extension all respect it. Add an MCP server via codex mcp add, and it appears in all three surfaces.
The Codex App and IDE extension also sync when both are open in the same project. The App tracks which files you view in your editor (Auto Context), and threads started in one surface appear in the other.
When This Breaks
Section titled “When This Breaks”App does not open on macOS: Ensure you are on Apple Silicon (M1 or later). Intel Macs are not supported. Check System Settings > Privacy & Security if macOS blocks the app.
CLI install fails with npm: Make sure Node.js 18+ is installed (node --version). If you get EACCES errors, do not use sudo — instead run npm config set prefix ~/.npm-global and add ~/.npm-global/bin to your PATH.
IDE extension not visible: In Cursor, the extension may be hidden in the collapsed section of the horizontal activity bar. Look for a >> overflow menu in the bar, or switch to vertical orientation temporarily.
Authentication does not persist: Check that ~/.codex/auth.json exists after signing in. If it is missing, your OS credential store may be in use. See the authentication guide for credential storage configuration.
“codex: command not found” after Homebrew install: Run brew link codex or ensure /opt/homebrew/bin is in your PATH.