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
-
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
-
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.
- Less widely used (Gid Score 75 vs 83)
- Growing fast: usage up 54% in 30 days
-
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.
- Paid plans from $10/mo vs $8/mo
- Less widely used (Gid Score 74 vs 83)
-
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 57 vs 83)
-
Open-source terminal coding agent (`omp`), a variant of the Pi coding agent from Stencil Labs, with a native Rust core, IDE-style tooling and Windows-native support.
- Less widely used (Gid Score 56 vs 83)
- Growing fast: usage up 58% in 30 days
-
Open-source autonomous coding agent for VS Code (and JetBrains) 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 53 vs 83)
-
Open-source AI software-development agent platform (formerly OpenDevin) with a local web GUI, a terminal UI/CLI, a hosted cloud and an SDK. It is model-agnostic and can use the user's own keys.
- Less widely used (Gid Score 50 vs 83)
-
Open-source software-engineering agents from Princeton and Stanford researchers: SWE-agent (2024) and its roughly 100-line successor mini-SWE-agent, which uses only bash and works with any model through LiteLLM and similar routers. The SWE-agent README says development effort has moved to mini-SWE-agent.
- Less widely used (Gid Score 48 vs 83)
-
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 46 vs 83)
-
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 45 vs 83)
OpenAI Codex vs alternatives at a glance
| Agent | Price | Free to start | Open source | MCP | Local models | Gid Score |
|---|---|---|---|---|---|---|
| OpenAI Codex | Free + $8/mo | ✓ | ✓ | ✓ | ✓ | 83 |
| Claude Code | $20/mo | ✕ | ✕ | ✓ | ? | 80 |
| Pi | Free (OSS) | ✓ | ✓ | ✓ | ✓ | 75 |
| OpenCode | Free + $10/mo | ✓ | ✓ | ✓ | ✓ | 74 |
| Gemini CLI | Varies | ✕ | ✓ | ✓ | ? | 57 |
| Oh My Pi | Free (OSS) | ✓ | ✓ | ✓ | ✓ | 56 |
| Cline | Free + $9.99/mo | ✓ | ✓ | ✓ | ✓ | 53 |
| OpenHands | Free | ✓ | ✓ | ✓ | ✓ | 50 |
| mini-SWE-agent | Free (OSS) | ✓ | ✓ | ? | ✓ | 48 |
| Kilo Code | Free + $19/mo | ✓ | ✓ | ✓ | ✓ | 46 |
| GitHub Copilot CLI | Free + $10/mo | ✓ | ✕ | ✓ | ✓ | 45 |
Prices from the vendors' pricing pages; features from official docs (“?” means not documented). Full feature comparison · All prices
How teams use these tools
Run Claude Code and Codex agents in parallel on Mac with Offrun
Offrun is a free Mac app that runs coding agent CLIs such as Claude Code and Codex side by side, each in its own git worktree, using the user's own logins. The page is the product…
As reported by the Offrun site: each agent in a project works in its own git worktree, so two agents on the same repo do not touch the same files.
Route between coding-agent models with the open-source Weave Router 2.0
The Weave team presented Weave Router 2.0 in a Show HN post. It is an open-source routing model that sits in front of coding agents and switches between LLMs per turn, and the aut…
As reported by the Weave author on Hacker News: on Terminal Bench 4.0 and SWE Atlas, the router had equivalent pass rates to GPT-6 Astra.
Porting JustHTML from Python to JavaScript with Codex CLI in an afternoon
Simon Willison gave Codex CLI a handful of high-level prompts to port JustHTML to a dependency-free JavaScript library. He published the repo and a playground.
The library passes 9,200 tests from the html5lib-tests suite.
FAQ
What is the best alternative to OpenAI Codex?
By usage, the closest alternative is Claude Code, followed by Pi, OpenCode, Gemini CLI.
Is there a free alternative to OpenAI Codex?
Yes. Pi is free to start.
Is there an open-source alternative to OpenAI Codex?
Not among the closest alternatives we track.
How do these OpenAI Codex alternatives compare on price?
Claude Code: $20/mo; Pi: Free (OSS); OpenCode: Free + $10/mo; Gemini CLI: Varies; Oh My Pi: Free (OSS); Cline: Free + $9.99/mo.
OpenAI Codex: pricing, features and stats · All terminal coding agents · Find the right agent in 4 questions
