Walkthrough
Install and Authenticate
Codex CLI on macOS / Linux, signing in, picking a model.
Steps · 0 / 3 done
Install via npm
Install the Codex CLI globally.
npm install -g @openai/codexVerify`codex --version` prints a version.Authenticate
Run codex once. It will open a browser for sign-in. Or set OPENAI_API_KEY in your shell if you prefer key-based auth.
codexVerifyAfter auth, the prompt shows your account and current model.Pick a model for mobile work
Newer reasoning-tier models are best for app scaffolding; mid-tier for iteration. You can switch mid-session.
/model gpt-codexVerifyThe prompt confirms the new model. Ask any question; the model name appears in the response header.
Check your understanding
Q1. Two valid ways to authenticate with Codex are…
· Tick off the 3 step(s) above.
· Score 100% on the quiz.