Sign in with Google
OpenToolslogo
ToolsExpertsSubmit a Tool
Advertise
HomeResourcesCodexOpenAI Codex Quick Start Guide
AllNext

Codex Resources

  • OpenAI Codex Quick Start Guidequickstart
  • Codex CLI: The Complete Guide
  • Mastering AGENTS.md: Codex Custom Instructions
  • Codex Skills & Plugins: Extend Your Agent

OpenAI Codex Quick Start Guide

quickstartbeginner6 min readVerified Apr 28, 2026

Get Codex running in under 5 minutes. Covers CLI installation on every platform, authentication with ChatGPT or API keys, your first tasks, the desktop app, Codex Cloud, and IDE extensions.

codexopenaiquickstartinstallationclicodex-cloudvs-codebeginner

Key Takeaways#

  • Install in one command — Codex CLI is available via npm, Homebrew, or GitHub releases for macOS, Linux, and Windows.
  • Sign in with ChatGPT or use an API key — two auth paths get you coding in under two minutes.
  • Run your first task from the terminal — codex Add-a-hello-world-function-to-main.py creates real code changes.
  • Use the desktop app for a GUI workflow — launch Codex App for a visual, conversational coding experience.
  • Access Codex Cloud for browser-based tasks — head to chatgpt.com/codex to run tasks without installing anything.
  • Pair with your IDE — VS Code, Cursor, and Windsurf extensions integrate Codex directly into your editor.

System Requirements#

RequirementMinimum
macOS12+ (Monterey)
LinuxUbuntu 20.04+ / Debian 10+
Windows10+ (native or WSL2)
Node.js22+ (for npm install)
RAM4 GB
NetworkOutbound HTTPS to api.openai.com

Installation#

npm (All Platforms)#

The fastest way to install Codex CLI globally:

npm install -g @openai/codex

This works on macOS, Linux, and Windows. Node.js 22 or later is required. Verify the install:

codex --version

Homebrew (macOS / Linux)#

For macOS and Linux users who prefer Homebrew:

brew install --cask codex

GitHub Releases#

Download the latest binary directly from the OpenAI Codex GitHub repository releases page. This is ideal for CI environments or machines without Node.js:

  1. Go to the Codex GitHub releases page.
  2. Download the archive for your OS and architecture.
  3. Extract the binary and add it to your PATH.

Tip: GitHub releases include standalone binaries with no runtime dependencies, making them the best option for Docker containers or minimal server installs.


Authentication#

Codex offers two authentication methods. Choose the one that fits your workflow.

1. Sign In with ChatGPT#

The simplest option for users with a ChatGPT Plus, Pro, Team, or Enterprise subscription:

codex auth login

This opens a browser window for OAuth login. After you authenticate with your OpenAI account, you are ready to go. No API key management required.

2. API Key#

For pay-as-you-go usage with an OpenAI API key:

codex auth login --api-key

Alternatively, set the OPENAI_API_KEY environment variable:

export OPENAI_API_KEY="sk-..."

Add this line to your shell profile (~/.bashrc, ~/.zshrc) to persist it across sessions.

Verify Your Auth#

codex auth status

This confirms your active account type and session validity.


Your First CLI Task#

  1. Navigate to a project directory:
cd ~/projects/my-app
  1. Run your first Codex task:
codex "Add a hello world function to main.py"

Codex reads your codebase, understands the context, and generates the change. It shows you a diff before applying it, so you stay in control.

  1. Try more prompts:
  • codex "Write unit tests for the auth module"
  • codex "Fix the type error in src/api/handlers.ts"
  • codex "Add JSDoc comments to all exported functions"
  • codex "Refactor the database connection to use a connection pool"
  1. Use Codex in full-auto mode for trusted tasks:
codex --full-auto "Add input validation to the registration form"

Caution: --full-auto applies changes without confirmation. Use it only for low-risk tasks or in throwaway branches.

Helpful CLI Flags#

FlagWhat It Does
--modelSwitch the underlying model (e.g., codex --model o4-mini)
--full-autoApply changes without asking for confirmation
--quietSuppress non-essential output
--helpList all available flags and subcommands

Codex Desktop App#

For a visual, conversational workflow, use the Codex desktop application:

codex app

The desktop app provides:

  • A chat-based interface for describing tasks in natural language
  • A file browser showing which files Codex plans to modify
  • One-click approval or rejection of proposed changes
  • Session history so you can review past tasks

The app is available on macOS and Windows. Download it from the OpenAI Codex product page if you have not installed it already.


Codex Cloud#

Run Codex tasks directly in your browser — no local installation required:

  1. Go to chatgpt.com/codex.
  2. Sign in with your ChatGPT account.
  3. Describe your task in natural language.
  4. Review the generated code diff and approve it.

Codex Cloud executes tasks in a sandboxed environment. It supports public GitHub repositories out of the box, and private repos can be connected with a single authorization step. This is the fastest way to try Codex if you want to evaluate it before installing anything locally.


IDE Integrations#

Codex integrates directly into popular code editors through official extensions.

VS Code#

  1. Open the Extensions marketplace in VS Code (Ctrl+Shift+X or Cmd+Shift+X).
  2. Search for OpenAI Codex.
  3. Click Install.
  4. Authenticate when prompted — the extension uses the same ChatGPT or API key credentials.

Cursor#

  1. Open Cursor Settings.
  2. Navigate to the Extensions panel.
  3. Search for OpenAI Codex and install it.
  4. Codex commands appear in the Command Palette (Ctrl+Shift+P).

Windsurf#

  1. Open the Windsurf marketplace.
  2. Search for OpenAI Codex.
  3. Install the extension and authenticate.

Once installed, you can invoke Codex from your editor sidebar or command palette, review proposed diffs inline, and accept or reject changes without leaving your IDE.


Next Steps#

  • Codex configuration — Learn how CODEX.md files set project-level instructions and guardrails.
  • Full CLI reference — Explore all flags, subcommands, and advanced usage patterns.
  • Codex Cloud deep dive — Set up private repo access, configure sandbox options, and manage team permissions.
  • MCP integration — Connect external tools and data sources to expand Codex capabilities.
NextCodex CLI: The Complete Guide

On this page

  • Key Takeaways
  • System Requirements
  • Installation
  • npm (All Platforms)
  • Homebrew (macOS / Linux)
  • GitHub Releases
  • Authentication
  • 1. Sign In with ChatGPT
  • 2. API Key
  • Verify Your Auth
  • Your First CLI Task
  • Helpful CLI Flags
  • Codex Desktop App
  • Codex Cloud
  • IDE Integrations
  • VS Code
  • Cursor
  • Windsurf
  • Next Steps

Footer

Company name

The right AI tool is out there. We'll help you find it.

LinkedInX

Knowledge Hub

  • News
  • Resources
  • Newsletter
  • Blog
  • AI Tool Reviews
  • YouTube Summary
  • YouTube Transcript Generator

Industry Hub

  • AI Companies
  • AI Tools
  • AI Models
  • MCP Servers
  • AI Tool Categories
  • Top AI Use Cases

For Builders

  • Submit a Tool
  • Experts & Agencies
  • Advertise
  • Compare Tools
  • Favourites

Legal

  • Privacy Policy
  • Terms of Service

© 2026 OpenTools - All rights reserved.