ChatGPT Plus, Pro, Business, Edu, and Enterprise plans include Codex. Using Codex with your ChatGPT subscription gives you access to the latest Codex models and features.
You can also use Codex with API credits by signing in with an OpenAI API key.
For a limited time, try Codex for free in ChatGPT Free and Go, or enjoy 2x Codex rate limits with Plus, Pro, Business and Enterprise subscriptions.
Setup
The Codex app is available on macOS (Apple Silicon).
-
Download and install the Codex app
The Codex app is currently only available for macOS.
-
Open Codex and sign in
Once you downloaded and installed the Codex app, open it and sign in with your ChatGPT account or an OpenAI API key.
If you sign in with an OpenAI API key, some functionality such as cloud threads might not be available.
-
Select a project
Choose a project folder that you want Codex to work in.
If you used the Codex app, CLI, or IDE Extension before you’ll see past projects that you worked on.
-
Send your first message
After choosing the project, make sure Local is selected to have Codex work on your machine and send your first message to Codex.
You can ask Codex anything about the project or your computer in general. Here are some examples:
If you need more inspiration, check out the explore section.
Install the Codex extension for your IDE.
-
Install the Codex extension
Download it for your editor:
-
Open the Codex panel
Once installed, the Codex extension appears in the sidebar alongside your other extensions. It may be hidden in the collapsed section. You can move the Codex panel to the right side of the editor if you prefer.
-
Sign in and start your first task
Sign in with your ChatGPT account or an API key to get started.
Codex starts in Agent mode by default, which lets it read files, run commands, and write changes in your project directory.
-
Use Git checkpoints
Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.
The Codex CLI is supported on macOS, Windows, and Linux.
-
Install the Codex CLI
Install with npm:
npm install -g @openai/codexInstall with Homebrew:
brew install codex -
Run
codexand sign inRun
codexin your terminal to get started. You’ll be prompted to sign in with your ChatGPT account or an API key. -
Ask Codex to work in your current directory
Once authenticated, you can ask Codex to perform tasks in the current directory.
-
Use Git checkpoints
Codex can modify your codebase, so consider creating Git checkpoints before and after each task so you can easily revert changes if needed.
Use Codex in the cloud at chatgpt.com/codex.
-
Open Codex in your browser
Go to chatgpt.com/codex. You can also delegate a task to Codex by tagging
@codexin a GitHub pull request comment (requires signing in to ChatGPT). -
Set up an environment
Before starting your first task, set up an environment for Codex. Open the environment settings at chatgpt.com/codex and follow the steps to connect a GitHub repository.
-
Launch a task and monitor progress
Once your environment is ready, launch coding tasks from the Codex interface. You can monitor progress in real time by viewing logs, or let tasks run in the background.
-
Review changes and create a pull request
When a task completes, review the proposed changes in the diff view. You can iterate on the results or create a pull request directly in your GitHub repository.
Codex also provides a preview of the changes. You can accept the PR as is, or check out the branch locally to test the changes:
git fetch git checkout <branch-name>