Codecademy Logo

Introduction to Codex CLI

Related learning

  • Learn to build maintainable projects with AI using Codex CLI in this course on agentic coding, specs, TDD, and context engineering.
    • With Certificate
    • Beginner Friendly.
      1 hour
  • Learn Python programming with AI tools. This course takes you from fundamentals to best practices using Codex CLI for serious development.
    • Includes 4 Courses
    • With Certificate
    • Beginner Friendly.
      7 hours

Starting Codex CLI

Begin a Codex CLI session by entering codex in your terminal. The CLI automatically detects the project structure and initiates an interactive dialogue.

Initialize with /init

Use /init in Codex CLI to analyze projects and create a base AGENTS.md file. Run /status to verify loaded configurations.

File References in Prompts

Codex CLI uses @ to specify files (e.g., @spec.md) in prompts and ! to execute inline shell commands (e.g., !node --test).

Next in Codex Workflow

Codex CLI’s “next” workflow in AGENTS.md helps navigate and complete feature lists incrementally with one command.

Interview Technique in Codex

In Codex CLI, the interview technique asks developers questions to customize generated code and specs based on personal preferences and experience.

Codex CLI Overview

Codex CLI is a terminal-based AI coding agent that operates in the developer’s environment, reading files and executing commands.

Learn more on Codecademy

  • Learn to build maintainable projects with AI using Codex CLI in this course on agentic coding, specs, TDD, and context engineering.
    • With Certificate
    • Beginner Friendly.
      1 hour
  • Learn Python programming with AI tools. This course takes you from fundamentals to best practices using Codex CLI for serious development.
    • Includes 4 Courses
    • With Certificate
    • Beginner Friendly.
      7 hours