Walkthrough

Install and Authenticate

Codex CLI on macOS / Linux, signing in, picking a model.

Steps · 0 / 3 done
  1. Install via npm

    Install the Codex CLI globally.

    npm install -g @openai/codex
    Verify`codex --version` prints a version.
  2. 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.

    codex
    VerifyAfter auth, the prompt shows your account and current model.
  3. 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-codex
    VerifyThe 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.