← All guides

What Is the Codex CLI? (2026 Guide)

OpenAI's terminal coding agent, what it does, how to install it, and how to run it against other models.

The Codex CLI is OpenAI's terminal-based coding agent: it reads your codebase, edits files, and runs commands from the shell. It's installed via a package manager and authenticated with your OpenAI account or API key. By default it runs OpenAI models, but with a router like Wuwei you can run Codex-style workflows against cheaper models with pay-as-you-go billing and no proxy setup.

The Codex CLI is OpenAI's command-line coding agent. Instead of chatting in a browser, you drive it from your terminal: it reads your project, plans a change, edits files, and can run commands, then iterates. It's part of the same wave as Claude Code: agentic coding that lives in the shell rather than the editor.

What the Codex CLI does

Core capabilities

CapabilityWhat it means
Reads your codebaseUnderstands project context before making changes.
Edits filesApplies multi-file changes directly from the terminal.
Runs commandsCan execute build/test commands and react to the output.
IteratesLoops on a task until it's done, agent-style.

How to install the Codex CLI

Getting started

  1. Install the CLIInstall via the package manager OpenAI documents (check the official Codex CLI docs for the current command).
  2. AuthenticateSign in with your OpenAI account or provide an API key as the docs describe.
  3. Run it in your projectOpen your repo in the terminal and start the Codex CLI to give it a task.
  4. Give it a taskDescribe what you want in plain language; it plans, edits, and runs from there.
Model names, versions, exact pricing and install commands change frequently, always check the provider's official documentation for the current details.

Running Codex CLI against other models

By default the Codex CLI runs OpenAI models. But the terminal-agent pattern isn't locked to one provider. With a router in front, you can point Codex-style workflows at other models and pay less for routine work. That's useful when you want the agentic flow but not the single-provider bill.

What that looks like with Wuwei

BenefitDetail
One endpoint, many modelsRun agentic coding against Claude, GPT, Grok, Gemini, Kimi, DeepSeek and more.
Cheaper routine workRoute boilerplate and refactors to low-cost models to cut spend.
Pay-as-you-goNo fixed subscription, billed for what you actually run.
No proxy to buildNatively supports OpenAI-compatible endpoints, so there's nothing to self-host.

FAQ

What is the Codex CLI?

It's OpenAI's terminal-based coding agent. It reads your codebase, edits files, and runs commands from the shell, iterating on a task the way an agent does.

How do I install the Codex CLI?

Install it via the package manager OpenAI documents, then authenticate with your OpenAI account or API key. Check the official Codex CLI docs for the exact current command.

Where are the Codex CLI docs?

OpenAI publishes official Codex CLI documentation covering install, auth, and usage. That's the authoritative source for commands and options.

Can I use the Codex CLI with other models?

The agentic terminal workflow isn't limited to one provider. With a router like Wuwei you can point Codex-style coding at other, cheaper models.

The Codex CLI brings OpenAI's coding agent into your terminal, great for hands-off, multi-file work. If you want that same agentic flow without being locked to one provider's bill, Wuwei lets you run it against many models with pay-as-you-go pricing and no proxy setup.

Windows · macOS · Linux · free, no login