replacing OpenAI Codex
Open Source OpenAI Codex Alternatives
OpenAI's cloud coding agent — OpenAI Codex pricing: Included with ChatGPT Plus/Pro ($20-$200/month); API billed separately. Below: 3 free,
self-hostable open source projects that cover the same ground, ranked by real GitHub adoption.
There are 3 open source OpenAI Codex alternatives tracked on this registry, against OpenAI Codex pricing of Included with ChatGPT Plus/Pro ($20-$200/month); API billed separately. The most-adopted is OpenCode with 208,699 GitHub stars under MIT, written in TypeScript. Together the set has 326,580 stars across 2 languages and 2 licences. All 3 are free to self-host with no licence fee, and 2 of 3 received a commit in the last 90 days. 3 head-to-head OpenAI Codex comparisons are available.
Codex runs in OpenAI's cloud against OpenAI's models, so it is unavailable offline and its behaviour changes when the underlying model is updated. Subscription limits are opaque and the agent can only work where the integration reaches. There is no self-hosted path.
Our top 3 OpenAI Codex alternatives
OpenCode is an open-source AI coding agent designed to operate across terminal, IDE, and desktop environments. It integrates directly into developer workflows to assist with writing, editing, and understanding code using natural language prompts. Built in TypeScript and licensed under MIT, it runs locally or via a desktop app and supports multiple languages and platforms.
MIT · TypeScript · OpenAI Codex vs OpenCode →
Cline is an open-source AI coding agent that operates across multiple interfaces: as a CLI tool, desktop application, VS Code extension, JetBrains plugin, and SDK. It lives in the developer tooling ecosystem and is built with TypeScript under the Apache-2.0 license. The project solves the problem of fragmented AI-assisted coding workflows by unifying agent capabilities—code generation, command execution, project-wide edits, and human-in-the-loop approval—into a single extensible engine that works consistently across environments.
Apache-2.0 · TypeScript · OpenAI Codex vs Cline →
Aider is an open-source AI pair programming tool that runs in the terminal. It connects to large language models—cloud-based or local—to assist with writing, editing, and debugging code directly within a developer’s existing workflow. Built in Python and licensed under Apache-2.0, it integrates with popular LLMs including OpenAI, Anthropic, Google Gemini, and open-source models like Llama.
Apache-2.0 · Python · OpenAI Codex vs Aider →
last updated nightly · ranking method: github stars, live-tracked
Frequently asked questions
What is the best open source alternative to OpenAI Codex?
OpenCode is the most-starred open source alternative to OpenAI Codex in this registry, with 208,699 GitHub stars. 3 alternatives are compared here in total.
Are there free alternatives to OpenAI Codex?
Yes. Every project listed on this page is open source and free to self-host — there is no licence fee. Some projects also sell a managed hosted version, but the self-hosted path costs nothing.
What should I look at when replacing OpenAI Codex?
Compare licence terms, community size (stars), primary language and release activity. A fast-moving project with a compatible licence and an active maintainer base matters more than raw star count when you are committing to a migration.