Skip to Content

Codex

Install

npm install -g @openai/codex

Authenticate

export OPENAI_API_KEY="sk-..."

Add to your shell profile so it persists. Get a key from platform.openai.com/api-keys .

Launch

Press ++4 or open the Command Palette → Add Codex.

Terminal
$ codex
Codex CLI v0.1
 
$ Fix the failing tests in auth module
✓ Updated src/auth.test.ts
✓ All tests passing
$
Sandbox mode — isolates shell commands from your host system:codex --sandboxModel selection — override the default model:codex --model o4-miniRun codex --help for the full list of model IDs.Approval policyPolicyBehaviorsuggest (default)Proposes changes, waits for approval.auto-editAuto-applies file edits, asks before running shell commands.full-autoApplies edits and runs commands without prompting.codex --approval-policy full-auto
Last updated on