Codex CLI: the 5 commands you need first

Codex CLI is OpenAI's coding agent in your terminal. Install it with one line, type codex, and these five slash commands cover most of a day: /init, /status, /permissions, /model and /review.

Short answer: Codex CLI is OpenAI's coding agent in your terminal. Install it (on macOS or Linux: curl -fsSL https://chatgpt.com/codex/install.sh | sh), open your project and type codex. Then five commands cover most of it: /init writes your AGENTS.md, /status shows this session's setup, /permissions sets what Codex may do without asking, /model picks the model and reasoning effort, and /review checks your changes. Its settings live in ~/.codex/config.toml.

Codex has dozens of slash commands, and a full list is a lot to take in on day one. These five are the ones the Codex CLI page itself suggests when you start, and they are enough to work safely from the first task.

Checked against the Codex docs on 14 November 2026.

Nothing loads from YouTube until you press play. Then Google receives your IP address and may set its own storage. Narrated with an AI-generated voice. Privacy

How do you install and start Codex CLI?

On macOS or Linux:

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

On Windows, the docs give a standalone installer to run from a new PowerShell window, and npm and Homebrew work too. Running the same line again updates Codex.

Then open a project folder and type codex. The first time, choose Sign in with ChatGPT or another sign-in method. A good first prompt is the one the docs use: "Tell me about this project".

Which five commands should you learn first?

CommandWhat it doesWhen to use it
/initCreates an AGENTS.md with instructions for CodexOnce per project, then edit it to match how you build and test
/statusShows the current session's configurationWhen something behaves oddly: which model, which permissions, which folder
/permissionsChooses what Codex is allowed to doBefore a task that needs more (or less) freedom than the default
/modelPicks the model and the reasoning effortLower effort for small, clear tasks; higher for debugging and big changes
/reviewReviews your changes and finds issues, without editing filesAfter every task, before you commit

/review only appears inside a Git repository. It can review your uncommitted changes, one commit, or your branch against a base branch.

Where do Codex's settings live?

In config.toml. Your personal defaults are in ~/.codex/config.toml, inside the .codex folder in your home directory. A project can add its own .codex/config.toml, which Codex loads only when you trust the project; the closest file to your working folder wins. What you pick with /model or /permissions applies to the session; to make it the default, set it in config.toml.

What comes after these five?

When the five feel natural, the next ones worth knowing are /compact to shrink a long conversation, /new to start fresh, /diff to see the changes and codex exec to run Codex from a script. All of them, with what each does: the 20 Codex CLI commands worth knowing.

Where can you check this?

Can you write config.toml without learning every key?

Config Studio for Codex explains all 21 surfaces Codex reads, from config.toml and the sandbox to AGENTS.md and rules, with 6 starter packs to begin from. Pick what you want to change, see the exact file it would write and copy it; nothing touches your disk until you do.

The tool

Do it in your browser.

Codex

Config Studio for Codex

Every file Codex reads, explained: config.toml, sandbox and approvals, AGENTS.md, rules, hooks, skills, MCP servers and the status line, with an editor that writes them for you.

Keep reading

More from the blog.

Every post