Gemini CLI

Gemini CLI is an open-source terminal coding agent maintained under the Google Gemini organization (google-gemini/gemini-cli). It provides a command-line and terminal-based agentic workflow for navigating codebases, generating code, and executing engineering tasks directly inside local developer environments. In daily use, the agent operates through an interactive Terminal User Interface (TUI) as well as direct command-line invocations. It reads and edits files within local repositories, runs shell operations, and connects to Google's Gemini models via Google AI Studio or Google Cloud Platform (GCP) authentication backends. A key differentiator for Gemini CLI is its built-in integration with the Model Context Protocol (MCP), including support for OAuth-based tool discovery and authentication. It also supports repository-level skill definitions stored within a .gemini directory to configure specialized agent behaviors across monorepos and complex projects. The project is open-source and distributed through the npm ecosystem. Model access depends on Google Gemini API keys or GCP credentials, subject to standard API pricing tiers and quota limits.

Tags: ai agent, cli, coding agent, OpenSource, terminal

Visit Gemini CLI

Key features

  • Terminal User Interface (TUI) — Provides an interactive terminal workspace for prompt execution, code review, and session management. - Model Context Protocol (MCP) Support — Connects to MCP servers with support for OAuth discovery and external tool calling. - Workspace Skill System — Enables custom agent skills and project-specific instructions configured via repository .gemini directories. - GCP and Gemini API Integration — Connects directly to Google's Gemini models using standard API keys or Google Cloud credentials. - Monorepo-Aware Navigation — Inspects, analyzes, and modifies multi-package codebases within local terminal sessions.

Use cases

Use Case: Terminal-Based Codebase Refactoring Developers can invoke the agent within a project directory to parse multi-file dependencies, analyze functions, and apply structural refactoring without leaving the terminal.

Use Case: External Tool Integration via MCP Teams can attach local or remote MCP servers with OAuth authentication, giving the terminal agent access to internal APIs, database schemas, and documentation tools during development sessions.

Use Case: Repository Task Automation Engineers can leverage custom repository skills to generate boilerplate, run test suites, and resolve failed builds through agentic command execution.

Who it is for

Gemini CLI is built for software engineers, DevOps practitioners, and terminal-first developers who want an agentic workflow integrated with Google's Gemini models and MCP tools. It is less relevant for developers who require a dedicated graphical IDE extension or teams exclusively using alternative LLM providers.

Install guide

Installation Install the package globally via npm (the standard distribution channel for this repository): bash npm install -g @google-gemini/gemini-cli

First Run Set your Gemini API key in your environment and launch the CLI: bash export GEMINI_API_KEY="your-gemini-api-key" gemini

Example Session Run an interactive query or pass a command directly from your project root: bash gemini "Inspect src/index.ts and refactor unhandled promise rejections"

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Open Interpreter — Open Interpreter is an open-source terminal coding agent maintained by Killian Lucas and the Open Interpreter community. It is designed…
  • Crush — Crush is an open-source terminal coding agent created by Charm (Charmbracelet), the team behind popular Go terminal UI libraries like…
  • Hax — Hax is a minimalist, native CLI coding agent created by Oleksandr Chekhovskyi. Written in C and designed for POSIX-compliant environments,…
  • amux — amux is an open-source agent harness and session multiplexer developed by Mixpeek. Built in Rust, it is designed to manage,…
  • San — San is an open-source terminal coding agent developed by the genai-io organization on GitHub. Built natively in Go, San is…
  • Pi Boss — Pi Boss is an open-source multi-agent orchestration extension developed by skyfallsin for the pi terminal coding agent ecosystem. It provides…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories