google-gemini/gemini-cli

An open-source AI agent that brings the power of Gemini directly into your terminal.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 20 minutes ago
Added to GitGenius on July 29th, 2025
Created on April 17th, 2025
Open Issues & Pull Requests: 850 (+1)
Number of forks: 14,481
Total Stargazers: 106,671 (+7)
Total Subscribers: 577 (+0)

Repository Insights (GitGenius)

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 90% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 14% of tracked open issues have had no activity in three months. Only 4% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 584
New in 7 days: 38
Closed in 7 days: 46
Avg open age: 85 days
Stale 30+ days: 241
Stale 90+ days: 97

Recent activity

Opened in 7 days: 32
Closed in 7 days: 35
Comments in 7 days: 162
Events in 7 days: 557

Top labels

  • area/core (4,721)
  • priority/p2 (4,143)
  • status/need-triage (3,881)
  • Stale (3,774)
  • status/bot-triaged (2,988)
  • area/agent (2,723)
  • priority/p1 (2,591)
  • kind/bug (2,206)

Most active issues this week

Detailed Description

The `google-gemini/gemini-cli` repository provides a command-line interface (CLI) for interacting with Google’s Gemini 1.5 Pro and Gemini 1.0 Pro large language models. It’s designed to be a developer-friendly tool for experimentation, prototyping, and integration of Gemini models into various workflows, particularly those benefiting from a terminal-based interaction. Essentially, it brings the power of Gemini directly to your command line, bypassing the need for a web UI or complex API calls in initial stages.

The core functionality revolves around sending text and/or file content as prompts to the Gemini models and receiving generated text responses. It supports both the Gemini 1.5 Pro model, known for its exceptionally large context window (currently up to 1 million tokens, with a 2 million token preview available), and the more readily accessible Gemini 1.0 Pro. This allows users to test the capabilities of both models, especially the long-context handling of Gemini 1.5 Pro, directly from their terminal. The CLI handles authentication using Google AI Studio API keys, simplifying the setup process. Users obtain an API key from the Google AI Studio website and configure the CLI to use it.

A key feature is the ability to process entire files as context. Instead of manually copying and pasting large documents, the `gemini` command can directly ingest files (currently supporting text, PDF, and CSV formats) and use their content as part of the prompt. This is particularly valuable when working with Gemini 1.5 Pro, as it allows leveraging the model’s large context window to analyze and reason over extensive datasets. The CLI also supports streaming responses, meaning the generated text is displayed incrementally as it's produced, rather than waiting for the entire response to be completed. This improves the user experience, especially for longer generations.

Beyond basic prompting and file processing, the CLI offers several customization options. Users can specify the model to use (1.0 Pro or 1.5 Pro), adjust generation parameters like temperature (controlling randomness) and top_p/top_k (influencing token selection), and set the maximum output token length. It also includes options for safety settings, allowing control over the types of content the model is allowed to generate. The CLI supports different prompt formats, including simple text prompts and structured prompts designed for specific tasks.

The repository includes comprehensive documentation, examples, and a clear installation guide. It’s written in Python and utilizes the `google-generativeai` library, making it relatively easy to extend and integrate with other Python-based tools. The project is actively maintained by Google, ensuring compatibility with the latest Gemini model updates and features. While primarily a CLI tool, it serves as a valuable entry point for developers exploring the Gemini API and building more sophisticated applications leveraging these powerful language models. It's a practical tool for tasks like document summarization, code analysis, data extraction, and creative writing, all directly from the command line.