google-gemini

gemini-cli: Use Gemini as an Agent in Your Terminal

Gemini CLI brings Gemini models into a terminal-based agent for working with code, files, shell commands, and web information. It suits developers who want interactive assistance or scriptable workflows, with support for custom tools through MCP.

TypeScriptApache-2.0AIAI AgentsCLI
View on GitHub Compare
Stars
107k
Forks
14.7k
Stars, last 30 days
+1,443

Our take

Health score

78/100

How it is scored
Activity
90
Community
94
Issues
84
Pull requests
44

+1,443 stars in the last 30 days

  • Releases more often than 93% of the projects we track
  • Closes issues faster than 81% of the projects we track
  • More contributors than 78% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

108,836

Forks

14,956

Change since Nov 14, 2026: +14 stars·+4 forks

Overview

Gemini CLI is a terminal-based AI agent that connects Gemini models to a developer's working environment. It can help understand and modify code, run shell commands, and use built-in web and file tools, providing a command-line interface for tasks that might otherwise require switching between tools.

It is aimed at developers who want either an interactive coding assistant or an agent they can invoke in scripts. MCP support lets users connect additional tools, while model access and usage depend on the chosen authentication method and its terms.

Key Features

  • Ask questions about a codebase and request code changes in natural language.
  • Use built-in file operations and shell commands from the terminal.
  • Ground queries with Google Search and fetch web content.
  • Extend the agent with tools through Model Context Protocol (MCP) servers.
  • Run non-interactively with text, JSON, or streaming JSON output for automation.
  • Save and resume sessions using conversation checkpointing.
  • Provide project-specific instructions and context with GEMINI.md files.

Use Cases

  • Developers can explore an unfamiliar repository or investigate recent code changes from the project directory.
  • Teams can use natural-language prompts to debug issues, generate code, or create project scaffolding.
  • Engineers can automate repeatable command-line tasks by invoking the agent from scripts and processing structured output.
  • Users who need integrations beyond the built-in tools can connect MCP servers for services such as GitHub or databases.

Getting Started

Run the CLI without a global install using:

npx @google/gemini-cli

Authentication is required. See the README and documentation for setup and configuration details.

Alternatives

  • opencode: OpenCode is a terminal coding agent with desktop apps and separate build and read-only plan agents, rather than a Gemini-focused CLI.
  • pi: Pi is a customizable coding-agent toolkit and CLI that supports multiple LLM providers, rather than centering on Gemini models.
  • goose: goose supports multiple model providers and offers desktop, CLI, and API interfaces for coding and broader tasks.
  • zero: Zero is a Go-based terminal coding agent for hosted or local models, with explicit controls over side effects.
ProjectLanguageLicenseStarsStatus
gemini-cliTypeScriptApache-2.0107kNot checked yet
opencodeTypeScriptMIT212kActive
PiTypeScriptMIT117kActive
gooseRustApache-2.054.9kActive
zeroGoMIT1.7kNew

Considerations

  • The agent uses Gemini models, so access depends on a supported authentication method and the applicable service terms and quotas.
  • Agent actions can include shell commands and file changes. Review its behavior and use the documented security and sandboxing options where appropriate.
  • The project offers preview and nightly release channels in addition to stable releases; the README cautions that preview and nightly builds may have regressions or pending validation.

Found this useful?

Share it with someone who would like gemini-cli.

Comparisons