All field notes

Alternatives · 6 min read ·

Claude Code alternatives: 8 coding agents compared

Eight Claude Code alternatives checked against their own docs in October 2026: which are open source, free or work with a local LLM, and what each one costs.

What are the main alternatives to Claude Code?

Eight Claude Code alternatives are worth comparing, all of them terminal coding agents: Codex CLI, Gemini CLI, Cursor CLI, GitHub Copilot CLI, OpenCode, Aider, Grok Build and Kimi Code CLI. They differ in three ways that matter more than a ranking: who you pay, which models you can use, and whether you can read the source. Every fact below comes from the vendor’s own docs, repository or pricing page, checked on October 15, 2026. Nothing here is ranked.

For reference, Claude Code needs a Pro, Max, Team or Enterprise plan or a Console account, and the free Claude plan does not include it, per Anthropic’s setup page. As of October 2026, Claude’s Pro plan costs $17 a month billed annually or $20 billed monthly. Claude Code runs Claude models. The license in its repository reads “All rights reserved”, so it is not open source.

What does each Claude Code alternative offer?

Codex CLI, from OpenAI. It is open source under Apache-2.0 (repository). Install it with npm install -g @openai/codex or the standalone installer, then sign in with ChatGPT or an API key (CLI docs). Codex is included in ChatGPT plans, with the CLI listed from Plus at $20 a month, and API-key use is billed at API rates (pricing). Passing --oss runs it against a local model through Ollama or LM Studio (config docs).

Gemini CLI, from Google. It is open source under Apache-2.0 (README) and installs with npm install -g @google/gemini-cli. Google stopped serving Login with Google for personal accounts, including Google AI Pro and Ultra, on June 18, 2026 (notice). Its announcement says Gemini CLI remains accessible through paid API keys, and it points consumers to the Antigravity CLI. The Antigravity CLI (agy) signs in with a personal Google account, and its pricing page lists a $0 plan with basic weekly rate limits.

Cursor CLI, from Cursor. You start it with agent, and it has Agent, Plan and Ask modes plus agent -p for scripts (docs). It needs a Cursor plan: Free is limited, and Claude, GPT and Gemini models are available from Premium at $30 a month, billed at API list price (pricing). Cursor’s docs name no open-source license for it.

GitHub Copilot CLI, from GitHub. You start it with copilot. It is available with every Copilot plan, and the Free plan includes it with limited usage (docs, plans). Usage limits depend on the plan, and you switch models with /model. Its license lets you install and run it but not modify it, so it is not open source.

OpenCode. It is open source under MIT (repository) and runs as a terminal app, a desktop app or an IDE extension. It works with any provider you give an API key, and it can sign in with ChatGPT Plus or GitHub Copilot (provider docs). Those docs warn that Anthropic prohibits using Claude Pro or Max through third-party plugins, so use an API key for Claude. On Windows, its docs recommend WSL.

Aider. It is open source under Apache-2.0 (repository). It pairs you with an LLM in the terminal, commits each change to git, and connects to almost any model, including local ones (aider.chat). Install it with python -m pip install aider-install, then run aider-install. Its latest release on PyPI, 0.86.2, dates from February 2026, so check that it supports the models you want.

Grok Build, from xAI. You start it with grok. The installer is curl -fsSL https://x.ai/cli/install.sh | bash, or irm https://x.ai/cli/install.ps1 | iex in PowerShell. On first launch it opens a browser to sign in, or you set an XAI_API_KEY (docs). A config file can add custom models by base URL. xAI’s launch post from May 25, 2026 described an early beta for SuperGrok and X Premium Plus subscribers, so check xAI for current access.

Kimi Code CLI, from Moonshot AI. It is open source under MIT (repository). You start it with kimi and run /login to use Kimi Code OAuth or a Moonshot AI API key. It works with Kimi models and can be configured for other compatible providers. On Windows it needs Git for Windows. The older Python kimi-cli repository is archived and points here.

Which Claude Code alternatives are open source?

Five of the eight, going by each GitHub repository’s license: Codex CLI (Apache-2.0), Gemini CLI (Apache-2.0), OpenCode (MIT), Aider (Apache-2.0) and Kimi Code CLI (MIT). GitHub Copilot CLI’s license does not allow modification, and the Cursor and xAI pages checked here name no open-source license for their CLIs.

Two more open-source agents are worth knowing: Goose, an Apache-2.0 desktop app and CLI that belongs to the Linux Foundation’s Agentic AI Foundation, and Qwen Code, also Apache-2.0. Open source covers the tool, not the model. Unless you run a model yourself, the model behind it is still a service you pay for.

Which Claude Code alternatives are free?

Free comes in two forms. The tools are free to install when they are open source, but you pay for whatever model they call. Free usage comes from plans, and the limits change often, so check each page before you rely on one.

GitHub. The Free Copilot plan includes the CLI with limited usage (plans).

Cursor. The Free plan includes limited agent usage and no third-party models (pricing).

Google. The $0 Antigravity plan, with basic weekly rate limits (pricing). The Gemini CLI quota page still lists an unpaid API-key row, but Google’s announcement mentions only paid keys, so test a free key before you rely on it.

OpenAI. Codex is part of ChatGPT Free, though the CLI is listed from Plus (pricing).

Claude Code has no free tier. The free Claude plan does not include it.

Which Claude Code alternatives work with a local LLM?

At least three of the eight document a local route. OpenCode lists Ollama, LM Studio and llama.cpp in its provider docs. Aider documents Ollama with aider --model ollama_chat/<model>. Codex CLI runs against Ollama or LM Studio when you pass --oss (config docs). Goose and Qwen Code also list Ollama among their providers.

Two cautions come from those docs. Aider warns that Ollama’s default 2k context window is very small for Aider and that Ollama silently discards what does not fit. OpenCode suggests raising num_ctx to 16k to 32k if tool calls fail. Test a local model on a task whose answer you already know before you trust it with a refactor.

Do you need an alternative, or just a backup?

If you are here because Claude Code hit a usage limit, you may not need to switch. The limit belongs to your Claude account, so another agent can take over while it resets. Our guide to a Claude Code usage limit explains the message and how to hand the work over, and our guide to running Claude Code and Codex together covers keeping both ready. A second agent that comes with a plan you already pay for, such as Codex with ChatGPT or Copilot CLI with Copilot, needs no extra subscription.

How do you choose between them?

Start from what you already pay for, as in our Claude Code vs Codex vs Gemini CLI comparison: a Copilot plan includes Copilot CLI, a ChatGPT plan includes Codex, a Cursor plan includes the Cursor CLI. Then pick on the constraint that is hardest for you: source access, a local model, a free tier or the models on offer.

Do not choose from a leaderboard or a forum thread. These tools change fast, and Gemini CLI’s README promises a new stable release every week. Give two candidates the same task on your own repository and let your tests decide. Our bake-off guide shows how.

Run several of them side by side

SwarmPane runs Claude Code, Codex, Gemini CLI (with a Gemini API key), Cursor Agent, GitHub Copilot CLI, OpenCode, Grok Build, Aider and other coding CLIs side by side in real terminals, with the sign-ins you already have. Agent Race gives two or three of them the same task in separate copies of the project, and your tests, typecheck and lint pick the winner. Nothing merges without your click.

Broadcast sends one prompt to several panes and says how many took it. Your providers bill their own usage separately. Start with a 7-day trial for $1 and cancel before it ends if it is not for you.