Codex rides on your ChatGPT plan. If you already pay for ChatGPT Plus, Pro, Business, Edu, or Enterprise, you already have access. This lesson is the Codex-only walkthrough: confirm the plan, open the right window, check what you are about to paste before you paste it, install, and send a first prompt.
If you have not picked a tool yet, go back to the "Install your AI coding agent" lesson and choose between Codex, Claude Code, and Grok Build first. This lesson assumes you already picked Codex.
Go to chatgpt.com and sign in. Check Settings for your plan name. Codex needs Plus or higher: Plus, Pro, Business, Edu, or Enterprise. The free ChatGPT plan does not include Codex. If you are on the free plan, upgrade before you go further, then keep this browser tab open and signed in. The first time you run Codex on your machine, it opens this browser to finish login.
You are not installing an app from a store. You paste one line of text into a plain command window.
Mac: press Command + Space, type Terminal, press Enter. A window opens with a blinking cursor and a line starting with % or $.
Windows: click Start, type PowerShell, and open Windows PowerShell, not Command Prompt. The prompt should read PS C:\Users\.... If it just reads C:\Users\... with no PS in front, that is Command Prompt. Close it and open PowerShell instead.
Leave this window open for the next step.
Do not paste anything into a window that can touch your whole computer without checking it first. Two checks, both take under a minute.
First, copy the install line for your OS from Step 4 below and paste it into a second AI tool, in a chat window, not the terminal. Ask it plainly: "What does this command do?" Read the answer before you decide to run it.
Second, check the domain by eye. The Codex install command points at chatgpt.com. Every command in this academy points at one of exactly three domains: claude.ai, chatgpt.com, or x.ai. If something you were handed points anywhere else, stop and ask before you run it.
Copy only the line for your operating system. Paste it into Terminal or PowerShell. Press Enter and wait for it to finish.
Mac:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
When it finishes, close the window completely and open a new one. Then check that Codex is on your PATH:
codex --version
If the new window says the command is not found, the installer likely added itself to PATH after this window had already opened. A fresh window almost always fixes it.
ai-setup-test (Finder or File Explorer is fine).Mac:
cd ~/Desktop/ai-setup-test
Windows:
cd $HOME\Desktop\ai-setup-test
codex and press Enter.Create a file named hello.txt in this folder. The file should contain the sentence: I am set up.
Open the folder in Finder or File Explorer. You should see hello.txt. Open it. You should see that sentence. You did not type the file by hand. Codex did.
codex again.You can open a new terminal window, cd into any folder, run codex, and get a reply. The hello.txt file exists on your Desktop inside ai-setup-test and contains the sentence you asked for. That is a complete, working Codex setup on your machine.
Template included: Members get a one-page Codex setup card: both OS install commands, the two verify-before-you-run checks, and the exact first prompt to confirm it works. Find it in your member dashboard under Templates.
Short on time? Alliance Optimal will implement this end to end, wired into your stack, and hand you the keys.