# Claude Code alternatives in 2026: open source, local and paid

Most are open source, most run local models, and some copy Claude Code's modes outright. What each is, what it costs and which one fits.

Published 2026-10-05 by Richard Kaminsky and Mitchell Lipyansky, the co-founders of Poly. Canonical: https://usepoly.co/claude-code-alternatives
Poly is a multiplayer AI coding workspace: a shared room where your team works with one AI agent, together. Free to start: https://usepoly.co/

**The main Claude Code alternatives in October 2026 are other terminal coding agents. OpenAI's Codex CLI, open source under Apache 2.0 and included with ChatGPT, is the closest match. OpenCode (MIT), Cline (Apache 2.0), Kilo Code (MIT), Goose (Apache 2.0) and Qwen Code (Apache 2.0) are open source and run almost any model, including local ones through Ollama. xAI's Grok Build is open source too and uses Claude Code's own permission-mode names. GitHub's Copilot CLI, Cursor's CLI, Amp, Factory's Droid and Warp are proprietary. Two names to drop from older lists: Gemini CLI stopped serving free accounts in June 2026 in favor of Google's Antigravity CLI, and Roo Code shut down in May.**

## Key takeaways

- Closest match: Codex CLI, which is open source, comes with ChatGPT and can import your Claude Code setup.
- Open source and model-agnostic: OpenCode, the most popular at about 212,000 GitHub stars, plus Cline ([Cline vs Claude Code](/cline-vs-claude-code)), Kilo Code, Goose, Qwen Code and Grok Build.
- For local models: OpenCode, Cline, Kilo, Goose, Qwen Code, Crush and Codex CLI all work with Ollama.
- Gone or changed in 2026: Gemini CLI for consumers (replaced by Antigravity CLI on June 18), Roo Code (archived May 15) and Windsurf (renamed Devin Desktop).

*Claude Code alternatives, from each project's own pages and repositories, October 5, 2026.*

|  | License | Models | Price |
| --- | --- | --- | --- |
| Codex CLI | Apache 2.0 | OpenAI; local with --oss | With ChatGPT, from Free; or an API key |
| OpenCode | MIT | 75+ providers, local | Free with your keys |
| Cline | Apache 2.0 | Any provider, local | Free with your keys |
| Kilo Code | MIT | 500+ models, local | Free with your keys; paid tiers |
| Goose | Apache 2.0 | 15+ providers, local | Free |
| Qwen Code | Apache 2.0 | Several APIs, local | Free with your keys |
| Grok Build | Apache 2.0 | Grok 4.7; any via custom backends | In every Grok plan, including free |
| Crush | Source-available (FSL) | APIs, local | Your keys, or Charm's provider |
| GitHub Copilot CLI | Proprietary | Anthropic, Google, OpenAI | With Copilot, from Free |
| Cursor CLI | Proprietary | Claude, GPT, Gemini, Grok, Composer | With a Cursor plan |
| Amp | Proprietary | Your keys or ChatGPT | Free Hobby; $20 Individual |
| Antigravity CLI | Proprietary | Gemini | Free weekly quota; paid Google AI plans |

Stars and releases from each project's GitHub repository on October 5, 2026; everything else from the vendors' own pages.

## Which alternative is closest to Claude Code?

**Codex CLI.** OpenAI's agent has the same shape: a terminal agent with plan mode, subagents, skills, plugins, hooks and MCP, plus an IDE extension, a desktop app and cloud tasks. It's included with every ChatGPT plan, the free one in a limited form, and its `/import` brings over Claude Code's instructions, settings, skills and recent chats. [Claude Code vs Codex](/claude-code-vs-codex) compares them in detail.

**Grok Build.** xAI's agent, open source since July 2026, copies Claude Code's permission modes by name (default, acceptEdits, plan, auto, dontAsk and an always-approve mode) and has a plan mode, subagents, skills, plugins and hooks. It comes with every Grok plan, the free one too. [Grok Build vs Claude Code](/grok-build-vs-claude-code).

## Which are open source?

- **[OpenCode](https://opencode.ai/)** (MIT, about 212,000 stars): a terminal app, desktop app and IDE extension for 75 or more model providers, local models included, with free models or your own keys.
- **[Codex CLI](https://github.com/openai/codex)** (Apache 2.0, about 128,000 stars): OpenAI's agent; `--oss` runs local models.
- **[Cline](https://cline.bot/)** (Apache 2.0, about 70,000 stars): a VS Code extension, with JetBrains, a CLI and a desktop app, with plan and act modes and approvals.
- **[Goose](https://github.com/aaif-goose/goose)** (Apache 2.0, about 55,000 stars): a desktop app and CLI, now run by the Linux Foundation's Agentic AI Foundation, with 15 or more providers.
- **[Qwen Code](https://github.com/QwenLM/qwen-code)** (Apache 2.0, about 28,000 stars): Alibaba's agent, forked from Gemini CLI, with subagents, plan mode and a sandbox.
- **[Kilo Code](https://kilo.ai/)** (MIT, about 28,000 stars): VS Code, JetBrains and a CLI, with 500 or more models; Anaconda bought it in July 2026.
- **[Grok Build](https://github.com/xai-org/grok-build)** (Apache 2.0, about 27,000 stars): xAI's agent; it doesn't accept outside contributions.
- **Aider** (Apache 2.0): the original terminal pair programmer, but its last release was 0.86.2 in February 2026 and it has had no commits since May 2026 ([Aider vs Claude Code](/aider-vs-claude-code)).

Claude Code's own repository has more stars than most of these, about 149,000, but its license reads "All rights reserved," so it isn't open source. **Crush**, from Charm, is source-available under the FSL license rather than open source.

## Which work with local models?

OpenCode, Cline, Kilo Code, Goose, Qwen Code, Crush and Aider all run models served by Ollama or LM Studio, and Codex CLI does with `--oss`. Grok Build can use any provider or a local model through custom backends. Claude Code itself can run against Ollama too, though Anthropic doesn't support it ([Is Claude Code free?](/is-claude-code-free)). Which open models fit your hardware is covered in [the best free AI for coding](/best-free-ai-for-coding).

## Which paid alternatives are worth a look?

- **[GitHub Copilot CLI](https://github.com/features/copilot/cli):** included in every Copilot plan from Free up, drawing on AI credits, with plan mode, approvals per action and parallel subagents.
- **[Cursor CLI](https://cursor.com/cli):** Cursor's agent in the terminal, with agent, plan and ask modes and a hand-off to Cursor's cloud agents; it uses your Cursor plan.
- **[Amp](https://ampcode.com/pricing):** a free Hobby tier and a $20 Individual plan, built around cloud runs, using your own keys or a ChatGPT subscription.
- **[Factory's Droid](https://factory.com/pricing):** a CLI, desktop and web agent from $20 a month, with team plans.
- **[Warp](https://www.warp.dev/pricing):** a terminal with its own agent, free or $20 a month, that can also run Claude Code or Codex.
- **Antigravity CLI:** Google's closed-source replacement for Gemini CLI, with a free weekly quota.

## What changed in 2026?

- **Gemini CLI** stopped serving free, Google AI Pro and Ultra accounts on June 18, 2026; Google moved them to Antigravity CLI, and Gemini CLI now needs a paid API key or a business license ([Google](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli)).
- **Roo Code** announced its shutdown in April and archived its repository on May 15, 2026.
- **Windsurf** is now Devin Desktop.
- **Kilo Code** was acquired by Anaconda in July, **Goose** moved to the Linux Foundation, **Amp** was spun out of Sourcegraph in December 2025, and Cursor became part of SpaceX in August 2026.

## Do you need an alternative, or a different way to use Claude Code?

It depends on why you're looking. If it's price, see [Is Claude Code free?](/is-claude-code-free); if it's usage limits, [Claude Code vs Codex](/claude-code-vs-codex). If it's working with other people, note that Claude Code is single-user and none of these alternatives lets two people steer one live session either. Poly (usepoly.co) runs Claude Code and Codex inside a shared browser room, where everyone sees the same session and anyone can approve a change. [What is Poly?](/what-is-poly)

## Which should you pick?

- **The closest swap, with a free start:** Codex CLI.
- **Open source, any model, the biggest community:** OpenCode.
- **Inside VS Code:** Cline or Kilo Code.
- **Claude Code's habits, open source:** Grok Build.
- **Already paying for Copilot or Cursor:** their CLIs.
- **Local and private:** OpenCode, Goose or Qwen Code with Ollama.

## Common questions

**What is the best open-source alternative to Claude Code?**

OpenCode is the most popular, with about 212,000 GitHub stars, an MIT license and 75 or more model providers. Codex CLI (Apache 2.0) is the closest in shape, and Cline is the pick inside VS Code.

**Is there a free alternative to Claude Code?**

Yes. Open-source agents such as OpenCode, Cline, Goose and Qwen Code are free with your own API keys or local models, Codex comes with ChatGPT's free plan in a limited form, and Grok Build is included in Grok's free plan.

**Which Claude Code alternatives work with local models?**

OpenCode, Cline, Kilo Code, Goose, Qwen Code, Crush and Aider work with Ollama or LM Studio, Codex CLI does with the --oss flag, and Grok Build can use a local model through a custom backend.

**Is Gemini CLI still free?**

No. Google stopped serving free, Google AI Pro and Ultra accounts on June 18, 2026 and moved them to Antigravity CLI. Gemini CLI still works with a paid Gemini API key or a business license.

More guides: https://usepoly.co/guides · Security: https://usepoly.co/security · Pricing: https://usepoly.co/pricing
