Welcome to Gemini CLI documentation
This documentation provides a comprehensive guide to installing, using, and developing Gemini CLI, a tool that lets you interact with Gemini models through a command-line interface.
Gemini CLI overview
Gemini CLI brings the capabilities of Gemini models to your terminal in an
interactive Read-Eval-Print Loop (REPL) environment. Gemini CLI consists of a
client-side application (packages/cli) that communicates with a local server
(packages/core), which in turn manages requests to the Gemini API and its AI
models. Gemini CLI also contains a variety of tools for tasks such as performing
file system operations, running shells, and web fetching, which are managed by
packages/core.
Navigating the documentation
This documentation is organized into the following sections:
Overview
- Architecture overview: Understand the high-level design of Gemini CLI, including its components and how they interact.
- Contribution guide: Information for contributors and developers, including setup, building, testing, and coding conventions.
Get started
- Gemini CLI quickstart: Let's get started with Gemini CLI.
- Gemini 3 Pro on Gemini CLI: Learn how to enable and use Gemini 3.
- Authentication: Authenticate to Gemini CLI.
- Configuration: Learn how to configure the CLI.
- Installation: Install and run Gemini CLI.
- Examples: Example usage of Gemini CLI.
CLI
- Introduction: Gemini CLI: Overview of the command-line interface.
- Commands: Description of available CLI commands.
- Checkpointing: Documentation for the checkpointing feature.
- Custom commands: Create your own commands and shortcuts for frequently used prompts.
- Enterprise: Gemini CLI for enterprise.
- Headless mode: Use Gemini CLI programmatically for scripting and automation.
- Keyboard shortcuts: A reference for all keyboard shortcuts to improve your workflow.
- Model selection: Select the model used to process your
commands with
/model. - Sandbox: Isolate tool execution in a secure, containerized environment.
- Settings: Configure various aspects of the CLI's
behavior and appearance with
/settings. - Telemetry: Overview of telemetry in the CLI.
- Themes: Themes for Gemini CLI.
- Token caching: Token caching and optimization.
- Trusted Folders: An overview of the Trusted Folders security feature.
- Tutorials: Tutorials for Gemini CLI.
- Uninstall: Methods for uninstalling the Gemini CLI.
Core
- Introduction: Gemini CLI core: Information about Gemini CLI core.
- Memport: Using the Memory Import Processor.
- Tools API: Information on how the core manages and exposes tools.
- Policy Engine: Use the Policy Engine for fine-grained control over tool execution.
Tools
- Introduction: Gemini CLI tools: Information about Gemini CLI's tools.
- File system tools: Documentation for the
read_fileandwrite_filetools. - Shell tool: Documentation for the
run_shell_commandtool. - Web fetch tool: Documentation for the
web_fetchtool. - Web search tool: Documentation for the
google_web_searchtool. - Memory tool: Documentation for the
save_memorytool. - Todo tool: Documentation for the
write_todostool. - MCP servers: Using MCP servers with Gemini CLI.
Extensions
- Introduction: Extensions: How to extend the CLI with new functionality.
- Get Started with extensions: Learn how to build your own extension.
- Extension releasing: How to release Gemini CLI extensions.
Hooks
- Hooks: Intercept and customize Gemini CLI behavior at key lifecycle points.
- Writing Hooks: Learn how to create your first hook with a comprehensive example.
- Best Practices: Security, performance, and debugging guidelines for hooks.
IDE integration
- Introduction to IDE integration: Connect the CLI to your editor.
- IDE companion extension spec: Spec for building IDE companion extensions.
Development
- NPM: Details on how the project's packages are structured.
- Releases: Information on the project's releases and deployment cadence.
- Changelog: Highlights and notable changes to Gemini CLI.
- Integration tests: Information about the integration testing framework used in this project.
- Issue and PR automation: A detailed overview of the automated processes we use to manage and triage issues and pull requests.
Support
- FAQ: Frequently asked questions.
- Troubleshooting guide: Find solutions to common problems.
- Quota and pricing: Learn about the free tier and paid options.
- Terms of service and privacy notice: Information on the terms of service and privacy notices applicable to your use of Gemini CLI.
We hope this documentation helps you make the most of Gemini CLI!