Gemini CLI documentation
Gemini CLI brings the power of Gemini models directly into your terminal. Use it to understand code, automate tasks, and build workflows with your local project context.
Install
Section titled “Install”npm install -g @google/gemini-cliGet started
Section titled “Get started”Jump in to Gemini CLI.
- Quickstart: Your first session with Gemini CLI.
- Installation: How to install Gemini CLI on your system.
- Authentication: Setup instructions for personal and enterprise accounts.
- Examples: Practical examples of Gemini CLI in action.
- Cheatsheet: A quick reference for common commands and options.
Use Gemini CLI
Section titled “Use Gemini CLI”User-focused guides and tutorials for daily development workflows.
- File management: How to work with local files and directories.
- Get started with Agent skills: Getting started with specialized expertise.
- Manage context and memory: Managing persistent instructions and facts.
- Execute shell commands: Executing system commands safely.
- Manage sessions and history: Resuming, managing, and rewinding conversations.
- Plan tasks with todos: Using todos for complex workflows.
- Web search and fetch: Searching and fetching content from the web.
- Set up an MCP server: Set up an MCP server.
- Automate tasks: Automate tasks.
Features
Section titled “Features”Technical documentation for each capability of Gemini CLI.
- Activate skill (tool): Internal mechanism for loading expert procedures.
- Ask user (tool): Internal dialog system for clarification.
- Checkpointing: Automatic session snapshots.
- File system (tool): Technical details for local file operations.
- Headless mode: Programmatic and scripting interface.
- Internal documentation (tool): Technical lookup for CLI features.
- Memory (tool): Storage details for persistent facts.
- Model routing: Automatic fallback resilience.
- Plan mode 🧪: Use a safe, read-only mode for planning complex changes.
- Subagents 🧪: Using specialized agents for specific tasks.
- Remote subagents 🧪: Connecting to and using remote agents.
- Sandboxing: Isolate tool execution.
- Shell (tool): Detailed system execution parameters.
- Telemetry: Usage and performance metric details.
- Todo (tool): Progress tracking specification.
- Token caching: Performance optimization.
- Web fetch (tool): URL retrieval and extraction details.
- Web search (tool): Google Search integration technicals.
Configuration
Section titled “Configuration”Settings and customization options for Gemini CLI.
- Custom commands: Personalized shortcuts.
- Enterprise configuration: Professional environment controls.
- Ignore files (.geminiignore): Exclusion pattern reference.
- Model configuration: Fine-tune generation parameters like temperature and thinking budget.
- Project context (GEMINI.md): Technical hierarchy of context files.
- Settings: Full configuration reference.
- System prompt override: Instruction replacement logic.
- Themes: UI personalization technical guide.
- Trusted folders: Security permission logic.
Reference
Section titled “Reference”Deep technical documentation and API specifications.
- Command reference: Detailed slash command guide.
- Configuration reference: Settings and environment variables.
- Keyboard shortcuts: Productivity tips.
- Memory import processor: How Gemini CLI processes memory from various sources.
- Policy engine: Fine-grained execution control.
- Tools API: The API for defining and using tools.
Resources
Section titled “Resources”Support, release history, and legal information.
- FAQ: Answers to frequently asked questions.
- Changelogs: Highlights and notable changes.
- Quota and pricing: Limits and billing details.
- Terms and privacy: Official notices and terms.
Development
Section titled “Development”- Contribution guide: How to contribute to Gemini CLI.
- Integration testing: Running integration tests.
- Issue and PR automation: Automation for issues and pull requests.
- Local development: Setting up a local development environment.
- NPM package structure: The structure of the NPM packages.
Releases
Section titled “Releases”- Release notes: Release notes for all versions.
- Stable release: The latest stable release.
- Preview release: The latest preview release.