Alternatives / OpenAI Codex

11 open-source alternatives

Open-source alternatives to OpenAI Codex

11 alternatives are compared by license, workflow, self-hosting, pricing, and fit for different use cases.

Maxime DERAME's profile

Written by Maxime DERAME

Last updated:

openai.com

Why look for a OpenAI Codex alternative?

OpenAI Codex is an AI coding agent that understands repositories, edits files, executes commands, runs tests, and completes multi-step software development tasks. People look for alternatives when they want open-source software, multiple model providers, local execution, self-hosting, local session storage, parallel agents, or more control over agent permissions and automation.

opencode.ai
1

OpenCode

Open-source coding agent for terminal, desktop, and IDE workflows.

OpenCode is one of the closest open alternatives to Claude Code, combining an agentic workflow with support for multiple providers, local models, and terminal, desktop, and IDE usage.

211.6K28.1KMITSelf-hosted

Pricing: Open source and free to run; model-provider costs may apply.

  • Terminal-first workflow
  • Multiple providers and local models
  • Open source with IDE and desktop support
  • Rapidly evolving project
  • Some setups require additional model configuration
pi.dev
2

Pi

Lightweight and extensible terminal-based coding agent.

Pi keeps a relatively small core that developers can extend and customize while supporting multiple AI providers and local models.

111.9K14.2KMITSelf-hosted

Pricing: Open source; model-provider costs may apply.

  • Lightweight terminal interface
  • Extensible architecture
  • Flexible session management
  • More configuration-oriented
  • Less opinionated than full-featured agents
zed.dev
3

Zed

High-performance open-source code editor with integrated AI.

Zed is a fast Rust-based editor that combines traditional development tools with AI-assisted coding, multiple model providers, and agent workflows.

91.2K10.9KGPL-3.0-or-later / Apache-2.0 componentsSelf-hosted

Pricing: Open source editor; hosted AI usage may be paid.

  • Fast native editor
  • Integrated AI and collaboration features
  • Strong developer tooling
  • Requires switching editors
  • Less similar to a terminal-first workflow
openhands.dev
4

OpenHands

Autonomous software development agents with web, CLI, and SDK interfaces.

OpenHands is an open-source platform for autonomous software development agents that inspect repositories, edit code, execute commands, run tests, and tackle larger tasks.

89.8K11.9KMIT coreSelf-hosted

Pricing: Open-source core and self-hosting available; hosted and enterprise options may be paid.

  • Autonomous coding workflows
  • Model agnostic
  • Web, CLI, and SDK interfaces
  • Heavier than terminal-first tools
  • Requires more infrastructure
cline.bot
5

Cline

Open-source IDE and CLI coding agent with MCP support.

Cline can read and edit files, execute terminal commands, interact with external tools, and work with many AI providers through a human approval workflow.

69.8K7.6KApache-2.0Self-hosted

Pricing: Open source; bring your own provider key and pay provider costs directly.

  • Strong IDE integration
  • Multiple providers and MCP support
  • Human approval workflow
  • More IDE-focused than Claude Code
  • Large tasks can consume significant tokens
aider.chat
6

Aider

Terminal-first AI pair programming built around Git.

Aider edits multiple files, understands existing repositories, runs tests, and automatically tracks changes through Git while supporting many models.

49.3K5KApache-2.0Self-hosted

Pricing: Open source; model-provider costs may apply.

  • Excellent Git integration
  • Terminal-first workflow
  • Lightweight and mature
  • More pair-programming focused
  • Less autonomous than newer agent platforms
tabby.tabbyml.com
7

Tabby

Self-hosted open-source AI coding assistant.

Tabby provides self-hosted AI coding infrastructure with IDE integrations and local deployment options for teams that want stronger control over code and data.

33.9K1.8KApache-2.0Self-hosted

Pricing: Free and self-hosted; infrastructure and model costs are your responsibility.

  • Self-hosted
  • IDE integrations
  • Strong privacy control
  • Less agentic than Claude Code
  • Infrastructure required for self-hosting
kilocode.ai
8

Kilo

Open-source coding agent across IDEs, CLI, and automated workflows.

Kilo supports a broad range of models and specialized modes for coding, debugging, and planning, with IDE, command-line, and local-model compatibility.

27.5K3.2KMITSelf-hosted

Pricing: Open source with bring-your-own-key support; some workflows may use hosted services.

  • Broad model support
  • IDE and CLI support
  • Specialized coding modes
  • More complex than lightweight terminal tools
  • Some workflows may depend on hosted services
forgecode.dev
9

Forgecode

Provider-flexible, terminal-first coding agent.

Forgecode is an open-source agent-driven development tool that works directly with codebases and multiple AI models.

7.6K1.5KApache-2.0Self-hosted

Pricing: Open source; model-provider costs may apply.

  • Terminal-first
  • Multiple model support
  • Codebase aware and provider flexible
  • Smaller ecosystem
  • Less mature than established projects
paseo.sh
10

Paseo

Self-hosted interface for controlling coding agents across machines.

Paseo orchestrates agents such as Claude Code, Codex, Copilot, OpenCode, and Pi across different machines and environments.

AGPL-3.0Self-hosted

Pricing: Open source and self-hosted; requires external coding agents.

  • Remote agent control
  • Multi-agent support
  • Works across multiple machines
  • Not a standalone replacement
  • Requires external coding agents
jean.dev
11

Jean

Workspace for coordinating coding agents across repositories.

Jean coordinates Claude Code, Codex, OpenCode, Cursor, Pi, and Grok-based agents across repositories and development environments.

Apache-2.0Self-hosted

Pricing: Open source workspace; depends on external agents or subscriptions.

  • Multi-agent and cross-repository workflows
  • Remote access
  • Automation features
  • Not a standalone coding agent
  • Depends on external agents or subscriptions

Compare OpenAI Codex alternatives

ToolStarsLicenseSelf-hostedPricing
OpenCode211.6KMITYesOpen source and free to run; model-provider costs may apply.
Pi111.9KMITYesOpen source; model-provider costs may apply.
Zed91.2KGPL-3.0-or-later / Apache-2.0 componentsYesOpen source editor; hosted AI usage may be paid.
OpenHands89.8KMIT coreYesOpen-source core and self-hosting available; hosted and enterprise options may be paid.
Cline69.8KApache-2.0YesOpen source; bring your own provider key and pay provider costs directly.
Aider49.3KApache-2.0YesOpen source; model-provider costs may apply.
Tabby33.9KApache-2.0YesFree and self-hosted; infrastructure and model costs are your responsibility.
Kilo27.5KMITYesOpen source with bring-your-own-key support; some workflows may use hosted services.
Forgecode7.6KApache-2.0YesOpen source; model-provider costs may apply.
Paseo—AGPL-3.0YesOpen source and self-hosted; requires external coding agents.
Jean—Apache-2.0YesOpen source workspace; depends on external agents or subscriptions.

Which one should you choose?

Want a direct open-source coding agent

OpenCode provides terminal, desktop, and IDE workflows with multiple providers, local models, LSP integration, and parallel sessions.

OpenCode

Want a lightweight extensible terminal agent

Pi keeps a small MIT-licensed core that can be extended with TypeScript tools, prompts, commands, and workflows.

Pi

Want autonomous software engineering

OpenHands is designed for larger tasks involving repository inspection, implementation, command execution, testing, and reviewable changes.

OpenHands

Want AI inside a complete editor

Zed combines a native editor with AI, debugging, Git, collaboration, remote development, and multiple providers.

Zed

Want a terminal-first Git workflow

Aider focuses on repository-aware pair programming, multi-file edits, tests, linting, and Git commits.

Aider

Want to run several agents in parallel

Paseo orchestrates agents such as Codex, Claude Code, Cursor, OpenCode, and Pi across desktop, web, mobile, and CLI interfaces.

Paseo

Want self-hosted coding assistance

Tabby runs on infrastructure you control and focuses on private code completion and repository-aware assistance.

Tabby