Creative Tim UICreative Tim UI

Cheat Sheet · Commands & Shortcuts

Codex logoCodex

A quick reference for OpenAI's Codex CLI, how to launch it, the in-session slash commands, approval modes and the flags you'll actually use.

CLI commands & flags

codexStart an interactive Codex session
codex "refactor utils"Start with an initial prompt
codex exec "…"Run non-interactively (automation / CI)
codex --model <name>Choose the model
codex resumeContinue a previous session
codex --helpShow all commands and flags

In-session & approvals

/approvalsSet how much Codex can do without asking
/diffShow the pending changes as a diff
/clearClear the conversation context
Suggest modeCodex proposes changes; you approve each one
Auto-edit modeCodex edits files but asks before running commands
Full-auto modeCodex edits and runs in a sandbox without prompts

Run an agent without the setup

Spin up a hosted open-source AI agent with Creative Tim, bring your own key or run it on credits.

Create Agent

Frequently asked questions

What are Codex approval modes?

They control autonomy: suggest (approve every change), auto-edit (edits freely, asks before commands), and full-auto (works in a sandbox without prompts).

Can I run Codex in CI?

Yes, use codex exec for non-interactive runs in scripts and pipelines.

Codex or Claude Code?

Both are terminal agents from rival labs; the choice usually comes down to model preference and ecosystem, see our Claude Code vs Codex comparison.

Compare Codex