Set up Codex (Mac and Windows)

Video 2 min 40 secAbout 20 min to do
Not startedSession 6 of 7, 0 done · Next up: Set up Grok Build (Mac and Windows)

Chapters

Shortcuts
  • Space or Kplay and pause
  • Left and Rightback and forward 5 seconds
  • J and Lback and forward 10 seconds
  • , and .step one frame
  • Shift + , and .slower and faster
  • 0 to 9jump to that tenth
  • Ffullscreen
  • Mmute
  • Ccaptions

Shortcuts stay out of the way while you are typing a note.

Lesson notes and steps

The written version of this session, with the commands and templates to copy.

Optional alternative. This academy teaches Claude Code by default. This session is here for readers who already work in ChatGPT and would rather not add a second subscription.

Codex rides on your ChatGPT plan, and every plan now includes it, Free and Go too; the plan decides how much you get to use, not whether you get in at all. This lesson is the Codex-only walkthrough: confirm your account, 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.

What you will use

  • A Mac (macOS 13 or later) or a Windows 10/11 PC
  • An internet connection
  • A ChatGPT account on any plan: Free, Go, Plus, Pro, Business, Edu, or Enterprise (chatgpt.com)

Step 1: Confirm your account and sign in

Go to chatgpt.com and sign in. OpenAI lists Codex as included on every ChatGPT plan, Free and Go included (learn.chatgpt.com/docs/pricing). What changes with the plan is how much Codex you get: Free is sized for quick coding tasks, Go for lightweight tasks, and Plus and above for real day-to-day building, with the allowance refilling on a rolling five-hour window. Start on whatever plan you are on today and upgrade later only if you hit the usage limit. Keep this browser tab open and signed in; the first time you run Codex on your machine, it opens this browser to finish login.

Step 2: Open Terminal (Mac) or PowerShell (Windows)

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.

Step 3: Read before you run

Do not paste anything into a window that can touch your whole computer without checking it first. One check, under a minute.

Read the install line for your OS in Step 4 below and 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.

This is the one command you run before Codex exists to explain itself. Once it is installed, it asks before it writes or changes anything, so keep those permission prompts on, read what it is about to do, and ask Codex itself if a step is ever unclear.

Step 4: Install Codex

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.

Step 5: Your first run

  1. Make a folder on your Desktop named ai-setup-test (Finder or File Explorer is fine).
  2. In your terminal, go there.

Mac:

cd ~/Desktop/ai-setup-test

Windows:

cd $HOME\Desktop\ai-setup-test
  1. Type codex and press Enter.
  2. The first launch opens your browser. Approve the login using the chatgpt.com account from Step 1. Return to the terminal.
  3. When you see a prompt, type this exactly and press Enter:

Create a file named hello.txt in this folder. The file should contain the sentence: I am set up.

  1. Approve the file write if Codex asks.

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.

Step 6: If it fails

  • Login page errors or Codex will not start: confirm you are signed in to the right ChatGPT account at chatgpt.com, then run codex again. If it starts but says you are out of usage, that is your plan's rolling five-hour allowance, not a broken install; wait for it to refill or upgrade the plan.
  • "Command not found" after installing: close every open terminal window and open a completely fresh one. PATH changes only take effect in new windows.

You are done when...

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.

Want it done for you?

Short on time? Agentic Quarks will implement this end to end, wired into your stack, and hand you the keys.

Implementation engagements from $2,500
Narration transcript (what the video says)

Codex rides on your ChatGPT plan. If you already pay for Plus, Pro, Business, Edu, or Enterprise, you have access. In the next twenty minutes you confirm your plan, verify the install command, run it, and send Codex its first real prompt.

Go to chatgpt dot com and sign in. Open Settings and check your plan name. Codex needs Plus or higher: Plus, Pro, Business, Edu, or Enterprise. The free plan does not include Codex, so upgrade now if you need to, then keep this tab open.

Next, open the right window. On a Mac, press Command Space, type Terminal, and press Enter. On Windows, click Start, type PowerShell, and open Windows PowerShell, not Command Prompt. Leave this window open for the next step.

One check, under a minute. Read the install line yourself, then check the domain by eye: every command here points at chatgpt dot com. Anything else, stop and ask first. Once Codex is installed, it asks before it changes anything, so keep that permission prompt on.

Paste the Mac install line into Terminal and press Enter. Text scrolls while it installs. When it finishes, close the window completely, open a fresh one, and type codex space dash dash version to confirm Codex is on your path.

Make a folder named ai-setup-test on your Desktop, then start Codex there. The first launch opens your browser to approve login. When you see a prompt, type this exactly: create a file named hello dot t x t containing the sentence, I am set up.

Open the ai-setup-test folder in Finder or File Explorer. There it is: hello.txt. Open it and you will see the sentence, I am set up. You did not type that file by hand. Codex read the prompt, wrote it, and saved it.

You are done when you can open a new terminal, run codex, and get a reply. The hello.txt file sits inside ai-setup-test with your sentence written inside it. Members get the full setup card and first prompt pack in the template vault.

Codex is installed, verified, and it already wrote a file for you. That same install works for every terminal task in this academy. Next session, you set up Grok Build, the second install worth having if you already pay for a Grok account.

The course this session belongs to

What you will build in Start Here

Who this is for, what you need, and your first AI agent installed

7 sessions, 17 min of video, about 1.9 hours to do, 7 free.

  1. 01Start here: who this is for and what you needFree2:23 video
  2. 02What you will be able to do when you finishFree2:17 video
  3. 03What is AI, in plain English (skip if you know this)Free2:32 video
  4. 04Know your computer: Mac or Windows, and what the terminal isFree2:29 video
  5. 05Set up Claude Code (Mac and Windows)Free2:35 video
  6. 06Set up Codex (Mac and Windows)Free2:40 videoYou are here
  7. 07Set up Grok Build (Mac and Windows)Free2:25 video

Cancel anytime from your account page, and a 14-day money back on your first month that you trigger yourself. Prefer to pay once? Lifetime All-Access is $399.

By purchasing you agree to the Terms and the Refund Policy.

Members share their results from this session in the community. See what is included.