What you will learn
- Install and verify Codex CLI.
- Choose between the CLI, IDE extension, app, and cloud tasks.
- Open a first session inside a repository.
Minimal setup
Codex CLI works with the files and tools on your machine. OpenAI recommends the standalone installer on macOS and Linux; npm remains a cross-platform alternative. Check the version before signing in.
# Recommended on macOS and Linux curl -fsSL https://chatgpt.com/codex/install.sh | sh # npm alternative npm install -g @openai/codex codex --version cd ~/code/my-project codex
On first launch, follow the sign-in flow shown by Codex. Inside a session, /status summarizes the active directory, model, and permissions.
/status /permissions /model
Choose a surface
- CLI for fast local work, scripts, Git, and terminal-native workflows.
- IDE for changes closely tied to the file or selection in view.
- App for longer tasks, visual review, and coordinating parallel work.
- Cloud for delegated work in a prepared, isolated environment.
Codex alongside Cursor, Windsurf, or your IDE
You do not need to choose a single tool. Use Cursor, Windsurf, or your IDE for localized edits, visual navigation, and small refactors. Use Codex when you need to traverse a repository, run commands, review Git, automate checks, or complete a whole task with evidence.
Practical rule: if the context fits on one screen, the IDE works well; if the context lives across files, commands, logs, and commits, Codex usually gives you more operational control.
First check
Start with a read-only request: “Summarize the architecture, tell me how tests run, and do not edit files.” Confirm that Codex identifies the language, package manager, and Git state correctly.
Lesson deliverable
What you will build
A working Codex setup and a first read-only session.
Why it matters
Before delegating changes you need to know which surface to use, which permissions are active, and how to verify the setup.
Starter repository or files
Any small Git repository. If you do not have one, create an empty folder with README.md.
Steps
- 1. Install Codex CLI.
- 2. Check the version.
- 3. Open Codex inside the repository.
- 4. Run /status, /permissions, and /model.
- 5. Ask for analysis without edits.
Copy-ready Codex request
Summarize this repository's architecture, tell me how tests run, and do not edit files. Cite concrete paths and separate observed facts from inferences.
Expected result
Codex identifies the project type, likely commands, and boundaries of what it has not inspected yet.
Verification command
codex --version && git status --short
Manual check
Confirm that git status shows no changes after the analysis.
Mini exercise
Open a second session and request the same analysis limited to one specific folder.
Show solution
Use explicit scope: “Focus only on app/ and state which parts you did not read.”
Evidence to save
Save Codex version, /status output, and clean git status.