Gemini CLI — AI Coding Agent (Enterprise Only)
Enterprise guide to Gemini CLI for Vertex AI customers. Product is deprecated for public use — replaced by Google Antigravity. Covers enterprise installation, configuration, sandbox modes, and Google ecosystem integration.
Deprecated for public use:
Gemini CLI is no longer available for individual consumers. It has been replaced by Google Antigravity. Enterprise customers can continue using Gemini CLI through Vertex AI.
Gemini CLI — AI Coding Agent (Enterprise Only)
Gemini CLI is Google's terminal-based AI coding agent. Built for large codebases and complex engineering tasks, it combines a 1M+ token context window with sandboxed code execution and deep integration into Google's ecosystem — Drive, Calendar, Gmail, and Cloud.
Its availability story is unique among the agents covered on this site: consumer access was sunset in favor of Google's newer Antigravity product, and Gemini CLI now lives on as an enterprise tool for Vertex AI customers. If you're evaluating it today, that context matters — it's a Google Cloud product, not a general-purpose tool.
How Gemini CLI Works
Gemini CLI operates as a terminal agent with three capabilities that define its niche:
- 1M+ token context — It can read entire large codebases into context in a single session, which makes it strong on monorepos and legacy systems where "the whole picture" matters more than one file.
- Sandbox execution — Generated code runs in safe, isolated execution environments rather than directly on your machine, a control that enterprise security teams tend to like.
- Google ecosystem access — First-class extensions for Google Drive, Calendar, and Gmail, so it can read a spec from Drive, schedule follow-ups, and draft email — not just edit code.
Within an enterprise, Gemini CLI fits workflows that already run on Google Cloud: Vertex AI-managed identity, IAM-scoped permissions, and data governed under the Google Cloud contract.
Core Features
- 1M+ context window — Read entire codebases in a single session.
- Sandbox modes — Safe, isolated execution environments for generated code.
- Google ecosystem — Google Drive, Calendar, and Gmail extensions.
- Vertex AI integration — Managed identity, IAM, and enterprise data governance.
- Ralph loop — Autonomous multi-step task execution for long-running work.
- Enterprise controls — Centralized provisioning and policy management through Google Cloud.
Enterprise Quick Start
Gemini CLI is available to Vertex AI customers. Contact your Google Cloud account team for access.
# Install (enterprise only)
npm install -g @google/gemini-cli
# Authenticate via Vertex AI
gcloud auth application-default login
gcloud config set project your-project-id
# Run in your project
gemini
Once authenticated:
- Run
geminiin your repository root. - Point it at a task — the 1M context window means you can describe work that spans many files.
- Let it execute inside the sandbox, reviewing results as it goes.
- Use the Google extensions to read specs from Drive or draft follow-up communication.
For installation and auth details, see Getting Started. For the full reference on configuration and sandbox modes, see Configuration Reference.
Writing Effective Prompts
Gemini CLI responds well to the same prompt discipline as other agents, with two enterprise-specific notes:
- Leverage the long context — Instead of narrowing context, you can give it the whole codebase and ask for cross-cutting changes; that's its strength.
- Be explicit about constraints — Enterprise work has compliance edges. State them: "Don't touch
/legacy/migrations," "Use only approved dependencies." - Use GEMINI.md conventions — Like
CLAUDE.mdandAGENTS.md, a project memory file keeps stable context out of every prompt. - Pair with Antigravity for images — For image generation and visual workflows, combine Gemini CLI with Antigravity.
For the full set of conventions, see Prompt Engineering.
Gemini CLI vs Antigravity vs OpenCode
| Feature | Gemini CLI | Google Antigravity | OpenCode |
|---|---|---|---|
| Availability | Enterprise (Vertex AI) | Consumer + enterprise | Open source |
| Interface | Terminal agent | IDE + terminal | Terminal agent |
| Context window | 1M+ tokens | Large | Provider-dependent |
| Sandboxed execution | ✓ | ✓ | Partial |
| Google ecosystem | Deep (Drive/Calendar/Gmail) | ✓ | ✗ |
| Provider freedom | Google models | Google models | 75+ providers |
| Local models | ✗ | ✗ | ✓ |
Gemini CLI is the right tool when you're a Google Cloud enterprise that needs a governed, large-context terminal agent. For individual developers, Antigravity is the supported path forward. OpenCode remains the open, model-agnostic alternative.
Pricing
Gemini CLI for Vertex AI is billed as part of your Google Cloud usage — model calls are metered per token under your Vertex AI agreement. There is no standalone consumer pricing, as the product is enterprise-only.
Frequently Asked Questions
Related Resources
- Getting Started — install, authenticate, and begin your first session
- Prompt Engineering — GEMINI.md conventions and the Ralph loop
- Configuration Reference — config files, sandbox modes, and Google service extensions
- Antigravity Patterns — CLI-first development with Antigravity and Nano Banana
- Image Pipeline Tutorial — CLI coding → Antigravity Nano Banana → cwebp → production
Related Articles
Cursor — AI-Powered IDE
Complete guide to Cursor, the AI-powered code editor. Covers prompt engineering, .cursorrules, agent mode, composer, and best practices for AI-assisted development.
Jcode — AI Coding Agent
Complete guide to jcode, the RAM-efficient open-source AI coding agent in Rust. Covers installation, prompt engineering, configuration, memory, swarms, and advanced workflows.
OpenCode — Getting Started
Install and configure OpenCode, the multi-provider AI coding agent. Covers installation, LLM provider setup, Zen/Go pricing, and first session walkthrough.