Walkthrough
Install and Authenticate
Codex CLI on macOS / Linux, signing in, picking a model.
Steps · 0 / 4 done
Install via npm
Install the Codex CLI globally.
npm install -g @openai/codexVerify`codex --version` prints 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.
codexVerifyAfter 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.
/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.
# 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.