codex Alternatives

Codex alternatives: OpenCode, Claude Code, Gemini CLI, Aider and Goose compared by model support, interface and workflow.

Updated

short verdict

OpenCode is the closest open source replacement for codex, with a terminal UI, build and plan agents, and a beta desktop app. Claude Code fits if you want a plugin system and GitHub @claude mentions. Gemini CLI has a free Google-account tier, Aider commits every change to git, and Goose connects to 15+ providers.

Codex CLI is OpenAI's local coding agent. It signs in with a ChatGPT plan or an API key, and it ships IDE extensions and a `codex app` desktop mode. The alternatives below differ mainly in which models they talk to, how they handle edits and git, and how you extend them. Some run in the terminal only, and others add a desktop app or an API.

this page is for

  • Developers who want an open source terminal coding agent
  • Teams that want to choose their own model provider
  • Readers who want git-native AI edits or a free tier to start
#1

opencode

★ 222.7kTypeScript
details

Open source (MIT) terminal agent with a TUI and a beta desktop app, like codex, but with `Tab` to switch between build and plan agents.

best for

  • Terminal-first agent workflows
  • Read-only exploration of unfamiliar code

strengths

  • `plan` agent denies file edits and asks before bash commands
  • Desktop beta for macOS, Windows and Linux (.deb, .rpm, .AppImage)
  • Installs via curl, npm, Homebrew, Scoop, Chocolatey, pacman or Nix
  • `@general` subagent for multistep searches

weaknesses

  • Desktop app is still beta
  • Model and agent configuration lives in the project's online docs
#2

Claude Code

★ 153.7kTypeScript
details

Terminal coding assistant that, unlike codex, is extended with a plugin system and can be triggered from GitHub with @claude.

best for

  • Teams that want custom commands and agents
  • Developers who want git workflows handled in chat

strengths

  • Plugin system adds custom commands and agents
  • Works in terminals, IDEs and GitHub @claude mentions
  • Handles git workflows and explains code from natural language
  • Installs via curl, Homebrew cask or `winget install Anthropic.ClaudeCode`

weaknesses

  • Collects code accept/reject feedback and conversation data
  • No open source license is listed for it
#3

gemini-cli

★ 108.6kTypeScript
details

Apache-2.0 terminal agent for Google Gemini models, where codex uses OpenAI accounts, with a free tier on Google OAuth.

best for

  • Trying an agent without a paid plan
  • Scripted and CI use

strengths

  • Free OAuth tier: 60 requests/min and 1,000 requests/day
  • Google Search grounding and web fetch built in
  • MCP support and project context in `GEMINI.md`
  • Non-interactive mode with JSON output, plus GitHub Actions for reviews and triage

weaknesses

  • Tied to Gemini models, with Vertex AI as the enterprise route
  • No IDE extensions are mentioned in its documentation
#4

aider

★ 49.8kPython
details

Python pair-programming CLI that auto-commits each change to git and accepts many LLMs, including local models, rather than one vendor's.

best for

  • Git-centric review of AI edits
  • Choosing or swapping LLMs

strengths

  • Commits with descriptive messages so you can use standard git diff and revert
  • Builds a map of your codebase across 100+ languages
  • Runs linting and tests on AI changes
  • Voice input and IDE integration through file watching

weaknesses

  • No desktop app or plugin system
  • Installed through Python with `aider-install`
#5

Goose

★ 55.9kRust
details

Rust agent with a desktop app, CLI and embeddable API, broader than codex's coding focus and connecting to 15+ providers.

best for

  • Mixed provider environments
  • Non-coding tasks such as research and automation

strengths

  • Connects via API keys or existing Claude, ChatGPT or Gemini subscriptions through ACP
  • 70+ extensions over Model Context Protocol
  • Desktop apps for macOS, Linux and Windows
  • Custom distributions with preset providers and extensions

weaknesses

  • General-purpose scope, not coding-specific
  • No license is listed for it
#6

Open Interpreter

★ 68.7kPython
details

Python tool that runs generated code locally behind approval prompts, closer to a code runner than codex's repo-focused agent.

best for

  • Data analysis and file or media tasks
  • Embedding in Python apps

strengths

  • Asks approval before executing any generated code
  • `interpreter.chat()` for Python integration and a FastAPI server option
  • Runs Python, JavaScript and Shell with full internet access
  • YAML profiles and LiteLLM model support

weaknesses

  • No git integration or codebase map is described
  • Installed from a GitHub URL with pip

Why look beyond codex

  • It is tied to OpenAI: sign-in is a ChatGPT plan or an API key
  • No Windows install is listed, only macOS and Linux (x86_64, arm64)
  • Its license is not stated on its page, while OpenCode (MIT) and Gemini CLI (Apache-2.0) state theirs
  • Extension paths are IDE plugins and the desktop app, not a plugin or MCP system described for it

Stay with codex if

  • You already pay for ChatGPT Plus, Pro, Business, Edu or Enterprise and want to use that plan
  • You work in VS Code, Cursor or Windsurf and want the matching Codex extension
  • You want the same agent in the terminal, the desktop app and web Codex at chatgpt.com/codex

When not to use these

  • You need a hosted, browser-only agent with no local install
  • You want plain shell autocomplete or command lookup rather than an agent that edits code

FAQ

What is the closest open source alternative to codex?
OpenCode. It is MIT-licensed, runs in a terminal TUI, and has a beta desktop app. You switch between its build and plan agents with `Tab`.
Is there a free alternative to codex?
Gemini CLI offers a free tier through Google OAuth, with 60 requests/min and 1,000 requests/day. Aider and Goose can use API keys or local models, so cost depends on the provider you choose.
Which alternative works with git best?
Aider commits each AI change with a descriptive message, so you review it with standard git tools. Claude Code also handles git workflows from natural language.
Can I use a ChatGPT subscription outside codex?
Goose can connect through existing Claude, ChatGPT or Gemini subscriptions via the Agent Communication Protocol, as well as API keys.

related