Alternatives / OpenAI Codex

Open-source alternatives to OpenAI Codex

11 genuinely open-source alternatives. The projects are compared by license, workflow, self-hosting, and pricing.

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.

#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.

MITSelf-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
#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.

MITSelf-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
#3

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.

MIT 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
#4

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.

GPL-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
#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.

Apache-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
#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.

Apache-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
#7

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.

MITSelf-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
#8

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.

Apache-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
#9

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
#10

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.

Apache-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
#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
OpenCodeMITYesOpen source and free to run; model-provider costs may apply.
PiMITYesOpen source; model-provider costs may apply.
OpenHandsMIT coreYesOpen-source core and self-hosting available; hosted and enterprise options may be paid.
ZedGPL-3.0-or-later / Apache-2.0 componentsYesOpen source editor; hosted AI usage may be paid.
ClineApache-2.0YesOpen source; bring your own provider key and pay provider costs directly.
AiderApache-2.0YesOpen source; model-provider costs may apply.
KiloMITYesOpen source with bring-your-own-key support; some workflows may use hosted services.
TabbyApache-2.0YesFree and self-hosted; infrastructure and model costs are your responsibility.
PaseoAGPL-3.0YesOpen source and self-hosted; requires external coding agents.
ForgecodeApache-2.0YesOpen source; model-provider costs may apply.
JeanApache-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