Gemini CLI — Getting Started (Enterprise)
Enterprise installation and setup for Gemini CLI via Vertex AI. Product is deprecated for public use — replaced by Google Antigravity. Covers enterprise auth, sandbox providers, and first session.
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 — Getting Started (Enterprise)
Gemini CLI is Google's enterprise terminal-based AI coding agent for Vertex AI customers, with a 1M+ token context window. It runs current Gemini models such as Gemini 3.1 Pro and Gemini 3.8 Flash, integrates with Google's ecosystem (Drive, Gmail, Calendar), and supports opt-in sandboxed execution. Note that Gemini CLI has been deprecated for individual consumers in favor of Google Antigravity.
Enterprise Installation
Gemini CLI is available to Vertex AI customers. Contact your Google Cloud account team for access.
# Via npm (enterprise only)
npm install -g @google/gemini-cli
# Verify
gemini --version
Authentication (Vertex AI)
Enterprise authentication can use user Application Default Credentials locally or a service account key in CI/CD. Vertex AI requests require both a project and a location.
User ADC (local):
# Authenticate as a user via Google Cloud
gcloud auth application-default login
# Point Gemini CLI at Vertex AI
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="YOUR_LOCATION"
# Verify in a session
gemini
> /auth
Service account (CI/CD):
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
export GOOGLE_CLOUD_LOCATION="YOUR_LOCATION"
Sandboxing

Sandboxing is opt-in. Enable it with -s / --sandbox, GEMINI_SANDBOX, or tools.sandbox in settings.json; set tools.sandbox to true or to a provider name:
| Provider | Isolation |
|---|---|
sandbox-exec | macOS Seatbelt profile |
docker | Containerized execution |
podman | Containerized execution |
runsc | gVisor sandbox |
lxc | LXC container |
{
"tools": {
"sandbox": "docker"
}
}
Enable it per run with gemini -s, set GEMINI_SANDBOX=docker, or keep the tools.sandbox setting shown above. There are no workspace, read-only, isolated, or full sandbox modes.
First Session
cd my-project
gemini
First-start experience:
⚡ Welcome to Gemini CLI
Model: gemini-3.1-pro-preview
Context: 1,048,576 tokens
Sandbox: disabled (use -s to enable)
Type /help for commands.
>
Essential Slash Commands
| Command | What it does |
|---|---|
/help | Show all commands |
/auth | Manage authentication |
/clear | Clear conversation |
/compress | Compress context into a summary |
/stats | Show session and context statistics |
/chat share | Export the session to a markdown or JSON file |
/settings | Open the settings editor |
/tools | List available tools |
/extensions | Manage extensions |
/mcp | Manage MCP servers |
Project Configuration: GEMINI.md
Create GEMINI.md (or .gemini/GEMINI.md) at project root:
# GEMINI.md
## Commands
- `npm run dev` — Start dev server
- `npm run build` — Production build
- `npm run test` — Vitest test suite
- `npm run lint` — ESLint + TypeScript
## Architecture
- Vite + React 19 with React Router v7
- Zustand for client state, React Query for server state
- Tailwind CSS v4 with custom design tokens
## Execution Rules
- Use `gemini -s` for untrusted or exploratory tasks
- Do not modify node_modules/, .env, or dist/
- Keep generated files inside src/, lib/, tests/, or public/
## Google Integration
- Google Drive folder: team/docs/shared — read only
- Google Calendar: check before scheduling changes
Google Ecosystem Integration

Gemini CLI connects to Google services through extensions. Browse the extensions gallery and install the ones you need:
# Install a Workspace extension
gemini extensions install <extension-name>
# List installed extensions
gemini extensions list
Then in prompts:
> Read the design spec from Google Drive (team/docs/specs/v2.md)
and compare it with our current implementation in src/components/.
List gaps.
Context Window Advantage
With 1M tokens, Gemini CLI can hold your entire codebase in context. Use this for:
- Full codebase analysis — "Find every place we use
localStorageand assess whether it should besessionStorage" - Cross-cutting refactors — "Rename
UsertoAccountacross the entire codebase and update all references" - Documentation generation — "Read every API route and generate OpenAPI specs"
Related Pages
- Prompt Engineering in Gemini CLI — extensions, prompt patterns, and context strategy
- Gemini CLI Configuration — settings.json, MCP, and .gemini/ conventions
- Tool Comparison — Gemini CLI vs Claude Code vs OpenCode vs Cursor vs Copilot
- Mastering Gemini CLI (Blog) — Comprehensive Gemini CLI guide with sandboxing and CI/CD
Sources
Related Articles & Guides
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.
Gemini CLI — Configuration Reference (Enterprise)
Enterprise Gemini CLI configuration reference. Covers settings.json, MCP integration, .gemini/ directory conventions, sandbox providers, extension management, and environment variables for Vertex AI deployments.
Prompt Engineering in Gemini CLI (Enterprise)
Enterprise prompt engineering for Gemini CLI. System instruction files, sandbox-aware prompting, Google extension patterns, and 1M context strategies for Vertex AI.