Picking a Claude Code alternative comes down to four things: your budget, the license, where the model runs and the interface you code in. The direct competitors come from other model vendors: OpenAI's Codex, Google's Antigravity CLI, Mistral Vibe and Grok Build. OpenCode, Aider and Cline are open source and work with whatever model you choose. Cursor and GitHub Copilot live inside your code editor.

Five vendors offer free access with a quota, including Codex in ChatGPT Free, Antigravity on its For Individuals plan and GitHub Copilot Free. Claude Code is the exception: Anthropic leaves it out of the Free plan. You can still run it on a local model through Ollama, with no Anthropic subscription.

All prices and quotas below come from the vendors' official pages, checked on November 26, 2026.

Which Claude Code alternative should you pick in 2026?

We compare all ten tools on the same columns. "Local" means the vendor or Ollama documents how to connect the tool to a model running on your own machine.

The 10 tools at a glance, as of November 26, 2026

The ten Claude Code alternatives in three families as of November 26, 2026: model vendor agents, open source tools and in-editor assistants, with license and interface

Tool Vendor License Free Entry paid price Local documented Interface
Codex OpenAI Apache 2.0 (CLI) Yes, ChatGPT Free plan Go $8/mo Yes, via Ollama Terminal, IDE, SDK
Antigravity CLI Google Not specified Yes, For Individuals plan Business $30/seat No Terminal, app, IDE
Mistral Vibe Mistral AI Apache 2.0 (CLI) Yes, limited sessions Pro $14.99/mo excl. tax No Terminal
Grok Build xAI Apache 2.0 Yes, limited access Plus $8/mo excl. tax No Terminal
OpenCode Anomaly MIT Free software Go $10/mo, optional Yes Terminal, desktop
Aider Open source project Apache 2.0 Free software Your API key Yes Terminal
Cline Cline Bot Inc. Apache 2.0 Free for solo developers Your API key Yes VS Code, JetBrains, terminal
Hermes Agent Nous Research MIT Free software Your model Any endpoint you choose Terminal, messaging apps, desktop
Cursor Anysphere, sold through X Subscription Proprietary Yes, limited requests Plus $8/mo excl. tax No Editor
GitHub Copilot GitHub Proprietary Yes, 2,000 completions/mo Pro $10/mo No Editor, terminal

Claude Code pricing, for comparison

According to Claude's pricing page, Claude Code starts with the Pro plan: $20 a month, or $17 a month billed annually with $200 paid upfront. Max costs $100 and Ultra $200. A Team Standard seat costs $25 a month, or $20 billed annually. The Free plan shows "No" on the Claude Code row.

Our Claude Code guide covers the models and limits of each plan. Anthropic no longer accepts applications to the Claude for Startups program (guide in French), which lists other ways to pay less for Claude.

Agents from the model vendors

These four tools work the way Claude Code does: an agent that reads your repo, edits files and runs commands. Each one defaults to its own vendor's models.

OpenAI Codex, the direct competitor

Codex is OpenAI's coding agent. The Codex CLI is open source under the Apache-2.0 license, with 136,500 GitHub stars as of November 26. Install it with npm install -g @openai/codex or brew install --cask codex.

Per Codex's official pricing grid, OpenAI includes Codex in every ChatGPT plan, Free included:

  • Free, $0: "Explore Codex capabilities on quick coding tasks".
  • Go, $8 a month: light coding tasks.
  • Plus, $20 a month: a few coding sessions a week. Over a five-hour window, OpenAI quotes 17 to 180 local messages with GPT-6.2 Sol, and 350 to 3,000 with GPT-6 Luna.
  • Pro, from $100 a month ($100, $200 or $500): no five-hour limit, though weekly limits may apply.
  • Business, $20 per user per month billed annually, $25 billed monthly.

You can also plug in an API key and pay API rates, without the cloud features. To have Codex and Claude Code work together instead of choosing one, read our guide to Claude Code and Codex.

Antigravity CLI, Google's answer to Claude Code

Google has replaced Gemini CLI with Antigravity CLI for individual users. The May 19, 2026 announcement introduces a new terminal tool written in Go, and warns that it won't have every Gemini CLI feature at launch.

The For Individuals plan costs $0 a month. It gives access to Gemini 4 Hydrogen, Gemini 3.8 Flash, GPT-OSS-120b, plus Claude Sonnet 4.6 and Claude Opus 4.6 in thinking mode. Google describes the quota as a "Baseline agent quota refreshed weekly", with no number attached. The plan covers the Antigravity app, the CLI, the IDE extensions and the Python SDK. The Business offering through Google Cloud starts at $30 per seat per month. Google doesn't list AI Pro and Ultra pricing on this page.

This is the closest free equivalent to Claude Code: Google's plan gives you two Claude models with no Anthropic subscription, within its weekly quota.

Mistral Vibe, the French option

Mistral Vibe CLI is Mistral AI's terminal coding agent, under the Apache 2.0 license. Mistral describes it as a "Terminal-native coding agent powered by Devstral". Install it with curl -LsSf https://mistral.ai/vibe/install.sh | bash or with uv. It requires Python 3.12 or later.

The Free plan includes "Limited coding sessions" in the terminal. Pro costs $14.99 a month before tax, or $5.99 for verified students for up to 12 months. Team costs $24.99 per user per month. Our Mistral Vibe guide covers the desktop app and the VS Code extension, and our Mistral Large 4 guide covers Mistral's latest flagship model. To compare the assistants themselves, see our Mistral vs ChatGPT vs Claude comparison.

Grok Build, part of X Subscription

Grok Build is xAI's coding agent. Its code is public under the Apache 2.0 license (27,900 stars), and it installs with curl -fsSL https://x.ai/cli/install.sh | bash on macOS and Linux.

You get it through X Subscription. Cursor's pricing page (Cursor is sold by the same X Subscription Corp) lists Grok Build as "Limited" on the $0 Free tier and included from Plus at $8 a month, then Premium at $30, Super at $100 and Ultra at $200, all before tax. Our Grok Build page covers the limits and repo security.

Open source Claude Code alternatives

These tools are free and let you pick the model. You pay the model provider, or nothing at all if the model runs on your own hardware. If you want an open source Claude Code alternative for coding, start with the first three.

OpenCode

OpenCode, built by Anomaly, is MIT-licensed and had 229,300 GitHub stars as of November 26. It comes as a terminal UI and a desktop app. Install it with curl -fsSL https://opencode.ai/v2/install | bash or npm i -g @opencode/cli@latest.

Its model catalog comes from models.dev. OpenCode detects Ollama automatically, with no account login, along with LM Studio and vLLM. The OpenCode Go subscription costs $10 a month, Go Plus $40 and Go Teams $20 per member. OpenCode calls it "completely optional". Our OpenCode guide walks through installing v2.

Aider

Aider is a pair programming tool for the terminal, under the Apache-2.0 license, with 50,300 stars. Install it with python -m pip install aider-install followed by aider-install. Its repo says it "can connect to almost any LLM, including local models". You can also use it from your editor.

Cline

Cline is under the Apache 2.0 license, with 71,900 stars. It runs in VS Code, in JetBrains IDEs and in the terminal (npm i -g cline), with a headless mode for CI. Its pricing page lists it as free for solo developers: you bring your own OpenAI, Anthropic or Google keys. Ollama and LM Studio are among its supported providers. The Enterprise plan goes through the sales team.

Hermes Agent, a general-purpose agent

Hermes Agent, from Nous Research, is MIT-licensed and has passed 266,000 stars. Its repo describes an agent that lives in the terminal and on Telegram, Discord, Slack, WhatsApp and Signal, with a desktop app. It works with Nous Portal, OpenRouter, OpenAI or your own endpoint, and imports your settings from Claude Code, Codex CLI or Cursor.

Nous Research positions it as a general-purpose agent rather than a coding agent, so use it for background tasks and automations. Our Hermes Agent page breaks down what it really costs, and our roundup of open source OpenClaw alternatives lists other agents of this kind.

Alternatives inside your code editor

These two tools live in a graphical editor. You keep your mouse, your tabs and completions as you type.

Cursor

Cursor, built by Anysphere, is sold through X Subscription: the FAQ on its pricing page states that subscriptions are sold only by X Subscription Corp. The $0 Free tier gives you "Limited agent requests". Plus, at $8 a month, only includes Grok models. Premium, at $30, unlocks third-party models in Cursor, billed separately by usage, and adds Bugbot code review. Prices are before tax.

Our Claude Code vs Cursor comparison and our Cursor review cover the use cases in detail.

GitHub Copilot

Copilot Free costs $0 and includes 2,000 completions a month, limited chat and agent usage, and the CLI: "Use Copilot from your terminal". The coding agent, which takes a task and opens a pull request, requires Pro at $10 a month or Pro+ at $39. Business and Enterprise go through the sales team.

Finding a free Claude Code alternative

A search for "free Claude Code alternative" lumps together three different kinds of offer. What you actually pay depends on the model you connect.

The three kinds of free Claude Code alternatives: free software with a paid model, a free quota from the vendor, a local model with Ollama

Free software, paid model

OpenCode, Aider, Cline and Hermes Agent cost nothing to install. Every request goes to a model provider, who bills you per token or by subscription. With an Anthropic key in Cline, you pay for Claude at API rates.

Free quota from the vendor

Table of free tiers as of November 26, 2026: Codex in ChatGPT Free, Antigravity For Individuals, GitHub Copilot Free, Mistral Vibe Free, X Subscription Free and Claude Free, with published quota and next plan up

Five vendors offer free access, with a cap:

  • Codex, ChatGPT Free plan: quick coding tasks, with no published quota figure.
  • Antigravity, For Individuals plan: a baseline agent quota refreshed weekly, with Claude Sonnet 4.6 and Opus 4.6 among the models.
  • GitHub Copilot Free: 2,000 completions a month and the CLI; GitHub also caps chat and agent use, without giving a number.
  • Mistral Vibe Free: limited coding sessions in the terminal.
  • X Subscription Free: limited Grok Build access, and limited agent requests in Cursor.

Copilot is the only one that publishes a number. The others say "limited" or "baseline", so treat the free tier as a trial and move to a paid plan once the agent becomes part of your daily workflow.

Local model, zero tokens billed

A model running on your own machine generates no provider bill. You pay in hardware and patience instead. OpenCode's documentation sums it up: a local runtime runs on your hardware and incurs no provider charges.

Gemini CLI is no longer free as of June 18, 2026

Timeline of the end of free Gemini CLI: Antigravity CLI announced on May 19, 2026, free accounts cut off on June 18, 2026, remaining access as of November 26, 2026

Plenty of comparisons still list Gemini CLI as the go-to free alternative. According to Google's May 19, 2026 announcement, Gemini CLI and the Gemini Code Assist extensions stopped responding on June 18, 2026 for individual Google AI Pro, Ultra and free Gemini Code Assist accounts.

Gemini CLI remains open source under the Apache 2.0 license, with 109,000 stars. It still works with a paid Gemini API key or a Gemini Code Assist Standard or Enterprise license. Its repo spells it out: "No free tier or Google AI plans" for individuals, who are directed to Antigravity CLI.

Running Claude Code locally, or a local alternative

"Claude Code local" can mean two setups: Claude Code itself connected to a local model, or an open source tool talking to Ollama. Either way, your code stays on your machine during inference.

Hardware and the 64k-token context window

Ollama gives the same guidance for Claude Code and Codex: a context window of at least 64k tokens. For Claude Code, the docs add: "For larger repositories, set the context length to 64k or higher".

Qwen 3.5 download sizes on Ollama, from 6.6 GB for the 9b version to 81 GB for the 122b, and the 64k-token minimum context guidance

The model also has to fit on your machine. Ollama lists the download size of each Qwen 3.5 version, a family of open source models with tool calling and a 256K window:

  • qwen3.5:9b (default version): 6.6 to 7.6 GB;
  • qwen3.5:27b: 17 to 20 GB;
  • qwen3.5:35b: 22 GB;
  • qwen3.5:122b: 81 GB.

Ollama publishes no minimum system requirements on these pages, so the file size is your only official benchmark. Compare it with your machine's memory.

Connecting Claude Code to Ollama

The four steps to run Claude Code on a local model with Ollama, ending with the ollama launch claude command

According to Ollama's Claude Code documentation, one command does it: ollama launch claude. The manual setup swaps the Anthropic connection for three variables:

export ANTHROPIC_AUTH_TOKEN=ollama
export ANTHROPIC_API_KEY=""
export ANTHROPIC_BASE_URL=http://localhost:11434
claude --model qwen3.5

Requests then go to Ollama on your machine. Ollama also offers larger cloud models with no download, but in that case your code leaves your machine and goes to Ollama's servers.

Codex, OpenCode, Cline and Aider locally

  • Codex: ollama launch codex, or codex --oss -m gpt-oss:120b, with the same 64k-token guidance.
  • OpenCode: run ollama serve, pull a model with ollama pull qwen3:8b, and OpenCode detects it on its own.
  • Cline: pick Ollama or LM Studio as the provider in the extension.
  • Aider: connect your local model like any other model.

For Mistral Vibe, Antigravity CLI, Grok Build and Cursor, we found no local setup procedure in the official pages we read on November 26.

Choosing by budget, codebase and machine

Decision tree for choosing a Claude Code alternative based on your subscription, budget, code privacy and editor

Start from the subscriptions you already have and the constraints on your code:

  • You already pay for ChatGPT: go with Codex, included in your plan.
  • Zero budget and no powerful machine: start with Antigravity For Individuals, Codex Free or Copilot Free, then keep whichever quota covers your needs.
  • Your code must stay on your machine: OpenCode, Cline or Aider with Ollama, or Claude Code connected to Ollama, with a model that fits in your memory.
  • You want to switch models depending on the task: OpenCode, or Cline if you live in VS Code or JetBrains.
  • You'd rather use a model from a French company: Mistral Vibe, starting on the Free plan.
  • You code in a graphical editor: Copilot if your code lives on GitHub, Cursor if you're fine with X Subscription.

If you're just starting out and building your product through prompts, read our vibe coding definition before you choose: an in-editor tool will show you every change it makes.

The best pick often comes down to the subscription you already pay for.

Building your startup and looking for long-term support? swanbase backs early-stage founders in Paris and remotely, at €0, by application; swanbase takes equity. Apply.

FAQ

How can I get Claude Code for free?

Anthropic doesn't include Claude Code in Claude's Free plan: it starts with the Pro plan, at $20 a month or $17 billed annually. You can, however, connect it to a local model with Ollama (ollama launch claude) and pay nothing in tokens. Antigravity For Individuals also gives free access to Claude Sonnet 4.6 and Opus 4.6, within a weekly quota.

What is Google's equivalent of Claude Code?

Antigravity CLI, Google's terminal agent written in Go, has replaced Gemini CLI for individual users. The For Individuals plan costs $0 with a weekly quota. Gemini CLI stopped responding to free, AI Pro and Ultra accounts on June 18, 2026, and now only works with a paid API key or a Code Assist Standard or Enterprise license.

What is the best open source alternative to Claude Code?

OpenCode (MIT license, 229,300 GitHub stars as of November 26, 2026) supports the providers in the models.dev catalog and detects Ollama on its own. Cline (Apache 2.0) suits you if you work in VS Code or JetBrains. Aider (Apache 2.0) installs with a single pip command and works in the terminal. OpenAI's Codex CLI is also open source, under Apache-2.0.

Can you run Claude Code locally?

Yes, with Ollama. The ollama launch claude command runs Claude Code on a model on your machine, such as Qwen 3.5. Ollama recommends a context window of at least 64k tokens. The 27b version of Qwen 3.5 weighs 17 to 20 GB, so check your machine's memory before downloading it.

Codex or Claude Code: which one should you choose?

Codex is Claude Code's most direct competitor: it works the same way in the terminal, and its CLI is open source under Apache-2.0. OpenAI includes Codex starting with the ChatGPT Free plan, while Claude Code requires at least Claude's Pro plan. If you pay for both subscriptions, keep both tools on the same repo.

What is the best AI coding tool?

No single tool wins on every criterion. To hand off whole tasks on a repo, pick a terminal agent: Claude Code, Codex or OpenCode. To stay in control line by line, pick an editor like Cursor or GitHub Copilot. If your code has to stay on your machine, connect an open source tool to Ollama.