Skip to content

AgentUsage-basedIntermediate

Codex CLI

Lets you hand coding tasks to OpenAI's agent, which edits and runs code on your computer

View original on GitHub

Install request

Your browser blocked copying. Select the text and copy it yourself.

Paste this into your AI agent (Claude Code, Codex or similar). It asks the agent to read the files and wait for your OK before installing.

Codex CLI in a terminal window, making a step-by-step plan to explain a codebase
Image: OpenAI (Apache-2.0). Original file

What it does

Codex CLI is OpenAI's coding agent that runs locally on your computer. You describe a change in plain words; it inspects the files in your project, makes edits and runs the tools already installed on your machine. You choose the model and how much permission it gets, and you can also call it from scripts. It suits developers and technical makers who work in the terminal.

It is open source and runs on your own computer, so you can see exactly what it changes.

Before you start

  • A computer with macOS, Windows or Linux.
  • A ChatGPT account on a paid plan, or an OpenAI API key
  • No free option. You need one of the plans below.
  • Pay per use. The AI service it calls charges for what you use.

How to start

  1. Install itPaste the install request into an AI agent you already use, or run the official command yourself or follow the official guide.macOS, Linuxcurl -fsSL https://chatgpt.com/codex/install.sh | sh

    Install command

    Your browser blocked copying. Select the text and copy it yourself.

    This is the official install command, copied from the creator's instructions. Paste it where the instructions say.

    Windowspowershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

    Install command

    Your browser blocked copying. Select the text and copy it yourself.

    This is the official install command, copied from the creator's instructions. Paste it where the instructions say.

    macOS, Windows, Linuxnpm install -g @openai/codex

    Install command

    Your browser blocked copying. Select the text and copy it yourself.

    This is the official install command, copied from the creator's instructions. Paste it where the instructions say.

  2. Sign up and choose a planCreate an account or sign in, then compare the official plans.
  3. Give it a first taskDescribe what you want in your own words, and check the first result before relying on it.

Steps follow the creator's instructions.

Stuck setting it up?

Tell us what happened. We confirm scope and price before any paid work.

Get help
View original

Install request

Your browser blocked copying. Select the text and copy it yourself.

Paste this into your AI agent (Claude Code, Codex or similar). It asks the agent to read the files and wait for your OK before installing.