Course contents
Walkthrough
Install and Authenticate
Codex CLI on macOS / Linux, signing in, picking a model.
Watch · Riley Brown
A fast orientation of the Codex surface you just installed — panels, projects, preview, and the loop.
Steps · 0 / 4 done
Install via npm
Install the Codex CLI globally.
bashnpm install -g @openai/codexVerifycodex --versionprints a version.Authenticate
Run codex once and pick "Sign in with ChatGPT" — usage is included with Plus/Pro/Team plans. Prefer pay-per-token? Set OPENAI_API_KEY in your shell instead.
bashcodexVerifyAfter auth, the status line shows your account, model, and approval mode.Pick a model for mobile work
gpt-5.1-codex-max is the agentic default and the right call for scaffolding. /model also sets reasoning effort — medium for iteration speed, high or xhigh when it must not miss.
prompt/model gpt-5.1-codex-maxVerifyThe status line confirms the model and reasoning effort. You can switch mid-session at any time.Give it project memory
Codex reads AGENTS.md — at repo root, in subfolders, and globally in ~/.codex — the same idea as CLAUDE.md from Course 1. Keep build commands and house rules there.
markdown# AGENTS.md - Expo app, TypeScript strict. Dev: `npx expo start`. - Tests: `npm test`. Run them before declaring anything done. - Never hand-edit ios/ or android/ — they're generated by prebuild.VerifyA fresh session mentions your conventions without being told.
Check your understanding
Q1. Two valid ways to authenticate with Codex are…
· Tick off the 4 step(s) above.
· Score 100% on the quiz.
Vocabulary in this lesson
Plain-English definitions from the AI Coding Dictionary.