Skip to content

Codex CLI cheatsheet

Every command below was checked against the installed codex-cli 0.147.0 binary or the official OpenAI Docs on 2026-08-18. “First-hand” means it appeared in codex --help or subcommand help; “docs” means the official documentation is the source of truth for that behavior.

Command drill

16 verified Codex CLI commands. Read the task, type the command, press Enter. Every answer is on this page's tables - this drill only asks what the verified data already states.

Answer key - all 16 commands
  1. Print the installed CLI version. codex --version
  2. Update Codex to the latest version. codex update
  3. Authenticate with ChatGPT OAuth, device auth, an API key, or an access token from stdin. codex login
  4. Remove stored authentication credentials. codex logout
  5. Generate a diagnostic report for installation, config, auth, runtime, Git, and session issues. codex doctor
  6. Start an interactive terminal session in the current directory. codex
  7. Choose or change the model and reasoning effort in the TUI. /model
  8. Show current session configuration. /status
  9. Review changes and find issues from inside a session. /review
  10. Open the permissions picker and change the active permissions profile. /permissions
  11. Allow read-only inspection; edits and commands requiring approval remain blocked unless approved. codex -s read-only
  12. Use the common local-work preset: workspace writes plus approval when Codex needs escalation. codex -s workspace-write -a on-request
  13. Ask before commands outside the trusted command set. codex -a untrusted
  14. Never ask for approval; command failures return to the model. codex -a never
  15. Route eligible approval requests through automatic review with workspace-write sandboxing. codex --approve-for-me
  16. Skip confirmation prompts and sandboxing. codex --dangerously-bypass-approvals-and-sandbox