Gemini CLI vs Claude Code: free tier, context, configuration and permissions

Gemini CLI Published: Updated:

Gemini CLI and Claude Code compared on the parts that change slowly: the free tier, context handling, context files, permission control, extensibility and licensing.

Verified on Sep 11, 2026 These tools change quickly. Please also check the latest official documentation.
Contents
  1. At a glance
  2. Pricing and the free tier
  3. Context window
  4. Configuration and permissions
  5. Sharing one context file
  6. Which one to reach for
  7. Summary

Gemini CLI and Claude Code are both coding agents that run in your terminal, but they differ in how they are priced, how they handle context, and how far you can customize them. Which model is "smarter" flips with every release, so this comparison focuses on the parts that change slowly.

KEY POINT

What you will learn

  • How the free tier and pricing models differ
  • Differences in context window, context files and permission control
  • Extensibility (MCP, hooks, skills) and the licensing question

At a glance

AspectGemini CLIClaude Code
VendorGoogleAnthropic
LicenseOpen source (Apache 2.0)Proprietary
Free tierCapped free usage with a personal Google accountNone (paid plan or API)
Paid routesGemini API key, Vertex AI, Code AssistClaude Pro/Max/Team/Enterprise, API, Bedrock, Vertex AI
Context fileGEMINI.md (filename configurable)CLAUDE.md
Settings filesettings.json (user / project)settings.json (user / project / local)
Permission controlPer-action confirmation, per-server trustPer-tool allow / deny / ask, permission modes
Deterministic automationNone (depends on instructions)Hooks
Reusable instructionsCustom commands (TOML)Skills / slash commands
MCPSupportedSupported
VS CodeThrough Gemini Code AssistDedicated extension
Non-interactive rungemini -pclaude -p
GitHub integrationGemini CLI GitHub Actionclaude-code-action

Pricing and the free tier

The clearest difference is the free tier. Sign in to Gemini CLI with a personal Google account and you get free usage, capped per minute and per day. That is enough for learning or a small open source fix.

Claude Code has no free tier: you need a Pro plan or above, or an API key. In exchange, the flat-rate plan allowances are sized for day-to-day development work.

Free tier data terms

On Gemini CLI's free tier, your input may be used to improve the product. When you are comparing for work code, compare paid routes against each other: an API key or Vertex AI on the Gemini side, and the API or a Team/Enterprise contract on the Claude side.

Context window

Gemini's larger models are known for big context windows, which helps when you want to put a lot of files in front of the model at once. Claude Code also handles long context, but its design pushes you toward compaction with /compact and splitting work across subagents so you read less into the window in the first place.

A reasonable rule of thumb: Gemini CLI for taking in a large repository or a pile of logs at once, Claude Code for working incrementally while keeping accuracy.

Configuration and permissions

Gemini CLI is built around per-action confirmation plus "always allow". You can set trust per MCP server and pick tools with includeTools / excludeTools. Configuration lives in settings.json.

Claude Code lets you write allow, deny and ask rules with patterns such as Bash(npm run test:*), where deny wins over everything else. On top of that, hooks let you attach deterministic behavior such as "always run lint after an edit". See Claude Code permissions in settings.json for the rule syntax.

For encoding a team's process into the tool, Claude Code's layers (hooks, skills, subagents) are thicker. Gemini CLI being open source means you can read the source to confirm behavior, or build your own extensions.

Sharing one context file

Gemini CLI can change which filename it loads via context.fileName in settings.json. Point it at AGENTS.md or CLAUDE.md and both tools read the same file, so you are not maintaining two copies. The full setup is in CLAUDE.md vs AGENTS.md vs GEMINI.md.

Which one to reach for

SituationBetter fit
You want to try something for free firstGemini CLI
You already pay for ClaudeClaude Code
You want to read a huge repository or log in one passGemini CLI
You want team process (lint, review criteria) built into the toolClaude Code
Open source matters to youGemini CLI
You want to stay inside Google CloudGemini CLI (Vertex AI)
You want to stay inside AWSClaude Code (Bedrock)

用語解説

Compare on the same task: the most reliable way to decide is to give both tools a real task from your own project (one bug fix, one small feature) and compare the quality of the diff and how much rework each one costs you. Your own codebase beats benchmark chatter.

Summary

  • Gemini CLI has a free tier and is open source; Claude Code is paid but has thicker customization layers in hooks and skills
  • Reach for Gemini CLI to ingest a lot at once, Claude Code to work incrementally with accuracy
  • For work code, compare paid routes against each other and watch the free tier's data terms
  • Sharing a context file via context.fileName makes running both tools side by side practical

FAQ

Which one can I use for free?
Gemini CLI has a capped free tier with a personal Google account. Claude Code has no free tier and requires a paid plan or an API key.
Can I use both in the same project?
Yes. Keep GEMINI.md and CLAUDE.md, and point both at one shared file so you are not maintaining the same content twice.
Which should I use at work?
Both have commercial routes (API keys, business contracts). Free tiers have different data terms, so compare the paid routes against each other for work code.

Primary sources

This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.