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.

01

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
02

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
codex
03

Understand 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.

04

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.

Return to the full curriculum.

Search Codex Me

navigateEnter openEsc close