Skip to content
RepoQuarry

OpenAI Codex CLI

Compare

OpenAI's open-source terminal coding agent; sign in with a ChatGPT plan or API key, or run local models through Ollama or LM Studio.

Open-source alternative toClaude CodeCursor

OpenAI Codex CLI at a glance

Checked 21 Oct 2026

Codex CLI is an Apache-2.0 coding agent from OpenAI that runs on your computer. From the terminal it inspects, edits and runs code, connects tools through MCP servers, and runs scripted or CI jobs with codex exec or the Codex GitHub Action. There is also an IDE extension for VS Code, Cursor and Windsurf. Sign in with ChatGPT (Codex is included in Free, Go, Plus, Pro, Business, Edu and Enterprise plans, with usage limits) or use an OpenAI API key; the --oss flag runs local open models through LM Studio or Ollama. Runs on macOS, Linux and Windows, with a native Windows sandbox.

Cite this pageRepoQuarry. “OpenAI Codex CLI.” Checked 21 Oct 2026. https://repoquarry.dev/projects/codex-cli

How much of Claude Code does it replace?

Use it instead of paying for Claude Code?
Personal use
Confirmed: Yes
For a business
Confirmed: Yes

5 of 6 jobs. Very close match for terminal, IDE, MCP and CI use; the docs do not describe writing commits or opening pull requests from the CLI.

Partial: Edit code across a repo from the terminal with an AI agent Partial replacement
Partial: Run commands and tests Partial replacement
Partial: Use the agent inside VS Code or JetBrains Partial replacement
Partial: Connect tools and data through MCP Partial replacement
No: Write commits and pull requests Not covered
Partial: Run the agent headless in scripts or CI (GitHub Actions) Partial replacement

For write commits and pull requests, see other Claude Code alternatives. You may also need to build an interface, an API server and hosting yourself.

How much of Cursor does it replace?

Use it instead of paying for Cursor?
Personal use
Confirmed: Yes
For a business
Confirmed: Yes

3 of 7 jobs. Agent edits and commands from the terminal or an IDE extension; not an editor, so no tab completion. Cloud agents are the separate Codex Web product.

No: Code in an AI-first editor Not covered
No: Multi-line tab completion and next-edit prediction Not covered
Partial: Let an agent plan and edit across many files Partial replacement
Partial: Run terminal commands and tests from the agent Partial replacement
No: Ask questions about your whole codebase Not covered
Partial: Connect tools and data through MCP Partial replacement
No: Run agents in the cloud in the background Not covered

For code in an AI-first editor, multi-line tab completion and next-edit prediction, ask questions about your whole codebase, run agents in the cloud in the background, see other Cursor alternatives. You may also need to build an interface, an API server and hosting yourself.

Facts, with sources

Every answer links to where we found it. We read the documentation; we did not install it.

Report a correction
QuestionAnswerSourceChecked
Runs on my machine? Confirmed: Yes, a command-line agent that runs on your computer; cloud models run on OpenAI's servers unless you use --oss Codex CLI is a coding agent from OpenAI that runs locally on your computer. github.com · codex#readme ↗ today
Code licence Confirmed: Apache-2.0 Apache License Version 2.0, January 2004 github.com · LICENSE ↗ today
Model weights licence Confirmed: No separate model weights github.com · codex#readme ↗ today
Commercial use Confirmed: Allowed under Apache-2.0 each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license github.com · LICENSE ↗ today
Paid services needed? Partial: Not required with local models (--oss with Ollama or LM Studio) or the limited ChatGPT Free plan; paid ChatGPT plans and OpenAI API keys are optional Use a local open source model provider. Codex uses --local-provider, your configured oss_provider, or prompts you to choose between LM Studio and Ollama. learn.chatgpt.com · developer-commands ↗ today
Hardware Unknown: Not documented in the README or CLI docs Know the answer? —
Operating systems Confirmed: macOS, Linux and Windows (native PowerShell with a Windows sandbox, or WSL2) Run the following on Windows to install Codex CLI: github.com · codex#readme ↗ today
Setup effort Confirmed: Easy; one-line install script, npm or Homebrew, then sign in with ChatGPT Then simply run `codex` to get started. github.com · codex#readme ↗ today

No licence changes since we started watching. Licence watch: follow OpenAI Codex CLI and we email you if its licence terms change.

Growth and activity in detail

Is it popular, and is anyone still working on it? From GitHub.

Numbers appear after the first nightly fetch from GitHub.

Cookie preferences

Choose what we may store in your browser. You can change this any time from Cookie settings in the footer.

Essential

Security, and remembering this choice. rq-consent · 12 months

Always on