Module 00 · beginner · 20 min
Getting Started
Codex is an agentic coding environment available in the ChatGPT desktop app, CLI, IDE extension, and cloud. It can inspect repositories, edit files, run commands, browse, and coordinate longer work with your approval model.
Choose your surface
Use the desktop app for projects, parallel tasks, visual review, browser work, and long-running workflows. Use the CLI when you want Codex directly inside a terminal. The IDE extension keeps the current editor context close to the task.
- Desktop: Projects, worktrees, review, and rich tools
- CLI: Fast terminal-first sessions
- IDE: Editor-aware implementation
Install and authenticate
Install the CLI with npm, then launch it from a repository. Sign in with your ChatGPT account or configure an API key when your environment calls for one.
npm i -g @openai/codex
cd my-project
codexUnderstand the safety boundary
Local Codex runs tools inside a sandbox and asks for approval when an operation exceeds the active policy. Network access, destructive file operations, credentials, and external side effects deserve deliberate review.
Your first task
Ask for an outcome and include the evidence you expect. Codex can inspect first, explain its plan when useful, implement, run checks, and hand back the exact files changed.
Inspect this repository, explain how it starts, then add a health endpoint and verify it with the existing test setup.Continue learning
Use the official OpenAI Codex documentation as the final reference for current commands, settings, and availability.