Usage
$ codex [options] <prompt>
Options
-h, --help Show help information and exit
-m, --model <model> Specify the model to use (default: codex-mini-latest)
-i, --image <path> Path to the file containing image input
-v, --view <rollout> View previously saved session records
-q, --quiet Non-interactive mode, only prints the final output of the assistant
-a, --approval-mode <mode> Override approval policy: 'suggest', 'auto-edit', or 'full-auto'
--auto-edit Automatically approve file edits; will still prompt for command confirmation
--full-auto Automatically approve edits and commands in sandbox environment
--no-project-doc Do not automatically include 'codex.md' file from the repository
--project-doc <file> Include specified Markdown file as context
--full-stdout Do not truncate stdout/stderr of command output
Dangerous Options
--dangerously-auto-approve-everything
Skip all confirmation prompts and execute commands directly (no sandbox protection)
For use only in temporary local testing environments
Experimental Options
-f, --full-context Start in "full context" mode, loading the entire repository into context
and applying bulk edits in a single operation
Only compatible with --model parameter
Examples
$ codex "Write and run a Python program that prints ASCII art"
$ codex -q "Fix build issues"