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.
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 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 | Proprietary | Yes | Not documented | Yes | Yes |
| Codex CLI | Apache-2.0 | Yes | Not documented | Yes | Yes |
| Gemini CLI | Apache-2.0 | Yes | Not documented | Yes | Experimental |
| OpenCode | MIT | Yes | Yes | Yes | Yes |
| pi | MIT | Not documented | Yes | Yes | Left out by design |
| Aider | Apache-2.0 | Yes | Yes | Not documented | Not documented |
| Cline | Apache-2.0 | Yes | Yes | Yes | Yes |
| Kilo Code | MIT | Yes | Yes | Yes | Yes |
| 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.
- $0 Free
- $10 Pro
- $39 Pro+
- $100 Max
- $20 Pro
- from $100 Max
Or pay per use through an Anthropic Console account. The Free plan does not include it.
- $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.
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.
Read each alternative on its own terms
Claude Code
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.
Codex CLI
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
Gemini CLI
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.
Apache-2.0OpenCode
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.
pi
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
Aider
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
--messagewith--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.
Apache-2.0Cline
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.
Apache-2.0Kilo Code
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.
MITGitHub Copilot CLI
Fits a team that already has a Copilot plan, because every Copilot plan includes it.
- Runs in
Terminal, cloud sandboxes
- Headless
-pwith--allow-all-tools- Models
An active Copilot subscription. The
/modelcommand 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.
GitHub Copilot CLI LicenseRun 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).
So you can keep Claude Code on the Reviewer and try codex or pi on the Builder:
# ship.yml
agents:
builder:
harness: codex
model: gpt-5.6-sol
reviewer:
harness: claude-codeIn SHIP's own SWE-in-a-team study, 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 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, pi and Kilo Code are MIT. The other four are Apache-2.0.
You want one agent in your IDE and your terminal
Claude Code and Codex also have IDE extensions.
You want git to record every change
Each change must pass your CI, a review and a test before a person reviews the pull request, with a harness per role
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.