Gemini CLI vs Claude Code: Terminal Coding Agents Tested
Comparing Google’s Apache-2.0 Gemini CLI against Anthropic’s closed-source Claude Code across PTY interactive shell control, DataCamp’s 432K vs 261K input-token efficiency test, multi-agent flags, and Google’s post-June consumer cutoff.

THE STORY IN THREE POINTS
- Licensing and distribution diverge sharply: google-gemini/gemini-cli is Apache-2.0 open source and actively maintained for paid Gemini API keys and Enterprise Cloud accounts (v0.68.0 on Nov 10 after consumer Free/Pro/Ultra login ended June 18), whereas Claude Code ships as a proprietary commercial binary.
- On terminal mechanics, Gemini CLI runs interactive pseudo-terminal (PTY) shells capable of handling stateful tools like vim and htop inside a session snapshot, while Claude Code centers on tree-structured edit approvals, MCP toolbars, and experimental JavaScript Code Mode.
- In DataCamp’s controlled multi-file engineering benchmark, Gemini CLI consumed 432K input tokens compared with Claude Code’s 261K input tokens—demonstrating that fewer retries and tighter context pulls can offset higher headline token rates.
Apache 2.0 vs proprietary binary—and Gemini CLI’s post-June access split
Engineers evaluating Gemini CLI vs Claude Code must first separate licensing and access eligibility from outdated early-2026 pricing guides. Google’s google-gemini/gemini-cli repository ships under the OSI-approved Apache 2.0 license, allowing security teams to audit source code, inspect tool hooks, and fork custom enterprise builds (it even served as the upstream codebase for Alibaba’s Apache-2.0 Qwen Code). However, as we detailed in our Gemini CLI transition report, Google ended consumer Free, AI Pro, and Ultra sign-in for Gemini CLI on June 18, 2026—steering individual subscribers toward Antigravity CLI while continuing weekly Gemini CLI releases (including v0.68.0 on November 10) for paid Gemini API keys and Enterprise Cloud seats.
Anthropic’s Claude Code takes the opposite distribution path: while anthropics/claude-code publishes issue trackers and plugin schemas on GitHub, its core runtime carries an All-rights-reserved commercial license tied to paid Claude Pro/Max/Ultra subscriptions or Anthropic API, Bedrock, and Vertex billing. Teams comparing total seat economics across proprietary terminal harnesses should weigh Claude Code’s shared 5-hour rolling limits alongside our Claude Code vs Codex pricing and quota audit.
Interactive PTY shells vs edit confirmation trees and real token burn
Inside the terminal, the two harnesses differ meaningfully in how they run external processes. Gemini CLI embeds a background pseudo-terminal (PTY) shell abstraction so interactive utilities such as vim, htop, or stateful CLI prompts can execute cleanly without wedging standard pipes. Claude Code prioritizes deterministic code-edit verification—pairing granular diff confirmations, repository grep traversal, and experimental JavaScript Code Mode batching (v2.1.323) to minimize redundant tool round-trips.
That execution discipline shows up directly in measured token consumption. In DataCamp’s head-to-head multi-file benchmark, Gemini CLI consumed 432K input tokens to finish the identical engineering task that Claude Code completed in 261K input tokens with fewer corrective retries. In the November 19 Coding Agent Index snapshot, Claude Code with Claude Fable 5.2 Xhigh ranked second at 58.5, behind Antigravity CLI with Gemini 4 Neon Xhigh at 58.6. This composite measures performance across three evaluations.
GEMINI.md vs CLAUDE.md and parallel multi-agent coordination
Both terminal agents rely on repository-root Markdown instructions—GEMINI.md for Gemini CLI and CLAUDE.md for Claude Code—though teams switching between both tools should centralize rules in a unified AGENTS.md bridge rather than duplicating build instructions. For orchestrating parallel sub-tasks, Claude Code introduces experimental agent swarms via CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, letting a lead session spawn isolated Git-worktree teammates sharing a coordinated task list.
Developers who want to combine strengths across both ecosystems increasingly pair Google’s long-context exploration or Antigravity CLI workflows with Claude Code’s surgical refactoring—or wrap multiple external terminal harnesses inside orchestrators like Qwen Code’s external-agent runner to enforce hard turn budgets and wall-clock caps.
Sources: Artificial Analysis Coding Agent Index ↗ Google Gemini CLI Official Repository (Apache 2.0)|GitHub ↗ Claude Code Overview & Documentation|Anthropic ↗ Gemini CLI vs Claude Code: Multi-File Token & PTY Benchmark|DataCamp ↗ CLI Coding Agents Comparison (2026)|Colombani.ai ↗
THE BROADER CONTEXT · GOOGLE DOSSIER
Explore full product specifications, pricing analysis, and continuous coverage in the Google Desk Hub. Independent benchmarks available on the AI Intelligence Index and Coding Agents Leaderboard.


