Guide

Claude Code Alternatives: Seven Coding Agents Compared

Seven alternatives to Claude Code, from open-source terminal agents to AI editors: what each runs on, which models it drives, what it costs to run and who it suits.

7 tools · Last checked

Claude Code is Anthropic's own terminal agent: closed source, built around Anthropic's models, and paid for per token through the Anthropic API or inside a Claude subscription. Teams look elsewhere for three reasons: they want to choose the model, they want a harness they can read and fork, or they want the agent somewhere other than a terminal.

Every tool below is a harness: the loop that reads files, runs commands and feeds results back to a model. Six of the seven are open source and cost nothing to install; with those, the bill is whatever your model provider charges. Each entry says where it runs, what it can drive, and what to watch for.

At a glance

ToolRuns inLicenseBest for
OpenCodeTerminalMITKeeping a Claude Code-style terminal workflow while choosing the model yourself
Codex CLITerminal (with a separate cloud-hosted Codex)Apache 2.0Teams already standardized on OpenAI models or ChatGPT plans
Gemini CLITerminalApache 2.0Trying a terminal agent without paying for a plan first
AiderTerminalApache 2.0Engineers who want every change as a reviewable git commit
ClineVS Code extension (also a CLI and SDK)Apache 2.0Working with an agent inside the editor, approving each diff
gooseDesktop app and CLIApache 2.0Agents that do more than edit code, through MCP extensions
CursorAI code editor (VS Code fork), plus cloud agentsProprietaryTeams that want the editor, not the terminal, to be the agent's home

1. OpenCode

Best for: Keeping a Claude Code-style terminal workflow while choosing the model yourself.

  • Made by: Open-source project
  • Runs in: Terminal
  • License: MIT
  • Models: 75+ providers through models.dev, plus local models
  • Cost to run: Free to use; you pay your model provider, or nothing with local models

The closest like-for-like swap. OpenCode is a terminal coding agent that treats the model as a setting: point it at Anthropic, OpenAI, Google, an open-weights model on a hosted provider, or a local model through Ollama, and the same harness drives it.

Because it is MIT-licensed and developed in the open, a team can read exactly what the harness does, and fork it if the project's direction stops suiting them.

Watch out for: How well it codes depends on the model you load, so there is no single score to compare against Claude Code. Budget time to test it with the models you actually plan to use.

opencode.ai · Opencode as a Harness Alternative to Claude Code

2. Codex CLI

Best for: Teams already standardized on OpenAI models or ChatGPT plans.

  • Made by: OpenAI
  • Runs in: Terminal (with a separate cloud-hosted Codex)
  • License: Apache 2.0
  • Models: OpenAI models
  • Cost to run: Free to install; use it through a ChatGPT plan or an OpenAI API key

OpenAI's open-source terminal agent is the most direct counterpart to Claude Code from another model lab. It reads repository instructions from AGENTS.md, works in isolated worktrees, and on Linux runs commands under Landlock and seccomp isolation by default.

Cloud-hosted Codex runs tasks asynchronously in OpenAI's containers, so one team can hand off longer jobs without changing tools.

Watch out for: Like Claude Code, it is built around its own lab's models. Switching to it moves your dependency from Anthropic to OpenAI rather than removing it.

github.com/openai/codex · Claude Code vs Codex for Autonomous Pull Request Generation · Codex CLI vs Cloud-Hosted Codex for Engineering Team Workflows

3. Gemini CLI

Best for: Trying a terminal agent without paying for a plan first.

  • Made by: Google
  • Runs in: Terminal
  • License: Apache 2.0
  • Models: Google Gemini models
  • Cost to run: Has a no-cost tier with a personal Google account; paid use through a Gemini API key or Google Cloud

Google's open-source terminal agent works the same way Claude Code does: it reads your project, edits files and runs shell commands, and it can call MCP servers as tools.

Signing in with a personal Google account gives you a free usage tier, which makes it the easiest way on this list to try an agentic terminal workflow before deciding what to pay for.

Watch out for: The free tier has quotas, and they change. Check the current limits in the project's quota and pricing document before relying on it for team work.

github.com/google-gemini/gemini-cli · Quota and pricing

4. Aider

Best for: Engineers who want every change as a reviewable git commit.

  • Made by: Aider AI
  • Runs in: Terminal
  • License: Apache 2.0
  • Models: Most hosted and local models (Anthropic, OpenAI, Gemini, open-weights)
  • Cost to run: Free to use; you pay your model provider

Aider calls itself AI pair programming in your terminal, and it is more conversational than autonomous: you add the files to work on, describe the change, and Aider edits them and commits each change to git with a message, so undoing a step is a git command.

It has been around longer than most tools here and works with a wide range of models, including local ones.

Watch out for: It is built for a person steering each step, not for long unattended runs. If you want an agent to work through a task on its own, one of the terminal agents above fits better.

aider.chat

5. Cline

Best for: Working with an agent inside the editor, approving each diff.

  • Made by: Cline
  • Runs in: VS Code extension (also a CLI and SDK)
  • License: Apache 2.0
  • Models: Any provider you bring a key for, including local models
  • Cost to run: Free to use; you pay your model provider

Cline puts an autonomous agent in your editor. A Plan mode works out the approach before anything changes, and an Act mode carries it out, showing every file it reads and every diff before it is applied.

You choose the model and pay its provider directly, so the cost of a task is visible rather than folded into a subscription.

Watch out for: Paying per token with no plan cap means long sessions on a frontier model can cost more than you expect. Set spending limits with your provider.

cline.bot

6. goose

Best for: Agents that do more than edit code, through MCP extensions.

  • Made by: Started at Block; now developed under the aaif-goose project
  • Runs in: Desktop app and CLI
  • License: Apache 2.0
  • Models: Any LLM provider, including local models
  • Cost to run: Free to use; you pay your model provider

goose is an open-source, extensible agent that installs, runs, edits and tests code with whichever model you connect. Its extensions are MCP servers, so the same agent can reach your other tools as well as your repository.

It ships as both a desktop app and a command-line tool, which suits teams where not everyone lives in a terminal.

Watch out for: Its breadth is the point, so it is less tuned to one coding workflow than a dedicated coding harness. Try it on a real task from your backlog before adopting it.

github.com/aaif-goose/goose

7. Cursor

Best for: Teams that want the editor, not the terminal, to be the agent's home.

  • Made by: Anysphere
  • Runs in: AI code editor (VS Code fork), plus cloud agents
  • License: Proprietary
  • Models: A choice of models from several labs inside Cursor
  • Cost to run: Paid plans; check cursor.com/pricing for current tiers

Cursor is the alternative for people who would rather see changes inline than in a terminal: an AI-native editor where you accept or reject each diff as it lands. Its cloud agents take longer tasks off your machine, and it can be triggered from Slack.

Many teams do not replace Claude Code with it; they run both, using Cursor for small, hands-on edits and a terminal agent for multi-file work.

Watch out for: It is closed source and subscription-priced, so it does not solve lock-in. It changes where the lock-in sits.

cursor.com · Cursor pricing · Cursor vs Claude Code for Team-Wide Agent Deployment

How to choose

Do you want to choose the model? Pick a model-agnostic harness: OpenCode, Aider, Cline or goose. Codex CLI and Gemini CLI are each built around their own lab's models, as Claude Code is.

Do you want to pay nothing to start? Gemini CLI's free tier, or any of the open-source harnesses pointed at a local model. Expect local models to be slower and less capable on large changes.

Terminal, editor or desktop? Terminal: OpenCode, Codex CLI, Gemini CLI, Aider. Editor: Cline or Cursor. A desktop app for people outside the terminal: goose.

Do you need to read or fork the code? Everything here except Cursor is open source: OpenCode under MIT, the rest under Apache 2.0.

You don't have to pick one. Teams that run several agents send each kind of task to the harness that handles it best, and keep their instructions in files every harness can read, such as AGENTS.md, so switching costs less later.

Prices, free-tier limits and supported models change often. Check each project's own site, linked above, before you commit a team to one.