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 providers, and Google ecosystem integration.

October 20, 2026
gemini-cligoogleai-codingenterprisevertex-ai

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.
  • Optional sandbox execution — Generated code can run in an isolated environment through -s, GEMINI_SANDBOX, or tools.sandbox in settings, using sandbox-exec, Docker, Podman, gVisor, or LXC.
  • 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.
  • Optional sandboxing — Isolated execution through sandbox-exec, Docker, Podman, gVisor, or LXC.
  • Google ecosystem — Google Drive, Calendar, and Gmail extensions.
  • Vertex AI integration — Managed identity, IAM, and enterprise data governance.
  • Enterprise controls — Centralized provisioning and policy management through Google Cloud.
  • Headless and MCP support — Scriptable -p runs and mcpServers configuration for external tools.

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 with user ADC
gcloud auth application-default login
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="your-location"

# Run in your project
gemini

Once authenticated:

  1. Run gemini in your repository root.
  2. Point it at a task — the 1M context window means you can describe work that spans many files.
  3. Start with gemini -s or enable tools.sandbox in settings if you want sandboxed execution, and review results as it goes.
  4. 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 providers, 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.md and AGENTS.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 background on how native image generation reached the mainstream, see the GPT-4o image generation breakdown.

Google also publishes agent skills for Gemini itself, and the Gemini skills pack covers what is in that repo and the eval lift Google documents for it.

For the full set of conventions, see Prompt Engineering.

Gemini CLI vs Antigravity vs OpenCode

FeatureGemini CLIGoogle AntigravityOpenCode
AvailabilityEnterprise (Vertex AI)Consumer + enterpriseOpen source
InterfaceTerminal agentIDE + terminalTerminal agent
Context window1M+ tokensLargeProvider-dependent
Sandboxed executionOpt-inOpt-inPartial
Google ecosystemDeep (Drive/Calendar/Gmail)✓✗
Provider freedomGoogle modelsGoogle models75+ 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

Sources