Skip to content

Configuration

John Williams edited this page Mar 31, 2026 · 1 revision

Configuration

Settings, environment variables, and model selection for Gemini CLI with Google Ads commands.


Project Settings

File: .gemini/settings.json

{
  "experimental": {
    "plan": true,
    "extensionReloading": true,
    "modelSteering": true
  },
  "general": {
    "devtools": true
  }
}
Setting What It Does
experimental.plan Enables /plan command for multi-step task planning
experimental.extensionReloading Hot-reloads extensions during development
experimental.modelSteering Allows model to select sub-models for specific tasks
general.devtools Enables the developer tools panel

Environment Variables

Authentication

Variable Description Required
GEMINI_API_KEY AI Studio API key (from aistudio.google.com/apikey) For API key auth
GOOGLE_API_KEY Google Cloud API key For Vertex AI
GOOGLE_GENAI_USE_VERTEXAI Set true to use Vertex AI backend For Vertex AI
GOOGLE_CLOUD_PROJECT GCP project ID For Code Assist / Workspace
GOOGLE_APPLICATION_CREDENTIALS Path to service account JSON For service account auth

CLI Behavior

Variable Description Default
GEMINI_MODEL Override default model (e.g., gemini-2.5-flash) Auto (Gemini 3)
GEMINI_CLI_HOME Override user config directory ~/.gemini
GEMINI_SANDBOX Sandbox mode: true, false, docker, podman false

File Locations

File Scope Purpose
~/.gemini/settings.json User (all projects) Global settings
.gemini/settings.json Project Project-specific settings
.gemini/commands/*.toml Project Custom slash commands
.gemini/skills/*/skill.md Project Agent skills (auto-loaded)
GEMINI.md Project Project context file read on startup
.gemini/.env Project Environment variables (loaded automatically)

Model Selection

# Use a specific model via CLI flag
gemini -m gemini-2.5-flash

# Or set via environment variable
export GEMINI_MODEL="gemini-2.5-flash"

# Or use the /model command inside the prompt
/model gemini-2.5-pro

Available Models

Models depend on your authentication tier:

Tier Models Limits
Free (Google Login) Gemini 3 Flash + Pro mix 60 req/min, 1,000 req/day
API Key (Free) Gemini 3 Flash + Pro 1,000 req/day
Paid / Code Assist All Gemini models including Pro Higher limits per plan
Vertex AI All Gemini models Usage-based billing

Clone this wiki locally