01 / Intro
What is Codex?
Codex is OpenAI's coding agent. It can run locally through Codex CLI, work in an IDE, or run as Codex Web in ChatGPT. Use it for reading code, planning changes, fixing bugs, writing tests, and preparing PR notes.
02 / Setup
Install
curl -fsSL https://chatgpt.com/codex/install.sh | shnpm install -g @openai/codexbrew install --cask codexRun codex, then choose Sign in with ChatGPT. API-key auth is also available for advanced users.
03 / Workflow
808 recommended workflow
- Ask Codex to read first, without editing.
- Ask for a plan listing files, risks, and verification steps.
- Let it make one small change at a time.
- Run tests, lint, and build before calling the task done.
- Ask for a delivery summary with changes, checks, and remaining risks.
04 / Guardrails
Safety and permissions
Do not paste secrets
Never paste API keys, passwords, payment data, or customer private data. Share variable names only.
Official sources
Based on OpenAI Codex GitHub README and OpenAI Developers docs. Re-check the latest official version before using these commands.