gemini-cli
An open-source AI agent that brings the power of Gemini directly into your terminal.
- 107.6k estrellas
- 14.8k forks
- 753 issues abiertos
- Lenguaje: TypeScript
- Licencia: Apache-2.0
- actualizado
Instalación
local · npxclaude mcp add gemini-cli -- npx -y @google/gemini-cli{
"mcpServers": {
"gemini-cli": {
"command": "npx",
"args": ["-y", "@google/gemini-cli"],
"env": {
"GEMINI_API_KEY": "<gemini_api_key>",
"GOOGLE_API_KEY": "<google_api_key>"
}
}
}
}{
"mcpServers": {
"gemini-cli": {
"command": "npx",
"args": ["-y", "@google/gemini-cli"],
"env": {
"GEMINI_API_KEY": "<gemini_api_key>",
"GOOGLE_API_KEY": "<google_api_key>"
}
}
}
}- Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
- Replace any <placeholder> values with your API keys or paths.
- Restart Claude. The MCP server and its tools appear automatically.
GEMINI_API_KEYGOOGLE_API_KEYNota editorial
Gemini CLI is a terminal-based AI agent built by Google that connects to the Gemini family of models, including Gemini 3 with a 1 million token context window, and exposes them through an interactive command-line interface installable via npm, Homebrew, or MacPorts. Its built-in tools cover file operations, shell command execution, web fetching, and Google Search grounding for real-time information retrieval. The project functions as both an MCP client and an MCP server, allowing users to connect external MCP servers for additional capabilities such as media generation via Imagen, Veo, or Lyria. A companion GitHub Action enables automated pull request reviews, issue triage, and on-demand assistance by mentioning @gemini-cli in repository threads. Authentication works through Google OAuth or a direct API key, with the free tier offering 60 requests per minute and 1,000 requests per day. The tool targets developers who work primarily in the terminal and need codebase querying, debugging, and workflow automation without leaving their shell.
Resumen de MCP Servers
Note
Unpaid tier and Google One users: Gemini CLI was replaced by Antigravity CLI on June 18th, 2026. To learn more, see our blog post.
Gemini CLI has not been optimized for Gemini 4 Argon. To use Gemini 4 Argon, please use Antigravity.
Gemini CLI
Note
Gemini CLI is not optimized for the latest Gemini models. For the best coding experience with Gemini models use Antigravity CLI
Gemini CLI is an open-source AI agent that brings the power of Gemini directly into your terminal. It provides lightweight access to Gemini, giving you the most direct path from your prompt to our model.
Learn all about Gemini CLI in our documentation.
📦 Installation
See Gemini CLI installation, execution, and releases for recommended system specifications and a detailed installation guide.
Quick Install
Run instantly with npx
# Using npx (no installation required)
npx @google/gemini-cliInstall globally with npm
npm install -g @google/gemini-cliInstall globally with Homebrew (macOS/Linux)
brew install gemini-cliInstall globally with MacPorts (macOS)
sudo port install gemini-cliInstall with Anaconda (for restricted environments)
# Create and activate a new environment
conda create -y -n gemini_env -c conda-forge nodejs
conda activate gemini_env
# Install Gemini CLI globally via npm (inside the environment)
npm install -g @google/gemini-cliRelease Channels
See Releases for more details.
Preview
New preview releases will be published each week at UTC 23:59 on Tuesdays. These
releases will not have been fully vetted and may contain regressions or other
outstanding issues. Please help us test and install with preview tag.
npm install -g @google/gemini-cli@previewStable
New stable releases will be published each week at UTC 20:00 on Tuesdays, this will be the full promotion of last week's
previewrelease + any bug fixes and validations. Uselatesttag.
npm install -g @google/gemini-cli@latestNightly
New releases will be published each day at UTC 00:00. This will be all changes from the main branch as represented at time of release. It should be assumed there are pending validations and issues. Use
nightlytag.
npm install -g @google/gemini-cli@nightly📋 Key Features
Code Understanding & Generation
Query and edit large codebases
Generate new apps from PDFs, images, or sketches using multimodal capabilities
Debug issues and troubleshoot with natural language
Automation & Integration
Automate operational tasks like querying pull requests or handling complex rebases
Use MCP servers to connect new capabilities, including media generation with Imagen, Veo or Lyria
Run non-interactively in scripts for workflow automation
🔐 Authentication Options
Choose the authentication method that best fits your needs:
Option 1: Sign in with Google (OAuth login using your Google Account)
When using a paid Code Assist License from your organization, remember to set the Google Cloud Project
# Set your Google Cloud Project
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
geminiOption 2: Gemini API Key
✨ Best for: Developers who need specific model control or paid tier access
Benefits:
Model selection: Choose specific Gemini models
Usage-based billing: Upgrade for higher limits when needed
# Get your key from https://aistudio.google.com/apikey
export GEMINI_API_KEY="YOUR_API_KEY"
geminiOption 3: Vertex AI
✨ Best for: Enterprise teams and production workloads
Benefits:
Enterprise features: Advanced security and compliance
Scalable: Higher rate limits with billing account
Integration: Works with existing Google Cloud infrastructure
# Get your key from Google Cloud Console
export GOOGLE_API_KEY="YOUR_API_KEY"
export GOOGLE_GENAI_USE_VERTEXAI=true
geminiFor Google Workspace accounts and other authentication methods, see the authentication guide.
🚀 Getting Started
Note
Gemini CLI is not optimized for the latest Gemini models. For the best coding experience with Gemini models use Antigravity CLI
Basic Usage
Start in current directory
geminiInclude multiple directories
gemini --include-directories ../lib,../docsUse specific model
gemini -m gemini-2.5-flashNon-interactive mode for scripts
Get a simple text response:
gemini -p "Explain the architecture of this codebase"For more advanced scripting, including how to parse JSON and handle errors, use
the --output-format json flag to get structured output:
gemini -p "Explain the architecture of this codebase" --output-format jsonFor real-time event streaming (useful for monitoring long-running operations),
use --output-format stream-json to get newline-delimited JSON events:
gemini -p "Run tests and deploy" --output-format stream-jsonQuick Examples
Start a new project
cd new-project/
gemini
> Write me a Discord bot that answers questions using a FAQ.md file I will provideAnalyze existing code
git clone https://github.com/google-gemini/gemini-cli
cd gemini-cli
gemini
> Give me a summary of all of the changes that went in yesterday📚 Documentation
Getting Started
Quickstart Guide - Get up and running quickly.
Authentication Setup - Detailed auth configuration.
Configuration Guide - Settings and customization.
Keyboard Shortcuts - Productivity tips.
Core Features
Commands Reference - All slash commands (
/help,/chat, etc).Custom Commands - Create your own reusable commands.
Context Files (GEMINI.md) - Provide persistent context to Gemini CLI.
Checkpointing - Save and resume conversations.
Token Caching - Optimize token usage.
Tools & Extensions
MCP Server Integration - Extend with custom tools.
Custom Extensions - Build and share your own commands.
Advanced Topics
Headless Mode (Scripting) - Use Gemini CLI in automated workflows.
IDE Integration - VS Code companion.
Sandboxing & Security - Safe execution environments.
Trusted Folders - Control execution policies by folder.
Enterprise Guide - Deploy and manage in a corporate environment.
Telemetry & Monitoring - Usage tracking.
Tools reference - Built-in tools overview.
Local development - Local development tooling.
Troubleshooting & Support
Troubleshooting Guide - Common issues and solutions.
FAQ - Frequently asked questions.
Use
/bugcommand to report issues directly from the CLI.
Using MCP Servers
Configure MCP servers in ~/.gemini/settings.json to extend Gemini CLI with
custom tools:
> @github List my open pull requests
> @slack Send a summary of today's commits to #dev channel
> @database Run a query to find inactive usersSee the
Lo que la gente pregunta sobre gemini-cli
¿Qué es google-gemini/gemini-cli?
google-gemini/gemini-cli es mcp servers para el ecosistema de Claude AI. An open-source AI agent that brings the power of Gemini directly into your terminal. Tiene 107.6k estrellas en GitHub y su última actualización registrada es del 2026-10-23.
¿Cómo se instala gemini-cli?
Puedes instalar gemini-cli clonando el repositorio (https://github.com/google-gemini/gemini-cli) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar google-gemini/gemini-cli?
Nuestro agente de seguridad ha analizado google-gemini/gemini-cli y le ha asignado un Trust Score de 100/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene google-gemini/gemini-cli?
google-gemini/gemini-cli es mantenido por google-gemini. La última actividad registrada en GitHub es del 2026-10-23, con 753 issues abiertos.
¿Hay alternativas a gemini-cli?
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
¿Mantienes este repo? Muestra su Trust Score en tu README
La insignia muestra el Trust Score y el veredicto actuales de este repositorio y enlaza a esta página. Sigue los datos del catálogo: nadie puede comprar ni editar la puntuación que enseña.
[](https://claudewave.com/en/repo/google-gemini-gemini-cli)<a href="https://claudewave.com/en/repo/google-gemini-gemini-cli"><img src="https://claudewave.com/api/badge/google-gemini-gemini-cli" alt="ClaudeWave Trust Score for google-gemini/gemini-cli" width="320" height="64"></a>