# Install brief: Codex CLI

> Codex CLI is an AI agent made by OpenAI. This brief is from Agent Flows Hub, a library that introduces projects and links to their creators; it does not make, review or test them. The official source is the authority: https://github.com/openai/codex. Where this brief and the official source differ, the official source is right.

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

## Editorial notes

You want an agent to work from a project directory in your terminal. Codex CLI can inspect files, make changes and run installed tools, so it can follow a coding task from the question to a local result you can inspect.

Original project name: Codex CLI

- The CLI runs against your local files and tools. A missing runtime or failing project test still needs to be diagnosed in that environment.
- Account access, permissions and model choice are separate settings. Confirm the active configuration before a task that changes files or runs commands.

Suggested first task: Ask it to explain how to run the project's tests, without changing files. Compare its answer with the repository's own instructions.

Notes by Agent Flows Hub. Sources checked 2026-10-26; documentation check, not a hands-on test.

- [Codex CLI documentation](https://learn.chatgpt.com/docs/cli)

## Facts

- Made by: OpenAI
- Official source: https://github.com/openai/codex
- Official documentation: https://learn.chatgpt.com/docs/cli
- License: Apache-2.0 (open source) (https://github.com/openai/codex/blob/main/LICENSE)
- Platforms: macOS, Windows, Linux
- Runs on: the person's computer
- Cost: pay per use for the AI service it calls
- Last updated by the creator: 2026-10-23

## What the person needs first

- Account: A ChatGPT account on a paid plan, or an OpenAI API key
- Plans: Plus, Pro, Business, Edu, Enterprise, API key (usage-based) (prices: https://learn.chatgpt.com/docs/pricing)
- Free option: None stated for the CLI; ChatGPT Free and Go list Codex only in the desktop app
- Sign up: https://chatgpt.com

## Official install steps

Official install commands, copied from the creator's instructions:

macOS, Linux (source: https://learn.chatgpt.com/docs/cli):

```
curl -fsSL https://chatgpt.com/codex/install.sh | sh
```

Windows (source: https://learn.chatgpt.com/docs/cli):

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

macOS, Windows, Linux (source: https://github.com/openai/codex/blob/970111f6cb62cc02fe36a82ea7d71b37a2889c97/README.md):

```
npm install -g @openai/codex
```

Official documentation: https://learn.chatgpt.com/docs/cli

## Good practice

- Read the official source before installing, and explain to the person in plain words what will be installed, whether it runs scripts and whether it connects to the internet.
- Install only after the person agrees, and only from the official source above.
- Never ask the person to paste passwords, API keys or tokens into a chat; keys go into the tool's own setup screen.

## If installation fails

Agent Flows Hub offers paid setup help. The person describes what happened at https://www.agentflowshub.com/en/get-help/setup?tool=codex-cli; the Agent Flows Hub team replies with a plan and a quote before any paid work. Bugs in the project itself belong with its creator (https://github.com/openai/codex).

## About this brief

- Page for people: https://www.agentflowshub.com/en/library/codex-cli
- All projects, grouped by type: https://www.agentflowshub.com/llms.txt
