Codex logo

Best Codex alternatives

Open-source, hosted, and minimal alternatives to Codex, compared on what actually matters: real usage, security posture, and cost.

The best Codex alternative is Claude Code if you want the strongest agentic-coding model behind a similar terminal workflow, or Cursor if you prefer an IDE.

If the reason you are leaving is cost or lock-in, the open-source route is stronger: OpenCode in the terminal, or Cline, Roo Code, and Kilo Code in VS Code, each able to run any model through OpenRouter, from frontier flagships to cheap Chinese models that cost cents.

The wider field
Cursor

Cursor

Coding agent
Cursor is an AI-first code editor with agent runs, multi-file edits, and its own Composer models. It is the most popular editor-shaped alternative to terminal agents like Claude Code and Codex: same kind of agentic coding, but living inside an IDE instead of your shell.
  • Editor-first: agent runs, inline edits, and tab completion in one IDE
  • Ships its own Composer models alongside frontier API models
  • Publishes CursorBench, the agentic-coding benchmark we track
Closed sourceHosted onlyWebsite
C

Cline

Coding agent
Cline is an open-source coding agent that lives in VS Code: it plans, edits files, runs commands, and uses a browser, with full control over which model and provider you pay for. It is one of the highest-usage OpenRouter-native coding agents, which makes its real-world traction easy to verify.
  • Bring-your-own-model: works with OpenRouter, so any frontier or cheap model
  • Plan/act workflow with human approval gates on edits and commands
  • Among the top coding apps by token volume on the OpenRouter board
Open sourceSelf-hostableWebsite
R

Roo Code

Coding agent
Roo Code grew out of the Cline lineage into its own open-source VS Code agent, known for switchable modes (architect, coder, debugger) that change how the agent behaves per task. Like Cline, it is provider-agnostic and shows real usage on the OpenRouter apps board.
  • Mode system tunes the agent per task type
  • Provider-agnostic, OpenRouter-friendly
  • Active open-source community fork lineage
Open sourceSelf-hostable
K

Kilo Code

Coding agent
Kilo Code is an open-source VS Code coding agent that positions itself as a superset of Cline and Roo Code features. It is OpenRouter-native with high real token usage, and a credible free alternative to vendor coding agents.
  • Superset approach: Cline and Roo features in one extension
  • High real usage on the OpenRouter apps board
  • Free and open source, pay only for tokens
Open sourceSelf-hostable
O

OpenCode

Coding agent
OpenCode is the open-source answer to Claude Code: a terminal-native coding agent that works with any provider, so you are not locked to one vendor's models or pricing. If you like the Claude Code workflow but want open source and model freedom, this is the closest match.
  • Terminal-native, the same shape as Claude Code and Codex CLI
  • Works with any model provider, including local models
  • Open source: inspect, extend, and self-host
Open sourceSelf-hostable
Gemini

Gemini CLI

Coding agent
Gemini CLI is Google's open-source terminal coding agent with a generous free tier and the 1M token context window of the Gemini models. The free quota makes it the cheapest way to try a terminal agent at all.
  • Generous free tier, the lowest-cost entry into terminal agents
  • 1M token context from the Gemini model family
  • Open-source CLI from a first-party vendor
Open sourceHosted only
G

GitHub Copilot

Coding agent
GitHub Copilot is the incumbent: tens of millions of developers, deep GitHub integration, and an agent mode that takes on issues and pull requests. It is the default choice inside organizations already on GitHub, though it is less model-flexible than the open alternatives.
  • Massive install base and organizational adoption
  • Agent mode works GitHub-native: issues, PRs, reviews
  • Bundled into GitHub plans many teams already pay for
Closed sourceHosted onlyWebsite
Devin logo

Devin

Coding agent
Devin from Cognition pioneered the fully autonomous software engineer: you assign tasks and it works in its own cloud workspace, end to end. It trades the local control of CLI agents for a hands-off, delegate-the-whole-ticket workflow.
  • Fully managed cloud workspaces, delegate whole tickets
  • Built by Cognition, the team behind the DeepSWE benchmark lineage
  • SaaS pricing rather than per-token API costs
Closed sourceHosted onlyWebsite
Frequently asked questions
What is the best alternative to OpenAI Codex?

Claude Code is the strongest direct alternative: the same terminal-agent shape with Anthropic's models behind it, which lead most agentic-coding benchmarks. For an open-source path, OpenCode keeps the terminal workflow while letting you run any model, and the VS Code agents (Cline, Roo Code, Kilo Code) do the same inside the editor.

Can I use Codex skills with other agents?

Skills are markdown-based and increasingly portable: many skills written for Codex or Claude Code work across agents that support the same skill format. Browse our skills directory to see which skills declare compatibility with which agents.

What is the cheapest way to get a Codex-style agent?

Gemini CLI is free to start. After that, an open-source agent (OpenCode, Cline, Roo Code) with a budget model like DeepSeek V4 or GLM 4.7 Flash through OpenRouter delivers the same workflow for cents per day. Our best cheap models ranking lists current prices.

Share:
Details:
  • Alternatives


    9
  • Open source


    6
  • Updated


    June 2026