# Claude Code alternatives in 2026, compared on their own docs

> Codex CLI, Gemini CLI, OpenCode, pi, Aider, Cline, Kilo Code and Copilot CLI compared with Claude Code on models, license, headless mode and price.

- URL: https://letsship.ai/compare/claude-code-alternatives
- Author: Önder Ceylan
- Published: 2026-10-16
- Last reviewed: 2026-10-16

Claude Code alternatives with their own headless mode and model setup include Codex CLI, Gemini CLI, OpenCode, pi, Aider, Cline and Kilo Code. GitHub Copilot CLI is the eighth. This page compares where each agent runs, its models and keys, its license, its headless mode and its price. Every fact below comes from the vendor's own docs, pricing page or repository.

Claude Code is Anthropic's agentic coding tool for the terminal, IDEs, a desktop app and the browser. It needs a Claude subscription or an Anthropic Console account, and the [Claude pricing page](https://claude.com/pricing) puts it on Pro at $20 a month, billed monthly. Each card below starts with the team that the alternative fits, from the alternative's own pages.

SHIP is not a terminal agent. It runs claude-code, codex, pi, kilo-code or open-code as the agents behind one issue, with a harness and model for each role.

## Compare the eight alternatives on their own documentation

The table, the price strip and the cards use only each product's own docs, pricing page or repository, and each card links its sources. Third-party lists for "claude code alternatives" were read only to see which products appear for that search, and none is cited.

| Product                            | License             |        IDE        |    Local models   |        MCP        |      Subagents     |
| ---------------------------------- | ------------------- | :---------------: | :---------------: | :---------------: | :----------------: |
| [Claude Code](#claude-code)        | Proprietary         |      Yes      | Not documented |      Yes      |       Yes      |
| [Codex CLI](#codex-cli)            | Apache-2.0          |      Yes      | Not documented |      Yes      |       Yes      |
| [Gemini CLI](#gemini-cli)          | Apache-2.0          |      Yes      | Not documented |      Yes      |    Experimental    |
| [OpenCode](#opencode)              | MIT                 |      Yes      |      Yes      |      Yes      |       Yes      |
| [pi](#pi)                          | MIT                 | Not documented |      Yes      |      Yes      | Left out by design |
| [Aider](#aider)                    | Apache-2.0          |      Yes      |      Yes      | Not documented |  Not documented |
| [Cline](#cline)                    | Apache-2.0          |      Yes      |      Yes      |      Yes      |       Yes      |
| [Kilo Code](#kilo-code)            | MIT                 |      Yes      |      Yes      |      Yes      |       Yes      |
| [Copilot CLI](#github-copilot-cli) | Copilot CLI License | Not documented | Not documented |      Yes      |  Not documented |

A check means the product's own pages describe it. A dash means none of those pages states it, which is a statement about the pages, not about the product.

Each agent is paid for in one of three ways. Prices are in US dollars a month, from each vendor's own pricing page, and they change often.

Pay a monthly plan

The plan covers the agent and its model use, up to the plan's limits.

**Copilot CLI:** $0 Free, $10 Pro, $39 Pro+, $100 Max.

**Claude Code:** $20 Pro, from $100 Max.
Or pay per use through an Anthropic Console account. The Free plan does not include it.

**Codex CLI:** $20 ChatGPT Plus, from $100 ChatGPT Pro.
Or pay per use with an API key. ChatGPT Free and Go cover the desktop app only.

Pay per use with a paid key

The vendor bills each request, and no consumer plan includes the agent.

**Gemini CLI:** No plan listed.
A paid Gemini API key, or a Gemini Code Assist Standard or Enterprise license. Google ended free access and access through Google AI Pro and Ultra on June 18, 2026.

Bring your own model keys

The agent has no price on its own pages. Your model provider bills you for use, and some vendors sell an optional plan.

**OpenCode:** $10 Go, $40 Go Plus.

**Cline:** $9.99 for open models ClinePass.

**Kilo Code:** $15 a user Teams, from $19 Kilo Pass.

**pi:** No plan listed.

**Aider:** No plan listed.

## Read each alternative on its own terms

### Claude Code

**License:** Proprietary

The agent that the other eight are compared with.

**Runs in:**
Terminal, IDEs, desktop app, web

**Headless:**
`-p` / `--print`

**Models:**
A Claude subscription or an Anthropic Console account. Third-party providers in the terminal and the IDEs.

**Features:**
Subagents, agent teams, MCP, hooks and skills. It opens pull requests and runs in GitHub Actions.

**Price:**
Not in the Free plan. Pro is $20 a month, billed monthly. Max starts at $100.

**Sources:**
* [Overview](https://code.claude.com/docs/en/overview)
* [Run Claude Code programmatically](https://code.claude.com/docs/en/headless)
* [Subagents](https://code.claude.com/docs/en/sub-agents)
* [Claude pricing](https://claude.com/pricing)
* [License](https://github.com/anthropics/claude-code/blob/main/LICENSE.md)

### Codex CLI

**License:** Apache-2.0

Fits a team that already pays for ChatGPT and wants an Apache-2.0 agent on OpenAI's models.

**Runs in:**
Terminal, IDE extension, desktop app, web

**Headless:**
`codex exec`

**Models:**
A ChatGPT plan sign-in, or an API key.

**Features:**
MCP and subagents.

**Price:**
The CLI comes with ChatGPT Plus at $20 a month and Pro from $100. ChatGPT Free and Go cover the desktop app only. API usage with a key.

OpenAI describes Codex CLI as a coding agent that runs locally on your computer. You sign in with a ChatGPT plan or set up an API key, and `codex exec` runs it from scripts and CI pipelines. The same agent is also an IDE extension, a desktop app and Codex Web.

**Sources:**
* [Codex CLI](https://learn.chatgpt.com/docs/codex/cli)
* [Pricing](https://learn.chatgpt.com/docs/pricing)
* [openai/codex repository](https://github.com/openai/codex)

### Gemini CLI

**License:** Apache-2.0

Fits a team that already pays for Gemini API usage or a Gemini Code Assist Standard or Enterprise license.

**Runs in:**
Terminal, VS Code companion

**Headless:**
`-p`

**Models:**
Gemini models through a paid Gemini API key, Vertex AI, or a Gemini Code Assist Standard or Enterprise license.

**Features:**
MCP, hooks, checkpoints and a sandbox. Plan mode and subagents are experimental.

**Price:**
API usage on a paid key, or a Code Assist Standard or Enterprise license. Free access ended on June 18, 2026.

Google calls Gemini CLI an open-source AI agent that brings Gemini into your terminal, under Apache-2.0. On June 18, 2026, Antigravity CLI replaced it for unpaid users and for Google AI Pro and Ultra plans. Google's announcement says Gemini CLI stays available with paid Gemini API keys and Code Assist Standard or Enterprise licenses. Its README recommends Antigravity CLI for the best coding experience with Gemini models.

**Sources:**
* [google-gemini/gemini-cli repository](https://github.com/google-gemini/gemini-cli)
* [Documentation index](https://geminicli.com/llms.txt)
* [Transition to Antigravity CLI](https://developers.googleblog.com/an-important-update-transitioning-gemini-cli-to-antigravity-cli)

### OpenCode

**License:** MIT

Fits a team that wants an MIT-licensed agent with more than 75 providers, local models and a headless server.

**Runs in:**
Terminal, desktop app (beta), IDE extension

**Headless:**
`opencode run`, `opencode serve`

**Models:**
More than 75 providers and local models. A GitHub Copilot or ChatGPT login also works.

**Features:**
Build and Plan agents, two subagents, MCP and plugins. It also runs from a GitHub comment.

**Price:**
The agent has no stated price. OpenCode Go is $10 a month, and Go Plus $40.

OpenCode is an MIT-licensed agent for the terminal, an IDE or a desktop app. It connects more than 75 providers and local models, and `opencode serve` starts a headless server for API access. Its docs say it does not store your code or context data.

**Sources:**
* [opencode.ai](https://opencode.ai)
* [anomalyco/opencode repository](https://github.com/anomalyco/opencode)
* [CLI](https://opencode.ai/docs/cli)
* [Providers](https://opencode.ai/docs/providers)
* [Agents](https://opencode.ai/docs/agents)
* [GitHub](https://opencode.ai/docs/github)
* [Go](https://opencode.ai/docs/go)
* [Zen](https://opencode.ai/docs/zen)

### pi

**License:** MIT

Fits a team that wants a minimal harness that it extends itself.

**Runs in:**
Terminal

**Headless:**
`-p`, `--mode json`, `--mode rpc`

**Models:**
More than 15 providers, a subscription or key through `/login`, and local models through Ollama.

**Features:**
TypeScript extensions, skills and MCP. Sub-agents and plan mode are left out by design.

**Price:**
Not documented

The pi coding agent calls itself a minimal, extensible agent harness. Its README says it skips sub-agents and plan mode, and you add what you need as TypeScript extensions or pi packages. It runs in print, JSON and RPC modes, with built-in MCP.

**Sources:**
* [pi.dev](https://pi.dev)
* [earendil-works/pi repository](https://github.com/earendil-works/pi)

### Aider

**License:** Apache-2.0

Fits a team that works one change at a time in the terminal and wants git to record each change.

**Runs in:**
Terminal, IDE and browser modes

**Headless:**
`--message` with `--yes`

**Models:**
Almost any LLM, with local models through Ollama.

**Features:**
Code, ask and architect modes. It commits each change to git, then lints and tests it.

**Price:**
Not documented

Aider describes itself as a pair programmer for your terminal. It commits each change to git with its own commit message, and it can lint and test after every change. An architect mode lets one model propose a change and a second model write it.

**Sources:**
* [aider.chat](https://aider.chat)
* [Scripts and the command line](https://aider.chat/docs/scripting.html)
* [Chat modes](https://aider.chat/docs/usage/modes.html)
* [LLM providers](https://aider.chat/docs/llms.html)
* [Aider-AI/aider repository](https://github.com/Aider-AI/aider)

### Cline

**License:** Apache-2.0

Fits a team that works in VS Code or JetBrains and also wants the same agent in a CLI.

**Runs in:**
VS Code, JetBrains (early access), CLI, desktop

**Headless:**
`cline "prompt"` with `--auto-approve`

**Models:**
Every major provider with your own keys, local models, and a Claude subscription through the Claude CLI.

**Features:**
Plan and Act modes, subagents, MCP, hooks and checkpoints. Kanban runs tasks in separate git worktrees.

**Price:**
The Open Source plan is free. ClinePass is $9.99 a month for open models.

Cline calls itself the open agent, and it runs in VS Code, JetBrains, a CLI and editors that speak ACP. Plan and Act modes let you agree on a strategy before it edits, and Kanban runs tasks in separate git worktrees.

**Sources:**
* [cline.bot](https://cline.bot)
* [Pricing](https://cline.bot/pricing)
* [Cline CLI](https://docs.cline.bot/cline-cli/overview)
* [Anthropic provider](https://docs.cline.bot/provider-config/anthropic)
* [ClinePass](https://docs.cline.bot/getting-started/clinepass)

### Kilo Code

**License:** MIT

Fits a team that wants one agent in the IDE, the terminal, the browser, Slack and mobile.

**Runs in:**
VS Code, JetBrains, CLI, desktop (beta), cloud, Slack

**Headless:**
`kilo run --auto`

**Models:**
More than 500 models, your own keys, local models and a ChatGPT subscription.

**Features:**
Ask, Plan, Code, Debug and Orchestrator modes, custom subagents, MCP and code reviews.

**Price:**
The free plan bills usage. Teams is $15 a user a month. Kilo Pass starts at $19.

Kilo Code offers one open agent for VS Code, JetBrains, a CLI, the browser, Slack and mobile. Its docs say the Kilo CLI is a fork of OpenCode and accepts the same configuration. Kilo's gateway charges provider rates for more than 500 models, and cloud agents bill by the hour.

**Sources:**
* [kilo.ai](https://kilo.ai)
* [Pricing](https://kilo.ai/pricing)
* [Kilo CLI](https://kilo.ai/docs/cli)

### GitHub Copilot CLI

**License:** GitHub Copilot CLI License

Fits a team that already has a Copilot plan, because every Copilot plan includes it.

**Runs in:**
Terminal, cloud sandboxes

**Headless:**
`-p` with `--allow-all-tools`

**Models:**
An active Copilot subscription. The `/model` command sets the model.

**Features:**
MCP, custom agents, hooks and plan mode.

**Price:**
In every Copilot plan: Free ($0), Pro ($10), Pro+ ($39) and Max ($100) a month.

GitHub describes Copilot CLI as Copilot from your terminal. It needs an active Copilot subscription, and every Copilot plan includes it, Free among them. Usage draws GitHub AI Credits from the plan's allowance.

**Sources:**
* [About GitHub Copilot CLI](https://docs.github.com/en/copilot/concepts/agents/copilot-cli/about-copilot-cli)
* [Copilot plans](https://github.com/features/copilot/plans)
* [github/copilot-cli repository](https://github.com/github/copilot-cli)

## Run several coding agents behind one issue

SHIP runs coding agents as a team instead of one at a time. Assign a Linear or Jira issue to SHIP, or comment `@SHIP` on a GitHub issue. A Planner, a Builder, a Reviewer and a Tester then take it to a pull request. Your own CI runs between them, and any gate that fails sends the work back to the Builder. Each role runs the harness and model you set in `ship.yml`: `claude-code`, `codex`, `pi`, `kilo-code` or `open-code` ([schema](https://letsship.ai/docs/configuration/schema)).

So you can keep Claude Code on the Reviewer and try codex or pi on the Builder:

```yaml
# ship.yml
agents:
  builder:
    harness: codex
    model: gpt-5.6-sol
  reviewer:
    harness: claude-code
```

In SHIP's own [SWE-in-a-team study](https://letsship.ai/blog/swe-in-a-team), 13 builder configurations ran the same 20 tickets, one trial each, with API-equivalent cost. The codex builder on `gpt-5.6-sol` resolved all 20 at $3.83 per resolved ticket. The claude-code builder on `claude-opus-5` resolved all 20 at $5.48. [Codex vs Claude Code](https://letsship.ai/blog/codex-vs-claude-code) compares the two harnesses at three model tiers. SHIP records cost, duration and outcome for each mission, so you can repeat the comparison on your own repository.

## Choose by how you work

You need an open-source license

* [OpenCode](#opencode)
* [pi](#pi)
* [Kilo Code](#kilo-code)
* [Codex CLI](#codex-cli)
* [Gemini CLI](#gemini-cli)
* [Aider](#aider)
* [Cline](#cline)

OpenCode, pi and Kilo Code are MIT. The other four are Apache-2.0.

You want to run local models

* [OpenCode](#opencode)
* [pi](#pi)
* [Aider](#aider)
* [Cline](#cline)
* [Kilo Code](#kilo-code)

You already pay for ChatGPT

* [Codex CLI](#codex-cli)

OpenCode and Kilo Code also accept a ChatGPT login.

You already pay for GitHub Copilot

* [Copilot CLI](#github-copilot-cli)

OpenCode and pi also accept a Copilot login.

You want one agent in your IDE and your terminal

* [Cline](#cline)
* [Kilo Code](#kilo-code)

Claude Code and Codex also have IDE extensions.

You want git to record every change

* [Aider](#aider)

Each change must pass your CI, a review and a test before a person reviews the pull request, with a harness per role

* [SHIP](#run-several-coding-agents-behind-one-issue)

## Questions

### What are the best Claude Code alternatives?

Eight terminal coding agents document a headless mode and their own model setup. They are Codex CLI, Gemini CLI, OpenCode, pi, Aider, Cline, Kilo Code and GitHub Copilot CLI. Which one fits depends on the models you want to run and whether you need an open-source license. Each fact comes from the product's own pages.

### Is there an open-source alternative to Claude Code?

Yes. OpenCode, pi and Kilo Code are MIT licensed, and Codex CLI, Gemini CLI, Aider and Cline are Apache-2.0. Each project says so in its own repository or site. Claude Code itself is not open source. Its license file reserves all rights to Anthropic.

### Which Claude Code alternative works with any model?

OpenCode connects more than 75 providers through Models.dev, and local models too. Kilo Code lists more than 500 models, and pi, Aider and Cline each support many providers and local models through Ollama. Codex CLI, Gemini CLI and Copilot CLI run their own vendor's models.

### Can I use my Claude subscription with another coding agent?

Cline's docs describe the use of a Claude Max or Pro subscription through the Claude CLI. OpenCode's providers page says that Anthropic prohibits this, and OpenCode removed its Claude Pro and Max plugins in version 1.3.0. Check each vendor's terms before you connect a subscription. SHIP runs Anthropic's own claude-code, so it works on your Claude subscription, and codex works on your ChatGPT subscription.

### Is Codex better than Claude Code?

In SHIP's SWE-in-a-team benchmark, codex cost 29% less per resolved ticket than claude-code across three model tiers. The claude-code harness resolved 58 of 60 missions, and codex 55. At the top tier both resolved all 20 tickets. The full comparison is in Codex vs Claude Code.

### Can I run Claude Code and an alternative together?

Yes. SHIP sets the harness per role in ship.yml, so the Builder can run codex, pi or open-code while the Reviewer runs claude-code. Both claude-code and codex can run on your Claude or ChatGPT subscription. Each mission records the cost, duration and outcome per stage, so you can compare the harnesses on your own tickets.
