Gemini CLI is an open-source command-line agent for querying and editing codebases, running shell workflows, and connecting MCP tools under Gemini Code Assist on Google Cloud.
Overview
Gemini CLI brings a terminal-based AI agent to workflows built around Gemini Code Assist for organizations on Google Cloud. It is maintained for enterprise Code Assist use, including Standard and Enterprise licenses and Code Assist for GitHub on Google Cloud. For unpaid tier and Google One users, Gemini CLI was replaced by Antigravity CLI on June 18, 2026.
Users can ask questions about large codebases, apply edits, generate applications from multimodal inputs such as PDFs or images, debug with natural language, and automate tasks like pull request queries or complex rebases. Non-interactive modes support scripted runs with plain text or structured JSON output, including stream-json event lines for long operations.
Authentication options include Google account sign-in with an optional Google Cloud project, a Gemini API key for model selection and usage-based billing, or Vertex AI for enterprise security, higher limits, and cloud integration. MCP servers configured in user settings extend built-in file, shell, and web tools with custom capabilities.
Installation paths listed include npx, npm, Homebrew, MacPorts, and Anaconda, with preview, stable, and nightly release channels. Documentation covers configuration, slash commands, context files, checkpointing, IDE integration, sandboxing, trusted folders, telemetry, and enterprise deployment.
Key features
- Large codebase query and edits
- Multimodal app generation inputs
- MCP server tool extensions
- Non-interactive scripting modes
- OAuth API key Vertex auth
- Built-in shell and web tools
- Custom slash commands
- Persistent GEMINI.md context
Use cases
- Terminal code analysis and fixes
- Automating git and PR tasks
- Scripted AI responses in CI
- Extending agents via MCP
- Enterprise Code Assist development