Skip to main content
Control your Gemini CLI experience through the /settings command or by editing settings.json files directly. Settings control UI behavior, model parameters, security policies, and more.

Configuration Files

Settings are stored in settings.json files at two levels:

User Settings

Location: ~/.gemini/settings.jsonGlobal settings that apply to all projects.

Workspace Settings

Location: <project>/.gemini/settings.jsonProject-specific settings that override user settings.
Workspace settings take precedence over user settings.

Managing Settings

Using the /settings Command

The recommended way to manage settings is through the interactive editor:
/settings
The editor provides:
  • Browse or search for specific settings
  • View current values with descriptions
  • Validation to prevent errors
  • Immediate or restart-required change notifications

Manual Editing

You can also edit settings.json files directly with any text editor:
{
  "general": {
    "vimMode": true,
    "defaultApprovalMode": "auto_edit"
  },
  "ui": {
    "hideBanner": false,
    "showLineNumbers": true
  },
  "model": {
    "name": "gemini-2.0-flash",
    "maxSessionTurns": 100
  }
}

Settings Reference

Below is a comprehensive list of all available settings grouped by category.

General

SettingTypeDescriptionDefault
general.vimModebooleanEnable Vim keybindingsfalse
general.defaultApprovalModestringDefault approval mode: default, auto_edit, plan"default"
general.enableAutoUpdatebooleanEnable automatic updatestrue
general.enableNotificationsbooleanEnable notifications for action-required prompts (macOS only)false
general.maxAttemptsnumberMaximum attempts for chat model requests (max 10)10
general.debugKeystrokeLoggingbooleanLog keystrokes to console for debuggingfalse

Plan Mode

SettingTypeDescriptionDefault
general.plan.directorystringDirectory for planning artifactsundefined
general.plan.modelRoutingbooleanAuto-switch between Pro/Flash for plan/implementationtrue

Session Retention

See Session Management for detailed information on retention policies.
SettingTypeDescriptionDefault
general.sessionRetention.enabledbooleanEnable automatic session cleanuptrue
general.sessionRetention.maxAgestringDelete chats older than this (e.g., “30d”, “7d”, “24h”)"30d"

Output

SettingTypeDescriptionDefault
output.formatstringOutput format: text or json"text"

UI

Appearance

SettingTypeDescriptionDefault
ui.autoThemeSwitchingbooleanAuto-switch light/dark themes based on terminal backgroundtrue
ui.terminalBackgroundPollingIntervalnumberSeconds between terminal background color polls60
ui.hideWindowTitlebooleanHide window title barfalse
ui.hideBannerbooleanHide application bannerfalse
ui.hideFooterbooleanHide footer from UIfalse
ui.useBackgroundColorbooleanUse background colors in UItrue
ui.useAlternateBufferbooleanUse alternate screen buffer (preserves shell history)false
ui.incrementalRenderingbooleanReduce flickering (requires useAlternateBuffer)true
ui.showSpinnerbooleanShow spinner during operationstrue

Content Display

SettingTypeDescriptionDefault
ui.inlineThinkingModestringDisplay model thinking inline: off or full"off"
ui.showStatusInTitlebooleanShow model thoughts in window titlefalse
ui.dynamicWindowTitlebooleanUpdate title with status icons (◇/✋/✦)true
ui.showLineNumbersbooleanShow line numbers in chattrue
ui.showCitationsbooleanShow citations for generated textfalse
ui.showModelInfoInChatbooleanShow model name for each turnfalse
ui.showUserIdentitybooleanShow logged-in user’s identitytrue
ui.showMemoryUsagebooleanDisplay memory usage informationfalse
ui.loadingPhrasesstringWhat to show while working: tips, witty, both, or nothing"tips"
ui.errorVerbositystringError display: low (hide recoverable) or full"low"

UI Elements

SettingTypeDescriptionDefault
ui.hideTipsbooleanHide helpful tipsfalse
ui.showShortcutsHintbooleanShow ”? for shortcuts” hinttrue
ui.hideContextSummarybooleanHide GEMINI.md/MCP context summaryfalse
ui.showHomeDirectoryWarningbooleanWarn when running in home directorytrue
ui.showCompatibilityWarningsbooleanShow terminal/OS compatibility warningstrue
SettingTypeDescriptionDefault
ui.footer.hideCWDbooleanHide current working directory pathfalse
ui.footer.hideSandboxStatusbooleanHide sandbox status indicatorfalse
ui.footer.hideModelInfobooleanHide model name and context usagefalse
ui.footer.hideContextPercentagebooleanHide context window percentagetrue

Accessibility

SettingTypeDescriptionDefault
ui.accessibility.screenReaderbooleanPlain-text output for screen readersfalse

IDE

SettingTypeDescriptionDefault
ide.enabledbooleanEnable IDE integration modefalse

Billing

SettingTypeDescriptionDefault
billing.overageStrategystringQuota exhaustion handling: ask, always, never"ask"

Model

SettingTypeDescriptionDefault
model.namestringGemini model for conversationsundefined
model.maxSessionTurnsnumberMax user/model/tool turns (-1 = unlimited)-1
model.compressionThresholdnumberContext usage fraction to trigger compression (0.0-1.0)0.5
model.disableLoopDetectionbooleanDisable infinite loop detectionfalse
model.skipNextSpeakerCheckbooleanSkip next speaker checktrue
Set model.maxSessionTurns to limit context window size and control costs. See Session Management for details.

Context

Memory Discovery

SettingTypeDescriptionDefault
context.discoveryMaxDirsnumberMax directories to search for GEMINI.md200
context.loadMemoryFromIncludeDirectoriesbooleanScan include directories for GEMINI.mdfalse

File Filtering

SettingTypeDescriptionDefault
context.fileFiltering.respectGitIgnorebooleanRespect .gitignore filestrue
context.fileFiltering.respectGeminiIgnorebooleanRespect .geminiignore filestrue
context.fileFiltering.enableRecursiveFileSearchbooleanRecursive search for @ referencestrue
context.fileFiltering.enableFuzzySearchbooleanFuzzy search when searching filestrue
context.fileFiltering.customIgnoreFilePathsarrayAdditional ignore files (highest precedence)[]

Tools

Shell

SettingTypeDescriptionDefault
tools.shell.enableInteractiveShellbooleanUse node-pty for interactive shelltrue
tools.shell.showColorbooleanShow color in shell outputfalse

Tool Behavior

SettingTypeDescriptionDefault
tools.useRipgrepbooleanUse ripgrep for faster content searchtrue
tools.truncateToolOutputThresholdnumberMax characters before truncation (0 = disabled)40000
tools.disableLLMCorrectionbooleanDisable LLM error correction for edit toolstrue
See Sandboxing for sandbox-specific configuration.

Security

SettingTypeDescriptionDefault
security.disableYoloModebooleanDisable YOLO mode even if flaggedfalse
security.enablePermanentToolApprovalbooleanEnable “Allow for all future sessions” optionfalse
security.blockGitExtensionsbooleanBlock installing/loading extensions from Gitfalse
security.allowedExtensionsarrayRegex patterns for allowed extensions (overrides blockGitExtensions)[]
security.folderTrust.enabledbooleanEnable folder trust trackingtrue
security.environmentVariableRedaction.enabledbooleanRedact environment variables with secretsfalse
security.enableConsecabooleanEnable context-aware security checker (LLM-based)false

Advanced

SettingTypeDescriptionDefault
advanced.autoConfigureMemorybooleanAuto-configure Node.js memory limitsfalse

Experimental

Experimental features may change or be removed in future versions.
SettingTypeDescriptionDefault
experimental.toolOutputMasking.enabledbooleanEnable tool output masking to save tokenstrue
experimental.useOSC52PastebooleanUse OSC 52 for pasting (remote sessions)false
experimental.useOSC52CopybooleanUse OSC 52 for copying (remote sessions)false
experimental.planbooleanEnable Plan Mode and planning toolsfalse
experimental.modelSteeringbooleanEnable user hints to guide modelfalse
experimental.directWebFetchbooleanWeb fetch without LLM summarizationfalse
experimental.gemmaModelRouter.enabledbooleanEnable Gemma Model Router (requires local endpoint)false

Skills

SettingTypeDescriptionDefault
skills.enabledbooleanEnable Agent Skillstrue

Hooks

SettingTypeDescriptionDefault
hooksConfig.enabledbooleanMaster toggle for hooks systemtrue
hooksConfig.notificationsbooleanShow visual indicators when hooks executetrue

Example Configurations

Minimal Setup

{
  "model": {
    "name": "gemini-2.0-flash"
  }
}

Productivity Setup

{
  "general": {
    "vimMode": true,
    "defaultApprovalMode": "auto_edit"
  },
  "ui": {
    "hideWindowTitle": true,
    "showLineNumbers": true,
    "inlineThinkingMode": "full"
  },
  "model": {
    "maxSessionTurns": 150
  },
  "tools": {
    "sandbox": "docker"
  }
}

Security-Focused

{
  "general": {
    "defaultApprovalMode": "default"
  },
  "security": {
    "disableYoloMode": true,
    "blockGitExtensions": true,
    "folderTrust.enabled": true,
    "enableConseca": true
  },
  "tools": {
    "sandbox": "restrictive-open",
    "disableLLMCorrection": true
  }
}

Hierarchical Memory (GEMINI.md)

The /memory command manages hierarchical instructional context from GEMINI.md files.

File Locations

GEMINI.md files are loaded from:
  1. Global: ~/.gemini/GEMINI.md
  2. Project ancestors: All parent directories up to project root
  3. Current directory: ./GEMINI.md
  4. Sub-directories: When configured

Commands

/memory list       # List paths of loaded GEMINI.md files
/memory show       # Display full concatenated content
/memory refresh    # Reload from all locations
/memory add <text> # Add text to memory

Configuration

Control memory loading behavior:
{
  "context": {
    "discoveryMaxDirs": 200,
    "loadMemoryFromIncludeDirectories": false
  }
}

Next Steps

Commands Overview

Explore all available commands

Session Management

Configure session retention and limits

Checkpointing

Enable automatic checkpoints

Sandboxing

Configure sandboxed execution

Build docs developers (and LLMs) love