00 β Orientation
What you are installing, in one minute
Codex is a coding agent. Underneath it is the same kind of model as a chatbot, but with a machine built around it so it can act, not just answer.
A chat window can only hand you text. An agent can open your files, run your code, read what happened, and fix it, pausing for your approval along the way. That is the whole difference, and it is why the setup below is worth fifteen minutes.
Think of a fast, very literal research assistant sitting at your computer. It types the commands; you make the decisions and check the result. Nothing happens on your machine without your yes.
01 β The one distinction that matters
What can it touch?
Every way of using AI differs mainly in what it is allowed to reach. Where the work runs is also where your data goes, so this is a privacy question as much as a convenience one.
| How you use it | Your files | Run your code | Where it runs |
|---|---|---|---|
| Chat windowchatgpt.com | β none | β you run it | your browser |
| Codex, on your laptopterminal or app | β reads & edits | β runs & checks | your machine |
| Codex Cloudchatgpt.com/codex | a copy on GitHub | β on servers | OpenAI's servers |
This guide sets up the middle row β Codex on your own laptop, in the terminal or in the app β and describes the other two rows.
02 β Access
Getting Codex for free
You need a (free) OpenAI account and a way to pay for usage. As a student, you have one without spending anything.
Option A β the student credits (recommended)
Verified university students in the US and Canada can claim $100 in free Codex credits, and they work even on a free ChatGPT account. That is enough to run everything this course asks of you.
Sign in at chatgpt.com with your school email, then claim the student credits from OpenAI's Codex-for-students page. Verification can take a little time, so start it before class.
Option B β a plan you already pay for
If you already pay for ChatGPT Plus ($20/month, which includes Codex), just sign in with that. A paid plan gives you higher ongoing limits than the one-time credit bucket, so you will not have to think about running out.
You do not need both. Pick the free credits or your existing plan and move on.
03 β Install
Codex in the terminal
Codex comes in two forms, the terminal program and the app, and either one works for this course. This section installs the terminal program; the next section installs the app. The terminal is a plain text window where you type one line, press Enter, and the computer does it. It is already on your machine. You only need it to start Codex; after that you talk in plain English.
-
Open the Terminal app
Press
β Command+Space, type Terminal, and press Enter. A small text window opens. That is it.ScreenshotCapture: Spotlight search showing "Terminal", or the empty Terminal window once open.Take this on a real Mac during setup. -
Install Codex with one line
Copy the line below, paste it into Terminal, and press Enter. It downloads Codex as a single small program. Nothing else is required.
$ curl -fsSL https://chatgpt.com/codex/install.sh | sh$ curl -fsSL https://chatgpt.com/codex/install.sh | sh Downloading codex⦠installed to /usr/local/bin/codex # when it finishes, you get your prompt back
Approximate output β the exact wording may differ.
-
Start Codex and sign in
Type
codexand press Enter. The first time, choose Sign in with ChatGPT; your browser opens, you approve, and you are back.$ codexScreenshotCapture: the "Sign in with ChatGPT" prompt on first launch, and the browser "authorize" screen.Two images; take on a real machine.
-
Open PowerShell
Click Start, type PowerShell, and press Enter. Codex now runs on Windows directly, so this is all you need.
ScreenshotCapture: the Start menu showing "PowerShell", or the open blue PowerShell window.Take this on a real Windows PC. -
Install Codex with one line
Copy the line below into PowerShell and press Enter. It installs Codex directly, with no WSL and no extra setup for this course.
PS> irm https://chatgpt.com/codex/install.ps1 | iexPS> irm https://chatgpt.com/codex/install.ps1 | iex Installing codex⦠done. Restart your terminal if 'codex' is not found.
Approximate output β the exact wording may differ.
-
Start Codex and sign in
Type
codexand press Enter. Choose Sign in with ChatGPT; your browser opens, you approve, and you are back β exactly like on a Mac.PS> codexScreenshotCapture: the "Sign in with ChatGPT" prompt on first launch in PowerShell.Take on a real Windows machine.
You do not need WSL, Node.js, or any other tool for this course. Ignore online guides that start with those; the one line above is enough.
Many guides say to run npm install -g @openai/codex. That works too, but it first needs another program called Node.js. You do not need that path β the one-line installer above gets you the exact same Codex.
04 β The app
Codex in an app
The same Codex comes in two app forms. You click instead of type, and the tasks in this course work the same way in either. Pick the form you prefer.
In your editor (VS Code)
This keeps your files in a sidebar and Codex in a panel beside them; changes are highlighted in the code and you approve them with a click.
-
Install VS Code
Download it from code.visualstudio.com. It is the same on Mac and Windows.
-
Add the Codex extension
Open the Extensions panel on the left, search for Codex, and install the one published by OpenAI (id
openai.chatgpt). A Codex icon appears in the sidebar.ScreenshotCapture: the Extensions search showing the OpenAI Codex extension, and the Codex icon in the sidebar. -
Sign in
Click Continue with ChatGPT, using the same account as before. You are ready.
In the browser (Codex Cloud)
Nothing to install. You hand Codex a task and it works on OpenAI's servers, then gives you back a pull request. Best when your project already lives on GitHub, or when you want to delegate and check back later.
-
Open Codex Cloud
Go to chatgpt.com/codex and sign in with your ChatGPT account.
-
Connect GitHub and send a task
Connect your GitHub account, pick the project Codex may see, describe the task in plain English, and send it. Review the result and open a pull request when you are happy.
ScreenshotCapture: the "connect GitHub" step and a finished task showing its diff.
Codex Cloud runs your code on OpenAI's servers, not your laptop. For sensitive or restricted data, keep the work local (the terminal or editor version) instead.
05 β Staying in control
The three permission modes
Codex runs in one of three permission modes. You set it when you start, or change it mid-session with the /permissions command (OpenAI's permission modes page). In the ChatGPT desktop app and the IDE extension, use the permissions control below the composer. The question behind all three: how much would you let a brand-new assistant do unsupervised?
Ask for approval Β· default
asks before it acts
Reads your files and answers questions. It asks you before every edit and every command.
Best for exploring unfamiliar code, or reading the plan first. Start here.
Approve for me
acts inside your folder
Edits and runs inside your project without asking each time, but stops before touching the network or anything outside it.
Best for everyday work on your own project once you trust it.
Full access
no guardrails
Edits, runs, and reaches the network with no approval prompts. Powerful and easy to regret.
Best for rare, trusted tasks β and only when you know why you need it.
The default is Ask for approval. Move to Approve for me once you trust the agent on your own project.
06 β Try it
Your first task
Do not save it for a real project. Point it at a small folder you do not mind experimenting on, and ask for something concrete. In the app, open the same folder and give the same request.
$ cd my-first-project $ codex βΊ explain what the files in this folder do Codex reads the folder, then answers β and waits for your approval before it changes or runs anything.
Good first asks
"Explain what this script does." Β· "Add comments to this file." Β· "What columns are in this data?"
The habit to build
Read the change it proposes and approve it only once you understand it. An unverified result is not a result.
07 β When something breaks
Something will break. That is fine.
Errors during setup are normal and are never a sign you are behind. The reflex to build:
- Read the last line
The final line of an error usually says what went wrong. Start there.
- Paste it to Codex
Copy the full error message, paste it in, and read the explanation before you try the fix.
- Ask for help early
Stuck past 15 minutes? Post to the course board or raise your hand in the build block. Do not debug alone for ten minutes.
If the install truly will not cooperate today, use the browser-based Codex Cloud so you are not blocked. We will sort the local install in office hours.