← Blog

Claude Code Alternatives: Terminal Agents Sorted by Why You're Leaving

September 29, 2026

AI CodingTool Comparisons

Most people searching for Claude Code alternatives don't want a different kind of tool. They like the shape: an agent in the terminal that reads the repo, edits files, runs the tests, and loops. What they want to change is one specific thing about Claude Code itself.

That one thing decides the answer. The reasons that come up:

  • Cost. Claude Code requires a paid plan: Pro, Max, Team, Enterprise, or a Console account. The free claude.ai plan doesn't include it.
  • Model lock-in. Claude Code runs Claude models. You want to use GPT, Gemini, DeepSeek, or whatever leads next quarter.
  • Open source. You want to read, audit, or fork the agent itself.
  • Local models. Code that can't leave the machine, or a model you run yourself.

This page sticks to agents with the same terminal shape. If you actually want the agent inside an editor instead, that's a different decision, and Cline vs Cursor is a better starting point.

Quick comparison

ToolOpen sourceModelsLocal modelsHow you pay
Claude CodeNoClaudeNot officiallyClaude plan or Console usage
Codex CLIYes, Apache-2.0OpenAI, plus localYes, via Ollama or LM StudioChatGPT plan or API key
GitHub Copilot CLINoSeveral hosted, plus your own providerYes, via your own providerCopilot plan, AI credits
OpenCodeYes, MIT75+ providersYesProvider directly, or a supported subscription
Cline CLIYes, Apache-2.0Many providersYesProvider directly
AiderYes, Apache-2.0Almost anyYesProvider directly
Gemini CLI / Antigravity CLIGemini CLI is, Apache-2.0Gemini—Changed in 2026, see below

If the monthly bill is the problem

Claude Code's cost isn't the tool, it's the model access. Every agent on this page spends tokens the same way, because each step re-sends context. Switching agents changes who you pay and how, not the fact that long agent runs are expensive.

So the real choice is between billing shapes:

Billing shapeToolsGood when
Flat subscription you may already haveCodex CLI (ChatGPT plans), Copilot CLI (Copilot plans)You already pay for ChatGPT or Copilot
Pay the model provider directlyOpenCode, Cline, AiderYour use is light or bursty
Run a local modelOpenCode, Cline, Aider, Codex CLIYou have the hardware and can accept weaker output

Codex CLI is the obvious first stop if you already pay OpenAI. Its README recommends signing in with your ChatGPT account to use it as part of a Plus, Pro, Business, Edu, or Enterprise plan, with an API key as the alternative. The agent loop is close to Claude Code's, so your habits carry over. Claude Code vs Codex covers how similar the two have become.

GitHub Copilot CLI is the equivalent if your company already pays for Copilot. GitHub says the CLI is available with all Copilot plans, and that each interaction consumes AI credits based on the tokens processed, varying by model. It can also hand work to Copilot's cloud agent, which runs in its own ephemeral environment powered by GitHub Actions and comes back with a pull request. If Copilot is already approved and billed at work, that alone can settle it. Claude Code vs GitHub Copilot goes deeper on that trade.

Bring-your-own-key tools (OpenCode, Cline, Aider) have no platform fee. You pay the model provider per token. For a few tasks a week that is often cheaper than any subscription. For all-day agent use it can easily cost more. Run a week of your real work and check the provider dashboard before you decide.

If you want a different model

This is where the open tools stand out. They treat the model as a setting, not a product decision.

OpenCode has the widest reach. Its provider docs say it uses the AI SDK and Models.dev to support 75+ LLM providers, plus local models. It can also sign in with subscriptions you may already hold: ChatGPT Plus or Pro, GitHub Copilot, and GitLab Duo.

One catch if you're coming from Claude Code: OpenCode's docs say Anthropic prohibits using Claude Pro or Max subscriptions through third-party plugins, and that OpenCode stopped bundling those plugins as of version 1.3.0. Claude models still work, but through an Anthropic API key.

Cline is best known as a VS Code extension, but it now describes itself as an open-source coding agent for your IDE, terminal, and desktop. The Cline CLI shares its agent core with the extension. Rules, skills, MCP servers, and provider settings behave the same everywhere. It takes API keys from the major providers and any OpenAI-compatible endpoint, or signs in with a ChatGPT subscription. If your team is split between editor and terminal, that shared setup is the draw.

Copilot CLI also lets you switch models with /model. It can point at your own provider too: any OpenAI-compatible endpoint, Azure OpenAI, or Anthropic.

If you want open source

Claude Code is not open source. If you need to read exactly what the agent does before it touches your codebase, or fork it, you need one of these:

ToolLicenceWhat stands out
Codex CLIApache-2.0Closest to Claude Code's shape, from a major lab
OpenCodeMITWidest model choice, terminal UI plus a desktop app in beta
ClineApache-2.0One agent core across CLI, VS Code, JetBrains, and desktop
AiderApache-2.0Git-native: every change lands as a commit

Aider is the veteran of the group. It maps your whole codebase and commits each change automatically, with sensible commit messages, so reviewing and undoing is just git. It connects to most LLMs, local ones included. Check activity before you standardise on it, though. As of September 2026, the most recent Aider release on PyPI dates from February 2026, and its model recommendations still name older models. It moves more slowly than the others here.

Copilot CLI is missing on purpose: its licence lets you install and run it, and redistribute only unmodified copies, so it isn't open source.

If you want local models

Local inference changes two things. Nothing leaves your machine, and each run costs nothing. The catch is quality. Local open-weight models are noticeably weaker on long, multi-step agent runs than frontier hosted models. Use them for scoped tasks, not hour-long unattended refactors.

ToolLocal route
Codex CLI--oss flag, with Ollama or LM Studio as the local provider
OpenCodeOllama, LM Studio, llama.cpp, and other OpenAI-compatible servers
ClineOllama, LM Studio, or Atomic Chat
AiderOllama, LM Studio, and OpenAI-compatible APIs
Copilot CLIYour own provider, including Ollama or vLLM

Copilot CLI's docs state a constraint that applies to every tool here: the model must support tool calling and streaming, ideally with a context window of at least 128k tokens. Many small local models fail that bar.

One twist before you leave Claude Code over this: Ollama documents an integration that connects Claude Code to local models through Ollama's Anthropic-compatible API. That's Ollama's route, not an Anthropic-supported one, but if local models are your only complaint it's worth an afternoon. LM Studio vs Ollama covers choosing the local runtime.

What happened to Gemini CLI

Older lists of Claude Code alternatives put Gemini CLI near the top because it had a generous free tier. That changed in 2026.

Google's developer blog says that on June 18, 2026, Gemini CLI stopped serving requests for Google AI Pro and Ultra subscribers and for free users. The Gemini Code Assist IDE extensions stopped too. According to the same post, Gemini CLI remains usable with paid Gemini and Gemini Enterprise Agent Platform API keys, and Standard and Enterprise licence holders keep access.

The replacement Google points to is Antigravity CLI, the terminal interface of its Antigravity platform. Google's migration docs say it imports Gemini CLI extensions, skills, and settings on first launch, and still reads your GEMINI.md and AGENTS.md files.

Two cautions:

  • The Gemini CLI repository is still Apache-2.0 and actively updated, and as of late September 2026 its README still describes a personal-account free tier. Google's announcement is the newer, more specific statement. Go by that.
  • Don't assume Antigravity CLI is free because Gemini CLI once was. Its docs include a section on AI credits. Check Google's current terms before you plan around it.

Where Claude Code is still stronger

It's a mature, integrated product. Skills, hooks, MCP, IDE extensions, a desktop app, and cloud tasks that run off your machine all come from one vendor and are documented together. The open tools have many of the same pieces, but you assemble them yourself.

Long runs tend to stay on track. Most alternatives hold up on a single scoped task. The gap shows on long unattended runs, and depends on the model as much as the agent. Test that on your own repo, not a leaderboard.

Enterprise routes exist. If the blocker is procurement, Anthropic's setup docs note Claude Code also runs through Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry.

Picking one

  1. Already pay for ChatGPT? → Codex CLI.
  2. Company already pays for Copilot? → Copilot CLI.
  3. Want the widest model choice? → OpenCode.
  4. Want one agent across terminal and editor? → Cline.
  5. Want git-native and simple? → Aider, after checking recent activity.
  6. Must stay local? → OpenCode, Cline, or Codex CLI with --oss, and keep tasks small.

Whatever you choose, write your project conventions into the agent's rules file (AGENTS.md for Codex, CLAUDE.md for Claude Code). It improves output more than switching tools does.

If the terminal is the actual problem

Everything above assumes you're comfortable with a terminal, API keys, and a repo that builds. Some readers aren't. You saw someone's agent setup do something useful, tried to reproduce it, and hit a wall of config files and environment variables. A cheaper or more open agent doesn't fix that.

Taku is built for that situation. It's an AI-native desktop workspace where you mirror an AI app, skill, or workflow someone already got working, run it, remix it, and keep it. It isn't a coding agent and doesn't compete with anything on this page. It's for the step before, where people stall on setup. Taku is in Beta, and the Mac app is available now. The free app library shows what you can mirror.

FAQ

Is there a free Claude Code alternative?

The software is free for Codex CLI, OpenCode, Cline, and Aider, since all four are open source. The model usually isn't. You pay a provider, use a subscription you already have, or run a local model, which is the only fully free route. Expect lower quality on complex tasks if you go local.

Can I use my Claude subscription in another agent?

Not through third-party plugins. OpenCode's docs say Anthropic prohibits using Claude Pro or Max subscriptions that way. Other agents can use Claude models through an Anthropic API key, billed per token.

Is Gemini CLI still free?

No. Per Google's June 2026 announcement, it stopped serving free users and Google AI Pro and Ultra subscribers on June 18, 2026. Paid API keys and Code Assist Standard or Enterprise licences still work, and Google now points people to Antigravity CLI.

Which alternative is closest to Claude Code?

Codex CLI. Same terminal loop, an AGENTS.md file in place of CLAUDE.md, and a cloud agent and desktop app alongside the CLI. The main differences are the model family and that Codex CLI's source is open.