Skip to content
Courses/Codex for programmers/Install Codex and understand its surfaces

Install Codex and understand its surfaces

Set up Codex CLI, sign in, and choose the right surface before touching a real repository.

What you will learn

  • Install and verify Codex CLI.
  • Choose between the CLI, IDE extension, app, and cloud tasks.
  • Open a first session inside a repository.

Minimal setup

Codex CLI works with the files and tools on your machine. OpenAI recommends the standalone installer on macOS and Linux; npm remains a cross-platform alternative. Check the version before signing in.

TerminalCode
# Recommended on macOS and Linux
curl -fsSL https://chatgpt.com/codex/install.sh | sh

# npm alternative
npm install -g @openai/codex

codex --version
cd ~/code/my-project
codex

On first launch, follow the sign-in flow shown by Codex. Inside a session, /status summarizes the active directory, model, and permissions.

TerminalCode
/status
/permissions
/model

Choose a surface

  • CLI for fast local work, scripts, Git, and terminal-native workflows.
  • IDE for changes closely tied to the file or selection in view.
  • App for longer tasks, visual review, and coordinating parallel work.
  • Cloud for delegated work in a prepared, isolated environment.

First check

Start with a read-only request: “Summarize the architecture, tell me how tests run, and do not edit files.” Confirm that Codex identifies the language, package manager, and Git state correctly.