Skip to content
Agents tracked: 502 Releases (7d): 762 Agent status: no reported issuesSince last limit reset: Claude 11d · Codex 9d For AI agents: Markdown Updated Nov 22, 2026

OpenAI Codex alternatives

OpenAI Codex by OpenAI costs Free + $8/mo and is open source. If you need something cheaper, open source, self-hosted or simply different, here are 10 alternatives that do the same job, ranked by how widely they are used, with the differences that matter.

10 OpenAI Codex alternatives, by popularity

  1. 1
    Claude Code · Anthropic · Terminal
    $20/mo

    Anthropic's agentic coding tool that reads a codebase, edits files and runs commands from the terminal, with VS Code and JetBrains integrations plus desktop, web and mobile access. It runs Claude models through a Claude subscription, an Anthropic Console API key or supported third-party cloud providers.

    • Paid plans from $20/mo vs $8/mo
    • Proprietary
  2. 2
    OpenCode · Anomaly · Terminal
    Free + $10/mo

    Open-source coding agent from Anomaly (the team behind SST) that runs as a terminal UI, desktop app or IDE extension and connects to 75+ model providers, including local models and existing ChatGPT or GitHub Copilot logins. OpenCode 2 is now available; per the docs, OpenCode 1 and 2 both use the opencode command and cannot be installed side by side under the default command.

    • Paid plans from $10/mo vs $8/mo
  3. 3
    Pi · Earendil Inc. · Terminal
    Free (OSS)

    Minimal, extensible open-source coding agent harness with interactive TUI, print/JSON, RPC and SDK modes, created by Mario Zechner and now maintained by Earendil Inc. It supports 15+ model providers through API keys or OAuth and is customized with TypeScript extensions, skills and packages. Its tools and extensions run with the permissions of the Pi process; Pi does not sandbox tool calls or ask before each one.

    • Less widely used (Gid Score 72 vs 84)
    • Growing fast: usage up 32% in 30 days
  4. 4
    Gemini CLI · Google · Terminal
    API usage or license

    Google's open-source terminal agent that brings Gemini models to the command line for code editing, shell commands and MCP tools. Since 2026-06-18 it no longer serves free, Google AI Pro/Ultra or Google One users, who were moved to Antigravity CLI.

    • Less widely used (Gid Score 62 vs 84)
  5. 5
    Cline · Cline Bot Inc. · Terminal
    Free + $9.99/mo

    Open-source autonomous coding agent for VS Code, JetBrains, Cursor, Windsurf, Antigravity and Zed (Neovim via ACP) that also ships a CLI, a desktop app and an SDK. It works with many model providers through the user's own keys, Cline's usage-billed provider or the ClinePass subscription.

    • Paid plans from $9.99/mo vs $8/mo
    • Less widely used (Gid Score 57 vs 84)
  6. 6
    GitHub Copilot CLI · GitHub · Terminal
    Free + $10/mo

    GitHub's standalone terminal coding agent (`copilot`, npm @github/copilot) that plans and edits code, runs commands and works with GitHub from the terminal. It runs on a Copilot plan and also supports bring-your-own model providers.

    • Paid plans from $10/mo vs $8/mo
    • Proprietary
    • Less widely used (Gid Score 55 vs 84)
  7. 7
    Oh My Pi · Stencil Labs · Terminal
    Free (OSS)

    Open-source terminal coding agent (`omp`), built by Stencil Labs as a fork of the Pi coding agent by Mario Zechner, with a native Rust core, IDE-style tooling and Windows-native support.

    • Less widely used (Gid Score 54 vs 84)
  8. 8
    Qwen Code · Alibaba Cloud · Terminal
    Bring your key

    Alibaba's open-source terminal coding agent for Qwen models that also offers a desktop app, web UI, IDE plugins (VS Code, Zed, JetBrains) and SDKs. It accepts OpenAI-, Anthropic- and Gemini-style provider APIs as well as local models.

    • Less widely used (Gid Score 52 vs 84)
    • Growing fast: usage up 65% in 30 days
  9. 9
    Kilo Code · Kilo Code · Terminal
    Free + $19/mo

    Open-source coding agent available as a VS Code extension, JetBrains plugin and CLI, with a gateway to 500+ models and support for bring-your-own keys and local models. Kilo launched in March 2025 and was acquired by Anaconda in July 2026.

    • Paid plans from $19/mo vs $8/mo
    • Less widely used (Gid Score 52 vs 84)
    • Growing fast: usage up 52% in 30 days
  10. 10
    Antigravity CLI · Google · Terminal
    Free

    Google's terminal interface (`agy`) to the Antigravity agent platform, built in Go and announced at Google I/O on 2026-05-19 as the replacement for Gemini CLI. It supports background and multi-agent workflows.

    • Proprietary
    • Less widely used (Gid Score 51 vs 84)

OpenAI Codex vs alternatives at a glance

AgentPriceFree to startOpen sourceMCPLocal modelsGid Score
OpenAI CodexFree + $8/mo ✓✓ ✓ ✓ 84
Claude Code$20/mo ✕✕ ✓ ? 89
OpenCodeFree + $10/mo ✓✓ ✓ ✓ 80
PiFree (OSS) ✓✓ ✓ ✓ 72
Gemini CLIAPI usage or license ✕✓ ✓ ? 62
ClineFree + $9.99/mo ✓✓ ✓ ✓ 57
GitHub Copilot CLIFree + $10/mo ✓✕ ✓ ✓ 55
Oh My PiFree (OSS) ✓✓ ✓ ✓ 54
Qwen CodeBring your key ✕✓ ✓ ✓ 52
Kilo CodeFree + $19/mo ✓✓ ✓ ✓ 52
Antigravity CLIFree ✓✕ ✓ ? 51

Prices from the vendors' pricing pages; features from official docs (“?” means not documented). Full feature comparison · All prices

How teams use these tools

FAQ

What is the best alternative to OpenAI Codex?

By usage, the closest alternative is Claude Code, followed by OpenCode, Pi, Gemini CLI.

Is there a free alternative to OpenAI Codex?

Yes. OpenCode is free to start.

Is there an open-source alternative to OpenAI Codex?

Yes. OpenCode is open source.

How do these OpenAI Codex alternatives compare on price?

Claude Code: $20/mo; OpenCode: Free + $10/mo; Pi: Free (OSS); Gemini CLI: API usage or license; Cline: Free + $9.99/mo; GitHub Copilot CLI: Free + $10/mo.

OpenAI Codex: pricing, features and stats · All terminal coding agents · Find the right agent in 4 questions