Blog

Gemini CLI vs Claude Code after the Antigravity CLI switch

How Google's Gemini CLI and Anthropic's Claude Code compare now that Gemini CLI no longer serves free or Google AI Pro and Ultra users.

Alex Mercer

Gemini CLI is Google's open-source terminal agent for Gemini models, and Claude Code is Anthropic's agent for Claude models; their features are close, so the choice mostly comes down to which models you want and how you pay. On June 18, 2026, Gemini CLI stopped serving requests from Google AI Pro and Ultra subscribers and from people using it free of charge, and Google's Gemini CLI site says that for unpaid tier and Google One users it "was replaced by Antigravity CLI." Google says Gemini CLI remains available through paid API keys and Gemini Code Assist Standard or Enterprise licenses, while Claude Code is included in every paid Claude plan.

Both tools read a project context file, connect to MCP servers, and support skills, hooks, subagents and a plan mode. Product details below come from Google's and Anthropic's docs as of October 12, 2026. For more agents side by side, see our ranking of AI coding tools and agents on Bug Bench.

Bug Bench, cubic's public benchmark of the bugs found in AI-written code during review, covers Claude Code in depth. It ranks no Gemini model and doesn't list Gemini CLI, so this comparison can't say which agent writes fewer bugs.

Gemini CLI vs Claude Code at a glance


Gemini CLI (Google)

Claude Code (Anthropic)

Who can use it

Paid Gemini API and Gemini Enterprise Agent Platform keys, Gemini Code Assist Standard and Enterprise licenses

Paid Claude plans, Claude Console API keys, Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry

Where it runs

Terminal, VS Code-compatible editors, JetBrains and Zed through ACP, GitHub Actions

CLI, VS Code and JetBrains, desktop app, web and mobile, Slack

Models

Gemini models, with Auto routing between Pro and Flash

Claude models (Opus, Sonnet, Fable)

Context file

GEMINI.md, renamable (for example to AGENTS.md)

CLAUDE.md, or AGENTS.md when there is no CLAUDE.md

MCP

mcpServers in settings.json

claude mcp add or a project .mcp.json

Default approvals

Prompts for approval; YOLO mode only by command-line flag

Auto mode: a classifier model reviews actions

OS sandbox

Opt-in: macOS Seatbelt, Docker or Podman

Opt-in: /sandbox, for shell commands

License

Apache 2.0

All rights reserved

Who can still use Gemini CLI

Google announced the change on May 19, 2026, in a developers blog post, and made Antigravity CLI available to everyone the same day.

  • No longer served: on June 18, 2026, Gemini CLI stopped serving requests for Google AI Pro and Ultra subscribers and people using it free of charge through Gemini Code Assist for individuals. The Gemini CLI site now says Gemini CLI "was replaced by Antigravity CLI" for unpaid tier and Google One users.

  • Unchanged: organizations using Gemini CLI through a Gemini Code Assist Standard or Enterprise license. Google says it will keep supporting Gemini CLI for them "with access to the latest Gemini models and other updates."

  • Also unchanged: in Google's words, "Gemini CLI will remain accessible via paid Gemini and Gemini Enterprise Agent Platform API keys."

Antigravity CLI is the terminal part of Google Antigravity, which Google calls its "agent-first development platform." Google says it is built in Go, runs multiple agents in the background for large tasks, and shares its agent engine with the Antigravity 2.0 desktop app. It keeps Agent Skills, hooks, subagents and extensions, which become Antigravity plugins, though Google says "there won't be 1:1 feature parity right out of the gate." The migration guide says it still reads GEMINI.md and AGENTS.md files, and agy plugin import gemini converts Gemini CLI extensions to plugins.

If you used Gemini CLI on the free tier or through Google AI Pro or Ultra, the comparison that applies to you now is Antigravity CLI against Claude Code. The rest of this article covers Gemini CLI as Google documents it for API and enterprise users.

Where each one runs

Gemini CLI

  • Install: npx @google/gemini-cli runs it without installing, and the README documents npm, Homebrew, MacPorts and conda installs. It describes weekly stable and preview releases, plus nightly builds.

  • Sign-in: a Google account (for licensed organizations), a Gemini API key, or Vertex AI.

  • IDEs: the Gemini CLI Companion extension for VS Code and compatible editors, including Antigravity, and the Agent Client Protocol for JetBrains IDEs and Zed (IDE integration).

  • Built-in tools: Google Search grounding, file operations, shell commands and web fetching.

  • Automation: non-interactive runs for scripts, and a GitHub Action for issue triage and @gemini-cli mentions.

Claude Code

  • CLI: macOS, Linux, WSL and Windows, through a native installer, Homebrew or WinGet (setup).

  • IDEs: a VS Code extension, which also installs in Cursor, and a JetBrains plugin.

  • Desktop app: macOS and Windows, with a beta for Ubuntu and Debian.

  • Web and mobile: cloud sessions at claude.ai/code and in the Claude app for iOS and Android, plus Remote Control for a session on your own machine (platforms).

  • Integrations: Chrome, Slack, GitHub Actions and GitLab CI/CD.

Cloud sessions and mobile need a Claude subscription, and so does the desktop app outside some enterprise and gateway setups (feature availability). Claude Code reaches more places, while Gemini CLI centers on the terminal and the editor.

Models

Gemini CLI runs Gemini models

The /model command offers Auto (Gemini 3), which picks between the Gemini 3 Pro and Gemini 3 Flash previews for each task, Auto (Gemini 2.5), or Manual selection of any model your account can use (model selection). Google recommends Auto for most work, Pro for complex reasoning, and Flash or Flash-Lite for quick answers. Its Gemini 3 page says Gemini 3.1 Pro Preview is rolling out, and the README lists a 1M token context window for Gemini 3 models. When a model fails, for example on quota, model routing offers to switch to a fallback.

Claude Code runs Claude models

On the Anthropic API, Claude Code's opus alias points to Opus 5.5 and sonnet to Sonnet 5.5, and Anthropic calls Fable 5.1 and Fable 5 "the most capable models in Claude Code" (model configuration). It also runs on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry and Claude Platform on AWS, so a company on Google Cloud can run Claude Code there, with Claude models.

Context files and settings

Gemini CLI loads GEMINI.md files in layers: a global ~/.gemini/GEMINI.md, files in your workspace directories and their parents, and files it finds when a tool touches a directory (GEMINI.md). It joins them and sends them with every prompt. @file.md imports split a long file, and /memory show prints what's loaded. The context.fileName setting accepts other names, such as AGENTS.md. Settings go in ~/.gemini/settings.json, a project's .gemini/settings.json and a system-wide file (configuration).

Claude Code reads CLAUDE.md files at the organization, user, project and local (CLAUDE.local.md) levels, with @path imports (memory). Since v2.1.277 it also reads AGENTS.md, by default only when there is no CLAUDE.md in the working directory or above it.

For a repo that uses both, one AGENTS.md works: list it in Gemini CLI's context.fileName and leave out a project CLAUDE.md. Antigravity CLI reads AGENTS.md as well. How to configure coding agents that follow your team's standards covers what to put in it.

MCP, skills and extensions


Gemini CLI

Claude Code

MCP servers

mcpServers in settings.json; stdio, SSE and streamable HTTP; /mcp auth for OAuth (docs)

claude mcp add, in local, project or user scope; a project .mcp.json to share (docs)

Skills

Agent Skills open standard (docs)

Agent Skills open standard, SKILL.md files (docs)

Bundles

Extensions with prompts, MCP servers, custom commands, themes, hooks, subagents and skills, plus a public gallery (docs)

Plugins with skills, agents, hooks and MCP servers, installed from marketplaces (docs)

Hooks

Scripts run at set points in the agent loop (docs)

Supported (docs)

Subagents

Subagents inside a session, plus remote subagents (docs)

Built-in Explore and Plan subagents, plus custom ones (docs)

Since both follow the Agent Skills standard, a skill folder can move between them, though Claude Code adds fields of its own.

Approvals and sandboxing

Gemini CLI prompts for approval in its default mode. auto_edit approves file edits automatically, plan is read-only, and YOLO mode, which approves every action, can only be turned on from the command line with --yolo (configuration). Plan Mode gives you a read-only space to research and agree on a plan before code changes. Sandboxing is opt-in, through -s, the GEMINI_SANDBOX variable or a setting. On macOS it can use Seatbelt, whose default profile restricts writes and allows network access, or it can run tools in a Docker or Podman container (sandboxing).

Claude Code has started interactive terminal and VS Code sessions in auto mode since v2.1.283, so "a second model, the classifier, reviews actions instead of you" (permission modes). Manual mode asks before most edits, shell commands and network requests, and deny rules apply in every mode. Its sandbox for shell commands is off by default; /sandbox turns it on, and on native Windows it needs WSL2 (sandboxing).

By default, Gemini CLI asks you and Claude Code asks a second model. Both leave the OS sandbox off until you turn it on.

Pricing and access

Gemini CLI is free software under Apache 2.0 (license). What costs money is model access, which after June 18, 2026 comes through:

  • a paid Gemini API key, billed by usage (Gemini API pricing)

  • a paid Gemini Enterprise Agent Platform API key on Google Cloud, billed by model and token usage (pricing); Gemini CLI's docs describe this route as Vertex AI

  • an organization's Gemini Code Assist Standard or Enterprise license, a fixed-price subscription per seat, with daily caps of 1,500 and 2,000 model requests per user (quotas and pricing)

Gemini CLI's quota page, and older comparisons, still describe a free tier of 1,000 requests a day with a Google account. That is the Gemini Code Assist for individuals tier, which Google stopped serving in Gemini CLI. The page also lists an unpaid Gemini API key tier, but Google's announcement names only paid API keys as staying on Gemini CLI.

Claude Code "is included in all paid plans," per Anthropic's pricing page: Pro, Max, Team and Enterprise. It shares one usage pool with the rest of your plan. For heavy use you can switch to pay-as-you-go API credits through a Console account, or pay through Amazon Bedrock, Google Cloud's Agent Platform or Microsoft Foundry.

Open source status

Gemini CLI's code is public under Apache 2.0 in google-gemini/gemini-cli. In its May post, Google counted more than 100,000 GitHub stars, 6,000 merged pull requests and hundreds of contributors.

Claude Code is not open source. The license file in anthropics/claude-code reads "All rights reserved," and use is subject to Anthropic's Commercial Terms of Service. The runtime behind its sandbox is open source.

What Bug Bench shows

How the data works

  • Counted bug: a cubic review finding on AI-written code that a developer upvoted or an AI coding agent addressed.

  • Relative bug rate: counted bugs per AI-attributed line, divided by the rate across all AI-attributed lines in the window. 1.00 is average, and lower is better.

  • Statistically tied: the two models' 95% confidence intervals overlap, so neither is clearly ahead.

Bug Bench is observational, not causal. Teams choose their models, so a rate reflects the code each model was used for as well as the model.

No Gemini data yet

Bug Bench ranks seven models, and none of them is a Gemini model. Gemini CLI isn't on the coding agents page either, which lists Claude Code, Codex, Cursor, OpenCode and Pi. Bug Bench publishes no data for Gemini CLI, so it can't say how code written with Gemini CLI compares.

Claude Code's share and models

Claude Code wrote 78.1% of the AI-written code cubic reviewed in the week of October 5 (AI coding statistics), up from 64.8% in the week of June 22. These shares describe the code in Bug Bench's data, not the whole market.

Model, used in Claude Code

Relative bug rate

Statistically tied with

In Bug Bench since

Claude Fable 5.1

1.09

Claude Sonnet 5.5

week of Aug 31

Claude Sonnet 5.5

1.24

Claude Fable 5.1, Claude Opus 5

week of Sep 28

Claude Opus 5

1.33

Claude Sonnet 5.5

week of Jul 20

Claude Opus 5.5

1.49

none

week of Sep 21

Inside Claude Code, Fable 5.1 had 9% more counted bugs than the all-model average and is statistically tied with Sonnet 5.5. Opus 5.5, which the opus alias points to on the Anthropic API, had 49% more. Sonnet 5.5 and Opus 5.5 are new to Bug Bench, so their rates rest on two and three weeks of data.

Which one to use

  • Your organization has Gemini Code Assist Standard or Enterprise licenses: Gemini CLI is still supported there, with new Gemini models.

  • You used Gemini CLI for free or through Google AI Pro or Ultra: Gemini CLI no longer serves those accounts. Google's path is Antigravity CLI, and Claude Code on a paid Claude plan is the other option here.

  • You want a CLI you can audit or fork: Gemini CLI is Apache 2.0.

  • You already pay for Claude: Claude Code.

  • Your company runs on Google Cloud but wants Claude models: Claude Code runs on Google Cloud's Agent Platform.

  • You want Google Search grounding built in: Gemini CLI ships it as a tool.

  • Your team uses both: keep one AGENTS.md and add it to Gemini CLI's context.fileName.

OpenCode vs Claude Code covers an open-source agent that runs Gemini, Claude and GPT models, and Codex vs Claude Code covers OpenAI's agent.

Whichever agent writes the code, review it before it merges. On GitHub, cubic reviews pull requests, finds bugs and learns your team's rules. The AI code review guide explains the approach, and how successful teams ship AI-generated code to production covers the process around it.

FAQ

Does Gemini have a CLI tool like Claude Code?

Yes, two. Gemini CLI is Google's open-source terminal agent, and since June 18, 2026, Google says it remains available through paid API keys and Gemini Code Assist Standard or Enterprise licenses. Antigravity CLI, which Google made available to everyone on May 19, 2026, is what the Gemini CLI site says replaced Gemini CLI for unpaid tier and Google One users.

Can I use Claude Code with Gemini CLI?

Not as one tool, since Gemini CLI runs Gemini models and Claude Code runs Claude models. You can use both on the same repository. Add AGENTS.md to Gemini CLI's context.fileName setting, and Claude Code reads the same file when there's no CLAUDE.md. Both can also connect to the same MCP servers.

Is Claude Code better than Gemini CLI?

Bug Bench can't say, because it has no data for Gemini CLI or any Gemini model, and the two tools' features are close. Inside Claude Code, rates vary by model: Opus 5.5, the default on paid Claude plans, had a relative bug rate of 1.49, against 1.09 for Fable 5.1 (Fable 5.1 vs Opus 5.5). No plan defaults to Fable 5.1, and depending on your plan, its usage can bill to usage credits.

Is Gemini CLI still free?

The software is free under Apache 2.0, but the free Google sign-in tier is gone. Gemini CLI stopped serving that tier (Gemini Code Assist for individuals, listed at 1,000 requests a day) on June 18, 2026, and the Gemini CLI site says Antigravity CLI replaced it for unpaid tier users. Google's announcement names paid Gemini API keys, Gemini Enterprise Agent Platform API keys and Gemini Code Assist Standard or Enterprise licenses as the ways to keep using Gemini CLI.

Table of contents