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:
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
Setting Type Description Default general.vimModeboolean Enable Vim keybindings falsegeneral.defaultApprovalModestring Default approval mode: default, auto_edit, plan "default"general.enableAutoUpdateboolean Enable automatic updates truegeneral.enableNotificationsboolean Enable notifications for action-required prompts (macOS only) falsegeneral.maxAttemptsnumber Maximum attempts for chat model requests (max 10) 10general.debugKeystrokeLoggingboolean Log keystrokes to console for debugging false
Plan Mode
Setting Type Description Default general.plan.directorystring Directory for planning artifacts undefinedgeneral.plan.modelRoutingboolean Auto-switch between Pro/Flash for plan/implementation true
Session Retention
Setting Type Description Default general.sessionRetention.enabledboolean Enable automatic session cleanup truegeneral.sessionRetention.maxAgestring Delete chats older than this (e.g., “30d”, “7d”, “24h”) "30d"
Output
Setting Type Description Default output.formatstring Output format: text or json "text"
Appearance
Setting Type Description Default ui.autoThemeSwitchingboolean Auto-switch light/dark themes based on terminal background trueui.terminalBackgroundPollingIntervalnumber Seconds between terminal background color polls 60ui.hideWindowTitleboolean Hide window title bar falseui.hideBannerboolean Hide application banner falseui.hideFooterboolean Hide footer from UI falseui.useBackgroundColorboolean Use background colors in UI trueui.useAlternateBufferboolean Use alternate screen buffer (preserves shell history) falseui.incrementalRenderingboolean Reduce flickering (requires useAlternateBuffer) trueui.showSpinnerboolean Show spinner during operations true
Content Display
Setting Type Description Default ui.inlineThinkingModestring Display model thinking inline: off or full "off"ui.showStatusInTitleboolean Show model thoughts in window title falseui.dynamicWindowTitleboolean Update title with status icons (◇/✋/✦) trueui.showLineNumbersboolean Show line numbers in chat trueui.showCitationsboolean Show citations for generated text falseui.showModelInfoInChatboolean Show model name for each turn falseui.showUserIdentityboolean Show logged-in user’s identity trueui.showMemoryUsageboolean Display memory usage information falseui.loadingPhrasesstring What to show while working: tips, witty, both, or nothing "tips"ui.errorVerbositystring Error display: low (hide recoverable) or full "low"
UI Elements
Setting Type Description Default ui.hideTipsboolean Hide helpful tips falseui.showShortcutsHintboolean Show ”? for shortcuts” hint trueui.hideContextSummaryboolean Hide GEMINI.md/MCP context summary falseui.showHomeDirectoryWarningboolean Warn when running in home directory trueui.showCompatibilityWarningsboolean Show terminal/OS compatibility warnings true
Setting Type Description Default ui.footer.hideCWDboolean Hide current working directory path falseui.footer.hideSandboxStatusboolean Hide sandbox status indicator falseui.footer.hideModelInfoboolean Hide model name and context usage falseui.footer.hideContextPercentageboolean Hide context window percentage true
Accessibility
Setting Type Description Default ui.accessibility.screenReaderboolean Plain-text output for screen readers false
IDE
Setting Type Description Default ide.enabledboolean Enable IDE integration mode false
Billing
Setting Type Description Default billing.overageStrategystring Quota exhaustion handling: ask, always, never "ask"
Model
Setting Type Description Default model.namestring Gemini model for conversations undefinedmodel.maxSessionTurnsnumber Max user/model/tool turns (-1 = unlimited) -1model.compressionThresholdnumber Context usage fraction to trigger compression (0.0-1.0) 0.5model.disableLoopDetectionboolean Disable infinite loop detection falsemodel.skipNextSpeakerCheckboolean Skip next speaker check true
Set model.maxSessionTurns to limit context window size and control costs. See Session Management for details.
Context
Memory Discovery
Setting Type Description Default context.discoveryMaxDirsnumber Max directories to search for GEMINI.md 200context.loadMemoryFromIncludeDirectoriesboolean Scan include directories for GEMINI.md false
File Filtering
Setting Type Description Default context.fileFiltering.respectGitIgnoreboolean Respect .gitignore files truecontext.fileFiltering.respectGeminiIgnoreboolean Respect .geminiignore files truecontext.fileFiltering.enableRecursiveFileSearchboolean Recursive search for @ references truecontext.fileFiltering.enableFuzzySearchboolean Fuzzy search when searching files truecontext.fileFiltering.customIgnoreFilePathsarray Additional ignore files (highest precedence) []
Shell
Setting Type Description Default tools.shell.enableInteractiveShellboolean Use node-pty for interactive shell truetools.shell.showColorboolean Show color in shell output false
Setting Type Description Default tools.useRipgrepboolean Use ripgrep for faster content search truetools.truncateToolOutputThresholdnumber Max characters before truncation (0 = disabled) 40000tools.disableLLMCorrectionboolean Disable LLM error correction for edit tools true
See Sandboxing for sandbox-specific configuration.
Security
Setting Type Description Default security.disableYoloModeboolean Disable YOLO mode even if flagged falsesecurity.enablePermanentToolApprovalboolean Enable “Allow for all future sessions” option falsesecurity.blockGitExtensionsboolean Block installing/loading extensions from Git falsesecurity.allowedExtensionsarray Regex patterns for allowed extensions (overrides blockGitExtensions) []security.folderTrust.enabledboolean Enable folder trust tracking truesecurity.environmentVariableRedaction.enabledboolean Redact environment variables with secrets falsesecurity.enableConsecaboolean Enable context-aware security checker (LLM-based) false
Advanced
Setting Type Description Default advanced.autoConfigureMemoryboolean Auto-configure Node.js memory limits false
Experimental
Experimental features may change or be removed in future versions.
Setting Type Description Default experimental.toolOutputMasking.enabledboolean Enable tool output masking to save tokens trueexperimental.useOSC52Pasteboolean Use OSC 52 for pasting (remote sessions) falseexperimental.useOSC52Copyboolean Use OSC 52 for copying (remote sessions) falseexperimental.planboolean Enable Plan Mode and planning tools falseexperimental.modelSteeringboolean Enable user hints to guide model falseexperimental.directWebFetchboolean Web fetch without LLM summarization falseexperimental.gemmaModelRouter.enabledboolean Enable Gemma Model Router (requires local endpoint) false
Skills
Setting Type Description Default skills.enabledboolean Enable Agent Skills true
Hooks
Setting Type Description Default hooksConfig.enabledboolean Master toggle for hooks system truehooksConfig.notificationsboolean Show visual indicators when hooks execute true
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:
Global: ~/.gemini/GEMINI.md
Project ancestors: All parent directories up to project root
Current directory: ./GEMINI.md
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 < tex t > # 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