Home
Login

Gemini CLI is Google's official open-source AI command-line tool that integrates Gemini AI capabilities directly into the terminal.

Apache-2.0TypeScript 10.0kgoogle-geminigemini-cli Last Updated: 2025-06-25

Gemini CLI - Google's Official Open Source AI Command Line Tool

Project Overview

Gemini CLI is Google's official open-source AI command-line tool that integrates the powerful capabilities of Gemini AI directly into your terminal. This tool is designed to connect to your development tools, understand your code, and accelerate your workflow.

Project Address: https://github.com/google-gemini/gemini-cli

Core Features

🔍 Code Understanding and Editing

  • Large Codebase Query and Editing: Supports querying and editing large codebases within and beyond Gemini's 1 million token context window.
  • Intelligent Code Understanding: Deeply understands project architecture and code logic.
  • Code Refactoring and Optimization: Assists with code refactoring and performance optimization.

🚀 Application Generation

  • Multi-modal Application Generation: Leverages Gemini's multi-modal capabilities to generate new applications from PDF documents or hand-drawn sketches.
  • Rapid Prototyping: Quickly create application prototypes and demos.

⚙️ Automated Task Operations

  • Git Operation Automation: Handles complex git rebase operations, queries pull requests, etc.
  • Project Management: Automates project management tasks.
  • Workflow Optimization: Simplifies daily development workflows.

🔧 Tool Integration and Extension

  • MCP Server Support: Connects new features through tools and MCP servers.
  • Media Generation Integration: Supports integration with media generation features from Imagen, Veo, or Lyria.
  • Google Search Integration: Built-in Google search tool provides real-time information support for queries.

Installation and Setup

System Requirements

  • Node.js: Requires Node.js 18 or higher.

Installation Methods

Method 1: Direct Execution (Recommended)

npx https://github.com/google-gemini/gemini-cli

Method 2: Global Installation

npm install -g @google/gemini-cli

Authentication

Personal Google Account Login

When prompted, log in with your personal Google account, which will provide you with:

  • Up to 60 model requests per minute
  • Up to 1,000 model requests per day (using Gemini 2.5 Pro)

API Key Configuration (Advanced Users)

If you need to use a specific model or higher request capacity:

  1. Generate an API key from Google AI Studio
  2. Set the environment variable:
export GEMINI_API_KEY="YOUR_API_KEY"

Usage Examples

New Project Creation

$ cd new-project/
$ gemini
> Write me a Gemini Discord bot that answers questions using a FAQ.md file I will provide

Existing Project Analysis

$ 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

Common Use Cases

🏗️ System Architecture Analysis

> Describe the main pieces of this system's architecture.
> What security mechanisms are in place?

🐛 Code Development and Debugging

> Implement a first draft for GitHub issue #123.
> Help me migrate this codebase to the latest version of Java. Start with a plan.

📊 Project Management and Collaboration

> Make me a slide deck showing the git history from the last 7 days, grouped by feature and team member.
> Make a full-screen web app for a wall display to show our most interacted-with GitHub issues.

🛠️ Automation Tasks

> Convert all the images in this directory to png, and rename them to use dates from the exif data.
> Organise my PDF invoices by month of expenditure.

Technical Features

🧠 AI Capabilities

  • Large Context Processing: Supports an ultra-large context window of 1 million tokens.
  • Multi-modal Understanding: Supports multiple data types such as text, images, and code.
  • Natural Language Interaction: Supports natural language queries and instructions.

🔧 Integration Capabilities

  • MCP Protocol Support: Supports the Model Context Protocol.
  • Enterprise Tool Integration: Can be integrated with enterprise collaboration suites.
  • Local System Tools: Supports integration of local system tools.

🎨 User Experience

  • Color Theme Selection: Supports multiple terminal color themes.
  • Interactive Interface: Provides a friendly command-line interactive experience.
  • Real-time Feedback: Provides real-time AI responses and suggestions.

Documentation and Support

📚 Official Documentation

🔧 Developer Resources

Project Significance

Gemini CLI represents a new trend in the integration of AI with development tools. It is not just a simple AI chat tool, but a complete AI-driven development environment. By integrating Gemini's powerful AI capabilities directly into the command line, developers can:

  1. Improve Development Efficiency: Quickly understand and modify code with AI assistance.
  2. Simplify Complex Tasks: Transform complex development tasks into simple natural language instructions.
  3. Enhance Creativity: Use AI's creative capabilities for rapid prototyping and problem-solving.
  4. Optimize Workflow: Automate repetitive tasks and focus on more valuable work.

The Gemini CLI project embodies Google's efforts in making AI tools practical, providing the developer community with a powerful and flexible AI programming assistant.

Star History Chart