Free to read. Sign up to save your progress and take knowledge-check quizzes.

Sign up free
5 min read·Updated May 20, 2026

Gemini CLI is Google's open-source AI coding agent that runs in your terminal, automatically routing between Gemini 3.5 Pro and Flash models with a 1 million token context window, plan mode, subagent support, and a free daily usage limit. Important — Gemini CLI sunsets June 18, 2026 in favor of Antigravity CLI, the Go-based rewrite that ships alongside Google Antigravity 2.0.

Listen to this lesson

Free preview · first 0:30
0:00 / 0:30

Audio & video lessons are paid features

Plus unlocks audio streaming. Pro adds downloadable audio, video, certificates, and more.

Plus adds:
  • Audio streaming
  • Downloadable PDFs
  • All AI Playbooks
  • Personalized content
Pro also adds:
  • Certificates of completion
  • Audio MP3 downloads
  • Video lessonssoon
  • & More…soon

Watch this lesson

Video coming soon

Learning Objectives

  • Understand the June 18, 2026 sunset and the migration path to Antigravity CLI
  • Understand how Gemini CLI works and what sets it apart from other coding agents
  • Identify key features: model routing, plan mode, subagents, and MCP support
  • Evaluate when to use Gemini CLI versus Claude Code, OpenAI Codex, or GitHub Copilot

⚠️Warning

Sunset date — June 18, 2026. Gemini CLI and the Gemini Code Assist IDE extensions stop serving requests for Google AI Pro, Ultra, and free-tier users on June 18, 2026. Enterprise customers on paid API keys keep working past that date. The replacement is Antigravity CLI — Google's Go-based rewrite that ships alongside Google Antigravity 2.0 and preserves the same Agent Skills, Hooks, Subagents, and Extensions (now called plugins) with async workflows and a unified backend shared with the Antigravity desktop app. Migration documentation is live on the Google Developers Blog. If you're starting a new project today, install Antigravity CLI directly rather than Gemini CLI — same model routing, faster execution, future-proof.

What Is Gemini CLI?

Gemini CLI is Google's open-source command-line AI coding agent. It runs directly in your terminal and automatically routes between Gemini 3.5 Pro (for complex reasoning tasks) and Gemini 3.5 Flash (for speed-sensitive operations), giving you frontier-level reasoning when you need it and fast responses when you don't — all within a 1 million token context window. As of May 2026, Gemini CLI is in a managed sunset: existing installs still work, but the June 18 cutoff means new projects should target Antigravity CLI instead.

Unlike proprietary coding agents, Gemini CLI is fully open source (Apache 2.0) and available on GitHub. It is free to use with a generous daily limit tied to your Google account, making it an accessible entry point for developers who want to try agentic coding without a paid subscription.

Tip

Get started: Install with npm install -g @google/gemini-cli — free to a daily limit with any Google account. Open source at github.com/google-gemini/gemini-cli

Core Capabilities

Intelligent Model Routing

Gemini CLI analyzes each task and automatically selects the best model:

  • Gemini 3.5 Pro: Used for complex reasoning, architecture decisions, multi-file refactoring, and debugging
  • Gemini 3.5 Flash: Used for quick questions, simple edits, code formatting, and routine operations

This routing happens transparently — you always interact with a single CLI, and it optimizes cost and speed behind the scenes.

Plan Mode

Plan mode lets you design implementation strategies before writing code. Gemini CLI creates a structured plan with steps, identifies files to modify, and gets your approval before executing. This is especially valuable for large features where you want to review the approach before any code changes.

Subagent Support

Gemini CLI can spawn subagents for parallel subtasks — delegating independent work items to separate agent instances that run concurrently. A model-driven parallel tool scheduler ensures safe tools execute simultaneously, improving throughput for multi-step workflows.

MCP Integration

Full support for the Model Context Protocol — connect Gemini CLI to databases (Supabase, Postgres), deployment platforms (Vercel, Firebase), project management tools (GitHub, Linear), and any other MCP-compatible service. Configure MCP servers in your project and Gemini CLI discovers their capabilities automatically.

gVisor Sandboxing

Gemini CLI uses native gVisor sandboxing (with experimental LXC support) to isolate agent actions from the host system. This provides safer execution of untrusted operations — particularly important when running agent-generated commands on your local machine.

JIT Context Loading

Just-In-Time context loading is enabled by default with deduplication — Gemini CLI loads only the context it needs for each step rather than loading your entire project upfront. This optimizes the 1 million token context window for maximum effectiveness.

Pricing

Gemini CLI is free with a daily usage limit:

  • Free tier: Generous daily limit tied to your Google account — sufficient for most individual development workflows
  • Paid accounts: Higher priority and expanded limits based on license type
  • API key: Use your own Gemini API key for unlimited usage at per-token pricing

📝Note

Traffic prioritization: Starting March 25, 2026, Gemini CLI routes traffic with higher priority given to accounts based on license type and account standing.

Strengths

  • Free daily usage: No subscription required — start coding with AI agents at zero cost
  • Open source: Full source code available; community contributions welcome; Apache 2.0 license
  • 1 million token context: Among the largest context windows of any coding agent — handles very large codebases
  • Automatic model routing: Optimizes between Pro (quality) and Flash (speed) without manual configuration
  • Plan mode: Review and approve implementation strategies before any code changes
  • Google ecosystem: Native integration with Google Cloud, Firebase, and Vertex AI

Limitations & Considerations

  • Google account required: Free tier requires Google authentication
  • Daily limits: Free usage is capped — heavy users may hit limits during intensive coding sessions
  • Newer ecosystem: Fewer community extensions and integrations compared to Claude Code or GitHub Copilot
  • Cloud inference: Code context is sent to Google's API — not suitable for air-gapped environments

Best Use Cases

TaskWhy Gemini CLI
Getting started with AI coding agentsFree tier with no subscription commitment
Large codebase exploration1 million token context handles very large projects
Google Cloud/Firebase developmentNative GCP, Firebase, and Vertex AI integration
Open-source projectsOpen-source tool for open-source work — no vendor lock-in
Budget-conscious developmentFree daily limit covers most individual workflows

When to choose alternatives:

  • Maximum coding agent capability → Claude Code (Agent SDK, sub-agents, Agent Teams)
  • GitHub-native workflow → GitHub Copilot (Issues, PRs, Actions integration)
  • Browser-based development → OpenAI Codex (sandboxed cloud environment)
  • Visual IDE experience → Cursor (AI-native editor with inline suggestions)

Migration to Antigravity CLI

The successor product is Antigravity CLI — a Go-based rewrite that ships alongside Google Antigravity 2.0 and replaces Gemini CLI as Google's terminal-side agentic coding entry point. The migration preserves the structural primitives developers depend on:

  • Same model routing between Gemini 3.5 Pro and Gemini 3.5 Flash
  • Same Agent Skills, Hooks, Subagents, and Extensions — Extensions are renamed to "plugins" but the configuration shape is unchanged
  • New: async workflows for complex multi-agent tasks that previously had to run sequentially
  • New: unified backend shared with the Antigravity desktop app, so terminal and IDE sessions can hand off in-flight work
  • New: faster execution courtesy of the Go runtime; Google highlights responsiveness as the headline improvement

Who needs to act: Google AI Pro, Ultra, and free-tier users — install Antigravity CLI before June 18, 2026. Enterprise customers using paid API keys for Gemini are unaffected — Gemini CLI continues to serve those requests past the cutoff. Migration documentation and walkthrough videos are linked from the Google Developers Blog announcement at developers.googleblog.com.

Key Takeaways

  • Gemini CLI sunsets June 18, 2026 for Google AI Pro, Ultra, and free-tier users — install Antigravity CLI as the supported replacement
  • Enterprise customers on paid API keys are unaffected by the sunset; Gemini CLI continues to serve those requests
  • Antigravity CLI preserves the same Agent Skills, Hooks, Subagents, and Extensions (renamed plugins) plus Gemini 3.5 model routing, and adds async workflows and a unified backend with the Antigravity desktop app
  • Until the sunset, Gemini CLI remains Google's open-source coding agent with automatic model routing between Gemini 3.5 Pro and Gemini 3.5 Flash
  • 1 million token context window, plan mode, subagent support, and MCP integration make it a capable production tool through June 18, 2026
  • Open source (Apache 2.0) under the legacy product; the Antigravity CLI source is also published on the Google Antigravity GitHub org

Save your progress & take the quiz

Sign up free to bookmark lessons, track which modules you've completed, and lock in what you learned with a quick knowledge-check quiz at the end of each lesson.

🧭Recommended for you