Gemini CLI reference - Settings
Gemini CLI settings.json settings
Gemini CLI documents 23 settings keys, including general.defaultApprovalMode, general.vimMode and general.checkpointing.enabled. These keys go in Gemini CLI's settings.json and the other config files it reads. Each row gives the docs' description, accepted values and an example where one is documented.
Last verified 2 official pagesFull Gemini CLI reference
| Key | Description |
|---|---|
general.defaultApprovalMode | Default approval mode for tool execution. YOLO can only be enabled via the command line. enum; default: "default"; values: "default", "auto_edit", "plan" Docs: general.defaultApprovalMode |
general.vimMode | Enable Vim keybindings. boolean; default: false Docs: general.vimMode |
general.checkpointing.enabled | Enable session checkpointing for recovery. boolean; default: false; restart required Docs: general.checkpointing.enabled |
general.plan.enabled | Enable Plan Mode for read-only safety during planning. boolean; default: true; restart required Docs: general.plan.enabled |
general.sessionRetention.maxAge | Automatically delete chats older than this period (e.g. "30d", "7d", "24h", "1w"). string; default: "30d" Docs: general.sessionRetention.maxAge |
ui.theme | The color theme for the UI. string; default: undefined Docs: ui.theme |
model.name | The Gemini model to use for conversations. string; default: undefined Docs: model.name |
model.maxSessionTurns | Maximum user/model/tool turns to keep in a session; -1 means unlimited. number; default: -1 Docs: model.maxSessionTurns |
model.compressionThreshold | Fraction of context usage at which to trigger context compression. number; default: 0.5; restart required Docs: model.compressionThreshold |
context.fileName | Name of the context file or files to load into memory. string | string[]; default: undefined Docs: context.fileName |
tools.sandbox | Legacy full-process sandbox: boolean, profile path, or command (e.g. "docker", "podman", "lxc", "windows-native"). string; default: undefined; restart required Docs: tools.sandbox |
tools.allowed | Tool names that bypass the confirmation dialog. array; default: undefined; restart required Docs: tools.allowed |
tools.exclude | Tool names to exclude from discovery. array; default: undefined; restart required Docs: tools.exclude |
security.folderTrust.enabled | Whether Folder trust is enabled. boolean; default: true; restart required Docs: security.folderTrust.enabled |
security.disableYoloMode | Disable YOLO mode, even if enabled by a flag. boolean; default: false; restart required Docs: security.disableYoloMode |
advanced.excludedEnvVars | Environment variables to exclude from project context. array; default: ["DEBUG", "DEBUG_MODE"] Docs: advanced.excludedEnvVars |
experimental.worktrees | Enable automated Git worktree management for parallel work. boolean; default: false; restart required Docs: experimental.worktrees |
skills.enabled | Enable Agent Skills. boolean; default: true; restart required Docs: skills.enabled |
hooksConfig.enabled | Canonical toggle for the hooks system; when disabled, no hooks run. boolean; default: true; restart required Docs: hooksConfig.enabled |
hooks.BeforeTool | Hooks that run before tool execution. Other events: AfterTool, BeforeAgent, AfterAgent, Notification, SessionStart, SessionEnd, PreCompress, BeforeModel, AfterModel, BeforeToolSelection. array; default: [] Docs: hooks.BeforeTool |
mcpServers.<SERVER_NAME> | Named MCP server config. Fields: command, args, env, cwd, url (SSE), httpUrl, headers, timeout, trust, description, includeTools, excludeTools. object; precedence httpUrl > url > command Docs: mcpServers.<SERVER_NAME> |
telemetry.* | Telemetry settings: enabled, traces, target, otlpEndpoint, otlpProtocol, otlpHeaders, logPrompts, outfile, useCollector, useCliAuth. target: local|gcp (default local); otlpEndpoint default http://localhost:4317; otlpProtocol grpc|http (default grpc) Docs: telemetry.* |
admin.secureModeEnabled | If true, disallows YOLO mode and "Always allow" options. boolean; default: false Docs: admin.secureModeEnabled |
The rest of the Gemini CLI reference
FAQ
How many settings keys does Gemini CLI have?
The official Gemini CLI docs list 23 settings keys, including general.defaultApprovalMode, general.vimMode and general.checkpointing.enabled. All of them are in the table above, in the docs' order.
What does general.defaultApprovalMode do in Gemini CLI?
Default approval mode for tool execution. YOLO can only be enabled via the command line. Values: enum; default: "default"; values: "default", "auto_edit", "plan".
Where are Gemini CLI settings keys documented?
On 2 official docs pages at github.com, last read on October 17, 2026. Every row in the table links the exact section it came from.
More on Gemini CLI
Sources
Last verified . Names and examples are copied verbatim from the 2 official pages below, and every row above links the exact section it came from.
Newsletter
Know when your tools change
One email per week. New coding agent releases, the flags and commands they add, and what they mean for how you work.