Google's open-source terminal agent with a generous free tier.

Install

$ npm install -g @google/gemini-cli

What is Gemini CLI?

Gemini CLI is Google's answer to Claude Code: an Apache-2.0-licensed terminal agent that puts the Gemini model family into an agentic loop — reading files, running shell commands, editing code, and grounding answers with Google Search. It installs via npm (or runs one-off with npx) and works both interactively and in headless scripting mode with JSON output.

Its standout economics: signing in with a personal Google account gets you a substantial free daily request quota against Gemini models with a very large context window, no credit card required. Heavier or production use routes through paid Gemini API keys or Vertex AI. It speaks MCP for external tools, supports project context files (GEMINI.md), conversation checkpointing, and ships an extensions system plus official GitHub Actions for PR review and issue triage.

In the ecosystem it sits closest to Claude Code in shape but differs in trade-offs: the code is fully open source, the free tier makes it the cheapest way to run a real agent daily, and Search grounding is built in — while the agentic polish and model reasoning depth are generally considered a step behind the strongest Claude-based setups on hard multi-file tasks.

Key capabilities

  • Free tier via Google account sign-in — real daily agent usage at zero cost
  • Very large context window suited to whole-repo comprehension
  • Built-in Google Search grounding and web fetch for up-to-date answers
  • MCP client support, extensions system, and GEMINI.md project context files
  • Headless mode with JSON/streaming output, plus official GitHub Actions integration

When to use it

Pick Gemini CLI if you want a capable terminal agent without paying per token — for personal projects, learning agentic workflows, or tasks that lean on huge context and live search. It is also the natural choice if your stack is already on Google Cloud/Vertex AI. Skip it when you need the highest success rate on gnarly multi-file refactors (Claude Code still leads there), or when your organization can't send code to Google's endpoints.

Alternatives

Frequently asked questions

Is Gemini CLI really free to use?

Yes, within limits. Signing in with a personal Google account grants a free daily request quota (on the order of a thousand requests per day, rate-limited per minute) — enough for regular individual use. Beyond that, or for production and higher limits, you attach a paid Gemini API key or use Vertex AI billing.

How does Gemini CLI compare to Claude Code?

Same shape, different trade-offs. Both are terminal agents with MCP support, shell execution, and project context files. Gemini CLI is fully open source (Apache 2.0), has a free tier, a very large context window, and built-in Google Search. Claude Code generally performs better on hard multi-step coding tasks but has no free tier.

Does Gemini CLI support MCP servers?

Yes. Gemini CLI is an MCP client: you register MCP servers in its configuration and the agent discovers and calls their tools during sessions. It also has its own extensions mechanism layered on top, which bundles MCP servers with prompts and context for one-command installation.

Star count updated 2026-07-02 · refreshed weekly from the GitHub API · browse all tools →