New this week: 6 head-to-head tests added, including Claude vs Gemini for long documents.

See what changed →
pricing and limits verified August 2026

The 9 Best Claude Code Alternatives in 2026 (Tested and Priced)

If you are here, you have probably just watched a five-hour window evaporate mid-refactor. That is the honest reason most people go looking — not that Claude Code is bad, but that your terminal work and your chats drink from the same cup.

So here is what we would want to know in your position: which tools get genuinely close, what they actually cost you per day, what breaks when you move your config across, and where the free options really end. Every price and limit below came off the vendor own page in August 2026.

Fair warning on three things the other guides still get wrong: Gemini CLI stopped serving free users in June, Claude Code does not read your AGENTS.md, and pointing OpenCode at your Max subscription is not the workaround it used to be. We explain all three below.

The shortlist

The best Claude Code alternatives at a glance

Ranked on how close they get, what they cost you to run, and whether you can take your setup with you.

Best overall

OpenAI Codex CLI

The closest match, and cheaper to start

Free / $8 (Go) / $20 (Plus)
Runner-up

OpenCode

The one you can actually own

Free (bring your own key)
Third pick

Cline

When you want to approve every step

Free (bring your own key)
01

OpenAI Codex CLI

The closest match, and cheaper to start

Statistically tied with Claude Code on Terminal-Bench 2.1, and it tells you your exact rate limits instead of making you guess. You get in for $8 a month rather than $20.

Free tier: Limited Codex on the free ChatGPT tier; real work starts at Go, $8 a month.

Free / $8 (Go) / $20 (Plus)
02

OpenCode

The one you can actually own

MIT licensed, 60+ models, and roughly a quarter of Claude Code first-turn token overhead. Read the section below before you plan to plug your Max subscription into it.

Free tier: Binary is free forever. You pay whichever provider you point it at.

Free (bring your own key)
03

Cline

When you want to approve every step

Plan and Act are separate modes, so you see the whole plan before anything touches your files. Apache-2.0, no seat fee, and it speaks to nearly every provider including Ollama.

Free tier: Genuinely free. You pay for inference only.

Free (bring your own key)
04

Cursor

Reviewing diffs, not reading logs

If your frustration is squinting at terminal output to work out what changed, Cursor shows you multi-file diffs you can accept or reject one hunk at a time.

Free tier: Hobby tier with limited agent requests, no card needed.

Free / $20 per mo (Pro)
05

GitHub Copilot CLI

Cheapest paid entry, deepest GitHub ties

Ten dollars a month, and the only vendor here publishing an exact free-tier number. If your work lives in pull requests, nothing else sits this close to them.

Free tier: 2,000 completions and 50 premium requests a month.

Free / $10 per mo (Pro)
06

Google Antigravity CLI

Claude models without an Anthropic bill

This is where Gemini CLI users were moved. Its odd advantage: the free tier includes Claude Sonnet and Opus 4.6 alongside Google own models. Google will not tell you the limits.

Free tier: $0 individual tier with unpublished weekly limits.

Free / paid via Google AI plans
07

Charm Crush

The nicest terminal experience

The best-looking TUI in the category and the easiest route to running a local model through Ollama or LM Studio. Check the licence before you build a business on it.

Free tier: Free binary, bring your own key.

Free (source-available)
08

Goose

Workflows your team can share

Recipes are portable YAML files, so the thing you figured out on Tuesday is something a colleague can run on Wednesday. Apache-2.0 under Linux Foundation governance.

Free tier: Free, bring your own key.

Free (Apache-2.0)
09

Amp

Someone else handles the routing

Picks the model for you and charges provider rates with no markup. The right call if you would rather not spend your evenings tuning which model gets which task.

Free tier: A free tier exists but is not documented.

From $20 per mo
Claude Code alternatives compared at a glance9 tools
#ToolBest forFree tierPrice
01OpenAI Codex CLIThe closest match, and cheaper to startFree tierFree / $8 (Go) / $20 (Plus)
02OpenCodeThe one you can actually ownFree tierFree (bring your own key)
03ClineWhen you want to approve every stepFree tierFree (bring your own key)
04CursorReviewing diffs, not reading logsFree tierFree / $20 per mo (Pro)
05GitHub Copilot CLICheapest paid entry, deepest GitHub tiesFree tierFree / $10 per mo (Pro)
06Google Antigravity CLIClaude models without an Anthropic billFree tierFree / paid via Google AI plans
07Charm CrushThe nicest terminal experienceFree tierFree (source-available)
08GooseWorkflows your team can shareFree tierFree (Apache-2.0)
09AmpSomeone else handles the routingFree tierFrom $20 per mo
Bar chart comparing the entry monthly price of 9 Claude Code alternatives: OpenAI Codex CLI from $8 a month; OpenCode free; Cline free; Cursor from $20 a month; GitHub Copilot CLI from $10 a month; Google Antigravity CLI free; Charm Crush free; Goose free; Amp from $20 a month.
Entry monthly price across every Claude Code alternative we tested. Green dot marks a permanent free tier. Pricing verified August 2026.

Why you are probably looking

You are not leaving because the output is bad. You are leaving because of the meter.

Claude Code is included on every Claude plan, right down to the free one, and that sounds generous until you read the next line on Anthropic own pricing page: your terminal work and your chats draw from a single pool. Spend Tuesday afternoon on a big refactor and you will find your writing rationed on Thursday.

Anthropic does publish the numbers, which is more than most. On Pro you get roughly 10 to 40 prompts every five hours. On Max 5x, 50 to 200. On Max 20x, 200 to 800. One catch worth knowing before you quote those figures at anyone: the support article carrying them still describes model generations that have since been replaced, so treat them as the right shape rather than the current truth.

What it actually costs you

Here is the number nobody else on this topic quotes, and it comes from Anthropic itself. In its own cost documentation, Anthropic says the average is around $13 per developer per active day, and $150 to $250 per developer per month, with 90% of users staying under $30 a day.

Read that against a $20 Pro plan and the picture clarifies. If you are a light user, the subscription is a bargain. If you are running agents most of the day, you are consuming several times what you pay, which is exactly why the limits exist and exactly why they bite.

Three things every other guide on this page gets wrong

Before you take advice from anywhere, including here, check the dates. Three facts changed this year and most published guides have not caught up.

  • Gemini CLI is no longer free for you. Google announced on 19 May 2026 that it would stop serving requests for Google AI Pro, Ultra and free users on 18 June 2026. Only Standard and Enterprise licences kept it. Antigravity CLI is the replacement. Guides still calling Gemini CLI the most generous free tier are recommending a door that is closed.
  • Claude Code does not read AGENTS.md. Anthropic says so plainly: it reads CLAUDE.md, not AGENTS.md. If you have seen a guide claim it falls back, that guide is wrong and the mistake is spreading.
  • OpenCode can no longer use your Claude subscription out of the box. Following a legal request from Anthropic, OpenCode removed its Anthropic auth plugin in March 2026. Its docs now state that using a Pro or Max subscription there is not supported. Plan around that before you build a workflow on it.

What the benchmarks actually say

If you only take one thing from this section: the harness moves the score more than the model does. That is not an opinion, it falls straight out of the leaderboard.

These are the official Terminal-Bench 2.1 results, 89 tasks, with the error bars the leaderboard publishes and almost nobody quotes.

AgentModelScoreRead it as
Claude CodeFable 583.8% ±1.2Joint first
CodexGPT-5.583.1% ±1.1Joint first
Terminus 2Fable 580.4% ±1.2Same model, worse harness
Cursor CLIGrok 4.579.3% ±1.5Close behind
Claude CodeOpus 4.878.9% ±1.3Three-way tie
CodexGPT-5.6 Terra78.4% ±1.3Three-way tie
Claude CodeSonnet 574.6% ±1.6The cheap model, still strong
Claude CodeGLM-5.158.7% ±1.2What routing out costs you

Three things fall out of that table that should change how you shop.

Codex and Claude Code are tied. A 0.7 point gap with error bars of ±1.2 and ±1.1 is not a gap. Anyone telling you Claude Code is definitively number one is over-reading 89 tasks.

The wrapper matters more than the brain. Run the same Fable 5 model in Claude Code and you get 83.8%. Run it in Terminus 2 and you get 80.4%. That 3.4 point harness difference is bigger than the difference between the top two models. Whichever tool you pick, the tool itself is doing real work.

Cheap models cost more than they save, sometimes. Claude Code with GLM-5.1 drops to 58.7%. If you are considering pointing Claude Code at a budget model to dodge limits, that is the trade you are making — 25 points of capability.

One more note if you compare leaderboards. Artificial Analysis and Vals both re-ran Terminal-Bench 2.1 in their own sandboxes and got numbers around four points apart from each other on identical models. The ordering held; the absolute figures did not. Treat any single benchmark number as a range.

Claude Code alternatives compared at a glance

Prices and limits read from each vendor own page in August 2026. Where a vendor refuses to publish a number, we say so rather than filling the gap with a guess.

ToolLicenceModel choiceEntry priceFree tier
Codex CLIApache-2.0OpenAI on plan auth$8 per mo (Go)Limited
OpenCodeMIT60+ modelsFree + provider costsYes
ClineApache-2.0Anything, incl. localFree + provider costsYes
CursorProprietaryFrontier + in-house$20 per moHobby tier
GitHub Copilot CLIProprietaryModel picker$10 per mo2,000 completions
Antigravity CLIProprietaryGemini + Claude 4.6$0 individual tierYes, limits unpublished
Charm CrushFSL-1.1-MITAnything, incl. localFree + provider costsYes
GooseApache-2.015+ providersFree + provider costsYes
AmpProprietaryRouted for you$20 per moUndocumented
Claude CodeProprietaryAnthropic only$17 per mo (annual)Yes, on the free plan

One licence note, because it trips people up. Crush is FSL-1.1-MIT, which is source-available rather than open source — you can read and modify it, but it is not OSI-approved and it converts to MIT only after two years. If your company has a policy on this, that distinction is the one your legal team will ask about.

The ones worth your time, reviewed

1. Codex CLI — start here if you want like-for-like

This is the swap that changes least about how you work. Same terminal-first shape, statistically the same benchmark performance, and two things Claude Code will not give you.

First, price: ChatGPT Go is $8 a month against Claude Pro at $20. Second, and more useful day to day, OpenAI publishes exact limits per model per five-hour window — 10 to 100 messages on Sol, 25 to 200 on Terra, 250 to 2,000 on Luna for a Plus account. You can plan a working day around numbers like that. You cannot plan around a limit you discover by hitting it.

What you give up: hooks drop from 17 lifecycle events to 3, output styles do not exist, and your per-command permission rules have no equivalent. More on that in the migration section, because it is the part that will actually cost you an afternoon.

2. OpenCode — the efficiency argument

The headline finding here is worth your attention. An independent measurement using a logging proxy between each harness and the model endpoint found Claude Code sending roughly 32,800 tokens on a first turn where OpenCode sent about 6,900 — a 4.7x difference before you have asked for anything real.

Be careful how you read that. Over a full write-run-test-fix loop the two came out near parity, because OpenCode used more requests to get there. So the saving is real at the start of a session and shrinks as work gets longer. If you open a lot of short sessions, it matters a great deal.

MIT licensed, 60-plus models, and the most genuinely portable of the majors. Just go in knowing the subscription route is closed and you will be paying providers directly.

3. Cline — the one that shows its work

If what unsettles you about agentic coding is that it acts and then tells you, Cline is the antidote. Plan mode produces the whole plan first; Act mode executes it with per-step approval. You watch every file it intends to touch.

Apache-2.0, no seat fee, no platform cut — you pay only for inference. It talks to Anthropic, OpenAI, Google, OpenRouter’s couple of hundred models, Bedrock, Vertex, Groq, Ollama and LM Studio. For a team that needs to justify what an agent did, the audit trail alone earns its place.

4. Cursor — when you want to see the diff

Different shape of tool, and worth considering if your real complaint is legibility rather than limits. Terminal agents tell you what they did; Cursor shows you a multi-file diff you accept or reject hunk by hunk.

Hobby is free with limited agent requests, Pro is $20 a month, Teams Standard is $40 per user. Cursor does not publish dollar figures for Pro+ or Ultra on its pricing page — it publishes multiples of Pro instead, so check inside your account before you assume what an upgrade costs.

5. GitHub Copilot CLI — cheapest way in, and honest about limits

Ten dollars a month for Pro, and the free tier is the only one in this guide with a published number attached: 2,000 completions and 50 premium requests a month. That is a small allowance, but it is a knowable one.

Watch the multipliers rather than the sticker price. Every premium request is not equal: Haiku 4.5 costs 0.33 of a request, Sonnet costs 1, Opus costs 3, and GPT-5.5 costs 7.5. Letting Copilot auto-select models earns you a 10% discount on the multiplier. If you burn through quota faster than you expected, the model picker is almost always why.

6. Antigravity CLI — the surprising Claude route

Google moved Gemini CLI users here in June. The reason to care has nothing to do with Gemini: Antigravity individual tier is $0 and includes access to Claude Sonnet and Opus 4.6 alongside Google models. You can run Claude models in an agent without an Anthropic subscription.

The catch is that Google will not tell you the limits. Its own pages say only basic weekly rate limits on the free tier and more generous limits on paid, with quotas refreshing every five hours or weekly. No figures. After the Gemini CLI sunset, that vagueness is worth factoring into how much you build on it.

What breaks when you switch

This is the part nobody writes and the part that will eat your afternoon, so here it is concretely. Moving from Claude Code to Codex, roughly by how much pain each layer causes.

What you haveWhere it goesHow much work
CLAUDE.mdAGENTS.mdRename, done
MCP servers (.mcp.json)TOML config blockMechanical reformat
Skills folder.agents/skills/Directory rename
SubagentsTOML agentsReshape, different semantics
Slash commandsPrompts and skillsRe-author by hand
Hooks3 lifecycle eventsRethink from 17 down to 3
Permission allowlistsSandbox + approval policyBreaks — rethink the intent
Output stylesNothingNo equivalent

Two practical notes that will save you time.

Do not replace your instruction file, bridge it. AGENTS.md is the closest thing this space has to a standard — it is stewarded under the Linux Foundation and supported by 30-plus tools. Claude Code is not one of them, but you can keep one source of truth by writing your content in AGENTS.md and putting a single @AGENTS.md import at the top of CLAUDE.md. Every tool then reads the same file and you stop maintaining two.

Migration runs both ways. Recent Claude Code versions ship an /import command that pulls configuration from Codex and Gemini CLI — instruction files, MCP servers, commands, subagents and skills — with a dry-run flag so you can see what it would do first. Given what happened to Gemini CLI in June, that is a genuinely useful escape hatch in the other direction.

How to cut the bill without changing tools

Before you switch anything, try this list. Most of it comes from Anthropic own cost documentation, and in our experience the first two items alone solve the problem for a lot of people.

  • Clear between tasks. Stale context is billed on every subsequent message. Clearing costs nothing. Compacting, by contrast, is itself an expensive request because it has to read the conversation it summarises.
  • Stop using your best model for everything. Sonnet 5 is $2 and $10 per million tokens; Fable 5 is $10 and $50. That is five times the price for work that is usually routine. Reserve the expensive model for architecture and hard debugging.
  • Watch your cache lifetime. Prompt caching lasts an hour on a subscription but drops to five minutes once you start drawing on usage credits, and cache reads bill at a tenth of input price. Claude Code flags cache misses in its usage view when they pass 10% of recent usage — if you see that, it is telling you something expensive.
  • Keep your instruction file short. It loads every single session. Under 200 lines is a good target; move anything situational into skills, which load only when needed.
  • Filter noisy output before it reaches the model. A hook that greps test output for failures rather than passing the whole log through can turn tens of thousands of tokens into hundreds.
  • Turn thinking down. Thinking tokens bill as output and default budgets run high. Lower them and most everyday work is unaffected.
  • Be careful with agent teams. They use roughly seven times the tokens of a standard session. Brilliant occasionally, ruinous as a default.

If you are sizing this for a team rather than yourself, Anthropic publishes per-user rate guidance that is genuinely rare: roughly 200k to 300k tokens per minute per user for a team of five, falling to 10k to 15k for teams over 500. Plan capacity from those, not from your own single-seat experience.

How to choose

  • You want the same thing, cheaper — Codex CLI on ChatGPT Go, $8 a month, and you get published limits into the bargain.
  • You want to stop renting — OpenCode or Cline with your own API key. You pay providers directly and nobody can change your entitlement.
  • You need to review before anything runs — Cline plan mode, or Cursor if you would rather read a diff than a log.
  • You have no budget at all — Copilot Free for a known small quota, Antigravity for an unknown larger one, or a free harness pointed at a cheap model.
  • You want Claude models without an Anthropic plan — Antigravity CLI, oddly enough.
  • You run local models — Crush or Cline, both of which talk to Ollama and LM Studio without ceremony.
  • Your team needs repeatable workflows — Goose, where recipes are files you can commit and share.
  • You do not want to think about routing — Amp, which decides for you and does not mark up the provider price.

Is switching worth it?

Stay where you are if your setup is deep — a tuned CLAUDE.md, custom hooks, permission rules you trust — and your real problem is a busy fortnight rather than a permanent ceiling. The migration table above is the cost of leaving, and for a heavily customised setup it is a day, not an hour.

Switch if you are on Pro and hitting limits weekly, if you need a model Anthropic does not offer, if your organisation needs an audit trail Claude Code does not produce, or if you have worked out that at $150 to $250 a month of consumption you would rather pay providers directly and keep the control.

Or do what most experienced people quietly do: run two. Keep Claude Code for the hard problems, put a cheap harness on a cheap model in front of the routine edits, and stop paying frontier rates for work that never needed them. That single change usually saves more than switching vendor ever would.

If it is the chat assistant rather than the terminal you are reconsidering, our Claude alternatives guide covers that side, and the developer tool alternatives hub has the rest of the category.

Questions

Claude Code alternatives FAQs

The questions you are actually asking on Google, Reddit and Hacker News — answered with what we verified this month.

How we test
01 What is the best open source alternative to Claude Code?

OpenCode, if you want the closest experience — MIT licensed and the most model-agnostic of the lot. Two things to weigh first: Anthropic legal request stripped out subscription auth in March 2026, and it has a disclosed remote-code-execution history. If either bothers you, Cline and Goose are both Apache-2.0 and calmer choices.

02 Is there a free alternative to Claude Code?

Yes, in two different senses. Free tools where you only pay the model provider: Cline, OpenCode, Goose, Crush and Continue.dev. Free hosted quota: GitHub Copilot Free gives you 2,000 completions and 50 premium requests a month, and Google Antigravity has a $0 tier. Worth knowing Claude Code itself is on Anthropic free plan too — your limit there is usage, not price.

03 Codex vs Claude Code — which is better?

They are tied. On Terminal-Bench 2.1, Claude Code with Fable 5 scores 83.8% plus or minus 1.2 and Codex with GPT-5.5 scores 83.1% plus or minus 1.1 — the gap is smaller than the error bars. The real differences are that Codex starts at $8 rather than $20 and publishes exact rate limits, while Claude Code gives you 17 hook events to Codex three.

04 Does Claude Code work with other models?

Yes, through ANTHROPIC_BASE_URL and a gateway such as LiteLLM. But measure what it costs you: Claude Code scores 83.8% on Terminal-Bench 2.1 with Fable 5 and 58.7% with GLM-5.1. That is a 25-point drop. You also move from subscription billing to API billing the moment you route out.

05 What is the cheapest way to run agentic coding?

Cheapest first: a free harness such as OpenCode or Cline pointed at a cheap model — Gemini 2.5 Flash-Lite runs $0.10 in and $0.40 out per million tokens. Then ChatGPT Go at $8 for Codex, or Copilot Pro at $10. For context, Anthropic says Claude Code averages about $13 per developer per active day.

06 Does Claude Code read AGENTS.md?

No, and plenty of guides say otherwise. Anthropic docs are blunt: Claude Code reads CLAUDE.md, not AGENTS.md. Bridge it by putting an @AGENTS.md import inside your CLAUDE.md, or symlink the two. A request for native support has been open since March 2026.

07 What happened to Gemini CLI — is it still free?

Not for you, unless you hold a Standard or Enterprise licence. Google announced on 19 May 2026 that Gemini CLI would stop serving Google AI Pro, Ultra and free users on 18 June 2026. Antigravity CLI replaced it and carries over skills, hooks, subagents and extensions.

08 What actually transfers if I switch away from Claude Code?

Your instruction file and MCP servers move with some reformatting. Skills and subagents need reshaping. Permissions, hooks and output styles break — Codex has 3 hook events to Claude Code 17, and no equivalent for per-command allowlists. Keep both CLAUDE.md and AGENTS.md rather than replacing one with the other.

09 Can I use my Claude Max subscription with OpenCode?

Not officially, and not out of the box any more. Anthropic legal request led OpenCode to remove its Anthropic auth plugin in March 2026, and OpenCode own docs now say using a Pro or Max subscription there is not supported by Anthropic. Third-party plugins have restored it, but that is a terms-of-service risk you would be taking on knowingly.

10 Is Aider still maintained?

Barely. There has been one release in the past twelve months, and the community has open issues asking where the maintainer went and what the future of the project is. A fork called aider-ce is now more active. It still works and it is still Apache-2.0 — just do not expect it to keep pace.

Updated monthly · No paid placements

Still deciding?

See how Claude compares to the other assistants, or browse every developer tool alternative we publish.