AI coding tools

Claude Code alternatives: 10 coding agents compared

The closest Claude Code alternative is OpenAI's Codex CLI, a terminal agent that is open source under Apache-2.0 and included in ChatGPT Plus at $20 a month. OpenCode, Cline and Kilo Code are free open-source agents that run models from any provider, and GitHub Copilot has a free plan and a $10 Pro plan with Claude, GPT and Gemini.

Closest match
Codex CLI, $20/mo
Free and open source
OpenCode, Cline, Kilo Code
Cheapest multi-model
Copilot Pro, $10/mo
Gemini's terminal agent
Antigravity CLI

Updated

Claude Code alternatives compared

The table below lines up ten Claude Code alternatives by license, starting price and the models they run. Four of the ten are terminal agents like Claude Code, and six publish their source code.

Claude Code alternatives, October 2026
ToolTypePriceModelsOpen source
Codex CLITerminal agentChatGPT Plus $20/moGPT-6 Astra, GPT-6.1 Sol, GPT-6 LunaYes, Apache-2.0
OpenCodeTerminal agentFree; Go $10/mo optional75+ providers and local modelsYes, MIT
Antigravity CLITerminal agentFree tier; Google AI Pro $19.99/moGemini 4 ArgonNo
Kimi Code CLITerminal agentKimi Code plan or Moonshot APIKimi K3Yes, MIT
ClineIDE extensionFree; pay your providerAny provider with your keysYes, Apache-2.0
Kilo CodeIDE extensionFree; Teams $15/user/moAny provider or Kilo GatewayYes, MIT
GitHub CopilotIDE extension and CLIFree; Pro $10/moClaude, GPT-6, Gemini, Grok, KimiClient only, in VS Code
CursorAI code editorPlus $8/mo; Premium $30/moGrok, Composer; others at API priceNo
ZedCode editorFree; Pro $10/moYour keys, Claude Agent, Codex CLIYes, GPL and Apache-2.0
Devin DesktopAI code editorFree; Pro $20/moSWE-2 and major providersNo

Terminal agents closest to Claude Code

  • Codex CLI is open source under Apache-2.0, comes included with ChatGPT Plus at $20 a month, and runs GPT-6 Astra (which scores 59.60% on Vals AI's Terminal-Bench 4.0 against 65.15% for Claude Opus 5.5).
  • OpenCode is free under the MIT license, connects to 75+ providers and local models, and lets you sign in directly with a ChatGPT Plus, ChatGPT Pro or GitHub Copilot account.
  • Antigravity CLI (agy) is Google's terminal agent with a $0 Individual tier on basic weekly rate limits and Gemini 4 Argon access when you have Google AI Pro at $19.99 a month.
  • Kimi Code CLI is Moonshot AI's MIT-licensed terminal agent that runs Kimi K3 using a Kimi Code account or a Moonshot API key at /login.
Shell
# Codex CLI
npm install -g @openai/codex

# OpenCode
curl -fsSL https://opencode.ai/v2/install | bash

# Antigravity CLI
curl -fsSL https://antigravity.google/cli/install.sh | bash

# Kimi Code CLI
curl -fsSL https://code.kimi.com/kimi-code/install.sh | bash

Editor and IDE alternatives

If you want an agent inside the editor you already use, extensions are the easiest swap. Cline (Apache-2.0) and Kilo Code (MIT) are both free open-source extensions where you only pay your model provider for inference, though Kilo also sells a Kilo Pass starting at $19 a month. GitHub Copilot Pro costs $10 a month and gives you $15 of GitHub AI Credits ($10 base plus $5 flex) for models such as Claude Sonnet 5.5, GPT-6.1 Terra, Grok 4.7 and Kimi K3, while Claude Opus 5.5, Fable 5.1, GPT-6 Astra, GPT-6.1 Sol and Gemini 4 Argon need Copilot Pro+ at $39 a month.

You can also switch to a full editor with an agent built in. Cursor (now sold inside The X Subscription) has a Plus tier at $8 a month that runs only Cursor's own models, led by Grok 4.7, with no support for your own API keys, so getting Claude, GPT and Gemini models means paying $30 a month for Premium and buying them at API list price from prepaid credit. If you're looking for a Cursor alternative, Zed is open source (GPL and Apache-2.0), free for personal use with your own API keys or external agents like Codex CLI, and has a $10 a month Pro plan that includes $5 of tokens before billing API list price plus 10%. Devin Desktop, the closed-source editor that windsurf.com/pricing now redirects to at devin.ai/pricing, has a $0 Free tier, Pro at $20 a month and Max at $200 a month, running Cognition's SWE-2 model alongside models from the major providers.

What happened to Gemini CLI and Roo Code

Gemini CLI is still around under the Apache-2.0 license, but it now serves enterprise Gemini Code Assist users on Google Cloud, plus legacy paid Gemini API and Vertex AI keys. According to its README, free individual access and Google AI Pro and Ultra moved to Antigravity CLI on June 18, 2026, and Gemini CLI is not tuned for Gemini 4 models.

The Roo Code extension was shut down on May 15. Its README now points users to the ZooCode fork and to Cline.

Which alternative to pick

  • If you already pay for ChatGPT, use Codex CLI since it's included in ChatGPT Plus at $20 a month and gives you GPT-6 Astra, GPT-6.1 Sol and GPT-6.1 Terra in the terminal.
  • If you want a free open source Claude Code alternative that runs any model, pick OpenCode for the terminal, or install Cline or Kilo Code inside VS Code and bring your own keys.
  • If you want Gemini models with a free tier, install Antigravity CLI for the $0 Individual plan with weekly rate limits or pair it with Google AI Pro ($19.99 a month) for Gemini 4 Argon.
  • If you want access to many models for one low price, GitHub Copilot Pro at $10 a month includes $15 of credits for Claude Sonnet 5.5, Grok 4.7, Kimi K3 and more, and Pro+ at $39 a month adds Claude Opus 5.5, GPT-6 Astra and Gemini 4 Argon.
  • If you want to run Kimi K3 in the terminal, install Kimi Code CLI with a Kimi Code plan or a Moonshot API key ($3 input and $15 output per 1M tokens).

Keep your Claude plan in another agent

Switching coding agents doesn't mean you have to cancel your Claude subscription or start paying per token. Plan2API turns a Claude Pro or Max plan, a ChatGPT plan, Google AI Pro or Ultra, and Kimi Code into one OpenAI-compatible endpoint at https://api.plan2api.com/v1 with a single p2a_ key. You can add that URL as a custom provider in OpenCode (through @ai-sdk/openai-compatible) or drop it straight into Cline and Kilo Code, then switch between claude/, openai/, gemini/ and kimi/ model prefixes without leaving your agent.

Plan2API Free costs $0 with no card needed and covers 1 connected subscription and 50 chat requests a day. Plan2API Pro is $12 a month (or $99 a year) for 3 connected subscriptions and no daily request cap. Codex CLI is the one exception here: custom providers in current Codex releases must expose the OpenAI Responses API, and Plan2API serves POST /v1/chat/completions rather than /v1/responses.

Use the AI subscriptions you already pay for as one OpenAI-compatible API key.

  • Free: 1 subscription, 50 requests a day, no card
  • Pro: $12 a month

FAQ

What is the best free alternative to Claude Code?

OpenCode is the best free terminal replacement: it's MIT-licensed, works with 75+ providers and local models, and lets you sign in with a ChatGPT Plus or GitHub Copilot account you already have. If you work inside an editor, Cline and Kilo Code are free open-source extensions where you only pay for your own API keys, and Google's Antigravity CLI has a $0 Individual tier with basic weekly rate limits.

Is there an open-source Claude Code?

Claude Code itself is proprietary and only runs Claude models. If you want an open-source agent, use Codex CLI (Apache-2.0), OpenCode (MIT) or Kimi Code CLI (MIT) in the terminal, or install Cline (Apache-2.0), Kilo Code (MIT) or the Zed editor (GPL and Apache-2.0).

Is Gemini CLI still free?

No. Since June 18, 2026, Gemini CLI serves enterprise Gemini Code Assist users (plus legacy paid API and Vertex AI keys) and isn't tuned for Gemini 4 models, while free individual users and Google AI Pro or Ultra subscribers moved to Antigravity CLI.

What happened to Roo Code?

The Roo Code extension was shut down on May 15. Its README directs users to the ZooCode fork and to Cline.

Is Codex better than Claude Code?

Claude models lead the model benchmarks: on Vals AI's Terminal-Bench 4.0, which tests models in the Mini-SWE-agent harness rather than the two apps, Claude Opus 5.5 scores 65.15% and Claude Sonnet 5.5 gets 64.14%, while OpenAI's GPT-6 Astra scores 59.60%. Codex CLI wins on licensing since it's open source under Apache-2.0, and both tools cost $20 a month at entry level through Claude Pro or ChatGPT Plus.

Sources

  1. Codex CLI on GitHubgithub.com
  2. OpenCode on GitHubgithub.com
  3. Gemini CLI READMEgithub.com
  4. Antigravity CLIgithub.com
  5. Kimi Code CLIgithub.com
  6. GitHub Copilot plansgithub.com
  7. Cursor pricingcursor.com
  8. Zed pricingzed.dev