Skip to content

openai/codex

Official

Lightweight coding agent that runs in your terminal

OpenAI Codex reached 73,674 GitHub stars in 2026 -- the terminal-first rival to Claude Code, backed by OpenAI with Apache-2.0 license and ChatGPT plan auth. Vibe Builders and developers run `codex` in minutes via npm, with subagents, sandboxing, MCP support, and CI/CD headless mode.

76,296 stars10,844 forksRustUpdated April 2026

Best for

Vibe BuilderDeveloper
✅ Reviewed by My AI Guide — vetted for vibe builders

Our Review

OpenAI Codex is OpenAI's terminal-based AI coding agent -- 73,674 GitHub stars and Apache-2.0 licensed as of April 2026. It starts with npm install and ChatGPT plan login for instant autonomous code work.

What OpenAI Codex does:

  • Terminal coding agent run `codex` in your terminal to start an AI that reads, writes, and executes code across your project.
  • ChatGPT plan auth sign in with Plus, Pro, Business, or Enterprise account; no separate API key for plan users.
  • Sandboxing modes pick workspace-write, full-access, or danger-full-access; network off by default for safety.
  • Subagents spawn parallel agents to handle complex multi-file tasks.
  • Multi-model support switch between GPT-5.4, GPT-5.3-Codex via config.
  • Non-interactive mode use `--non-interactive` flag for headless CI/CD runs.
  • MCP integration connect to MCP servers for extra tool access.
  • Worktree support integrate git worktrees for parallel branches.

OpenAI Codex ecosystem:

  • Multi-surface access CLI primary, plus Codex App at chatgpt.com/codex and IDE extensions for VS Code, Cursor, Windsurf.
  • Claude Code alternative pairs with Ollama for local models or runs on OpenAI's GPT-5 lineup.

Getting started:

Install with npm install -g @openai/codex. Run codex login and sign in via ChatGPT. Start coding with codex "fix the login bug". Check docs at openai.com/codex for config and alpha notes.

Limitations:

OpenAI Codex CLI is still in alpha as of April 2026 -- frequent breaking changes in the 0.x releases mean production workflows need version pinning. Requires a paid ChatGPT Plus or Pro subscription for authentication; there is no free tier. Officially tested on macOS and Windows; Linux support is unofficial. The tool is terminal-only with no GUI or web interface.

Cons

  • Alpha status at 0.119.0-alpha.14 brings bugs and frequent changes.
  • macOS optimized; Windows support lags with separate docs needed.
  • Ties to paid ChatGPT plans ($20+/mo); API fallback incurs extra costs.
  • Terminal-first design skips inline IDE edits found in Cursor.

Our Verdict

Vibe Builders grab OpenAI Codex to beat Claude Code on token spend during rapid repo spins -- 3x efficiency lets you iterate prototypes all day on ChatGPT Plus. Simple npm install drops the terminal barrier that blocks agent trials.

Developers run subagents and --non-interactive in CI for GPT-5.4 code gen at production scale. MCP hooks pull in custom tools without rebuilds.

Skip OpenAI Codex if you chase 1M context depth or prefer IDE inline diffs. Basic users pass too -- it demands git fluency and terminal comfort.

Frequently Asked Questions

What is OpenAI Codex and how does it work?

OpenAI Codex is a Rust CLI tool from OpenAI that deploys autonomous AI agents in your terminal. Run `codex` to analyze repos, edit files, and execute tests via GPT-5.4 models. It spawns subagents for multi-file work in sandboxed safety. Authenticate once with your ChatGPT account.

Is OpenAI Codex free?

OpenAI Codex works free with any paid ChatGPT plan -- Plus at $20/month includes it without extra API costs. Pro, Business, and Enterprise plans cover heavier use. For example, select Codex in the model dropdown to convert prompts like "sort a list in Python" to code. API key mode bills separately by token.

How does OpenAI Codex compare to Claude Code?

OpenAI Codex cuts tokens 3x per task versus Claude Code per 2026 benchmarks. Claude Code offers 1M context and stronger reasoning; Codex prioritizes ChatGPT auth and subagents. Choose OpenAI Codex when cost efficiency and OpenAI models fit your stack. Choose Claude Code when deep context rules.

Can I use OpenAI Codex in CI/CD pipelines?

OpenAI Codex runs headless in CI/CD with the `--non-interactive` flag. Pass tasks like `codex --non-interactive 'refactor auth module'`. It integrates via npm in pipelines on GitHub Actions or similar. In a workflow YAML step after `actions/checkout`, run `npm ci` then the codex command. Subagents handle parallel file ops reliably.

How do I install and get started with OpenAI Codex?

Install OpenAI Codex with `npm install -g @openai/codex` on macOS or Linux. Run `codex login` and follow the ChatGPT browser prompt. Issue commands like `codex 'add user auth'` to start. Full setup takes under 2 minutes; see 2026 docs for Windows tweaks.

What is codex?

OpenAI Codex reached 73,674 GitHub stars in 2026 -- the terminal-first rival to Claude Code, backed by OpenAI with Apache-2.0 license and ChatGPT plan auth. Vibe Builders and developers run `codex` in minutes via npm, with subagents, sandboxing, MCP support, and CI/CD headless mode.

What license does codex use?

codex uses the Apache-2.0 license.

What are alternatives to codex?

Explore related tools and alternatives on My AI Guide.

Great for: Pro Vibe Builders

Skip if: You need something more beginner-friendly or guided

🔒

Open source & community-verified

Apache-2.0 licensed — free to use in any project, no strings attached. 76,296 developers have starred this, meaning the community has reviewed and trusted it.

Reviewed by My AI Guide for relevance, quality, and active maintenance before listing.