Gemini CLI Documentation Hub
Gemini CLI brings the full power of Gemini models straight to your terminal. Whether you're prototyping in a REPL, building custom tools, or automating workflows, Gemini CLI helps you integrate AI directly into your development environment—with speed, clarity, and flexibility.
This guide walks you through installation, usage, architecture, and extension. It's written for developers who want more than just API references—clear, actionable documentation built for real-world application.
Gemini CLI is a local-first command-line tool that connects your terminal with Gemini’s AI models. It provides:
The CLI is divided into two packages:
packages/cli
– the user-facing command-line interfacepackages/core
– the local server that handles tool execution and API communicationThis design lets you build, test, and scale intelligent workflows right from your terminal—no external services required beyond Gemini.
Ready to dive in? The Execution and Deployment section includes:
The process is smooth for developers on macOS, Linux, or Windows running Node.js.
Gemini CLI operates on a client-server model:
packages/cli
) handles user input and interfaces with the REPLpackages/core
) interprets commands, routes them to tools or Gemini, and returns resultsThis separation allows you to:
For visuals and architecture diagrams, explore Architecture Overview and Core Introduction.
From querying models to running scripts, Gemini CLI includes commands like:
ask
– Send questions or prompts directly to a Gemini modelrun
– Execute a tool or code blockconfig
– Adjust local settings and preferencesSee Commands for syntax, examples, and options.
Gemini CLI includes a modular tools API with functions that simplify automation:
read_file
, write_file
, read_many_files
web_fetch
or search via google_web_search
Each tool is fully documented in the Tools section with practical examples.
Customize your CLI experience with a local config file—control API tokens, output styles, and telemetry preferences. Learn more in Configuration.
Need to pause and resume work? Use the checkpointing system to save model interactions and restore them later. Great for long prompts, iterative workflows, or session-specific prototyping.
You can build your own tools and integrate them into Gemini CLI. Visit the Extensions section to learn how to:
packages/core
Anonymous usage data helps us improve Gemini CLI. Telemetry is optional and can be disabled in your config. See Telemetry for full details.
Want to contribute? Head over to Contributing & Development Guide for:
New contributors are welcome—modular code makes onboarding fast and fun.
Ran into an issue? The Troubleshooting Guide offers:
For bugs or feature requests, open an issue on GitHub.
See our Terms of Service and Privacy Notice for transparency around data usage, open source licensing, and community guidelines.
Gemini CLI is designed for:
Gemini CLI isn’t just an API wrapper. It’s a robust, developer-friendly interface that brings Gemini’s capabilities into your everyday terminal workflow.
Whether you're building, testing, or just exploring—Gemini CLI gives you everything you need to work smarter with AI, right at your fingertips.