# Best Claude Code alternatives in 2026: 9 CLI agents

URL: https://agentvera.dev/en/blog/best-claude-code-alternatives/ · Published: 2026-10-28

The best Claude Code alternatives in 2026: Codex CLI, Gemini CLI, Copilot CLI, opencode, Aider, Cursor CLI, Amp, Qwen Code and Kiro, with prices and when to switch.

**In short:**

- The closest Claude Code alternative is OpenAI’s Codex CLI; Copilot CLI fits if you already pay for GitHub Copilot, and opencode or Aider fit if you want to bring your own model or key.
- Gemini CLI no longer serves free personal accounts and Qwen Code’s free OAuth tier has ended, so check how you would pay before you switch (prices as of October 2026).
- You don’t have to replace Claude Code: keep one AGENTS.md for every tool and run several agents side by side, picking the one that fits each task.

The best Claude Code alternatives in 2026 are OpenAI’s **Codex CLI** (the closest match, included in every ChatGPT plan), **GitHub Copilot CLI** (if you already pay for Copilot) and **opencode** (if you want to pick any model). Aider, Cursor CLI, Amp, Gemini CLI, Qwen Code and Kiro CLI each fit narrower cases. And you may not need to replace Claude Code at all: many developers keep it and run a second agent next to it.

This post answers one question: what can replace Claude Code, and when does each option make sense? If you want a neutral catalog of every terminal agent instead, see [the best AI coding CLI tools](/en/blog/best-ai-coding-cli-tools/ "Best AI coding CLI tools"). Prices and plans below were checked on each vendor’s site and are current as of October 2026.

## Why people look for a Claude Code alternative

The usual reasons are practical, not about quality:

- **Limits.** Claude plans have a rolling 5-hour window and a weekly cap. Hitting them mid-afternoon is the most common trigger. [Claude Code usage limits](/en/blog/claude-code-usage-limits/ "Claude Code usage limits") explains how they work.
- **Price.** Claude Code isn’t in Claude’s free plan. As of October 2026, Pro is $20/month ($17/month billed yearly) and Max starts at $100/month.
- **An existing subscription.** If your company already pays for ChatGPT, GitHub Copilot or Google Cloud, an agent that uses that plan costs nothing extra.
- **Model choice.** Some teams want to try other models, use a local model or route work through their own provider.
- **A second opinion.** A different model reviewing the first one’s work catches different mistakes.

## Claude Code alternatives at a glance

| Tool | Maker | Command | Platforms | Price / free tier (Oct 2026) | Best for |
| --- | --- | --- | --- | --- | --- |
| Codex CLI | OpenAI | `codex` | macOS, Linux, Windows | In ChatGPT Free, Go, Plus, Pro, Business; or API key | The closest like-for-like switch |
| Copilot CLI | GitHub | `copilot` | macOS, Linux, Windows | In all Copilot plans, Free ($0) to Max ($100/mo) | Teams already on GitHub Copilot |
| opencode | Anomaly | `opencode` | macOS, Linux, Windows | Free; you pay your model provider | Any model, including local ones |
| Aider | Aider | `aider` | macOS, Linux, Windows | Free; your API key or a local model | Git-first, file-by-file edits |
| Cursor CLI | Cursor | `agent` | macOS, Linux, Windows | Cursor plans; Free has limited agent requests | Cursor users who want the terminal |
| Amp | Amp | `amp` | macOS, Linux, Windows via WSL | Free tier; usage paid in credits | Multi-model work without picking models |
| Gemini CLI | Google | `gemini` | macOS, Linux, Windows | Paid API key, Vertex AI or Code Assist license | Companies on Google Cloud |
| Qwen Code | Alibaba (Qwen) | `qwen` | macOS, Linux, Windows | Free CLI; Qwen plans, API keys or other providers | Qwen models and cheap providers |
| Kiro CLI | AWS | `kiro-cli` | macOS, Linux, Windows 11 | Free (50 credits/mo); Pro $20, Pro+ $40, Power $200 | AWS shops and spec-driven work |

## The 9 best Claude Code alternatives

### 1. OpenAI Codex CLI

Codex CLI is the most direct replacement. You run `codex` in a project, describe the task and it reads, edits and runs commands, just like Claude Code. Its safety model is different: an OS-level sandbox (Seatbelt on macOS, bubblewrap on Linux, a native sandbox on Windows) combined with an approval policy, instead of Claude Code’s permission modes.

```bash
npm install -g @openai/codex
codex
```

- **Strengths:** strong models, a real sandbox, `codex exec` for scripts and CI, project rules in `AGENTS.md`.
- **Limits:** no equivalent of Claude Code’s hooks and plugin ecosystem; subscription usage has 5-hour and weekly windows too.
- **Pricing:** as of October 2026, Codex is included in ChatGPT Free, Go ($8/month), Plus ($20/month), Pro (from $100/month), Business, Edu and Enterprise, with higher limits on bigger plans. An OpenAI API key is billed per token.
- **Fits:** anyone who wants the same workflow with a different model and plan. [Claude Code vs Codex](/en/blog/claude-code-vs-codex/ "Claude Code vs Codex") goes deeper, and [how to use Codex CLI](/en/blog/how-to-use-codex-cli/ "How to use Codex CLI") walks through setup.

### 2. GitHub Copilot CLI

Copilot CLI is GitHub’s terminal agent. It signs in with your GitHub account and offers models from several vendors through your Copilot plan, so one subscription gives you more than one model family. It has interactive, plan and autopilot modes, and it reads `AGENTS.md`, `.github/copilot-instructions.md` and even `CLAUDE.md`.

```bash
npm install -g @github/copilot   # Node.js 22+
copilot
```

- **Strengths:** no new vendor to approve if your company already uses Copilot; it reads your existing `CLAUDE.md`; close to GitHub issues and pull requests.
- **Limits:** usage draws on your plan’s AI credits, so heavy agent work needs a higher plan.
- **Pricing:** as of October 2026, all Copilot plans include the CLI: Free ($0), Pro ($10/month), Pro+ ($39/month) and Max ($100/month), plus Business and Enterprise seats.
- **Fits:** teams already paying for Copilot. See [Copilot CLI vs Claude Code](/en/blog/copilot-cli-vs-claude-code/ "Copilot CLI vs Claude Code").

### 3. opencode

opencode is a terminal agent that isn’t tied to one provider. You connect providers with `/connect`, pick a model with `/models`, and switch between a Build agent (edits and runs commands) and a Plan agent (can’t edit) with Tab.

```bash
curl -fsSL https://opencode.ai/install | bash
opencode
```

- **Strengths:** any provider, local models, a GitHub Copilot sign-in, project rules in `AGENTS.md`, configuration in `opencode.json`.
- **Limits:** you can’t use a Claude Pro or Max subscription with it; Anthropic models need a Console API key billed per token.
- **Pricing:** free to install; you pay the provider you connect.
- **Fits:** people who want to choose a model per task, or keep code on local models. Start with [how to use opencode](/en/blog/how-to-use-opencode/ "How to use opencode").

### 4. Aider

Aider is one of the oldest terminal coding tools and works differently from Claude Code: you add the files you want changed to the chat, and every edit becomes a git commit, so `/undo` takes it back.

```bash
python -m pip install aider-install
aider-install
aider --model sonnet --api-key anthropic=<key>
```

- **Strengths:** works with almost any model, including local ones; ask, code and architect modes; `--lint-cmd` and `--test-cmd` to check its own work.
- **Limits:** less autonomous than Claude Code (you decide which files are in context), and no MCP support in AgentVera.
- **Pricing:** free to install; you pay your model provider, or nothing with a local model.
- **Fits:** developers who want small, reviewable commits. See [how to use Aider](/en/blog/how-to-use-aider/ "How to use Aider").

### 5. Cursor CLI

Cursor CLI brings the Cursor agent to the terminal. It has Agent, Plan and Ask modes (switch with `/plan`, `/ask`, Shift+Tab or `--mode`), and it uses your Cursor account.

```bash
curl https://cursor.com/install -fsS | bash
agent
```

On Windows, the docs give a PowerShell install: `irm 'https://cursor.com/install?win32=true' | iex`.

- **Strengths:** the same agent you use in the Cursor editor, now scriptable and usable over SSH.
- **Limits:** usage counts against your Cursor plan; it makes most sense if you already use Cursor.
- **Pricing:** as of October 2026, Cursor lists Free (limited agent requests), Plus ($8/month), Premium ($30/month), Super ($100/month), Ultra ($200/month) and Teams (from $30/user/month).
- **Fits:** Cursor users who want a terminal agent too. If you’re weighing the editor itself, see [Claude Code vs Cursor](/en/blog/claude-code-vs-cursor/ "Claude Code vs Cursor") and [the best Cursor alternatives](/en/blog/best-cursor-alternatives/ "Best Cursor alternatives").

### 6. Amp

Amp is a multi-model agent: instead of choosing a model, you choose a mode (`low`, `medium`, `high` or `ultra`) and Amp picks models and tools for that difficulty. It runs on the web and in the terminal, and reads `AGENTS.md` (falling back to `CLAUDE.md` when a folder has none).

```bash
curl -fsSL https://ampcode.com/install.sh | bash
amp
```

- **Strengths:** good defaults without model shopping; reads your existing `CLAUDE.md`.
- **Limits:** on Windows the CLI runs through WSL; usage is pay-as-you-go, so costs follow how much you use it.
- **Pricing:** as of October 2026, Amp has a free tier, and agent usage is paid with credits. For individuals Amp charges the providers’ API prices without a markup.
- **Fits:** people who want strong results without tuning models and effort themselves.

### 7. Gemini CLI

Gemini CLI is Google’s terminal agent with Gemini models, `GEMINI.md` project rules, MCP, checkpoints and several sandbox options. The big change: **since June 18, 2026, Gemini CLI no longer serves unpaid and Google One personal accounts**; those users were moved to Antigravity CLI.

```bash
npm install -g @google/gemini-cli
gemini
```

- **Strengths:** long context, strong sandboxing choices (Seatbelt, Docker or Podman, gVisor), fits Google Cloud setups.
- **Limits:** no longer a free option for individuals.
- **Pricing:** paid Gemini API key, Vertex AI or a Gemini Code Assist Standard or Enterprise license.
- **Fits:** companies already on Google Cloud. Details in [Gemini CLI vs Claude Code](/en/blog/gemini-cli-vs-claude-code/ "Gemini CLI vs Claude Code").

### 8. Qwen Code

Qwen Code is Alibaba’s Qwen-team terminal agent, Apache-2.0 licensed. It started as a Gemini CLI fork and now works with Qwen models and many other providers.

```bash
npm install -g @qwen-code/qwen-code@latest   # Node.js 22+
qwen
```

- **Strengths:** many providers (QwenCloud, Alibaba ModelStudio, OpenRouter, DeepSeek, local servers), switchable at runtime with `/auth`.
- **Limits:** the free Qwen OAuth tier ended on April 15, 2026, so you now need a plan or an API key.
- **Pricing:** free CLI; you pay through a QwenCloud Token Plan, an Alibaba ModelStudio Coding Plan or an API key.
- **Fits:** people who want Qwen models or low-cost providers.

### 9. Kiro CLI

Kiro CLI is the terminal side of AWS’s Kiro, the successor to Amazon Q Developer CLI. You run `kiro-cli`, sign in in the browser, and use the same subscription as the Kiro IDE.

```bash
curl -fsSL https://cli.kiro.dev/install | bash
kiro-cli
```

- **Strengths:** a free plan, predictable credit-based pricing, and a natural fit for teams on AWS.
- **Limits:** credits are shared with the IDE, so heavy use needs a higher plan.
- **Pricing:** as of October 2026, Free ($0, 50 credits/month), Pro ($20, 1,000 credits), Pro+ ($40, 2,000), Pro Max ($100, 5,000) and Power ($200, 10,000), per user.
- **Fits:** AWS-centered teams and anyone who wants a capped monthly bill.

## How to choose a Claude Code alternative

Ask these in order:

1. **What do you already pay for?** ChatGPT → Codex. GitHub Copilot → Copilot CLI. Cursor → Cursor CLI. Google Cloud → Gemini CLI. AWS → Kiro CLI. Using a plan you already have is the cheapest switch.
2. **Do you need a specific model, or a local one?** opencode and Aider let you pick any provider and run local models; Qwen Code also covers many providers.
3. **How much autonomy do you want?** Codex, Copilot CLI, Cursor CLI, Amp and Kiro run multi-step tasks on their own. Aider keeps you closer to every edit.
4. **What does your team need to approve?** A tool from a vendor you already use (GitHub, Google, AWS) is easier to get through security review.
5. **Test on a real task.** Run the same issue through two agents in your own repo and compare the diffs, not the demos.

## Switching without losing your setup

Most of what you built around Claude Code carries over if you move it to shared formats first.

**One rules file for every agent.** Codex, Copilot CLI, opencode and Amp read `AGENTS.md`. Move your shared rules there and leave a one-line `CLAUDE.md` so Claude Code reads the same file:

```markdown
@AGENTS.md
```

For Gemini CLI, add `AGENTS.md` to `context.fileName` in its settings. [CLAUDE.md and AGENTS.md](/en/blog/claude-md-agents-md/ "CLAUDE.md and AGENTS.md") covers the details.

**Re-add your MCP servers.** Each CLI has its own MCP config. For example, adding a server to Codex:

```bash
codex mcp add context7 -- npx -y @upstash/context7-mcp
```

**Expect hooks and skills to differ.** Claude Code’s hooks, skills and subagents don’t have one-to-one equivalents everywhere. Write down what each hook does (for example, “run the formatter after edits”) and put the instruction in `AGENTS.md` or the other tool’s own settings.

**Commit before every task.** Whatever the agent, a git checkpoint before and after makes a bad run cheap to undo.

## You don’t have to choose: run several agents side by side

Often the best answer to “what should replace Claude Code?” is “nothing, add a second agent”. Claude Code for a hard refactor, Codex for tests, a cheap model in opencode for docs, and a different model reviewing the result. Each CLI keeps its own login, so nothing stops you from using them together, except that juggling terminal tabs gets messy and two agents in the same folder overwrite each other.

AgentVera is a desktop app for macOS, Windows and Linux that runs Claude Code, Codex, Gemini CLI, Copilot CLI, opencode, Aider, Cursor CLI, Amp, Qwen Code, Kiro and other CLI agents in real terminals, using the installs and logins already on your machine. It is one way to do this; plain terminals with [git worktrees](/en/blog/git-worktree-parallel-agents/ "Git worktrees for parallel agents") work too.

- **[Workspace](/en/features/workspace/ "Workspace"):** a grid of agents per project, from 1×1 to 5×4, mixing different CLIs. Pick the model and effort per agent.
- **Worktrees:** start each agent in its own git worktree so they don’t touch each other’s files.
- **[Code review](/en/features/code-review/ "Code review"):** have one agent review what another changed before you merge, for example Codex reviewing Claude Code.
- **[Account switching](/en/features/account-switching/ "Account switching"):** when a Claude or Codex limit runs out, the agent moves to the next account in the same conversation (Pro and Team).
- **[Flows](/en/features/flows/ "Flows"):** pass one agent’s reply to another automatically, such as a planner in one CLI and a builder in another (Pro and Team).
- **[MCP manager](/en/features/mcp-manager/ "MCP manager"):** set up MCP servers once and AgentVera passes them to every supported CLI at launch (Aider is the exception).

The grid, worktrees, code review and MCP manager are on the free plan. [Download AgentVera](/en/download/ "Download AgentVera") and open Claude Code next to one of the alternatives above on the same repo. If you are comparing desktop apps for running agents rather than the agents themselves, the [alternatives pages](/en/alternatives/ "AgentVera alternatives") compare AgentVera with tools like Conductor, Warp and Zed.

## Wrapping up

If you want one replacement for Claude Code, start with Codex CLI. If you already pay for Copilot, Cursor, Google Cloud or AWS, use that vendor’s CLI first. If you want model freedom or local models, use opencode or Aider. Before you switch, move your rules into `AGENTS.md` and test two agents on the same real task. And if both turn out to be good at different things, keep both. For a free-only shortlist, see [the best free AI coding tools](/en/blog/best-free-ai-coding-tools/ "Best free AI coding tools").

## More roundups

- [Best Claude Code GUI apps (2026)](/en/blog/best-claude-code-gui/)
- [Best Cursor alternatives in 2026: 10 tools compared](/en/blog/best-cursor-alternatives/)
- [Best free AI coding tools (2026): 10 options compared](/en/blog/best-free-ai-coding-tools/)

## Frequently asked questions

**What is the best alternative to Claude Code?** For most people it is OpenAI’s Codex CLI: it works the same way (a terminal agent that reads your repo, edits files and runs commands), and it is included in every ChatGPT plan, including Free. If you already pay for GitHub Copilot, Copilot CLI is the cheapest switch; if you want any model, try opencode.

**Is there a free alternative to Claude Code?** As of October 2026, Codex is included in ChatGPT Free, Copilot CLI is included in Copilot Free, Kiro has a free plan with 50 credits a month and Cursor’s free plan has limited agent requests. opencode and Aider are free to install and can run local models, so you only pay for the hardware.

**Can I keep using my CLAUDE.md with another agent?** Partly. Copilot CLI reads CLAUDE.md, and Amp falls back to it when a folder has no AGENTS.md. The safer route is to move shared rules into AGENTS.md and leave a CLAUDE.md that only contains @AGENTS.md, so Claude Code and the others read the same file.

**Can opencode use my Claude Pro or Max subscription?** No. opencode takes an Anthropic API key from the Claude Console, billed per token. Signing in with a Claude Pro or Max plan isn’t offered.

**Do I have to pick just one coding agent?** No. Each CLI keeps its own login and sessions, so you can install several. A desktop app like AgentVera opens them in panes next to each other in the same project, each in its own git worktree, so you can send a task to whichever agent suits it.

---

**About AgentVera.** AgentVera is a desktop app for macOS, Windows and Linux, built by Solviera Teknoloji. It runs 18 AI coding agents (Claude Code, Codex, Gemini CLI, Copilot, Cursor, Antigravity, opencode, Hermes, Qwen Code, Kimi Code, Kiro, Amp, Droid, Goose, Vibe, Crush, Aider, Cline) side by side, per project, in real terminals with the user's own CLI installs and logins. The free plan has unlimited agents. Download: https://agentvera.dev/en/download/ · Pricing: https://agentvera.dev/en/pricing/
