기본 명령어, 주요 옵션, 설정 방법, 실전 워크플로를 정리한 Codex CLI 레퍼런스
Switch between Core Commands, Key Options, Setup, and Workflow Examples to focus on the commands you need.
Use keyword search to match command names, option notes, and example commands at once.
Copy the command snippet with one click, then run it directly in your terminal.
codexLaunch interactive mode in the current directory.codex "Summarize this repository structure"Start a session with a task-focused prompt.codex exec "Review this PR diff"Run a one-shot review task from the CLI.cat plan.md | codex exec -Read instructions from stdin.codex review --uncommittedReview local changes before committing.codex review --base mainReview changes against main branch.codex resume --lastContinue the latest session quickly.codex resume <SESSION_ID>Resume a specific saved session.codex fork --last최신 세션을 분기해 다른 방향으로 이어갑니다.codex fork <SESSION_ID> "대안 구현을 시도해줘"특정 세션에서 새 검토 브랜치를 시작합니다.codex apply <TASK_ID>지정한 작업의 최신 diff를 로컬에 적용합니다.codex cloud diff <TASK_ID>로컬 적용 전에 패치를 미리 확인합니다.codex cloud listCodex Cloud에서 사용 가능한 작업을 확인합니다.codex cloud diff <TASK_ID>로컬 적용 전에 diff를 미리 확인합니다.codex app앱을 실행합니다(필요 시 설치 후 실행).codex app --help플랫폼 지원과 시작 옵션을 확인합니다.codex exec --profile fast "Inspect routing"Run a low-cost analysis task.codex exec --profile deep "Design refactor plan"Use deeper reasoning for architecture tasks.codex exec --sandbox read-only "List potential bugs"Analyze code without changing files.codex exec --sandbox workspace-write "Apply the fix"Allow edits in the current workspace.codex -a on-requestStart interactive mode with request-based approvals.codex exec -a never "Run checks and summarize"Use no-approval policy for scripted runs.codex exec --full-auto "이 수정 사항을 구현하고 테스트해"요청 기반 승인과 workspace-write 샌드박스로 실행합니다.codex resume --last --full-auto같은 편의 설정으로 최근 세션을 재개합니다.codex --search "Check latest framework changes"Start with web search enabled.codex resume --last --searchContinue the latest session with web search.codex -c model="gpt-5-codex"Launch with a specific model override.codex exec -c 'sandbox_permissions=["workspace-write"]' "Explain risk"Override sandbox permissions inline.printenv OPENAI_API_KEY | codex login --with-api-keyLogin non-interactively with environment variable.codex login --device-authStart interactive device authentication.codex mcp add docs -- command --flagRegister a new MCP server command.codex mcp get docsInspect details of a configured MCP server.codex mcp-serverstdio에서 MCP 서버 모드를 시작합니다.codex mcp-server -c model="gpt-5-codex"일회성 설정 오버라이드와 함께 시작합니다.codex features list활성화 전 실험/단계적 플래그를 점검합니다.codex features enable <feature_name>로컬 Codex 설정에서 기능 플래그를 활성화합니다.codex completion zsh > ~/.zsh/completions/_codexInstall zsh completion manually.codex completion fish > ~/.config/fish/completions/codex.fishInstall fish completion script.codex exec --profile fast --sandbox read-only "Find dead code candidates"Run static analysis without editing files.codex exec --profile fast --sandbox read-only "Map i18n key usage"Inspect translation usage safely.codex exec --profile default --sandbox workspace-write "Implement tooltip improvements"Run a typical implementation task.codex exec --profile default --sandbox workspace-write "Update docs and tests"Apply code and documentation updates together.codex review --uncommittedRun a quick local review pass.codex review --uncommitted --title "before-merge-check"Attach a custom review title.codex exec --json -o result.json "List migration risks"Capture structured events and final summary.codex exec --json "Generate release notes draft"Use JSONL stream in custom tooling.This page consolidates Codex CLI essentials into one searchable reference so you can move from lookup to execution quickly.
It covers Codex CLI basics, major options, setup commands, and reusable workflow examples in a single searchable view.
Examples are templates. Replace placeholder prompts and choose sandbox/approval settings appropriate for your environment.
Review after CLI updates and when your team changes profiles, sandbox policies, or automation scripts.
Yes. Each card has a copy button that copies the command string so you can paste it into your terminal immediately.