Skip to main content
toolsSource-backedReview first Safety Privacy

Gemini CLI

Google's open-source terminal AI agent for Gemini-powered coding and automation, with code understanding, file edits, shell commands, web fetching, Google Search grounding, MCP server integrations, checkpointing, GEMINI.md context files, and GitHub workflow automation.

by Google·added 2026-06-18·
HarnessGeminiCLI
Review first review before installing

Open the source and read safety notes before installing.

Safety notes

  • Gemini CLI can read and edit local files, run shell commands, fetch web content, use Google Search grounding, and call configured MCP servers; keep it inside version-controlled workspaces and review high-impact actions.
  • MCP integrations can expose databases, SaaS accounts, browsers, cloud resources, files, or internal APIs to the agent; apply least privilege and approval gates per server.
  • Preview and nightly release channels may contain regressions or unvetted changes; use stable releases for shared or production workflows unless testing intentionally.
  • Non-interactive scripting can run without the same operator attention as an interactive session; constrain prompts, output parsing, credentials, and command permissions.
  • GitHub workflow automation through Gemini CLI should be reviewed like any other code-review or issue-triage automation before granting repository permissions.

Privacy notes

  • Prompts, selected source files, GEMINI.md context, shell output, web fetches, MCP tool arguments, MCP tool results, checkpoints, and command output may be sent through the configured Gemini or Vertex AI route.
  • Keep API keys, Google Cloud project IDs, service credentials, private paths, customer data, and internal code out of prompts, logs, shared terminal output, and public issues.
  • Google account, Gemini API, Vertex AI, retention, quota, telemetry, and billing behavior depend on the selected authentication mode and organizational settings.
  • MCP server logs, Gemini CLI logs, terminal history, GitHub workflow logs, and generated artifacts can retain sensitive code or operational context.

Prerequisites

  • Node.js 20 or newer for the npm package, or a supported Homebrew, MacPorts, or Conda install path.
  • A Google account, Gemini API key, or Vertex AI configuration for the selected authentication route.
  • A project workspace where file access, shell commands, web fetching, and MCP server access are intentionally scoped.
  • A decision on stable, preview, or nightly release channels before using the CLI in team workflows.
  • Reviewed MCP server configuration if custom integrations will be exposed to Gemini CLI.

Schema details

Install type
cli
Troubleshooting
No
Source repository stats
Scope
Source repo
Collection metadata
Estimated setup
15 minutes
Difficulty
intermediate
Tool listing metadata
Pricing
free
Disclosure
editorial
Application category
DeveloperApplication
Operating system
Cross-platform
Full copyable content
npm install -g @google/gemini-cli

About this resource

Overview

Gemini CLI is Google's open-source terminal AI agent for Gemini-powered coding, repository work, and automation. It can inspect and edit codebases, run shell commands, fetch web content, use Google Search grounding, connect to MCP servers, checkpoint conversations, load project context through GEMINI.md, and run non-interactively in scripts.

Use it when a developer wants a Google-backed terminal agent rather than an IDE extension or a hosted chat surface. It is especially relevant for Gemini coding agent, terminal AI agent, MCP client, Google Search grounding, and GitHub workflow automation searches.

Install

Run without a global install:

npx @google/gemini-cli

Install globally with npm:

npm install -g @google/gemini-cli

The upstream docs also describe Homebrew, MacPorts, and Conda install paths. Use the stable channel for shared workflows unless you are intentionally testing preview or nightly releases.

Agent Capabilities

Area Gemini CLI Coverage
Terminal Agent Interactive gemini CLI and non-interactive prompt mode
Coding Workflows Codebase understanding, file edits, debugging, troubleshooting, and app generation
Tools File operations, shell commands, web fetching, Google Search grounding, and MCP servers
Context GEMINI.md project context files and include-directory support
Automation JSON and streaming output formats for scripts and long-running workflows
GitHub Separate Gemini CLI GitHub Action for PR reviews, issue triage, mentions, and custom workflows
Releases Stable, preview, and nightly npm release channels

MCP Fit

Gemini CLI has built-in MCP support for custom integrations. That makes it a natural target for teams using the same MCP servers across Claude Code, Codex, Cursor, Gemini CLI, and other agent hosts.

Treat each MCP server as a separate trust boundary. A harmless read-only docs server has a different risk profile than a server that can write to GitHub, query production databases, control a browser, deploy infrastructure, or access private files.

Use Cases

  • Ask Gemini to inspect, explain, or edit a local repository from the terminal.
  • Use Google Search grounding while debugging current behavior or APIs.
  • Connect Gemini CLI to MCP servers for custom tools and internal systems.
  • Script codebase explanations, audits, or automation through non-interactive prompt mode.
  • Store project guidance in GEMINI.md files.
  • Run Gemini CLI GitHub Action workflows for pull request review or issue triage after repository permissions are reviewed.

Source Review

Verified on 2026-06-18:

  • The upstream repository describes Gemini CLI as an open-source AI agent that brings Gemini into the terminal.
  • The README documents npm, npx, Homebrew, MacPorts, and Conda install paths.
  • The README describes file operations, shell commands, web fetching, Google Search grounding, MCP support, checkpointing, GEMINI.md, non-interactive mode, JSON output modes, and GitHub Action integration.
  • package.json declares the @google/gemini-cli package, gemini binary, GitHub repository, workspace layout, and Node.js engine requirement.
  • The npm registry resolves @google/gemini-cli with latest version 0.47.0 and Apache-2.0 licensing.

Safety and Privacy

Gemini CLI is a local agent with access to the directory and tools you expose. Start in a version-controlled workspace, review proposed edits and shell commands, and keep destructive or credentialed operations behind explicit operator approval.

When using MCP, Google Search grounding, web fetching, Vertex AI, API-key authentication, or GitHub automation, review which prompts, source files, tool outputs, logs, checkpoints, and workflow artifacts leave the local machine or repository boundary.

Duplicate Check

Checked current content/tools/, content/mcp/, content/agents/, content/skills/, guides, open pull requests, and repository-wide content for google-gemini/gemini-cli, Gemini CLI, @google/gemini-cli, Google Gemini CLI, Gemini terminal agent, Gemini CLI MCP, and GEMINI.md. Existing content includes gemini-mcp-tool, which is a separate MCP bridge that calls Gemini CLI from Claude, and multiple skill entries that mention Gemini CLI compatibility. No dedicated official Gemini CLI tools entry, exact source URL duplicate, target file, or open duplicate PR was found.

Source citations

Add this badge to your README

Show that Gemini CLI is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/tools/gemini-cli.svg)](https://heyclau.de/entry/tools/gemini-cli)

How it compares

Gemini CLI side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

FieldGemini CLI

Google's open-source terminal AI agent for Gemini-powered coding and automation, with code understanding, file edits, shell commands, web fetching, Google Search grounding, MCP server integrations, checkpointing, GEMINI.md context files, and GitHub workflow automation.

Open dossier
OpenCode

Terminal-first AI coding agent for local development workflows, codebase edits, and model-flexible automation.

Open dossier
Qwen Code

Open-source terminal AI coding agent from Qwen with Auto-Memory, Auto-Skills, SubAgents, Agent Teams, dynamic workflows, MCP support, multi-provider model routing, IDE plugins, desktop app, daemon mode, SDKs, IM bots, sandboxing, and worktree-aware coding workflows.

Open dossier
Crush

Terminal-based agentic AI coding assistant from Charm that works with many LLM providers, uses LSP and MCP for context, manages per-project sessions, and asks permission before running tools by default.

Open dossier
Trust
Install riskReview firstReview firstReview firstReview first
Notes Safety Privacy Safety Privacy Safety Privacy Safety Privacy
Categorytoolstoolstoolstools
Sourcesource-backedsource-backedsource-backedsource-backed
AuthorGoogleSSTQwenCharm
Added2026-06-182026-04-272026-06-182026-06-05
Platforms
GeminiCLI
CLI
CLI
CLI
Source repo
Safety notesGemini CLI can read and edit local files, run shell commands, fetch web content, use Google Search grounding, and call configured MCP servers; keep it inside version-controlled workspaces and review high-impact actions. MCP integrations can expose databases, SaaS accounts, browsers, cloud resources, files, or internal APIs to the agent; apply least privilege and approval gates per server. Preview and nightly release channels may contain regressions or unvetted changes; use stable releases for shared or production workflows unless testing intentionally. Non-interactive scripting can run without the same operator attention as an interactive session; constrain prompts, output parsing, credentials, and command permissions. GitHub workflow automation through Gemini CLI should be reviewed like any other code-review or issue-triage automation before granting repository permissions.OpenCode is an agent that reads, edits, and can run code in your local repository; review proposed changes and run it in version-controlled projects.Qwen Code can edit files, run commands, use MCP servers, launch subagents, apply skills, use hooks, operate in sandboxes, and manage worktrees; keep destructive or credentialed actions behind explicit approval. Auto-Memory and Auto-Skills can persist or reuse context across tasks; review what is stored, updated, and replayed before using sensitive repositories or customer data. Daemon mode and IM bot channels can expose a shared agent session over HTTP+SSE or messaging platforms; require authentication, network controls, audit logs, and operator visibility. MCP servers can expose databases, SaaS accounts, browsers, cloud resources, files, or internal APIs to the agent; apply least privilege per server. Multi-provider routing means prompts and code may go to different model providers at runtime; lock down provider choices for regulated or confidential work.Crush executes tools and commands; by default it asks for permission before each tool call. The --yolo flag skips all permission prompts; the project warns to be very careful with it, so avoid it on untrusted work. The crush.json config is trusted code — any $(...) in it runs at load time with your shell's privileges, so review config files before use. LSP and MCP servers can read your codebase and influence agent behavior; only connect servers you trust.
Privacy notesPrompts, selected source files, GEMINI.md context, shell output, web fetches, MCP tool arguments, MCP tool results, checkpoints, and command output may be sent through the configured Gemini or Vertex AI route. Keep API keys, Google Cloud project IDs, service credentials, private paths, customer data, and internal code out of prompts, logs, shared terminal output, and public issues. Google account, Gemini API, Vertex AI, retention, quota, telemetry, and billing behavior depend on the selected authentication mode and organizational settings. MCP server logs, Gemini CLI logs, terminal history, GitHub workflow logs, and generated artifacts can retain sensitive code or operational context.OpenCode sends your code, prompts, and file context to the configured LLM provider to plan and apply edits; choose providers deliberately and keep secrets out of shared context.Prompts, selected files, memory, skills, subagent transcripts, MCP tool arguments, MCP tool results, hooks, shell output, worktree paths, daemon traffic, IM bot messages, SDK messages, and provider responses may contain sensitive data. Do not expose provider API keys, OAuth tokens, Qwen credentials, private repository content, customer data, or internal system details through prompts, logs, screenshots, bot messages, or shared sessions. Provider privacy, retention, billing, and telemetry behavior depends on the selected Qwen, OpenAI, Anthropic, Gemini, local, or third-party model route. Desktop, daemon, IDE, SDK, and IM-bot modes may retain or relay agent context outside the terminal session; review logs and storage for each mode.Your code context and prompts are transmitted to the LLM provider you configure. API keys are read from environment variables or config files and sent to the configured provider; store them as secrets. Crush records pseudonymous usage metrics tied to a device-specific hash; prompts and responses are never collected. Opt out with CRUSH_DISABLE_METRICS=1 or DO_NOT_TRACK=1.
Prerequisites
  • Node.js 20 or newer for the npm package, or a supported Homebrew, MacPorts, or Conda install path.
  • A Google account, Gemini API key, or Vertex AI configuration for the selected authentication route.
  • A project workspace where file access, shell commands, web fetching, and MCP server access are intentionally scoped.
  • A decision on stable, preview, or nightly release channels before using the CLI in team workflows.
— none listed
  • Node.js 22 or newer for the npm package, or a supported standalone script or Homebrew install path.
  • Provider credentials for Qwen, OpenAI, Anthropic, Gemini, Ollama, vLLM, or another compatible route.
  • A project workspace where file access, shell commands, Auto-Memory, Auto-Skills, SubAgents, Agent Teams, MCP, and hooks are intentionally scoped.
  • A policy for headless mode, daemon mode, IM bot access, IDE plugins, desktop app sessions, and SDK clients before using Qwen Code outside an interactive terminal.
  • An API key from a supported LLM provider such as Anthropic, OpenAI, or a compatible API.
  • A supported terminal on macOS, Linux, Windows (PowerShell or WSL), or BSD.
  • On Linux/BSD, clipboard helpers (wl-copy/wl-paste for Wayland or xclip/xsel for X11) for clipboard features.
Install
npm install -g @google/gemini-cli
npm install -g @qwen-code/qwen-code@latest
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.