# The Best Claude Code Alternatives in 2026 (Free, Open-Source, and Paid)

> The best Claude Code alternatives in 2026, sorted by why you're leaving: cost, open source, local models, an IDE, cloud agents, or OpenAI and Google.

Codex CLI is the best all-round Claude Code alternative in 2026: Apache-2.0, included even in ChatGPT Free and Go, and able to run local models. Pick OpenCode for open source with any model, Cline or Cursor to work in an editor, Devin or Jules for async cloud agents, and Antigravity for Google's free agent.

The best Claude Code alternative for most developers in 2026 is OpenAI's [Codex CLI](/tools/codex-cli): open source under Apache-2.0, included even in ChatGPT's Free and Go plans, and able to run local models. The right replacement still depends on why you're leaving [Claude Code](/tools/claude-code), so the picks below are sorted by reason, every product gets a verdict, and a dated changelog shows what moved in 2026.

*Last reviewed: September 2026.*

Prices change often; each tool page lists current pricing. For what Claude's own plans include, see [Claude plans compared](/guides/getting-started/claude-plans-compared-2026).

## The short list

| Tool | Type | Open source? | Models | Best for |
|---|---|---|---|---|
| [Codex CLI](/tools/codex-cli) | CLI, IDE, desktop, cloud | Yes (Apache-2.0) | GPT-5.6; local via `--oss` | Closest like-for-like swap |
| [OpenCode](/tools/opencode) | Terminal, desktop | Yes (MIT) | 75+ providers; local | Open source, any model |
| [Aider](/tools/aider) | Terminal | Yes (Apache-2.0) | Almost any; local | Commit-per-edit workflow |
| [goose](/tools/goose) | Desktop, CLI | Yes (Apache-2.0) | 15+ providers; local | Code and non-code tasks |
| [Qwen Code](/tools/qwen-code) | CLI, desktop, IDE | Yes (Apache-2.0) | Four API protocols; local | Qwen models |
| [Crush](/tools/crush) | Terminal | No: source-available (FSL-1.1-MIT) | Dozens; local | Mid-session model switching |
| [Amp](/tools/amp) (ex-Sourcegraph, Dec 2025) | CLI, web, remote | No | Set by "the Dial"; BYOK | Remote agents |
| [Warp](/tools/warp) | Terminal, Agent CLI | Client only (AGPL-3.0, Apr 2026) | Frontier, open-weight; BYOK | Hosting several agents |
| [Factory](/tools/factory) | CLI, desktop, SDK | No | Any; local via BYOK | Teams, remote runs |
| [Cursor](/tools/cursor) (SpaceX, Aug 2026) | AI-native editor | No | Frontier, Composer, Grok | Agent-first editor |
| [Devin Desktop](/tools/windsurf) (ex-Windsurf, Jun 2026) | Editor | No | SWE-1.7, Claude, GPT | Local plus cloud agents |
| [Kiro](/tools/kiro) | IDE, CLI, web | No | Claude, open-weight, Auto | Spec-driven work |
| [Antigravity](/tools/antigravity) | Desktop, CLI, extensions | No | Gemini, Claude Sonnet/Opus 4.6 | Google's free agent |
| [Cline](/tools/cline) | Extension, CLI, desktop | Yes (Apache-2.0; JetBrains plugin closed) | Any; local | Agent inside VS Code |
| [Kilo Code](/tools/kilo-code) | Extension, CLI | Yes (MIT) | 500+ via gateway; local | Parallel agents in the editor |
| [Devin](/tools/devin) | Cloud agent, CLI | No | Anthropic, OpenAI, Google, Cognition | Handing off whole tasks |
| [Jules](/tools/jules) (quiet since Mar 2026) | Async cloud agent | No | Gemini | Free async GitHub tasks |
| [OpenHands](/tools/openhands) | Web canvas, CLI, cloud | Yes (MIT) | Any via LiteLLM; local | Self-hosted platform |

[Gemini CLI](/tools/gemini-cli) is left out on purpose: it lost consumer access in June 2026, and its current status is in the Google pick below.

## Pick by reason

### If cost or usage limits are the problem

Claude Code isn't on Claude's Free plan, and paid plans share one usage pool with a rolling five-hour window and weekly caps. There are three ways out.

- **A bundled free tier.** Codex is included in ChatGPT Free and Go. Antigravity's Individual plan is free, generally available, and lists Claude Sonnet and Opus 4.6 under basic weekly rate limits. Kiro's Free plan includes 50 credits a month, and Jules allows 15 free tasks a day, though its changelog has been quiet since March 2026.
- **Bring your own key.** OpenCode, Cline, Kilo Code, Aider, goose and Qwen Code are free tools: you pay per token, reuse a subscription, or go local. Qwen Code's free OAuth quota ended in April 2026. Amp, independent since December 2025, has a free Hobby plan with "No Amp token fees", and Warp's Free tier includes its Agent CLI with your own inference.
- **Low-cost open-model plans.** OpenCode Go and Cline's ClinePass are optional subscriptions for open coding models. Factory has no free plan, but it falls back to Droid Core, a free open-weight pool, when plan usage runs out.

**Pick:** Codex CLI if you have a ChatGPT account; OpenCode with a local or low-cost open model for the smallest possible bill.

### If you want open source or your own model

**Pick OpenCode:** MIT, 75+ providers, local models, and sign-in with an existing GitHub Copilot or ChatGPT subscription. The alternatives are Aider for git-committed edits, goose for non-code work under Linux Foundation governance, Qwen Code for four API protocols in one agent, OpenHands to self-host the whole platform, and Cline or Kilo Code inside VS Code.

> [!NOTE]
> Two licenses need care. Crush is source-available under FSL-1.1-MIT: it permits any use except a "Competing Use", and each release becomes MIT on its second anniversary. Warp's client has been AGPL-3.0 since April 2026, but Oz, its cloud orchestration layer, stays proprietary.

### If you need local models and privacy

Every open-source tool above runs local models, and so do Crush and Factory. The specifics:

- **Codex CLI:** `--oss` ("Use open-source provider"), with `--local-provider` set to `lmstudio` or `ollama`.
- **OpenHands:** LM Studio, Ollama, SGLang or vLLM, and its docs suggest Qwen3.6-35B-A3B as a starting model.
- **Crush:** auto-discovers Ollama, LM Studio and llama.cpp; turn off its pseudonymous metrics with `CRUSH_DISABLE_METRICS=1`.
- **Factory:** point BYOK at `http://localhost:11434/v1` (Ollama) or `http://localhost:1234/v1` (LM Studio), in the CLI and desktop app only.

**Pick:** OpenCode for everyday local work; OpenHands to sandbox the agent in Docker or a VM you control. [Ollama vs LM Studio](/guides/comparisons/ollama-vs-lm-studio) helps with the runtime. Check telemetry before assuming nothing leaves your machine.

### If you'd rather work in an editor than a terminal

Claude Code already integrates with VS Code and JetBrains, so try that first if the terminal is your only friction. Otherwise, keep your editor with Cline or Kilo Code, compared in [Cline vs Kilo Code vs Roo Code](/guides/comparisons/cline-vs-kilo-code-vs-roo-code). Or switch editors: Cursor, owned by SpaceX since August 2026, is the most agent-centric; Devin Desktop, called Windsurf until June 2026, pairs local and cloud agents; Kiro adds specs; Antigravity pairs a desktop app with IDE extensions.

**Pick:** Cline to keep your editor and your model; Cursor for a full AI-native editor. [Claude Code vs Cursor](/guides/comparisons/claude-code-vs-cursor) goes deeper.

### If you want async cloud agents

Devin runs tasks in cloud VMs and accepts hand-offs "from the Devin CLI, Claude Code, Codex, Cursor, and more", the others through an open-source Devin Handoff plugin. Codex Web is Codex's cloud side, with GitLab support in beta as of September 2026. Jules gives 15 free tasks a day but has had no changelog entry since March 2026. Amp's remote orbs, Factory's Droid Computers and Kiro's cloud sessions (launched in preview in August 2026) keep working after you close the laptop, and OpenHands Cloud's free tier allows 10 conversations a day.

**Pick:** Devin for the most complete cloud product; Jules if free matters more than momentum.

### If you want to stay with OpenAI or Google

**OpenAI:** Codex is the direct equivalent, with the CLI, an IDE extension, the ChatGPT desktop app and Codex Web on one ChatGPT plan. See [Claude Code vs Codex CLI](/guides/comparisons/claude-code-vs-codex-cli) and [Codex CLI sandbox and approval modes](/guides/configuration/codex-sandbox-and-approvals). **Google:** Antigravity is the successor Google named for Gemini CLI's consumer users, with a desktop app and the `agy` CLI, and Jules covers async work. **AWS:** Kiro replaced the Amazon Q Developer CLI.

> [!NOTE]
> Gemini CLI's consumer access ended on June 18, 2026, for Google AI Pro and Ultra subscribers and free Code Assist individuals. The Apache-2.0 project still ships weekly for paid Gemini API keys, Vertex AI and Code Assist Standard or Enterprise, though its README still advertises the old free tier. See [Claude Code vs Gemini CLI](/guides/comparisons/claude-code-vs-gemini-cli).

**Pick:** Codex CLI for OpenAI shops; Antigravity for Google shops, or Gemini CLI if you already pay for Gemini API keys or Vertex AI.

## The alternatives, one at a time

### Codex CLI

OpenAI's agent "runs locally on your computer" and is Apache-2.0 on GitHub. Every ChatGPT plan from Free and Go to Enterprise includes it, or you can use an API key. Models are Astra and GPT-5.6 Sol, Terra and Luna; any Chat Completions or Responses provider also works, and `--oss` goes local. The same product spans an IDE extension, the ChatGPT desktop app and Codex Web.

**Verdict:** the default switch. It's the closest to Claude Code in shape, it's open source, and it's the cheapest way in if you have ChatGPT.

### OpenCode

Anomaly's MIT terminal agent (now at anomalyco/opencode) is the most-starred project here, with 206,680 GitHub stars as of September 11, 2026. It has build and plan agents, 75+ providers and local models. OpenCode Zen (a pay-as-you-go gateway) and OpenCode Go (an open-model subscription) are optional, and the desktop app is in beta as of September 2026. See [Claude Code vs OpenCode](/guides/comparisons/claude-code-vs-opencode).

**Verdict:** the best open-source Claude Code alternative, and the pick if model freedom is why you're leaving.

### Aider

Aider (Apache-2.0) is git-first: every edit becomes a commit "with sensible commit messages", a repo map supplies context, and it connects to "almost any LLM, including local models". Voice-to-code, lint-and-test after edits, and an IDE watch mode round it out. Releases have slowed: the latest PyPI release is 0.86.2, from February 12, 2026. See [Aider vs Claude Code](/guides/comparisons/aider-vs-claude-code).

**Verdict:** still sound for reviewable, commit-per-change work with your own keys; weigh the slower release pace.

### goose

goose is a general-purpose agent, "Not just for code", and it's now part of the Linux Foundation's Agentic AI Foundation (the repo moved from block/goose to aaif-goose/goose). It ships a desktop app, a CLI and an API, supports 15+ providers including Ollama, connects to 70+ MCP extensions, and can use Claude, ChatGPT or Gemini subscriptions over ACP. Teams can build branded custom distributions.

**Verdict:** the pick for one open agent across code and non-code work, with neutral governance.

### Qwen Code

The Qwen team's Apache-2.0 agent began as a fork of Gemini CLI v0.8.2 and has been developed independently since. It speaks four model APIs (OpenAI, Anthropic, Gemini and Qwen), runs local models via Ollama or vLLM, and adds subagents, hooks, MCP, plan mode and an "Agent Arena" for model head-to-heads. Its free Qwen OAuth tier ended on April 15, 2026, so you now need an Alibaba Cloud plan, your own key, or a local model.

**Verdict:** capable for multi-model work, especially with Qwen models, but no longer a free hosted quota.

### Crush

Charm's terminal agent continues the archived opencode-ai/opencode project, "developed by the original author and the Charm team", and is separate from Anomaly's OpenCode. It auto-discovers local models, switches models mid-session with context intact, uses LSP context, and reads Agent Skills from `.claude/skills` directories. It runs on macOS, Linux, Windows, Android and the BSDs. The license is FSL-1.1-MIT: source-available, with each release becoming MIT two years after it ships.

**Verdict:** best for mid-session model switching and unusual platforms. Just don't file it under open source.

### Amp

Amp spun out of Sourcegraph in December 2025, then removed Amp Tab (January 2026), killed its editor extension (February) and rebuilt its CLI (May). "The Dial" replaces model picking with low, medium, high and ultra modes, and Claude Fable 5.1 powers ultra as of September 2026. Remote "orbs" keep agents working after you close your laptop. The CLI runs on Mac, Linux and WSL.

**Verdict:** strong if you'd rather delegate the model choice and want remote agents. Editor users should look elsewhere.

### Warp

Warp's terminal client went open source (AGPL-3.0) on April 28, 2026. On August 4 it launched a standalone Agent CLI, "a multi-model, cost-optimizing harness" that runs in any terminal with your own keys or custom routers. The app also hosts Claude Code, Codex, Gemini CLI and other agents. A Warp account is required.

**Verdict:** pick it for a terminal that runs several agents side by side, Claude Code included. The Agent CLI is only weeks old.

### Factory

Factory's "Droids" span the `droid` CLI, a desktop app and an SDK, with cloud and local background agents on every individual plan. It is model-agnostic, local models included, and it falls back to the free Droid Core pool when usage runs out. Upper tiers add managed Droid Computers, SSO, SCIM, zero data retention and on-prem deployment. There is no free plan.

**Verdict:** serious for teams that need enterprise controls and remote runs; solo developers on a budget should start elsewhere.

### Cursor

Cursor is an AI-native VS Code fork, owned by SpaceX since August 14, 2026, completing a process that began with an April partnership. Cursor 3.0 (April 2026) made agents the main view, running in parallel locally, in worktrees, in the cloud or over SSH. Since September 2, 2026, Self-Hosted Machines have let cloud agents execute on your infrastructure while inference stays in Cursor's cloud. Your own API keys work for chat models only.

**Verdict:** the strongest pick if you want an editor built around agents. Watch how the new owner shapes its model lineup.

### Devin Desktop (formerly Windsurf)

Windsurf was renamed Devin Desktop on June 2, 2026: "the same IDE, same editor, and has the same features", with the Agent Command Center up front. Cascade became Devin Local, which Cognition says brings up to 30% better token efficiency, subagents and sandboxing. It works with local-only agents, pricing didn't change, and the JetBrains plugin is in maintenance mode. See [Cursor vs Windsurf](/guides/comparisons/cursor-vs-windsurf).

**Verdict:** a good fit for local and cloud agents in one editor, and the natural choice for teams already on Devin.

### Kiro

AWS's Kiro, generally available since November 2025, is what the Amazon Q Developer CLI was rebranded into. It turns prompts into specs (requirements, design and tasks) and checks code against them with property-based testing. One agent harness drives the IDE, `kiro-cli` and Kiro Web, plus an iOS app launched in June 2026. Models include Claude up to Opus 5, GPT-5.6 Sol, Terra and Luna, open-weight options and an Auto router. It's proprietary; only Kiro Crew is Apache-2.0.

**Verdict:** for teams that want specs, tests and AWS governance over free-form prompting. There's no documented support for your own model keys.

### Google Antigravity

Google's named successor for Gemini CLI's consumer users pairs the Antigravity 2.0 desktop app with the `agy` CLI and IDE extensions for VS Code, Visual Studio, JetBrains, Zed and Xcode. The free Individual plan lists Gemini 3.x Flash models, Gemini 3.1 Pro, Claude Sonnet and Opus 4.6, and gpt-oss-120b. It joined eligible Gemini Enterprise subscriptions in August 2026. Only its Python SDK is open source (Apache-2.0).

**Verdict:** the best free option that includes Claude models, and the natural home for Google shops.

### Cline

Cline (Apache-2.0) is the open-source agent for VS Code, also available as a JetBrains plugin (not open-sourced), a CLI, a desktop app and an SDK. It offers Plan and Act modes, checkpoints, and any provider or local model. v4.0.0 (June 2026) moved it onto the Cline SDK and added a marketplace for skills, MCP servers and plugins, while pausing subagents in VS Code and turning command auto-approval off by default. Inference is BYOK, at cost through Cline, or via ClinePass.

**Verdict:** the best way to get a Claude Code-style agent inside VS Code with any model.

### Kilo Code

Kilo Code began in 2025 as a Roo Code fork, but v7 (GA April 2, 2026) was rebuilt on the OpenCode server under MIT, and the legacy Roo-derived extension reached end of life on July 31, 2026. It ships Code, Plan, Ask and Debug agents, supports subagents natively, and runs parallel agents in worktrees. It covers VS Code, JetBrains and a CLI, with free models, your own keys, local models, or Kilo Gateway at provider rates with no markup.

**Verdict:** the pick for parallel agents and a huge model catalogue in your editor, on an MIT codebase.

### Devin

Cognition's cloud agent now shares one plan family with Devin Desktop (Windsurf until June 2026), a local Devin CLI and Devin Review. The CLI uses models from Anthropic, OpenAI, Google and Cognition plus open models such as DeepSeek, Kimi and GLM, behind an "Adaptive" router. Devin Outposts adds self-hosted workers, and a Free plan offers limited usage.

**Verdict:** the most complete cloud-agent product here, and one that treats Claude Code as a hand-off source rather than only a rival.

### Jules

Jules works in a Google-hosted VM: connect a GitHub repo, describe a task or label an issue `jules`, approve its plan, and get a pull request. It also fixes failing GitHub Actions checks. The free tier allows 15 tasks and 3 concurrent tasks per rolling 24 hours. Its direction is uncertain: Google Labs calls it experimental, the latest changelog entry is from March 9, 2026, and the CLI was last published in December 2025.

**Verdict:** a genuinely free way to try async agents on GitHub. Don't build a team process on it yet.

### OpenHands

OpenHands (MIT, now at OpenHands/OpenHands) leads with Agent Canvas, in beta as of September 2026: a self-hosted control center that runs OpenHands, Claude Code, Codex, Gemini or any ACP-compatible agent across local, remote and cloud backends. Models come through LiteLLM, local ones included. OpenHands Cloud's Individual tier is free for 10 conversations a day, with your own key or OpenHands models at cost.

**Verdict:** the pick for a self-hosted agent platform that can keep Claude Code in the mix.

## What changed in 2026

Dates come from each vendor's own post, docs or repository.

| Date | Change |
|---|---|
| Dec 2, 2025 | Amp spins out of Sourcegraph as an independent company |
| Feb 12, 2026 | Aider's latest PyPI release (0.86.2) |
| Feb 19, 2026 | Amp kills its editor extension |
| Mar 9, 2026 | Latest Jules changelog entry to date |
| Apr 2, 2026 | Kilo Code v7, rebuilt on the OpenCode server, goes GA; Cursor 3.0 ships |
| Apr 15, 2026 | Qwen Code's free Qwen OAuth tier ends |
| Apr 28, 2026 | Warp open-sources its client under AGPL-3.0 |
| Apr 30, 2026 | AWS sets April 30, 2027 as end of support for Amazon Q Developer IDE plugins and points users to Kiro |
| May 15, 2026 | Roo Code shuts down |
| May 19, 2026 | Google announces the Gemini CLI transition; Antigravity 2.0 and its CLI launch |
| Jun 2, 2026 | Windsurf becomes Devin Desktop; Cascade becomes Devin Local |
| Jun 18, 2026 | Gemini CLI consumer access ends |
| Jun 26, 2026 | Cline v4.0.0 moves to the Cline SDK |
| Jul 9, 2026 | Codex joins the ChatGPT desktop app; Amp's Dial replaces its old modes |
| Jul 23, 2026 | OpenAI's API shuts down gpt-5-codex through gpt-5.2-codex |
| Jul 31, 2026 | Kilo's legacy Roo-derived extension reaches end of life |
| Aug 4, 2026 | Warp Agent CLI launches |
| Aug 14, 2026 | SpaceX completes its acquisition of Cursor |
| Aug 20, 2026 | Antigravity joins eligible Gemini Enterprise subscriptions |
| Aug 31, 2026 | GPT-5.4 and GPT-5.4 mini retire from Codex |
| Sep 5, 2026 | Codex removes its `codex mcp-server` command |

Three corrections to common claims. Not every Codex-named model is gone: as of September 2026, 5.3 Codex Spark remains as a text-only research preview, and gpt-5.3-codex is deprecated for ChatGPT sign-in but absent from the API shutdown list. Crush is not OpenCode: the archived opencode-ai/opencode project became Crush. And Roo Code users have maintained successors, covered in [Cline vs Kilo Code vs Roo Code](/guides/comparisons/cline-vs-kilo-code-vs-roo-code).

## Moving your setup

Switching costs less than it used to, because the configuration formats are converging.

- **Instructions.** Claude Code reads `CLAUDE.md`; Codex reads `AGENTS.md`, an open format other agents use too (see [AGENTS.md](/glossary/agents-md)). Move durable content (layout, commands, conventions and boundaries) into `AGENTS.md`, and keep only Claude-specific notes in `CLAUDE.md`. [AGENTS.md for Codex](/guides/configuration/codex-agents-md) covers what belongs there, and Antigravity's migration keeps `GEMINI.md` and `AGENTS.md` rules.
- **Skills.** SKILL.md follows the open [Agent Skills standard](/guides/skills/agent-skills-open-standard), so a skill's name, description and instructions port. Crush reads `.claude/skills`, Kiro supports Agent Skills, and Codex reads `.agents/skills`. Claude-only fields such as `allowed-tools` may be ignored.
- **MCP servers.** goose, Crush, Kiro, Qwen Code, Cline, Kilo Code, Cursor and Jules all use MCP. Re-register your servers in each tool.
- **Hooks and permissions.** These are tool-specific. Kiro, Qwen Code and Cursor have their own hooks, so plan to recreate yours.

You may not need a clean break. Warp and OpenHands' Agent Canvas run Claude Code beside other agents, goose can use a Claude subscription over ACP, and Devin accepts hand-offs from Claude Code.

## How to choose

The bold picks above are the short answer: Codex CLI or Antigravity for price, OpenCode or Cline for open source, OpenCode or OpenHands for local work, Cursor or Cline for an editor, Devin or Jules for async, and Codex or Antigravity to stay with OpenAI or Google.

Then run a two-candidate bake-off: the same repository and the same three tasks (a bug fix, a small feature and a refactor), comparing the diffs you'd actually merge. The top three picks install in a minute:

```bash
npm install -g @openai/codex
curl -fsSL https://opencode.ai/install | bash
curl -fsSL https://antigravity.google/cli/install.sh | bash
```

Run `codex`, `opencode` or `agy` from your project root. For the wider field, read [the open-source and CLI agents overview](/guides/prompting/ai-coding-agents-cli-2026). If you're replacing an editor assistant rather than a terminal agent, see the [best GitHub Copilot alternatives](/guides/comparisons/best-github-copilot-alternatives-2026).

## Sources and further reading

- [Codex pricing and plans](https://learn.chatgpt.com/docs/pricing) — OpenAI
- [Codex models](https://learn.chatgpt.com/docs/models) — OpenAI
- [API deprecations](https://developers.openai.com/api/docs/deprecations) — OpenAI
- [An important update: transitioning Gemini CLI to Antigravity CLI](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli/) — Google
- [Google Antigravity pricing](https://antigravity.google/pricing) — Google
- [OpenCode documentation](https://opencode.ai/docs/) — OpenCode
- [Devin Desktop FAQ](https://docs.devin.ai/desktop/devin-desktop-faq) — Cognition
- [Amp is becoming a separate company](https://ampcode.com/news/amp-frontier-corporation) — Amp
- [Introducing the Warp Agent CLI](https://www.warp.dev/blog/introducing-the-warp-agent-cli-coding-agent) — Warp
- [Factory pricing](https://docs.factory.ai/pricing) — Factory
- [Kiro is generally available](https://kiro.dev/blog/general-availability/) — Kiro (AWS)
- [Crush repository and license](https://github.com/charmbracelet/crush) — Charm
- [Qwen Code repository](https://github.com/QwenLM/qwen-code) — Alibaba Qwen
- [OpenHands pricing](https://openhands.dev/pricing) — OpenHands
- [Jules documentation](https://jules.google/docs) — Google

---

_Source: https://agentscamp.com/guides/comparisons/best-claude-code-alternatives-2026 — Guide on AgentsCamp._
