Claude Code alternatives: 7 tools, and what switching costs
Claude Code alternatives ranked by what they actually cost. Real invoices, the vendors' own $150-250 figures, and which ones I've tested versus only read about.
Contents
The short answer
Most people searching for Claude Code alternatives are not unhappy with Claude Code. They are unhappy with what it costs at volume, and they want to know what they would be giving up.
So here is the uncomfortable framing up front: this site earns a commission if you stay on Claude Code, and nothing at all from any of the seven alternatives below. Every one of them is a link we make no money from. Read the rest knowing the incentive points the other way.
| If you want | Go to |
|---|---|
| The cheapest real agent | Codex — the free ChatGPT tier genuinely works |
| An editor instead of a terminal | Cursor |
| Free, terminal-native, no card | OpenCode |
| Claude Code’s shape, open source | OpenCode |
| Git-native, diff-first | Aider |
| To stay inside VS Code | Cline |
| What your employer already bought | GitHub Copilot |
How I picked these, and what I have not tested
This is the part most roundups skip, and on this page it matters more than usual, because my evidence is lopsided.
Tested, with real money behind it. Claude Code is my daily driver on a paid Max plan. I paid for Cursor for eleven months and have the invoices. I ran two full Codex tasks on the free tier in July and verified the output against disk rather than trusting the transcript.
Documented, not tested. Gemini CLI, OpenCode, Aider, Cline and GitHub Copilot. I have read their documentation and licences and followed the coverage, and I have not run a controlled task through any of them. Where I describe them below, I am describing what they are built to do, not what I watched them do.
I would rather tell you that plainly than write seven sections in the same confident voice and let you assume they carry equal weight. Four of the most visible guides on this are published by companies selling one of the tools on their own list. This one is not selling any of them.

What you are actually leaving
Before the list, it is worth naming what Claude Code does that makes people reluctant to move.
Three things, in the order they matter after a few months of use. A project-memory file that compounds — CLAUDE.md accumulates the conventions of a codebase and stops you re-explaining them, which is most of what makes it worth driving properly. A default posture that asks before editing, which is tedious on day one and reassuring on day ninety. And a bill with a ceiling: the plan price plus tax, with usage credits off unless you turn them on.
That third one is why the cost complaint is sharper than it looks. Claude Code is not unusually expensive per unit of work. It is that Anthropic’s cost guide puts enterprise usage at $150 to $250 per developer per month against a top consumer plan of $200 — so the people who find it expensive are usually the people using it properly. I broke that down in full in what Claude Code actually costs.
Which means the real question is not “what is cheaper”, it is “what am I willing to lose to pay less”. Every option below answers that differently.
Why people leave Claude Code in the first place
Worth naming precisely, because the alternative you want depends on which complaint is yours.
The limit system, not the price. Two limits run at once: a rolling session window of roughly five hours, and a separate weekly cap that resets on a fixed day. They move independently, so you can sit at 7% of your session and 56% of your week at the same time — that is my own dashboard, not a hypothetical. The session meter tells you nothing about whether you will still be working on Friday, and that mismatch is what turns a flat monthly fee into a surprise.
The absence of a free tier. Claude Code has none. Every other tool on this page can be tried for nothing, and several can be run indefinitely for nothing. That is a real gap and it is the single most common reason this search happens.
One vendor, one model family. Claude Code runs Anthropic’s models. If your objection is strategic rather than financial — you do not want your workflow welded to one lab’s roadmap and pricing — no amount of tuning fixes it, and only the provider-agnostic tools below actually answer it.
If your complaint is the first one, a cheaper tool will not help; a different limit shape might. If it is the second, start free. If it is the third, you are looking at OpenCode, Aider or Cline and the rest of this list is noise.
The alternatives at a glance
| Tool | Cost | Shape | Tested? |
|---|---|---|---|
| Codex | Free tier, then $8–$200 in ChatGPT | Terminal, app, IDE extension | Yes |
| Cursor | Free Hobby, $20–$200 + metered | Full VS Code fork | Yes |
| Antigravity CLI | ~20 free requests/day | Terminal agent | No |
| OpenCode | Free tier is a trial; else you pay the model | Terminal, desktop and IDE; any provider | No |
| Aider | Free, you pay the model | Terminal, git-native | No |
| Cline | Free, you pay the model | VS Code, JetBrains, CLI | No |
| GitHub Copilot | Free tier, $10–$100 individual; $19–$39/seat | IDE completion + agent | No |
1. Codex — best if you already pay for ChatGPT
The cheapest honest way to find out whether you can live without Claude Code, because trying it costs nothing.
Codex is bundled into whatever ChatGPT plan you already have, including the free one. I tested that claim directly rather than repeating it: on 31 July I ran two agent tasks on a free ChatGPT account with no card attached, and the substantive one renamed 33 of 33 references across seven files and three languages. Everything still parsed afterwards — I checked with git, node --check and py_compile rather than trusting what the tool said it had done.
That matters because “Codex requires ChatGPT Pro at $200” is one of the most repeated errors in this category. It does not.
Where it lands against Claude Code: the shape is close. Both are agents you delegate to; both now bill past their allowance if you let them, Codex through credits at four cents each. What you lose is CLAUDE.md’s exact ergonomics and, in my testing, a little trust — Codex will wander outside the folder you point it at unless you tell it not to, and its own diff badge undercounts what it changed.
Skip it if you specifically left OpenAI’s ecosystem, or you need the agent to stay rigorously inside a scope without being told.
2. Cursor — best if you want the editor back
The obvious move for anyone who misses watching code land rather than reviewing a finished diff.
Cursor is a fork of VS Code, so your extensions, keybindings and settings come across, and the migration is the smoothest thing about it. Since its 2.0 release it is agent-first rather than autocomplete-first, which makes it a genuine peer to Claude Code rather than a different category of tool.
I paid for it for eleven months, and the reason I left is the reason to be careful. Across that time I paid $510.70 on a plan advertised at $20: $340 of subscription and $170.70 of metered usage billed in arrears. October alone was $159.22. Nothing malfunctioned and Cursor takes no markup — individual plans pay the model’s API rate. But the meter is unbounded by default, and there is a spend limit on Pro, Pro+ and Ultra that I never switched on.
If you move here from Claude Code you are trading a capped bill for an uncapped one. That is a reasonable trade for the editor, as long as you make it deliberately. The full head-to-head is in Claude Code vs Cursor.
Skip it if predictable cost is the thing you came for.
3. Antigravity CLI — what replaced Gemini CLI, and what it costs now
Google’s terminal agent, on much thinner terms than most write-ups still describe.
An earlier version of this post recommended Gemini CLI here as the best genuinely free option. That was wrong, and the correction is the most useful thing on this page. Google retired Gemini CLI on 18 June 2026 and moved those users to Antigravity CLI, run with the agy command. Free, AI Pro and Ultra tiers stopped being served on that date.
What replaced it is a different proposition. Gemini CLI was open TypeScript under Apache 2.0 with a large contributor base; Antigravity CLI ships as a closed single Go binary. And the free allowance went from roughly a thousand requests a day to roughly twenty. Paid Gemini Code Assist Standard and Enterprise seats kept working, as did metered API keys, so the cut landed specifically on the personal free and subscription tiers.
Twenty requests a day is a trial, not a working allowance. If your objection to Claude Code is purely the money, this is no longer the answer, and the honest recommendation moved to OpenCode below.
Skip it if you were counting on the old free allowance. It is gone.
The IDE is a different story from the CLI, and better: I ran a full build on it for the Google Antigravity review, where the free tier held up and the agent wrote its own tests.
4. OpenCode — best open-source take on Claude Code’s shape
The one the specialist coverage keeps converging on, and the closest structural match to what you are leaving.
OpenCode runs in your terminal, and now also as a desktop app and IDE extension. It is deliberately provider-agnostic: rather than shipping its own model, it connects to whichever backend you point it at, including a local LLM you run yourself. It is MIT-licensed and the largest open-source project in this category by stars — worth checking you are looking at the right repository, because an older abandoned one shares the name. That is the whole design argument. Claude Code ties the interface to Anthropic; OpenCode separates them, so a model price rise or a rate-limit change is something you route around rather than absorb.
The catch is the one most “free” tools on this list share, and it is worth stating in plain arithmetic. Free software plus a paid model is not free. You have replaced a capped subscription with per-token billing from whichever provider you chose — with one narrow exception, the time-limited free models in OpenCode’s own Zen catalogue, which I come back to below — which is the same unbounded shape that made Cursor expensive for me. If your reason for leaving Claude Code is an unpredictable bill, this does not solve it. If your reason is wanting control over which model runs, it solves it completely.
Skip it if you want one thing to install that works with no configuration.
5. Aider — best for git-native, diff-first work
The oldest idea here, and the most opinionated.
Aider is a command-line tool built around git rather than around a chat window: it works in diffs, commits as it goes, and treats your repository history as the interface. It is Apache-licensed Python.
| Open-source project | Licence | Stars | Last push |
|---|---|---|---|
| OpenCode | MIT | ~192,000 | 3 Aug 2026 |
| Antigravity CLI | Closed source (Go binary) | n/a | 6 Aug 2026 |
| Cline | Apache-2.0 | ~65,000 | 3 Aug 2026 |
| Aider | Apache-2.0 | ~48,000 | 22 May 2026 |
One thing to check before you commit to it, and it is the kind of detail these roundups never surface: when I looked on 3 August 2026, the repository’s last push was 22 May. OpenCode and Cline had both pushed that same 3 August. A quiet ten weeks is not abandonment and Aider is a mature tool that does not need constant churn, but in a category where the underlying models change monthly, it is worth looking at the commit history yourself rather than taking any list’s word for it.
It is also the one most likely to feel like a step backwards if you came for reach: it works in small committed increments rather than taking a whole task at once. The trade Aider makes is auditability over reach: it commits each edit as it goes, with a generated message, so your review happens in git history rather than in an approval prompt. That is a feature when you want a paper trail and a tax when you wanted to be asked first.
Same billing note as OpenCode: the tool is free, the model is not.
Skip it if you wanted to hand over a whole task and walk away.
6. Cline — best if you are staying in VS Code
The lowest-friction option for anyone who does not want a new application at all.
Cline is an Apache 2.0 open-source agent runtime whose main surface is a VS Code extension, with a JetBrains plugin and a CLI alongside it. Used as the extension it means no editor migration, no second window, and no new muscle memory. Apache-licensed and actively developed, with commits landing the day I checked. Like OpenCode it is provider-agnostic, so it will run whichever model you have keys for, including local ones.
Positioned against the others: Cursor replaces your editor, Cline sits inside the one you have. That is a meaningful difference if your setup is heavily customised or if your employer has opinions about which applications you install. It is a meaningless difference if you were happy to move to Cursor anyway.
Worth noting for balance that Cline publishes its own “best Claude Code alternatives” roundup, which ranks Cline first. That is not a reason to discount the tool; it is a reason to weight the source.
Skip it if you want the agent to be the whole product rather than a panel inside one, or you were happy to change editors anyway.
7. GitHub Copilot — best if your company already pays for it
Rarely the enthusiast’s answer and often the correct one.
Copilot’s advantage is not capability, it is procurement. It is already approved at a great many companies, already inside the IDE, and already billed — which means adopting it requires no conversation with anyone. At $10 for Pro it is among the cheapest paid options on this list, undercut only by Codex’s $8 Go tier, with a free tier beneath that. It climbs from there: Pro+ at $39, Max at $100, Business at $19 and Enterprise at $39 per seat.
Against Claude Code, the honest read is that it started as a completion tool and grew agentic features, where Claude Code started agentic. If your work is mostly writing code with assistance, that history does not matter. If your work is handing over multi-file tasks, it does.
Skip it if agentic multi-file work is the specific thing you are buying.
The migration cost nobody mentions
Every roundup treats switching as a download. It is not, and the reason is project instructions.
Claude Code reads CLAUDE.md. Codex reads AGENTS.md. Cursor reads AGENTS.md as well as its own .cursor/rules, and OpenCode reads AGENTS.md too. Aider uses CONVENTIONS.md, Cline reads .clinerules/ and AGENTS.md, Gemini CLI uses GEMINI.md. So the field is largely converged on AGENTS.md — Codex, Cursor, OpenCode and Cline all read it — while Claude Code, Aider and Gemini CLI each keep their own file. Anthropic’s docs say plainly that Claude Code reads CLAUDE.md, not AGENTS.md.
That file is the part of your setup with the most accumulated value: months of conventions, gotchas and “never do this in this repo” that stop the tool making the same mistake twice.
So a switch usually costs you that file, or the work of porting it — with one exception worth knowing. OpenCode reads AGENTS.md and falls back to CLAUDE.md when no AGENTS.md exists, so a move in that direction carries your existing file across unchanged. Two practical notes:
- If you are trialling rather than switching, keep both files and let them drift. It is fine for a week.
- If you are actually moving, pick one as the source of truth and have the other reference it. Two independently maintained descriptions of one project is worse than one, because they diverge silently and then two tools follow different conventions in the same codebase.
The second thing that does not port is your subscription, which is common enough as a misconception that it has its own answer in the FAQ below. The short version is firmer than most switching advice admits: a Claude plan pays for Claude Code and the Claude apps, and Anthropic’s consumer terms now explicitly prohibit using it to drive third-party clients. Those tools want a Console API key, billed per token.
Also named, and why they are not on my list
Windsurf, Kilo Code, Continue and Tabby all appear in other roundups. I have left them out for one reason: I have neither tested them nor checked their documentation to the standard I applied above, and adding four more names I cannot speak to would make the list longer without making it more useful. Antigravity is the exception and it has its own entry above, because I have since run a full build on it for the Google Antigravity review.
That is a limitation of this page, not a verdict on those tools.
One more name turns up constantly and belongs to a different category rather than a shorter list. Lovable is a prompt-to-app builder: you describe an application and it hands back a working, hosted one, with no editor and no terminal anywhere in the process. That is not a replacement for an agent working inside your repository, and if your problem is genuinely a blank page rather than an existing codebase it is the more useful instrument. I put it through a measured build in the Lovable review.
What switching actually saves you
Here is the arithmetic nobody else does, and it is the reason I would not switch on price alone.
The two vendors who publish real usage figures both put serious use far above their headline tiers: Anthropic at $150–250 per developer per month, OpenAI at $100–200 for Codex. Those are not marketing numbers, they are the companies’ own documentation, and they are remarkably close to each other. That convergence tells you something: at volume, the cost of running an agent is the cost of the tokens, and no interface saves you from it.
Which means the three provider-agnostic free tools above do not remove that cost. They move it. You stop paying a subscription and start paying a model provider per token, without a plan ceiling and usually without a spend cap. That is a genuinely good deal if your usage is spiky or occasional, and a worse one if it is heavy and daily — which is precisely the profile of the person who found Claude Code expensive in the first place.
| Your situation | The saving is |
|---|---|
| Occasional use, a few tasks a week | Real. Free tools or Codex’s free tier, and you may never pay |
| Steady daily use on one project | Marginal. You trade a capped bill for a metered one |
| Heavy, multi-agent, all day | Probably negative. Per-token has no ceiling; subscriptions do |
| Privacy or air-gap requirement | Not the point. Local models are the only option, at a capability cost |
There is one place you can now check this arithmetic against a real per-task number rather than a monthly average. A Codex credit is worth exactly four cents, and OpenAI puts a typical GPT-5.6-Sol task at 5 to 40 credits — so $0.20 to $1.60 per task on Sol, with 25 credits to the dollar. Lighter models cost a fraction of that, and heavier ones such as Cyber bill well above it.
Hold that against the vendors’ monthly figures and the picture sharpens. At $150 a month you are buying somewhere between about ninety and seven hundred and fifty Sol-sized agent tasks, depending entirely on how big each one is. If you run fewer than that, a metered tool genuinely is cheaper and the free ones may cost you nothing at all. If you run more, you are looking for a plan with a ceiling, and the free tools are the wrong direction.
That is the whole decision, and it is arithmetic rather than preference. Count your tasks in a normal week before you switch anything.
What the free tools actually cost to run
“Free” is doing enormous work in this category, so here is the arithmetic in real numbers.
OpenCode, Aider and Cline ship no model. You supply one, and the bill comes from whichever provider you picked, at per-token rates. If you point them at the same Anthropic models Claude Code runs, you pay Anthropic’s published API rates — from $1 per million input tokens on Haiku 4.5 up to $5 on Opus 5, with output billed at five times input and cache reads at a tenth, on every model. The full rate card is in what Claude Code costs.
| The measure | Subscription tool | Free tool + your API key |
|---|---|---|
| Who bills you | The vendor, monthly | Your model provider, per token |
| At the limit | Stops, or asks | Keeps going |
| Ceiling | The plan price | None unless you set one |
| Cache tuning | The vendor’s problem | Whatever the project implemented |
| Predictable? | Yes | Only if your usage is |
Three consequences that the word “free” hides.
Output is five times input on every row. An agent that narrates its reasoning at length costs more than a terse one producing the same diff, and you are now paying for that verbosity directly rather than inside a plan.
Cache reads are a tenth of input, and caching is the mechanism these tools run on. Long sessions on one repository are far cheaper per turn than the raw token counts suggest — but only if the tool caches well, and that is exactly the kind of engineering a subscription product invests in and a community project may not.
There is no ceiling. A subscription stops or asks; an API key keeps going. This is the same shape that turned my $20 Cursor plan into $510.70 over eleven months, and it is worth noticing that the “cheap” option and the option that cost me the most money are structurally identical.
Sonnet 5 also gets 50% more expensive on 1 September 2026 — Anthropic published that increase in advance. If you are budgeting a switch to a self-hosted tool running Sonnet, budget the September number.
Is there a genuinely free Claude Code alternative?
Yes, with one asterisk, and the asterisk is the whole answer.
Antigravity CLI is free only in a trial sense: roughly twenty requests a day since the June 2026 changeover, against the thousand Gemini CLI used to give. Codex’s free tier is free in the same sense, and I have run real multi-file work on it to check. Both are genuinely usable without a card.
OpenCode, Aider and Cline are free software, which is mostly not the same thing. Each is free to install and each needs a model to do anything. Aider and Cline bill you through whichever provider you point them at, with no ceiling.
OpenCode is the partial exception, and I had this wrong before I checked: its OpenCode Zen catalogue currently carries seven genuinely free models. Read the small print before you build on them, though — they are explicitly available “for a limited time”, most note that collected data may be used to improve the model, and two say outright not to submit confidential data. That is a trial window, not a free tier.
Calling these free alternatives is otherwise accurate about the licence and misleading about the cost, which is the single most common distortion in the published roundups.
The only fully free path is an open-source tool pointed at a locally-run model, and that costs you capability on long multi-file tasks — which is the work that made you want an agent.
How to pick, in one decision tree

Three questions, in order.
Is the problem cost or workflow? If it is workflow — you want an editor, or you want to stay in VS Code — go to Cursor or Cline and stop reading. Cost is a different branch.
If it is cost, is your usage heavy or light? Light: take Codex’s free tier or OpenCode and you may never pay again. Heavy: understand that free tools shift you to per-token billing, which is how Cursor cost me $510.70 across eleven months. A cheaper subscription usually beats a free tool with an uncapped meter.
Do you need to choose the model, including running a local LLM? If yes — for privacy, for local inference through Ollama or a similar runtime, for insulation from one lab’s pricing — that narrows you to OpenCode, Aider or Cline, and the decision is mostly which surface you want.
Final word
The strongest argument for switching is not that any of these is better than Claude Code — I still think it earns its price for daily agentic work, and I pay for it. It is that the cost of agentic coding is converging, and it is converging above what any of the headline tiers suggest.
If you are searching for alternatives because a $100 or $200 bill surprised you, the useful move is to count your tasks in a normal week before you look at what else exists.
And if you take one thing from a page that earns nothing when you leave: the free tools are free to install, not free to run. Two of the seven above bill you through a model provider with no ceiling, and a third does unless you stay inside a trial catalogue — the same shape as the bill you are trying to escape. Codex’s free tier and Gemini CLI are the no-cost starting points that need neither a card nor an API key, and Codex is the only one on this page I have watched complete real multi-file work.
I looked at all of this in early August 2026. In a category where three of these tools shipped commits the same afternoon, that date is doing more work than anything else on the page. The rest of my coding-tool coverage is here.
Frequently asked questions
What is the best free alternative to Claude Code?
OpenCode, and that answer changed in June 2026. Google retired Gemini CLI on 18 June and moved personal users to Antigravity CLI, whose free allowance is roughly twenty requests a day rather than the thousand the old tool gave you. Anything still recommending Gemini CLI as the free pick is describing a product that stopped being served.
OpenCode is the one the specialist coverage keeps landing on. It is open source, runs in the terminal as well as a desktop app and IDE extension, and connects to whichever model provider you want rather than shipping its own. That flexibility is the point and also the catch: apart from a set of time-limited free models in its own Zen catalogue, you supply the model, so the bill arrives from your provider instead of a subscription.
Is Claude Code worth it compared to the alternatives?
For daily agentic work on a real codebase, I still think so, and I pay for it. What you buy is a capped bill, a project-memory file that compounds over months, and a default posture that asks before it edits. None of the free alternatives reproduce all three.
The honest counter-argument is cost at volume. Anthropic's own documentation puts enterprise usage at $150 to $250 per developer per month, and OpenAI puts Codex at $100 to $200. If your usage looks like that, the question stops being which tool is better and becomes which bill you would rather receive.
Can I use my Claude subscription with another tool?
No, and this is the trap in most switching advice. A Claude Pro or Max subscription pays for Claude Code and the Claude apps, not for arbitrary third-party clients calling Anthropic's models — Anthropic's consumer terms were updated in February 2026 to prohibit it explicitly.
Most alternatives expect either their own subscription or your own API key, and an API key bills separately from your plan at per-token rates. So switching from Claude Code to an open-source tool that runs Claude models does not move your existing subscription across. It replaces a capped monthly cost with a metered one, which is the opposite of what most people searching for alternatives are trying to do.
Which Claude Code alternative is best for a local model?
OpenCode, Aider and Cline are all provider-agnostic rather than tied to one lab; OpenCode and Cline come up most often in the coverage. If you are running something locally through Ollama or a similar runtime, a tool that treats the model as a swappable backend is the requirement, and the frontier tools do not offer that.
Be clear about what you are buying with that. Local models remove the per-token bill and the data-leaves-your-machine problem, and they cost you capability on exactly the long multi-file work that makes an agentic tool worth using. That trade is reasonable for privacy-constrained work and poor value if you only want to save $20.
Is Codex cheaper than Claude Code?
At the entry point, clearly. Codex is bundled into ChatGPT and even the free tier includes real access, which I confirmed by running two full agent tasks on it. Claude Code has no free tier at all, so the cheapest way to try an agentic coding tool today is Codex.
Higher up they converge. Both top out at $200, both can bill past their allowance if you let them, and the two vendors' own spend estimates ($100-200 against $150-250 per developer per month) sit close enough that the difference is not the deciding factor. Pick on shape and workflow rather than on the headline price.