@dgxo/mashadevcli 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +393 -0
  3. package/bundle/builtin/skill-creator/SKILL.md +382 -0
  4. package/bundle/builtin/skill-creator/scripts/init_skill.cjs +239 -0
  5. package/bundle/builtin/skill-creator/scripts/package_skill.cjs +131 -0
  6. package/bundle/builtin/skill-creator/scripts/validate_skill.cjs +131 -0
  7. package/bundle/docs/CONTRIBUTING.md +1 -0
  8. package/bundle/docs/admin/enterprise-controls.md +115 -0
  9. package/bundle/docs/assets/connected_devtools.png +0 -0
  10. package/bundle/docs/assets/gemini-screenshot.png +0 -0
  11. package/bundle/docs/assets/monitoring-dashboard-logs.png +0 -0
  12. package/bundle/docs/assets/monitoring-dashboard-metrics.png +0 -0
  13. package/bundle/docs/assets/monitoring-dashboard-overview.png +0 -0
  14. package/bundle/docs/assets/release_patch.png +0 -0
  15. package/bundle/docs/assets/theme-ansi-light.png +0 -0
  16. package/bundle/docs/assets/theme-ansi.png +0 -0
  17. package/bundle/docs/assets/theme-atom-one.png +0 -0
  18. package/bundle/docs/assets/theme-ayu-light.png +0 -0
  19. package/bundle/docs/assets/theme-ayu.png +0 -0
  20. package/bundle/docs/assets/theme-custom.png +0 -0
  21. package/bundle/docs/assets/theme-default-light.png +0 -0
  22. package/bundle/docs/assets/theme-default.png +0 -0
  23. package/bundle/docs/assets/theme-dracula.png +0 -0
  24. package/bundle/docs/assets/theme-github-light.png +0 -0
  25. package/bundle/docs/assets/theme-github.png +0 -0
  26. package/bundle/docs/assets/theme-google-light.png +0 -0
  27. package/bundle/docs/assets/theme-xcode-light.png +0 -0
  28. package/bundle/docs/changelogs/index.md +867 -0
  29. package/bundle/docs/changelogs/latest.md +208 -0
  30. package/bundle/docs/changelogs/preview.md +187 -0
  31. package/bundle/docs/cli/checkpointing.md +93 -0
  32. package/bundle/docs/cli/cli-reference.md +115 -0
  33. package/bundle/docs/cli/creating-skills.md +80 -0
  34. package/bundle/docs/cli/custom-commands.md +327 -0
  35. package/bundle/docs/cli/enterprise.md +604 -0
  36. package/bundle/docs/cli/gemini-ignore.md +71 -0
  37. package/bundle/docs/cli/gemini-md.md +116 -0
  38. package/bundle/docs/cli/generation-settings.md +210 -0
  39. package/bundle/docs/cli/headless.md +50 -0
  40. package/bundle/docs/cli/model-routing.md +42 -0
  41. package/bundle/docs/cli/model.md +53 -0
  42. package/bundle/docs/cli/plan-mode.md +375 -0
  43. package/bundle/docs/cli/rewind.md +51 -0
  44. package/bundle/docs/cli/sandbox.md +257 -0
  45. package/bundle/docs/cli/session-management.md +184 -0
  46. package/bundle/docs/cli/settings.md +165 -0
  47. package/bundle/docs/cli/skills.md +134 -0
  48. package/bundle/docs/cli/system-prompt.md +125 -0
  49. package/bundle/docs/cli/telemetry.md +922 -0
  50. package/bundle/docs/cli/themes.md +269 -0
  51. package/bundle/docs/cli/token-caching.md +20 -0
  52. package/bundle/docs/cli/trusted-folders.md +126 -0
  53. package/bundle/docs/cli/tutorials/automation.md +283 -0
  54. package/bundle/docs/cli/tutorials/file-management.md +142 -0
  55. package/bundle/docs/cli/tutorials/mcp-setup.md +113 -0
  56. package/bundle/docs/cli/tutorials/memory-management.md +126 -0
  57. package/bundle/docs/cli/tutorials/session-management.md +105 -0
  58. package/bundle/docs/cli/tutorials/shell-commands.md +107 -0
  59. package/bundle/docs/cli/tutorials/skills-getting-started.md +110 -0
  60. package/bundle/docs/cli/tutorials/task-planning.md +93 -0
  61. package/bundle/docs/cli/tutorials/web-tools.md +78 -0
  62. package/bundle/docs/core/index.md +107 -0
  63. package/bundle/docs/core/remote-agents.md +84 -0
  64. package/bundle/docs/core/subagents.md +307 -0
  65. package/bundle/docs/examples/proxy-script.md +83 -0
  66. package/bundle/docs/extensions/best-practices.md +188 -0
  67. package/bundle/docs/extensions/index.md +61 -0
  68. package/bundle/docs/extensions/reference.md +333 -0
  69. package/bundle/docs/extensions/releasing.md +154 -0
  70. package/bundle/docs/extensions/writing-extensions.md +308 -0
  71. package/bundle/docs/get-started/authentication.md +402 -0
  72. package/bundle/docs/get-started/examples.md +139 -0
  73. package/bundle/docs/get-started/gemini-3.md +115 -0
  74. package/bundle/docs/get-started/index.md +82 -0
  75. package/bundle/docs/get-started/installation.md +174 -0
  76. package/bundle/docs/hooks/best-practices.md +709 -0
  77. package/bundle/docs/hooks/index.md +164 -0
  78. package/bundle/docs/hooks/reference.md +330 -0
  79. package/bundle/docs/hooks/writing-hooks.md +474 -0
  80. package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
  81. package/bundle/docs/ide-integration/index.md +224 -0
  82. package/bundle/docs/index.md +141 -0
  83. package/bundle/docs/integration-tests.md +211 -0
  84. package/bundle/docs/issue-and-pr-automation.md +172 -0
  85. package/bundle/docs/local-development.md +134 -0
  86. package/bundle/docs/mermaid/context.mmd +103 -0
  87. package/bundle/docs/mermaid/render-path.mmd +64 -0
  88. package/bundle/docs/npm.md +62 -0
  89. package/bundle/docs/redirects.json +20 -0
  90. package/bundle/docs/reference/commands.md +526 -0
  91. package/bundle/docs/reference/configuration.md +1786 -0
  92. package/bundle/docs/reference/keyboard-shortcuts.md +164 -0
  93. package/bundle/docs/reference/memport.md +246 -0
  94. package/bundle/docs/reference/policy-engine.md +364 -0
  95. package/bundle/docs/reference/tools.md +106 -0
  96. package/bundle/docs/release-confidence.md +164 -0
  97. package/bundle/docs/releases.md +540 -0
  98. package/bundle/docs/resources/faq.md +175 -0
  99. package/bundle/docs/resources/quota-and-pricing.md +165 -0
  100. package/bundle/docs/resources/tos-privacy.md +102 -0
  101. package/bundle/docs/resources/troubleshooting.md +176 -0
  102. package/bundle/docs/resources/uninstall.md +56 -0
  103. package/bundle/docs/sidebar.json +233 -0
  104. package/bundle/docs/tools/activate-skill.md +43 -0
  105. package/bundle/docs/tools/ask-user.md +95 -0
  106. package/bundle/docs/tools/file-system.md +129 -0
  107. package/bundle/docs/tools/internal-docs.md +46 -0
  108. package/bundle/docs/tools/mcp-server.md +1150 -0
  109. package/bundle/docs/tools/memory.md +35 -0
  110. package/bundle/docs/tools/planning.md +58 -0
  111. package/bundle/docs/tools/shell.md +216 -0
  112. package/bundle/docs/tools/todos.md +35 -0
  113. package/bundle/docs/tools/web-fetch.md +35 -0
  114. package/bundle/docs/tools/web-search.md +32 -0
  115. package/bundle/docs/update/update-guide.md +111 -0
  116. package/bundle/masha.js +563471 -0
  117. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/client/main.js +89 -0
  118. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.d.ts +7 -0
  119. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.js +9 -0
  120. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.js.map +1 -0
  121. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.d.ts +48 -0
  122. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.js +299 -0
  123. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.js.map +1 -0
  124. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.d.ts +36 -0
  125. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.js +7 -0
  126. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.js.map +1 -0
  127. package/bundle/node_modules/@dgxo/mashadevcli-devtools/package.json +32 -0
  128. package/bundle/policies/conseca.toml +6 -0
  129. package/bundle/policies/discovered.toml +8 -0
  130. package/bundle/policies/plan.toml +109 -0
  131. package/bundle/policies/read-only.toml +53 -0
  132. package/bundle/policies/write.toml +80 -0
  133. package/bundle/policies/yolo.toml +54 -0
  134. package/bundle/sandbox-macos-permissive-open.sb +27 -0
  135. package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
  136. package/bundle/sandbox-macos-restrictive-open.sb +96 -0
  137. package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
  138. package/bundle/sandbox-macos-strict-open.sb +131 -0
  139. package/bundle/sandbox-macos-strict-proxied.sb +133 -0
  140. package/package.json +169 -0
@@ -0,0 +1,1786 @@
1
+ # Gemini CLI configuration
2
+
3
+ Gemini CLI offers several ways to configure its behavior, including environment
4
+ variables, command-line arguments, and settings files. This document outlines
5
+ the different configuration methods and available settings.
6
+
7
+ ## Configuration layers
8
+
9
+ Configuration is applied in the following order of precedence (lower numbers are
10
+ overridden by higher numbers):
11
+
12
+ 1. **Default values:** Hardcoded defaults within the application.
13
+ 2. **System defaults file:** System-wide default settings that can be
14
+ overridden by other settings files.
15
+ 3. **User settings file:** Global settings for the current user.
16
+ 4. **Project settings file:** Project-specific settings.
17
+ 5. **System settings file:** System-wide settings that override all other
18
+ settings files.
19
+ 6. **Environment variables:** System-wide or session-specific variables,
20
+ potentially loaded from `.env` files.
21
+ 7. **Command-line arguments:** Values passed when launching the CLI.
22
+
23
+ ## Settings files
24
+
25
+ Gemini CLI uses JSON settings files for persistent configuration. There are four
26
+ locations for these files:
27
+
28
+ > **Tip:** JSON-aware editors can use autocomplete and validation by pointing to
29
+ > the generated schema at `schemas/settings.schema.json` in this repository.
30
+ > When working outside the repo, reference the hosted schema at
31
+ > `https://raw.githubusercontent.com/DGameGT/mashadev-cli/main/schemas/settings.schema.json`.
32
+
33
+ - **System defaults file:**
34
+ - **Location:** `/etc/gemini-cli/system-defaults.json` (Linux),
35
+ `C:\ProgramData\gemini-cli\system-defaults.json` (Windows) or
36
+ `/Library/Application Support/GeminiCli/system-defaults.json` (macOS). The
37
+ path can be overridden using the `GEMINI_CLI_SYSTEM_DEFAULTS_PATH`
38
+ environment variable.
39
+ - **Scope:** Provides a base layer of system-wide default settings. These
40
+ settings have the lowest precedence and are intended to be overridden by
41
+ user, project, or system override settings.
42
+ - **User settings file:**
43
+ - **Location:** `~/.gemini/settings.json` (where `~` is your home directory).
44
+ - **Scope:** Applies to all Gemini CLI sessions for the current user. User
45
+ settings override system defaults.
46
+ - **Project settings file:**
47
+ - **Location:** `.gemini/settings.json` within your project's root directory.
48
+ - **Scope:** Applies only when running Gemini CLI from that specific project.
49
+ Project settings override user settings and system defaults.
50
+ - **System settings file:**
51
+ - **Location:** `/etc/gemini-cli/settings.json` (Linux),
52
+ `C:\ProgramData\gemini-cli\settings.json` (Windows) or
53
+ `/Library/Application Support/GeminiCli/settings.json` (macOS). The path can
54
+ be overridden using the `GEMINI_CLI_SYSTEM_SETTINGS_PATH` environment
55
+ variable.
56
+ - **Scope:** Applies to all Gemini CLI sessions on the system, for all users.
57
+ System settings act as overrides, taking precedence over all other settings
58
+ files. May be useful for system administrators at enterprises to have
59
+ controls over users' Gemini CLI setups.
60
+
61
+ **Note on environment variables in settings:** String values within your
62
+ `settings.json` and `gemini-extension.json` files can reference environment
63
+ variables using either `$VAR_NAME` or `${VAR_NAME}` syntax. These variables will
64
+ be automatically resolved when the settings are loaded. For example, if you have
65
+ an environment variable `MY_API_TOKEN`, you could use it in `settings.json` like
66
+ this: `"apiKey": "$MY_API_TOKEN"`. Additionally, each extension can have its own
67
+ `.env` file in its directory, which will be loaded automatically.
68
+
69
+ > **Note for Enterprise Users:** For guidance on deploying and managing Gemini
70
+ > CLI in a corporate environment, please see the
71
+ > [Enterprise Configuration](../cli/enterprise.md) documentation.
72
+
73
+ ### The `.gemini` directory in your project
74
+
75
+ In addition to a project settings file, a project's `.gemini` directory can
76
+ contain other project-specific files related to Gemini CLI's operation, such as:
77
+
78
+ - [Custom sandbox profiles](#sandboxing) (e.g.,
79
+ `.gemini/sandbox-macos-custom.sb`, `.gemini/sandbox.Dockerfile`).
80
+
81
+ ### Available settings in `settings.json`
82
+
83
+ Settings are organized into categories. All settings should be placed within
84
+ their corresponding top-level category object in your `settings.json` file.
85
+
86
+ <!-- SETTINGS-AUTOGEN:START -->
87
+
88
+ #### `policyPaths`
89
+
90
+ - **`policyPaths`** (array):
91
+ - **Description:** Additional policy files or directories to load.
92
+ - **Default:** `[]`
93
+ - **Requires restart:** Yes
94
+
95
+ #### `general`
96
+
97
+ - **`general.preferredEditor`** (string):
98
+ - **Description:** The preferred editor to open files in.
99
+ - **Default:** `undefined`
100
+
101
+ - **`general.vimMode`** (boolean):
102
+ - **Description:** Enable Vim keybindings
103
+ - **Default:** `false`
104
+
105
+ - **`general.defaultApprovalMode`** (enum):
106
+ - **Description:** The default approval mode for tool execution. 'default'
107
+ prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is
108
+ read-only mode. 'yolo' is not supported yet.
109
+ - **Default:** `"default"`
110
+ - **Values:** `"default"`, `"auto_edit"`, `"plan"`
111
+
112
+ - **`general.devtools`** (boolean):
113
+ - **Description:** Enable DevTools inspector on launch.
114
+ - **Default:** `false`
115
+
116
+ - **`general.enableAutoUpdate`** (boolean):
117
+ - **Description:** Enable automatic updates.
118
+ - **Default:** `true`
119
+
120
+ - **`general.enableAutoUpdateNotification`** (boolean):
121
+ - **Description:** Enable update notification prompts.
122
+ - **Default:** `true`
123
+
124
+ - **`general.enableNotifications`** (boolean):
125
+ - **Description:** Enable run-event notifications for action-required prompts
126
+ and session completion. Currently macOS only.
127
+ - **Default:** `false`
128
+
129
+ - **`general.checkpointing.enabled`** (boolean):
130
+ - **Description:** Enable session checkpointing for recovery
131
+ - **Default:** `false`
132
+ - **Requires restart:** Yes
133
+
134
+ - **`general.plan.directory`** (string):
135
+ - **Description:** The directory where planning artifacts are stored. If not
136
+ specified, defaults to the system temporary directory.
137
+ - **Default:** `undefined`
138
+ - **Requires restart:** Yes
139
+
140
+ - **`general.plan.modelRouting`** (boolean):
141
+ - **Description:** Automatically switch between Pro and Flash models based on
142
+ Plan Mode status. Uses Pro for the planning phase and Flash for the
143
+ implementation phase.
144
+ - **Default:** `true`
145
+
146
+ - **`general.retryFetchErrors`** (boolean):
147
+ - **Description:** Retry on "exception TypeError: fetch failed sending
148
+ request" errors.
149
+ - **Default:** `false`
150
+
151
+ - **`general.maxAttempts`** (number):
152
+ - **Description:** Maximum number of attempts for requests to the main chat
153
+ model. Cannot exceed 10.
154
+ - **Default:** `10`
155
+
156
+ - **`general.debugKeystrokeLogging`** (boolean):
157
+ - **Description:** Enable debug logging of keystrokes to the console.
158
+ - **Default:** `false`
159
+
160
+ - **`general.sessionRetention.enabled`** (boolean):
161
+ - **Description:** Enable automatic session cleanup
162
+ - **Default:** `true`
163
+
164
+ - **`general.sessionRetention.maxAge`** (string):
165
+ - **Description:** Automatically delete chats older than this time period
166
+ (e.g., "30d", "7d", "24h", "1w")
167
+ - **Default:** `"30d"`
168
+
169
+ - **`general.sessionRetention.maxCount`** (number):
170
+ - **Description:** Alternative: Maximum number of sessions to keep (most
171
+ recent)
172
+ - **Default:** `undefined`
173
+
174
+ - **`general.sessionRetention.minRetention`** (string):
175
+ - **Description:** Minimum retention period (safety limit, defaults to "1d")
176
+ - **Default:** `"1d"`
177
+
178
+ #### `output`
179
+
180
+ - **`output.format`** (enum):
181
+ - **Description:** The format of the CLI output. Can be `text` or `json`.
182
+ - **Default:** `"text"`
183
+ - **Values:** `"text"`, `"json"`
184
+
185
+ #### `ui`
186
+
187
+ - **`ui.theme`** (string):
188
+ - **Description:** The color theme for the UI. See the CLI themes guide for
189
+ available options.
190
+ - **Default:** `undefined`
191
+
192
+ - **`ui.autoThemeSwitching`** (boolean):
193
+ - **Description:** Automatically switch between default light and dark themes
194
+ based on terminal background color.
195
+ - **Default:** `true`
196
+
197
+ - **`ui.terminalBackgroundPollingInterval`** (number):
198
+ - **Description:** Interval in seconds to poll the terminal background color.
199
+ - **Default:** `60`
200
+
201
+ - **`ui.customThemes`** (object):
202
+ - **Description:** Custom theme definitions.
203
+ - **Default:** `{}`
204
+
205
+ - **`ui.hideWindowTitle`** (boolean):
206
+ - **Description:** Hide the window title bar
207
+ - **Default:** `false`
208
+ - **Requires restart:** Yes
209
+
210
+ - **`ui.inlineThinkingMode`** (enum):
211
+ - **Description:** Display model thinking inline: off or full.
212
+ - **Default:** `"off"`
213
+ - **Values:** `"off"`, `"full"`
214
+
215
+ - **`ui.showStatusInTitle`** (boolean):
216
+ - **Description:** Show Gemini CLI model thoughts in the terminal window title
217
+ during the working phase
218
+ - **Default:** `false`
219
+
220
+ - **`ui.dynamicWindowTitle`** (boolean):
221
+ - **Description:** Update the terminal window title with current status icons
222
+ (Ready: ◇, Action Required: ✋, Working: ✦)
223
+ - **Default:** `true`
224
+
225
+ - **`ui.showHomeDirectoryWarning`** (boolean):
226
+ - **Description:** Show a warning when running Gemini CLI in the home
227
+ directory.
228
+ - **Default:** `true`
229
+ - **Requires restart:** Yes
230
+
231
+ - **`ui.showCompatibilityWarnings`** (boolean):
232
+ - **Description:** Show warnings about terminal or OS compatibility issues.
233
+ - **Default:** `true`
234
+ - **Requires restart:** Yes
235
+
236
+ - **`ui.hideTips`** (boolean):
237
+ - **Description:** Hide helpful tips in the UI
238
+ - **Default:** `false`
239
+
240
+ - **`ui.showShortcutsHint`** (boolean):
241
+ - **Description:** Show the "? for shortcuts" hint above the input.
242
+ - **Default:** `true`
243
+
244
+ - **`ui.hideBanner`** (boolean):
245
+ - **Description:** Hide the application banner
246
+ - **Default:** `false`
247
+
248
+ - **`ui.hideContextSummary`** (boolean):
249
+ - **Description:** Hide the context summary (GEMINI.md, MCP servers) above the
250
+ input.
251
+ - **Default:** `false`
252
+
253
+ - **`ui.footer.items`** (array):
254
+ - **Description:** List of item IDs to display in the footer. Rendered in
255
+ order
256
+ - **Default:** `undefined`
257
+
258
+ - **`ui.footer.showLabels`** (boolean):
259
+ - **Description:** Display a second line above the footer items with
260
+ descriptive headers (e.g., /model).
261
+ - **Default:** `true`
262
+
263
+ - **`ui.footer.hideCWD`** (boolean):
264
+ - **Description:** Hide the current working directory in the footer.
265
+ - **Default:** `false`
266
+
267
+ - **`ui.footer.hideSandboxStatus`** (boolean):
268
+ - **Description:** Hide the sandbox status indicator in the footer.
269
+ - **Default:** `false`
270
+
271
+ - **`ui.footer.hideModelInfo`** (boolean):
272
+ - **Description:** Hide the model name and context usage in the footer.
273
+ - **Default:** `false`
274
+
275
+ - **`ui.footer.hideContextPercentage`** (boolean):
276
+ - **Description:** Hides the context window usage percentage.
277
+ - **Default:** `true`
278
+
279
+ - **`ui.hideFooter`** (boolean):
280
+ - **Description:** Hide the footer from the UI
281
+ - **Default:** `false`
282
+
283
+ - **`ui.showMemoryUsage`** (boolean):
284
+ - **Description:** Display memory usage information in the UI
285
+ - **Default:** `false`
286
+
287
+ - **`ui.showLineNumbers`** (boolean):
288
+ - **Description:** Show line numbers in the chat.
289
+ - **Default:** `true`
290
+
291
+ - **`ui.showCitations`** (boolean):
292
+ - **Description:** Show citations for generated text in the chat.
293
+ - **Default:** `false`
294
+
295
+ - **`ui.showModelInfoInChat`** (boolean):
296
+ - **Description:** Show the model name in the chat for each model turn.
297
+ - **Default:** `false`
298
+
299
+ - **`ui.showUserIdentity`** (boolean):
300
+ - **Description:** Show the logged-in user's identity (e.g. email) in the UI.
301
+ - **Default:** `true`
302
+
303
+ - **`ui.useAlternateBuffer`** (boolean):
304
+ - **Description:** Use an alternate screen buffer for the UI, preserving shell
305
+ history.
306
+ - **Default:** `false`
307
+ - **Requires restart:** Yes
308
+
309
+ - **`ui.useBackgroundColor`** (boolean):
310
+ - **Description:** Whether to use background colors in the UI.
311
+ - **Default:** `true`
312
+
313
+ - **`ui.incrementalRendering`** (boolean):
314
+ - **Description:** Enable incremental rendering for the UI. This option will
315
+ reduce flickering but may cause rendering artifacts. Only supported when
316
+ useAlternateBuffer is enabled.
317
+ - **Default:** `true`
318
+ - **Requires restart:** Yes
319
+
320
+ - **`ui.showSpinner`** (boolean):
321
+ - **Description:** Show the spinner during operations.
322
+ - **Default:** `true`
323
+
324
+ - **`ui.loadingPhrases`** (enum):
325
+ - **Description:** What to show while the model is working: tips, witty
326
+ comments, both, or nothing.
327
+ - **Default:** `"tips"`
328
+ - **Values:** `"tips"`, `"witty"`, `"all"`, `"off"`
329
+
330
+ - **`ui.errorVerbosity`** (enum):
331
+ - **Description:** Controls whether recoverable errors are hidden (low) or
332
+ fully shown (full).
333
+ - **Default:** `"low"`
334
+ - **Values:** `"low"`, `"full"`
335
+
336
+ - **`ui.customWittyPhrases`** (array):
337
+ - **Description:** Custom witty phrases to display during loading. When
338
+ provided, the CLI cycles through these instead of the defaults.
339
+ - **Default:** `[]`
340
+
341
+ - **`ui.accessibility.enableLoadingPhrases`** (boolean):
342
+ - **Description:** @deprecated Use ui.loadingPhrases instead. Enable loading
343
+ phrases during operations.
344
+ - **Default:** `true`
345
+ - **Requires restart:** Yes
346
+
347
+ - **`ui.accessibility.screenReader`** (boolean):
348
+ - **Description:** Render output in plain-text to be more screen reader
349
+ accessible
350
+ - **Default:** `false`
351
+ - **Requires restart:** Yes
352
+
353
+ #### `ide`
354
+
355
+ - **`ide.enabled`** (boolean):
356
+ - **Description:** Enable IDE integration mode.
357
+ - **Default:** `false`
358
+ - **Requires restart:** Yes
359
+
360
+ - **`ide.hasSeenNudge`** (boolean):
361
+ - **Description:** Whether the user has seen the IDE integration nudge.
362
+ - **Default:** `false`
363
+
364
+ #### `privacy`
365
+
366
+ - **`privacy.usageStatisticsEnabled`** (boolean):
367
+ - **Description:** Enable collection of usage statistics
368
+ - **Default:** `true`
369
+ - **Requires restart:** Yes
370
+
371
+ #### `billing`
372
+
373
+ - **`billing.overageStrategy`** (enum):
374
+ - **Description:** How to handle quota exhaustion when AI credits are
375
+ available. 'ask' prompts each time, 'always' automatically uses credits,
376
+ 'never' disables credit usage.
377
+ - **Default:** `"ask"`
378
+ - **Values:** `"ask"`, `"always"`, `"never"`
379
+
380
+ #### `model`
381
+
382
+ - **`model.name`** (string):
383
+ - **Description:** The Gemini model to use for conversations.
384
+ - **Default:** `undefined`
385
+
386
+ - **`model.maxSessionTurns`** (number):
387
+ - **Description:** Maximum number of user/model/tool turns to keep in a
388
+ session. -1 means unlimited.
389
+ - **Default:** `-1`
390
+
391
+ - **`model.summarizeToolOutput`** (object):
392
+ - **Description:** Enables or disables summarization of tool output. Configure
393
+ per-tool token budgets (for example {"run_shell_command": {"tokenBudget":
394
+ 2000}}). Currently only the run_shell_command tool supports summarization.
395
+ - **Default:** `undefined`
396
+
397
+ - **`model.compressionThreshold`** (number):
398
+ - **Description:** The fraction of context usage at which to trigger context
399
+ compression (e.g. 0.2, 0.3).
400
+ - **Default:** `0.5`
401
+ - **Requires restart:** Yes
402
+
403
+ - **`model.disableLoopDetection`** (boolean):
404
+ - **Description:** Disable automatic detection and prevention of infinite
405
+ loops.
406
+ - **Default:** `false`
407
+ - **Requires restart:** Yes
408
+
409
+ - **`model.skipNextSpeakerCheck`** (boolean):
410
+ - **Description:** Skip the next speaker check.
411
+ - **Default:** `true`
412
+
413
+ #### `modelConfigs`
414
+
415
+ - **`modelConfigs.aliases`** (object):
416
+ - **Description:** Named presets for model configs. Can be used in place of a
417
+ model name and can inherit from other aliases using an `extends` property.
418
+ - **Default:**
419
+
420
+ ```json
421
+ {
422
+ "base": {
423
+ "modelConfig": {
424
+ "generateContentConfig": {
425
+ "temperature": 0,
426
+ "topP": 1
427
+ }
428
+ }
429
+ },
430
+ "chat-base": {
431
+ "extends": "base",
432
+ "modelConfig": {
433
+ "generateContentConfig": {
434
+ "thinkingConfig": {
435
+ "includeThoughts": true
436
+ },
437
+ "temperature": 1,
438
+ "topP": 0.95,
439
+ "topK": 64
440
+ }
441
+ }
442
+ },
443
+ "chat-base-2.5": {
444
+ "extends": "chat-base",
445
+ "modelConfig": {
446
+ "generateContentConfig": {
447
+ "thinkingConfig": {
448
+ "thinkingBudget": 8192
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "chat-base-3": {
454
+ "extends": "chat-base",
455
+ "modelConfig": {
456
+ "generateContentConfig": {
457
+ "thinkingConfig": {
458
+ "thinkingLevel": "HIGH"
459
+ }
460
+ }
461
+ }
462
+ },
463
+ "gemini-3-pro-preview": {
464
+ "extends": "chat-base-3",
465
+ "modelConfig": {
466
+ "model": "gemini-3-pro-preview"
467
+ }
468
+ },
469
+ "gemini-3-flash-preview": {
470
+ "extends": "chat-base-3",
471
+ "modelConfig": {
472
+ "model": "gemini-3-flash-preview"
473
+ }
474
+ },
475
+ "gemini-2.5-pro": {
476
+ "extends": "chat-base-2.5",
477
+ "modelConfig": {
478
+ "model": "gemini-2.5-pro"
479
+ }
480
+ },
481
+ "gemini-2.5-flash": {
482
+ "extends": "chat-base-2.5",
483
+ "modelConfig": {
484
+ "model": "gemini-2.5-flash"
485
+ }
486
+ },
487
+ "gemini-2.5-flash-lite": {
488
+ "extends": "chat-base-2.5",
489
+ "modelConfig": {
490
+ "model": "gemini-2.5-flash-lite"
491
+ }
492
+ },
493
+ "gemini-2.5-flash-base": {
494
+ "extends": "base",
495
+ "modelConfig": {
496
+ "model": "gemini-2.5-flash"
497
+ }
498
+ },
499
+ "gemini-3-flash-base": {
500
+ "extends": "base",
501
+ "modelConfig": {
502
+ "model": "gemini-3-flash-preview"
503
+ }
504
+ },
505
+ "classifier": {
506
+ "extends": "base",
507
+ "modelConfig": {
508
+ "model": "gemini-2.5-flash-lite",
509
+ "generateContentConfig": {
510
+ "maxOutputTokens": 1024,
511
+ "thinkingConfig": {
512
+ "thinkingBudget": 512
513
+ }
514
+ }
515
+ }
516
+ },
517
+ "prompt-completion": {
518
+ "extends": "base",
519
+ "modelConfig": {
520
+ "model": "gemini-2.5-flash-lite",
521
+ "generateContentConfig": {
522
+ "temperature": 0.3,
523
+ "maxOutputTokens": 16000,
524
+ "thinkingConfig": {
525
+ "thinkingBudget": 0
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "fast-ack-helper": {
531
+ "extends": "base",
532
+ "modelConfig": {
533
+ "model": "gemini-2.5-flash-lite",
534
+ "generateContentConfig": {
535
+ "temperature": 0.2,
536
+ "maxOutputTokens": 120,
537
+ "thinkingConfig": {
538
+ "thinkingBudget": 0
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "edit-corrector": {
544
+ "extends": "base",
545
+ "modelConfig": {
546
+ "model": "gemini-2.5-flash-lite",
547
+ "generateContentConfig": {
548
+ "thinkingConfig": {
549
+ "thinkingBudget": 0
550
+ }
551
+ }
552
+ }
553
+ },
554
+ "summarizer-default": {
555
+ "extends": "base",
556
+ "modelConfig": {
557
+ "model": "gemini-2.5-flash-lite",
558
+ "generateContentConfig": {
559
+ "maxOutputTokens": 2000
560
+ }
561
+ }
562
+ },
563
+ "summarizer-shell": {
564
+ "extends": "base",
565
+ "modelConfig": {
566
+ "model": "gemini-2.5-flash-lite",
567
+ "generateContentConfig": {
568
+ "maxOutputTokens": 2000
569
+ }
570
+ }
571
+ },
572
+ "web-search": {
573
+ "extends": "gemini-3-flash-base",
574
+ "modelConfig": {
575
+ "generateContentConfig": {
576
+ "tools": [
577
+ {
578
+ "googleSearch": {}
579
+ }
580
+ ]
581
+ }
582
+ }
583
+ },
584
+ "web-fetch": {
585
+ "extends": "gemini-3-flash-base",
586
+ "modelConfig": {
587
+ "generateContentConfig": {
588
+ "tools": [
589
+ {
590
+ "urlContext": {}
591
+ }
592
+ ]
593
+ }
594
+ }
595
+ },
596
+ "web-fetch-fallback": {
597
+ "extends": "gemini-3-flash-base",
598
+ "modelConfig": {}
599
+ },
600
+ "loop-detection": {
601
+ "extends": "gemini-3-flash-base",
602
+ "modelConfig": {}
603
+ },
604
+ "loop-detection-double-check": {
605
+ "extends": "base",
606
+ "modelConfig": {
607
+ "model": "gemini-3-pro-preview"
608
+ }
609
+ },
610
+ "llm-edit-fixer": {
611
+ "extends": "gemini-3-flash-base",
612
+ "modelConfig": {}
613
+ },
614
+ "next-speaker-checker": {
615
+ "extends": "gemini-3-flash-base",
616
+ "modelConfig": {}
617
+ },
618
+ "chat-compression-3-pro": {
619
+ "modelConfig": {
620
+ "model": "gemini-3-pro-preview"
621
+ }
622
+ },
623
+ "chat-compression-3-flash": {
624
+ "modelConfig": {
625
+ "model": "gemini-3-flash-preview"
626
+ }
627
+ },
628
+ "chat-compression-2.5-pro": {
629
+ "modelConfig": {
630
+ "model": "gemini-2.5-pro"
631
+ }
632
+ },
633
+ "chat-compression-2.5-flash": {
634
+ "modelConfig": {
635
+ "model": "gemini-2.5-flash"
636
+ }
637
+ },
638
+ "chat-compression-2.5-flash-lite": {
639
+ "modelConfig": {
640
+ "model": "gemini-2.5-flash-lite"
641
+ }
642
+ },
643
+ "chat-compression-default": {
644
+ "modelConfig": {
645
+ "model": "gemini-3-pro-preview"
646
+ }
647
+ }
648
+ }
649
+ ```
650
+
651
+ - **`modelConfigs.customAliases`** (object):
652
+ - **Description:** Custom named presets for model configs. These are merged
653
+ with (and override) the built-in aliases.
654
+ - **Default:** `{}`
655
+
656
+ - **`modelConfigs.customOverrides`** (array):
657
+ - **Description:** Custom model config overrides. These are merged with (and
658
+ added to) the built-in overrides.
659
+ - **Default:** `[]`
660
+
661
+ - **`modelConfigs.overrides`** (array):
662
+ - **Description:** Apply specific configuration overrides based on matches,
663
+ with a primary key of model (or alias). The most specific match will be
664
+ used.
665
+ - **Default:** `[]`
666
+
667
+ #### `agents`
668
+
669
+ - **`agents.overrides`** (object):
670
+ - **Description:** Override settings for specific agents, e.g. to disable the
671
+ agent, set a custom model config, or run config.
672
+ - **Default:** `{}`
673
+ - **Requires restart:** Yes
674
+
675
+ - **`agents.browser.sessionMode`** (enum):
676
+ - **Description:** Session mode: 'persistent', 'isolated', or 'existing'.
677
+ - **Default:** `"persistent"`
678
+ - **Values:** `"persistent"`, `"isolated"`, `"existing"`
679
+ - **Requires restart:** Yes
680
+
681
+ - **`agents.browser.headless`** (boolean):
682
+ - **Description:** Run browser in headless mode.
683
+ - **Default:** `false`
684
+ - **Requires restart:** Yes
685
+
686
+ - **`agents.browser.profilePath`** (string):
687
+ - **Description:** Path to browser profile directory for session persistence.
688
+ - **Default:** `undefined`
689
+ - **Requires restart:** Yes
690
+
691
+ - **`agents.browser.visualModel`** (string):
692
+ - **Description:** Model override for the visual agent.
693
+ - **Default:** `undefined`
694
+ - **Requires restart:** Yes
695
+
696
+ #### `context`
697
+
698
+ - **`context.fileName`** (string | string[]):
699
+ - **Description:** The name of the context file or files to load into memory.
700
+ Accepts either a single string or an array of strings.
701
+ - **Default:** `undefined`
702
+
703
+ - **`context.importFormat`** (string):
704
+ - **Description:** The format to use when importing memory.
705
+ - **Default:** `undefined`
706
+
707
+ - **`context.includeDirectoryTree`** (boolean):
708
+ - **Description:** Whether to include the directory tree of the current
709
+ working directory in the initial request to the model.
710
+ - **Default:** `true`
711
+
712
+ - **`context.discoveryMaxDirs`** (number):
713
+ - **Description:** Maximum number of directories to search for memory.
714
+ - **Default:** `200`
715
+
716
+ - **`context.includeDirectories`** (array):
717
+ - **Description:** Additional directories to include in the workspace context.
718
+ Missing directories will be skipped with a warning.
719
+ - **Default:** `[]`
720
+
721
+ - **`context.loadMemoryFromIncludeDirectories`** (boolean):
722
+ - **Description:** Controls how /memory refresh loads GEMINI.md files. When
723
+ true, include directories are scanned; when false, only the current
724
+ directory is used.
725
+ - **Default:** `false`
726
+
727
+ - **`context.fileFiltering.respectGitIgnore`** (boolean):
728
+ - **Description:** Respect .gitignore files when searching.
729
+ - **Default:** `true`
730
+ - **Requires restart:** Yes
731
+
732
+ - **`context.fileFiltering.respectGeminiIgnore`** (boolean):
733
+ - **Description:** Respect .geminiignore files when searching.
734
+ - **Default:** `true`
735
+ - **Requires restart:** Yes
736
+
737
+ - **`context.fileFiltering.enableRecursiveFileSearch`** (boolean):
738
+ - **Description:** Enable recursive file search functionality when completing
739
+ @ references in the prompt.
740
+ - **Default:** `true`
741
+ - **Requires restart:** Yes
742
+
743
+ - **`context.fileFiltering.enableFuzzySearch`** (boolean):
744
+ - **Description:** Enable fuzzy search when searching for files.
745
+ - **Default:** `true`
746
+ - **Requires restart:** Yes
747
+
748
+ - **`context.fileFiltering.customIgnoreFilePaths`** (array):
749
+ - **Description:** Additional ignore file paths to respect. These files take
750
+ precedence over .geminiignore and .gitignore. Files earlier in the array
751
+ take precedence over files later in the array, e.g. the first file takes
752
+ precedence over the second one.
753
+ - **Default:** `[]`
754
+ - **Requires restart:** Yes
755
+
756
+ #### `tools`
757
+
758
+ - **`tools.sandbox`** (boolean | string):
759
+ - **Description:** Sandbox execution environment. Set to a boolean to enable
760
+ or disable the sandbox, provide a string path to a sandbox profile, or
761
+ specify an explicit sandbox command (e.g., "docker", "podman", "lxc").
762
+ - **Default:** `undefined`
763
+ - **Requires restart:** Yes
764
+
765
+ - **`tools.shell.enableInteractiveShell`** (boolean):
766
+ - **Description:** Use node-pty for an interactive shell experience. Fallback
767
+ to child_process still applies.
768
+ - **Default:** `true`
769
+ - **Requires restart:** Yes
770
+
771
+ - **`tools.shell.pager`** (string):
772
+ - **Description:** The pager command to use for shell output. Defaults to
773
+ `cat`.
774
+ - **Default:** `"cat"`
775
+
776
+ - **`tools.shell.showColor`** (boolean):
777
+ - **Description:** Show color in shell output.
778
+ - **Default:** `false`
779
+
780
+ - **`tools.shell.inactivityTimeout`** (number):
781
+ - **Description:** The maximum time in seconds allowed without output from the
782
+ shell command. Defaults to 5 minutes.
783
+ - **Default:** `300`
784
+
785
+ - **`tools.shell.enableShellOutputEfficiency`** (boolean):
786
+ - **Description:** Enable shell output efficiency optimizations for better
787
+ performance.
788
+ - **Default:** `true`
789
+
790
+ - **`tools.core`** (array):
791
+ - **Description:** Restrict the set of built-in tools with an allowlist. Match
792
+ semantics mirror tools.allowed; see the built-in tools documentation for
793
+ available names.
794
+ - **Default:** `undefined`
795
+ - **Requires restart:** Yes
796
+
797
+ - **`tools.allowed`** (array):
798
+ - **Description:** Tool names that bypass the confirmation dialog. Useful for
799
+ trusted commands (for example ["run_shell_command(git)",
800
+ "run_shell_command(npm test)"]). See shell tool command restrictions for
801
+ matching details.
802
+ - **Default:** `undefined`
803
+ - **Requires restart:** Yes
804
+
805
+ - **`tools.exclude`** (array):
806
+ - **Description:** Tool names to exclude from discovery.
807
+ - **Default:** `undefined`
808
+ - **Requires restart:** Yes
809
+
810
+ - **`tools.discoveryCommand`** (string):
811
+ - **Description:** Command to run for tool discovery.
812
+ - **Default:** `undefined`
813
+ - **Requires restart:** Yes
814
+
815
+ - **`tools.callCommand`** (string):
816
+ - **Description:** Defines a custom shell command for invoking discovered
817
+ tools. The command must take the tool name as the first argument, read JSON
818
+ arguments from stdin, and emit JSON results on stdout.
819
+ - **Default:** `undefined`
820
+ - **Requires restart:** Yes
821
+
822
+ - **`tools.useRipgrep`** (boolean):
823
+ - **Description:** Use ripgrep for file content search instead of the fallback
824
+ implementation. Provides faster search performance.
825
+ - **Default:** `true`
826
+
827
+ - **`tools.truncateToolOutputThreshold`** (number):
828
+ - **Description:** Maximum characters to show when truncating large tool
829
+ outputs. Set to 0 or negative to disable truncation.
830
+ - **Default:** `40000`
831
+ - **Requires restart:** Yes
832
+
833
+ - **`tools.disableLLMCorrection`** (boolean):
834
+ - **Description:** Disable LLM-based error correction for edit tools. When
835
+ enabled, tools will fail immediately if exact string matches are not found,
836
+ instead of attempting to self-correct.
837
+ - **Default:** `true`
838
+ - **Requires restart:** Yes
839
+
840
+ #### `mcp`
841
+
842
+ - **`mcp.serverCommand`** (string):
843
+ - **Description:** Command to start an MCP server.
844
+ - **Default:** `undefined`
845
+ - **Requires restart:** Yes
846
+
847
+ - **`mcp.allowed`** (array):
848
+ - **Description:** A list of MCP servers to allow.
849
+ - **Default:** `undefined`
850
+ - **Requires restart:** Yes
851
+
852
+ - **`mcp.excluded`** (array):
853
+ - **Description:** A list of MCP servers to exclude.
854
+ - **Default:** `undefined`
855
+ - **Requires restart:** Yes
856
+
857
+ #### `useWriteTodos`
858
+
859
+ - **`useWriteTodos`** (boolean):
860
+ - **Description:** Enable the write_todos tool.
861
+ - **Default:** `true`
862
+
863
+ #### `security`
864
+
865
+ - **`security.disableYoloMode`** (boolean):
866
+ - **Description:** Disable YOLO mode, even if enabled by a flag.
867
+ - **Default:** `false`
868
+ - **Requires restart:** Yes
869
+
870
+ - **`security.enablePermanentToolApproval`** (boolean):
871
+ - **Description:** Enable the "Allow for all future sessions" option in tool
872
+ confirmation dialogs.
873
+ - **Default:** `false`
874
+
875
+ - **`security.blockGitExtensions`** (boolean):
876
+ - **Description:** Blocks installing and loading extensions from Git.
877
+ - **Default:** `false`
878
+ - **Requires restart:** Yes
879
+
880
+ - **`security.allowedExtensions`** (array):
881
+ - **Description:** List of Regex patterns for allowed extensions. If nonempty,
882
+ only extensions that match the patterns in this list are allowed. Overrides
883
+ the blockGitExtensions setting.
884
+ - **Default:** `[]`
885
+ - **Requires restart:** Yes
886
+
887
+ - **`security.folderTrust.enabled`** (boolean):
888
+ - **Description:** Setting to track whether Folder trust is enabled.
889
+ - **Default:** `true`
890
+ - **Requires restart:** Yes
891
+
892
+ - **`security.environmentVariableRedaction.allowed`** (array):
893
+ - **Description:** Environment variables to always allow (bypass redaction).
894
+ - **Default:** `[]`
895
+ - **Requires restart:** Yes
896
+
897
+ - **`security.environmentVariableRedaction.blocked`** (array):
898
+ - **Description:** Environment variables to always redact.
899
+ - **Default:** `[]`
900
+ - **Requires restart:** Yes
901
+
902
+ - **`security.environmentVariableRedaction.enabled`** (boolean):
903
+ - **Description:** Enable redaction of environment variables that may contain
904
+ secrets.
905
+ - **Default:** `false`
906
+ - **Requires restart:** Yes
907
+
908
+ - **`security.auth.selectedType`** (string):
909
+ - **Description:** The currently selected authentication type.
910
+ - **Default:** `undefined`
911
+ - **Requires restart:** Yes
912
+
913
+ - **`security.auth.enforcedType`** (string):
914
+ - **Description:** The required auth type. If this does not match the selected
915
+ auth type, the user will be prompted to re-authenticate.
916
+ - **Default:** `undefined`
917
+ - **Requires restart:** Yes
918
+
919
+ - **`security.auth.useExternal`** (boolean):
920
+ - **Description:** Whether to use an external authentication flow.
921
+ - **Default:** `undefined`
922
+ - **Requires restart:** Yes
923
+
924
+ - **`security.enableConseca`** (boolean):
925
+ - **Description:** Enable the context-aware security checker. This feature
926
+ uses an LLM to dynamically generate and enforce security policies for tool
927
+ use based on your prompt, providing an additional layer of protection
928
+ against unintended actions.
929
+ - **Default:** `false`
930
+ - **Requires restart:** Yes
931
+
932
+ #### `advanced`
933
+
934
+ - **`advanced.autoConfigureMemory`** (boolean):
935
+ - **Description:** Automatically configure Node.js memory limits
936
+ - **Default:** `false`
937
+ - **Requires restart:** Yes
938
+
939
+ - **`advanced.dnsResolutionOrder`** (string):
940
+ - **Description:** The DNS resolution order.
941
+ - **Default:** `undefined`
942
+ - **Requires restart:** Yes
943
+
944
+ - **`advanced.excludedEnvVars`** (array):
945
+ - **Description:** Environment variables to exclude from project context.
946
+ - **Default:**
947
+
948
+ ```json
949
+ ["DEBUG", "DEBUG_MODE"]
950
+ ```
951
+
952
+ - **`advanced.bugCommand`** (object):
953
+ - **Description:** Configuration for the bug report command.
954
+ - **Default:** `undefined`
955
+
956
+ #### `experimental`
957
+
958
+ - **`experimental.toolOutputMasking.enabled`** (boolean):
959
+ - **Description:** Enables tool output masking to save tokens.
960
+ - **Default:** `true`
961
+ - **Requires restart:** Yes
962
+
963
+ - **`experimental.toolOutputMasking.toolProtectionThreshold`** (number):
964
+ - **Description:** Minimum number of tokens to protect from masking (most
965
+ recent tool outputs).
966
+ - **Default:** `50000`
967
+ - **Requires restart:** Yes
968
+
969
+ - **`experimental.toolOutputMasking.minPrunableTokensThreshold`** (number):
970
+ - **Description:** Minimum prunable tokens required to trigger a masking pass.
971
+ - **Default:** `30000`
972
+ - **Requires restart:** Yes
973
+
974
+ - **`experimental.toolOutputMasking.protectLatestTurn`** (boolean):
975
+ - **Description:** Ensures the absolute latest turn is never masked,
976
+ regardless of token count.
977
+ - **Default:** `true`
978
+ - **Requires restart:** Yes
979
+
980
+ - **`experimental.enableAgents`** (boolean):
981
+ - **Description:** Enable local and remote subagents. Warning: Experimental
982
+ feature, uses YOLO mode for subagents
983
+ - **Default:** `false`
984
+ - **Requires restart:** Yes
985
+
986
+ - **`experimental.extensionManagement`** (boolean):
987
+ - **Description:** Enable extension management features.
988
+ - **Default:** `true`
989
+ - **Requires restart:** Yes
990
+
991
+ - **`experimental.extensionConfig`** (boolean):
992
+ - **Description:** Enable requesting and fetching of extension settings.
993
+ - **Default:** `true`
994
+ - **Requires restart:** Yes
995
+
996
+ - **`experimental.extensionRegistry`** (boolean):
997
+ - **Description:** Enable extension registry explore UI.
998
+ - **Default:** `false`
999
+ - **Requires restart:** Yes
1000
+
1001
+ - **`experimental.extensionReloading`** (boolean):
1002
+ - **Description:** Enables extension loading/unloading within the CLI session.
1003
+ - **Default:** `false`
1004
+ - **Requires restart:** Yes
1005
+
1006
+ - **`experimental.jitContext`** (boolean):
1007
+ - **Description:** Enable Just-In-Time (JIT) context loading.
1008
+ - **Default:** `false`
1009
+ - **Requires restart:** Yes
1010
+
1011
+ - **`experimental.useOSC52Paste`** (boolean):
1012
+ - **Description:** Use OSC 52 for pasting. This may be more robust than the
1013
+ default system when using remote terminal sessions (if your terminal is
1014
+ configured to allow it).
1015
+ - **Default:** `false`
1016
+
1017
+ - **`experimental.useOSC52Copy`** (boolean):
1018
+ - **Description:** Use OSC 52 for copying. This may be more robust than the
1019
+ default system when using remote terminal sessions (if your terminal is
1020
+ configured to allow it).
1021
+ - **Default:** `false`
1022
+
1023
+ - **`experimental.plan`** (boolean):
1024
+ - **Description:** Enable planning features (Plan Mode and tools).
1025
+ - **Default:** `false`
1026
+ - **Requires restart:** Yes
1027
+
1028
+ - **`experimental.taskTracker`** (boolean):
1029
+ - **Description:** Enable task tracker tools.
1030
+ - **Default:** `false`
1031
+ - **Requires restart:** Yes
1032
+
1033
+ - **`experimental.modelSteering`** (boolean):
1034
+ - **Description:** Enable model steering (user hints) to guide the model
1035
+ during tool execution.
1036
+ - **Default:** `false`
1037
+
1038
+ - **`experimental.directWebFetch`** (boolean):
1039
+ - **Description:** Enable web fetch behavior that bypasses LLM summarization.
1040
+ - **Default:** `false`
1041
+ - **Requires restart:** Yes
1042
+
1043
+ - **`experimental.gemmaModelRouter.enabled`** (boolean):
1044
+ - **Description:** Enable the Gemma Model Router. Requires a local endpoint
1045
+ serving Gemma via the Gemini API using LiteRT-LM shim.
1046
+ - **Default:** `false`
1047
+ - **Requires restart:** Yes
1048
+
1049
+ - **`experimental.gemmaModelRouter.classifier.host`** (string):
1050
+ - **Description:** The host of the classifier.
1051
+ - **Default:** `"http://localhost:9379"`
1052
+ - **Requires restart:** Yes
1053
+
1054
+ - **`experimental.gemmaModelRouter.classifier.model`** (string):
1055
+ - **Description:** The model to use for the classifier. Only tested on
1056
+ `gemma3-1b-gpu-custom`.
1057
+ - **Default:** `"gemma3-1b-gpu-custom"`
1058
+ - **Requires restart:** Yes
1059
+
1060
+ #### `skills`
1061
+
1062
+ - **`skills.enabled`** (boolean):
1063
+ - **Description:** Enable Agent Skills.
1064
+ - **Default:** `true`
1065
+ - **Requires restart:** Yes
1066
+
1067
+ - **`skills.disabled`** (array):
1068
+ - **Description:** List of disabled skills.
1069
+ - **Default:** `[]`
1070
+ - **Requires restart:** Yes
1071
+
1072
+ #### `hooksConfig`
1073
+
1074
+ - **`hooksConfig.enabled`** (boolean):
1075
+ - **Description:** Canonical toggle for the hooks system. When disabled, no
1076
+ hooks will be executed.
1077
+ - **Default:** `true`
1078
+ - **Requires restart:** Yes
1079
+
1080
+ - **`hooksConfig.disabled`** (array):
1081
+ - **Description:** List of hook names (commands) that should be disabled.
1082
+ Hooks in this list will not execute even if configured.
1083
+ - **Default:** `[]`
1084
+
1085
+ - **`hooksConfig.notifications`** (boolean):
1086
+ - **Description:** Show visual indicators when hooks are executing.
1087
+ - **Default:** `true`
1088
+
1089
+ #### `hooks`
1090
+
1091
+ - **`hooks.BeforeTool`** (array):
1092
+ - **Description:** Hooks that execute before tool execution. Can intercept,
1093
+ validate, or modify tool calls.
1094
+ - **Default:** `[]`
1095
+
1096
+ - **`hooks.AfterTool`** (array):
1097
+ - **Description:** Hooks that execute after tool execution. Can process
1098
+ results, log outputs, or trigger follow-up actions.
1099
+ - **Default:** `[]`
1100
+
1101
+ - **`hooks.BeforeAgent`** (array):
1102
+ - **Description:** Hooks that execute before agent loop starts. Can set up
1103
+ context or initialize resources.
1104
+ - **Default:** `[]`
1105
+
1106
+ - **`hooks.AfterAgent`** (array):
1107
+ - **Description:** Hooks that execute after agent loop completes. Can perform
1108
+ cleanup or summarize results.
1109
+ - **Default:** `[]`
1110
+
1111
+ - **`hooks.Notification`** (array):
1112
+ - **Description:** Hooks that execute on notification events (errors,
1113
+ warnings, info). Can log or alert on specific conditions.
1114
+ - **Default:** `[]`
1115
+
1116
+ - **`hooks.SessionStart`** (array):
1117
+ - **Description:** Hooks that execute when a session starts. Can initialize
1118
+ session-specific resources or state.
1119
+ - **Default:** `[]`
1120
+
1121
+ - **`hooks.SessionEnd`** (array):
1122
+ - **Description:** Hooks that execute when a session ends. Can perform cleanup
1123
+ or persist session data.
1124
+ - **Default:** `[]`
1125
+
1126
+ - **`hooks.PreCompress`** (array):
1127
+ - **Description:** Hooks that execute before chat history compression. Can
1128
+ back up or analyze conversation before compression.
1129
+ - **Default:** `[]`
1130
+
1131
+ - **`hooks.BeforeModel`** (array):
1132
+ - **Description:** Hooks that execute before LLM requests. Can modify prompts,
1133
+ inject context, or control model parameters.
1134
+ - **Default:** `[]`
1135
+
1136
+ - **`hooks.AfterModel`** (array):
1137
+ - **Description:** Hooks that execute after LLM responses. Can process
1138
+ outputs, extract information, or log interactions.
1139
+ - **Default:** `[]`
1140
+
1141
+ - **`hooks.BeforeToolSelection`** (array):
1142
+ - **Description:** Hooks that execute before tool selection. Can filter or
1143
+ prioritize available tools dynamically.
1144
+ - **Default:** `[]`
1145
+
1146
+ #### `admin`
1147
+
1148
+ - **`admin.secureModeEnabled`** (boolean):
1149
+ - **Description:** If true, disallows yolo mode from being used.
1150
+ - **Default:** `false`
1151
+
1152
+ - **`admin.extensions.enabled`** (boolean):
1153
+ - **Description:** If false, disallows extensions from being installed or
1154
+ used.
1155
+ - **Default:** `true`
1156
+
1157
+ - **`admin.mcp.enabled`** (boolean):
1158
+ - **Description:** If false, disallows MCP servers from being used.
1159
+ - **Default:** `true`
1160
+
1161
+ - **`admin.mcp.config`** (object):
1162
+ - **Description:** Admin-configured MCP servers.
1163
+ - **Default:** `{}`
1164
+
1165
+ - **`admin.skills.enabled`** (boolean):
1166
+ - **Description:** If false, disallows agent skills from being used.
1167
+ - **Default:** `true`
1168
+ <!-- SETTINGS-AUTOGEN:END -->
1169
+
1170
+ #### `mcpServers`
1171
+
1172
+ Configures connections to one or more Model-Context Protocol (MCP) servers for
1173
+ discovering and using custom tools. Gemini CLI attempts to connect to each
1174
+ configured MCP server to discover available tools. If multiple MCP servers
1175
+ expose a tool with the same name, the tool names will be prefixed with the
1176
+ server alias you defined in the configuration (e.g.,
1177
+ `serverAlias__actualToolName`) to avoid conflicts. Note that the system might
1178
+ strip certain schema properties from MCP tool definitions for compatibility. At
1179
+ least one of `command`, `url`, or `httpUrl` must be provided. If multiple are
1180
+ specified, the order of precedence is `httpUrl`, then `url`, then `command`.
1181
+
1182
+ - **`mcpServers.<SERVER_NAME>`** (object): The server parameters for the named
1183
+ server.
1184
+ - `command` (string, optional): The command to execute to start the MCP server
1185
+ via standard I/O.
1186
+ - `args` (array of strings, optional): Arguments to pass to the command.
1187
+ - `env` (object, optional): Environment variables to set for the server
1188
+ process.
1189
+ - `cwd` (string, optional): The working directory in which to start the
1190
+ server.
1191
+ - `url` (string, optional): The URL of an MCP server that uses Server-Sent
1192
+ Events (SSE) for communication.
1193
+ - `httpUrl` (string, optional): The URL of an MCP server that uses streamable
1194
+ HTTP for communication.
1195
+ - `headers` (object, optional): A map of HTTP headers to send with requests to
1196
+ `url` or `httpUrl`.
1197
+ - `timeout` (number, optional): Timeout in milliseconds for requests to this
1198
+ MCP server.
1199
+ - `trust` (boolean, optional): Trust this server and bypass all tool call
1200
+ confirmations.
1201
+ - `description` (string, optional): A brief description of the server, which
1202
+ may be used for display purposes.
1203
+ - `includeTools` (array of strings, optional): List of tool names to include
1204
+ from this MCP server. When specified, only the tools listed here will be
1205
+ available from this server (allowlist behavior). If not specified, all tools
1206
+ from the server are enabled by default.
1207
+ - `excludeTools` (array of strings, optional): List of tool names to exclude
1208
+ from this MCP server. Tools listed here will not be available to the model,
1209
+ even if they are exposed by the server. **Note:** `excludeTools` takes
1210
+ precedence over `includeTools` - if a tool is in both lists, it will be
1211
+ excluded.
1212
+
1213
+ #### `telemetry`
1214
+
1215
+ Configures logging and metrics collection for Gemini CLI. For more information,
1216
+ see [Telemetry](../cli/telemetry.md).
1217
+
1218
+ - **Properties:**
1219
+ - **`enabled`** (boolean): Whether or not telemetry is enabled.
1220
+ - **`target`** (string): The destination for collected telemetry. Supported
1221
+ values are `local` and `gcp`.
1222
+ - **`otlpEndpoint`** (string): The endpoint for the OTLP Exporter.
1223
+ - **`otlpProtocol`** (string): The protocol for the OTLP Exporter (`grpc` or
1224
+ `http`).
1225
+ - **`logPrompts`** (boolean): Whether or not to include the content of user
1226
+ prompts in the logs.
1227
+ - **`outfile`** (string): The file to write telemetry to when `target` is
1228
+ `local`.
1229
+ - **`useCollector`** (boolean): Whether to use an external OTLP collector.
1230
+
1231
+ ### Example `settings.json`
1232
+
1233
+ Here is an example of a `settings.json` file with the nested structure, new as
1234
+ of v0.3.0:
1235
+
1236
+ ```json
1237
+ {
1238
+ "general": {
1239
+ "vimMode": true,
1240
+ "preferredEditor": "code",
1241
+ "sessionRetention": {
1242
+ "enabled": true,
1243
+ "maxAge": "30d",
1244
+ "maxCount": 100
1245
+ }
1246
+ },
1247
+ "ui": {
1248
+ "theme": "GitHub",
1249
+ "hideBanner": true,
1250
+ "hideTips": false,
1251
+ "customWittyPhrases": [
1252
+ "You forget a thousand things every day. Make sure this is one of ’em",
1253
+ "Connecting to AGI"
1254
+ ]
1255
+ },
1256
+ "tools": {
1257
+ "sandbox": "docker",
1258
+ "discoveryCommand": "bin/get_tools",
1259
+ "callCommand": "bin/call_tool",
1260
+ "exclude": ["write_file"]
1261
+ },
1262
+ "mcpServers": {
1263
+ "mainServer": {
1264
+ "command": "bin/mcp_server.py"
1265
+ },
1266
+ "anotherServer": {
1267
+ "command": "node",
1268
+ "args": ["mcp_server.js", "--verbose"]
1269
+ }
1270
+ },
1271
+ "telemetry": {
1272
+ "enabled": true,
1273
+ "target": "local",
1274
+ "otlpEndpoint": "http://localhost:4317",
1275
+ "logPrompts": true
1276
+ },
1277
+ "privacy": {
1278
+ "usageStatisticsEnabled": true
1279
+ },
1280
+ "model": {
1281
+ "name": "gemini-1.5-pro-latest",
1282
+ "maxSessionTurns": 10,
1283
+ "summarizeToolOutput": {
1284
+ "run_shell_command": {
1285
+ "tokenBudget": 100
1286
+ }
1287
+ }
1288
+ },
1289
+ "context": {
1290
+ "fileName": ["CONTEXT.md", "GEMINI.md"],
1291
+ "includeDirectories": ["path/to/dir1", "~/path/to/dir2", "../path/to/dir3"],
1292
+ "loadFromIncludeDirectories": true,
1293
+ "fileFiltering": {
1294
+ "respectGitIgnore": false
1295
+ }
1296
+ },
1297
+ "advanced": {
1298
+ "excludedEnvVars": ["DEBUG", "DEBUG_MODE", "NODE_ENV"]
1299
+ }
1300
+ }
1301
+ ```
1302
+
1303
+ ## Shell history
1304
+
1305
+ The CLI keeps a history of shell commands you run. To avoid conflicts between
1306
+ different projects, this history is stored in a project-specific directory
1307
+ within your user's home folder.
1308
+
1309
+ - **Location:** `~/.gemini/tmp/<project_hash>/shell_history`
1310
+ - `<project_hash>` is a unique identifier generated from your project's root
1311
+ path.
1312
+ - The history is stored in a file named `shell_history`.
1313
+
1314
+ ## Environment variables and `.env` files
1315
+
1316
+ Environment variables are a common way to configure applications, especially for
1317
+ sensitive information like API keys or for settings that might change between
1318
+ environments. For authentication setup, see the
1319
+ [Authentication documentation](../get-started/authentication.md) which covers
1320
+ all available authentication methods.
1321
+
1322
+ The CLI automatically loads environment variables from an `.env` file. The
1323
+ loading order is:
1324
+
1325
+ 1. `.env` file in the current working directory.
1326
+ 2. If not found, it searches upwards in parent directories until it finds an
1327
+ `.env` file or reaches the project root (identified by a `.git` folder) or
1328
+ the home directory.
1329
+ 3. If still not found, it looks for `~/.env` (in the user's home directory).
1330
+
1331
+ **Environment variable exclusion:** Some environment variables (like `DEBUG` and
1332
+ `DEBUG_MODE`) are automatically excluded from being loaded from project `.env`
1333
+ files to prevent interference with gemini-cli behavior. Variables from
1334
+ `.gemini/.env` files are never excluded. You can customize this behavior using
1335
+ the `advanced.excludedEnvVars` setting in your `settings.json` file.
1336
+
1337
+ - **`GEMINI_API_KEY`**:
1338
+ - Your API key for the Gemini API.
1339
+ - One of several available
1340
+ [authentication methods](../get-started/authentication.md).
1341
+ - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env`
1342
+ file.
1343
+ - **`GEMINI_MODEL`**:
1344
+ - Specifies the default Gemini model to use.
1345
+ - Overrides the hardcoded default
1346
+ - Example: `export GEMINI_MODEL="gemini-3-flash-preview"` (Windows PowerShell:
1347
+ `$env:GEMINI_MODEL="gemini-3-flash-preview"`)
1348
+ - **`GEMINI_CLI_IDE_PID`**:
1349
+ - Manually specifies the PID of the IDE process to use for integration. This
1350
+ is useful when running Gemini CLI in a standalone terminal while still
1351
+ wanting to associate it with a specific IDE instance.
1352
+ - Overrides the automatic IDE detection logic.
1353
+ - **`GEMINI_CLI_HOME`**:
1354
+ - Specifies the root directory for Gemini CLI's user-level configuration and
1355
+ storage.
1356
+ - By default, this is the user's system home directory. The CLI will create a
1357
+ `.gemini` folder inside this directory.
1358
+ - Useful for shared compute environments or keeping CLI state isolated.
1359
+ - Example: `export GEMINI_CLI_HOME="/path/to/user/config"` (Windows
1360
+ PowerShell: `$env:GEMINI_CLI_HOME="C:\path\to\user\config"`)
1361
+ - **`GOOGLE_API_KEY`**:
1362
+ - Your Google Cloud API key.
1363
+ - Required for using Vertex AI in express mode.
1364
+ - Ensure you have the necessary permissions.
1365
+ - Example: `export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"` (Windows PowerShell:
1366
+ `$env:GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"`).
1367
+ - **`GOOGLE_CLOUD_PROJECT`**:
1368
+ - Your Google Cloud Project ID.
1369
+ - Required for using Code Assist or Vertex AI.
1370
+ - If using Vertex AI, ensure you have the necessary permissions in this
1371
+ project.
1372
+ - **Cloud Shell note:** When running in a Cloud Shell environment, this
1373
+ variable defaults to a special project allocated for Cloud Shell users. If
1374
+ you have `GOOGLE_CLOUD_PROJECT` set in your global environment in Cloud
1375
+ Shell, it will be overridden by this default. To use a different project in
1376
+ Cloud Shell, you must define `GOOGLE_CLOUD_PROJECT` in a `.env` file.
1377
+ - Example: `export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"` (Windows
1378
+ PowerShell: `$env:GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`).
1379
+ - **`GOOGLE_APPLICATION_CREDENTIALS`** (string):
1380
+ - **Description:** The path to your Google Application Credentials JSON file.
1381
+ - **Example:**
1382
+ `export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json"`
1383
+ (Windows PowerShell:
1384
+ `$env:GOOGLE_APPLICATION_CREDENTIALS="C:\path\to\your\credentials.json"`)
1385
+ - **`GOOGLE_GENAI_API_VERSION`**:
1386
+ - Specifies the API version to use for Gemini API requests.
1387
+ - When set, overrides the default API version used by the SDK.
1388
+ - Example: `export GOOGLE_GENAI_API_VERSION="v1"` (Windows PowerShell:
1389
+ `$env:GOOGLE_GENAI_API_VERSION="v1"`)
1390
+ - **`OTLP_GOOGLE_CLOUD_PROJECT`**:
1391
+ - Your Google Cloud Project ID for Telemetry in Google Cloud
1392
+ - Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"` (Windows
1393
+ PowerShell: `$env:OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`).
1394
+ - **`GEMINI_TELEMETRY_ENABLED`**:
1395
+ - Set to `true` or `1` to enable telemetry. Any other value is treated as
1396
+ disabling it.
1397
+ - Overrides the `telemetry.enabled` setting.
1398
+ - **`GEMINI_TELEMETRY_TARGET`**:
1399
+ - Sets the telemetry target (`local` or `gcp`).
1400
+ - Overrides the `telemetry.target` setting.
1401
+ - **`GEMINI_TELEMETRY_OTLP_ENDPOINT`**:
1402
+ - Sets the OTLP endpoint for telemetry.
1403
+ - Overrides the `telemetry.otlpEndpoint` setting.
1404
+ - **`GEMINI_TELEMETRY_OTLP_PROTOCOL`**:
1405
+ - Sets the OTLP protocol (`grpc` or `http`).
1406
+ - Overrides the `telemetry.otlpProtocol` setting.
1407
+ - **`GEMINI_TELEMETRY_LOG_PROMPTS`**:
1408
+ - Set to `true` or `1` to enable or disable logging of user prompts. Any other
1409
+ value is treated as disabling it.
1410
+ - Overrides the `telemetry.logPrompts` setting.
1411
+ - **`GEMINI_TELEMETRY_OUTFILE`**:
1412
+ - Sets the file path to write telemetry to when the target is `local`.
1413
+ - Overrides the `telemetry.outfile` setting.
1414
+ - **`GEMINI_TELEMETRY_USE_COLLECTOR`**:
1415
+ - Set to `true` or `1` to enable or disable using an external OTLP collector.
1416
+ Any other value is treated as disabling it.
1417
+ - Overrides the `telemetry.useCollector` setting.
1418
+ - **`GOOGLE_CLOUD_LOCATION`**:
1419
+ - Your Google Cloud Project Location (e.g., us-central1).
1420
+ - Required for using Vertex AI in non-express mode.
1421
+ - Example: `export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"` (Windows
1422
+ PowerShell: `$env:GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"`).
1423
+ - **`GEMINI_SANDBOX`**:
1424
+ - Alternative to the `sandbox` setting in `settings.json`.
1425
+ - Accepts `true`, `false`, `docker`, `podman`, or a custom command string.
1426
+ - **`GEMINI_SYSTEM_MD`**:
1427
+ - Replaces the built‑in system prompt with content from a Markdown file.
1428
+ - `true`/`1`: Use project default path `./.gemini/system.md`.
1429
+ - Any other string: Treat as a path (relative/absolute supported, `~`
1430
+ expands).
1431
+ - `false`/`0` or unset: Use the built‑in prompt. See
1432
+ [System Prompt Override](../cli/system-prompt.md).
1433
+ - **`GEMINI_WRITE_SYSTEM_MD`**:
1434
+ - Writes the current built‑in system prompt to a file for review.
1435
+ - `true`/`1`: Write to `./.gemini/system.md`. Otherwise treat the value as a
1436
+ path.
1437
+ - Run the CLI once with this set to generate the file.
1438
+ - **`SEATBELT_PROFILE`** (macOS specific):
1439
+ - Switches the Seatbelt (`sandbox-exec`) profile on macOS.
1440
+ - `permissive-open`: (Default) Restricts writes to the project folder (and a
1441
+ few other folders, see
1442
+ `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other
1443
+ operations.
1444
+ - `restrictive-open`: Declines operations by default, allows network.
1445
+ - `strict-open`: Restricts both reads and writes to the working directory,
1446
+ allows network.
1447
+ - `strict-proxied`: Same as `strict-open` but routes network through proxy.
1448
+ - `<profile_name>`: Uses a custom profile. To define a custom profile, create
1449
+ a file named `sandbox-macos-<profile_name>.sb` in your project's `.gemini/`
1450
+ directory (e.g., `my-project/.gemini/sandbox-macos-custom.sb`).
1451
+ - **`DEBUG` or `DEBUG_MODE`** (often used by underlying libraries or the CLI
1452
+ itself):
1453
+ - Set to `true` or `1` to enable verbose debug logging, which can be helpful
1454
+ for troubleshooting.
1455
+ - **Note:** These variables are automatically excluded from project `.env`
1456
+ files by default to prevent interference with gemini-cli behavior. Use
1457
+ `.gemini/.env` files if you need to set these for gemini-cli specifically.
1458
+ - **`NO_COLOR`**:
1459
+ - Set to any value to disable all color output in the CLI.
1460
+ - **`CLI_TITLE`**:
1461
+ - Set to a string to customize the title of the CLI.
1462
+ - **`CODE_ASSIST_ENDPOINT`**:
1463
+ - Specifies the endpoint for the code assist server.
1464
+ - This is useful for development and testing.
1465
+
1466
+ ### Environment variable redaction
1467
+
1468
+ To prevent accidental leakage of sensitive information, Gemini CLI automatically
1469
+ redacts potential secrets from environment variables when executing tools (such
1470
+ as shell commands). This "best effort" redaction applies to variables inherited
1471
+ from the system or loaded from `.env` files.
1472
+
1473
+ **Default Redaction Rules:**
1474
+
1475
+ - **By Name:** Variables are redacted if their names contain sensitive terms
1476
+ like `TOKEN`, `SECRET`, `PASSWORD`, `KEY`, `AUTH`, `CREDENTIAL`, `PRIVATE`, or
1477
+ `CERT`.
1478
+ - **By Value:** Variables are redacted if their values match known secret
1479
+ patterns, such as:
1480
+ - Private keys (RSA, OpenSSH, PGP, etc.)
1481
+ - Certificates
1482
+ - URLs containing credentials
1483
+ - API keys and tokens (GitHub, Google, AWS, Stripe, Slack, etc.)
1484
+ - **Specific Blocklist:** Certain variables like `CLIENT_ID`, `DB_URI`,
1485
+ `DATABASE_URL`, and `CONNECTION_STRING` are always redacted by default.
1486
+
1487
+ **Allowlist (Never Redacted):**
1488
+
1489
+ - Common system variables (e.g., `PATH`, `HOME`, `USER`, `SHELL`, `TERM`,
1490
+ `LANG`).
1491
+ - Variables starting with `GEMINI_CLI_`.
1492
+ - GitHub Action specific variables.
1493
+
1494
+ **Configuration:**
1495
+
1496
+ You can customize this behavior in your `settings.json` file:
1497
+
1498
+ - **`security.allowedEnvironmentVariables`**: A list of variable names to
1499
+ _never_ redact, even if they match sensitive patterns.
1500
+ - **`security.blockedEnvironmentVariables`**: A list of variable names to
1501
+ _always_ redact, even if they don't match sensitive patterns.
1502
+
1503
+ ```json
1504
+ {
1505
+ "security": {
1506
+ "allowedEnvironmentVariables": ["MY_PUBLIC_KEY", "NOT_A_SECRET_TOKEN"],
1507
+ "blockedEnvironmentVariables": ["INTERNAL_IP_ADDRESS"]
1508
+ }
1509
+ }
1510
+ ```
1511
+
1512
+ ## Command-line arguments
1513
+
1514
+ Arguments passed directly when running the CLI can override other configurations
1515
+ for that specific session.
1516
+
1517
+ - **`--model <model_name>`** (**`-m <model_name>`**):
1518
+ - Specifies the Gemini model to use for this session.
1519
+ - Example: `npm start -- --model gemini-3-pro-preview`
1520
+ - **`--prompt <your_prompt>`** (**`-p <your_prompt>`**):
1521
+ - **Deprecated:** Use positional arguments instead.
1522
+ - Used to pass a prompt directly to the command. This invokes Gemini CLI in a
1523
+ non-interactive mode.
1524
+ - **`--prompt-interactive <your_prompt>`** (**`-i <your_prompt>`**):
1525
+ - Starts an interactive session with the provided prompt as the initial input.
1526
+ - The prompt is processed within the interactive session, not before it.
1527
+ - Cannot be used when piping input from stdin.
1528
+ - Example: `gemini -i "explain this code"`
1529
+ - **`--output-format <format>`**:
1530
+ - **Description:** Specifies the format of the CLI output for non-interactive
1531
+ mode.
1532
+ - **Values:**
1533
+ - `text`: (Default) The standard human-readable output.
1534
+ - `json`: A machine-readable JSON output.
1535
+ - `stream-json`: A streaming JSON output that emits real-time events.
1536
+ - **Note:** For structured output and scripting, use the
1537
+ `--output-format json` or `--output-format stream-json` flag.
1538
+ - **`--sandbox`** (**`-s`**):
1539
+ - Enables sandbox mode for this session.
1540
+ - **`--debug`** (**`-d`**):
1541
+ - Enables debug mode for this session, providing more verbose output. Open the
1542
+ debug console with F12 to see the additional logging.
1543
+
1544
+ - **`--help`** (or **`-h`**):
1545
+ - Displays help information about command-line arguments.
1546
+ - **`--yolo`**:
1547
+ - Enables YOLO mode, which automatically approves all tool calls.
1548
+ - **`--approval-mode <mode>`**:
1549
+ - Sets the approval mode for tool calls. Available modes:
1550
+ - `default`: Prompt for approval on each tool call (default behavior)
1551
+ - `auto_edit`: Automatically approve edit tools (replace, write_file) while
1552
+ prompting for others
1553
+ - `yolo`: Automatically approve all tool calls (equivalent to `--yolo`)
1554
+ - `plan`: Read-only mode for tool calls (requires experimental planning to
1555
+ be enabled).
1556
+ > **Note:** This mode is currently under development and not yet fully
1557
+ > functional.
1558
+ - Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of
1559
+ `--yolo` for the new unified approach.
1560
+ - Example: `gemini --approval-mode auto_edit`
1561
+ - **`--allowed-tools <tool1,tool2,...>`**:
1562
+ - A comma-separated list of tool names that will bypass the confirmation
1563
+ dialog.
1564
+ - Example: `gemini --allowed-tools "ShellTool(git status)"`
1565
+ - **`--extensions <extension_name ...>`** (**`-e <extension_name ...>`**):
1566
+ - Specifies a list of extensions to use for the session. If not provided, all
1567
+ available extensions are used.
1568
+ - Use the special term `gemini -e none` to disable all extensions.
1569
+ - Example: `gemini -e my-extension -e my-other-extension`
1570
+ - **`--list-extensions`** (**`-l`**):
1571
+ - Lists all available extensions and exits.
1572
+ - **`--resume [session_id]`** (**`-r [session_id]`**):
1573
+ - Resume a previous chat session. Use "latest" for the most recent session,
1574
+ provide a session index number, or provide a full session UUID.
1575
+ - If no session_id is provided, defaults to "latest".
1576
+ - Example: `gemini --resume 5` or `gemini --resume latest` or
1577
+ `gemini --resume a1b2c3d4-e5f6-7890-abcd-ef1234567890` or `gemini --resume`
1578
+ - See [Session Management](../cli/session-management.md) for more details.
1579
+ - **`--list-sessions`**:
1580
+ - List all available chat sessions for the current project and exit.
1581
+ - Shows session indices, dates, message counts, and preview of first user
1582
+ message.
1583
+ - Example: `gemini --list-sessions`
1584
+ - **`--delete-session <identifier>`**:
1585
+ - Delete a specific chat session by its index number or full session UUID.
1586
+ - Use `--list-sessions` first to see available sessions, their indices, and
1587
+ UUIDs.
1588
+ - Example: `gemini --delete-session 3` or
1589
+ `gemini --delete-session a1b2c3d4-e5f6-7890-abcd-ef1234567890`
1590
+ - **`--include-directories <dir1,dir2,...>`**:
1591
+ - Includes additional directories in the workspace for multi-directory
1592
+ support.
1593
+ - Can be specified multiple times or as comma-separated values.
1594
+ - 5 directories can be added at maximum.
1595
+ - Example: `--include-directories /path/to/project1,/path/to/project2` or
1596
+ `--include-directories /path/to/project1 --include-directories /path/to/project2`
1597
+ - **`--screen-reader`**:
1598
+ - Enables screen reader mode, which adjusts the TUI for better compatibility
1599
+ with screen readers.
1600
+ - **`--version`**:
1601
+ - Displays the version of the CLI.
1602
+ - **`--experimental-acp`**:
1603
+ - Starts the agent in ACP mode.
1604
+ - **`--allowed-mcp-server-names`**:
1605
+ - Allowed MCP server names.
1606
+ - **`--fake-responses`**:
1607
+ - Path to a file with fake model responses for testing.
1608
+ - **`--record-responses`**:
1609
+ - Path to a file to record model responses for testing.
1610
+
1611
+ ## Context files (hierarchical instructional context)
1612
+
1613
+ While not strictly configuration for the CLI's _behavior_, context files
1614
+ (defaulting to `GEMINI.md` but configurable via the `context.fileName` setting)
1615
+ are crucial for configuring the _instructional context_ (also referred to as
1616
+ "memory") provided to the Gemini model. This powerful feature allows you to give
1617
+ project-specific instructions, coding style guides, or any relevant background
1618
+ information to the AI, making its responses more tailored and accurate to your
1619
+ needs. The CLI includes UI elements, such as an indicator in the footer showing
1620
+ the number of loaded context files, to keep you informed about the active
1621
+ context.
1622
+
1623
+ - **Purpose:** These Markdown files contain instructions, guidelines, or context
1624
+ that you want the Gemini model to be aware of during your interactions. The
1625
+ system is designed to manage this instructional context hierarchically.
1626
+
1627
+ ### Example context file content (e.g., `GEMINI.md`)
1628
+
1629
+ Here's a conceptual example of what a context file at the root of a TypeScript
1630
+ project might contain:
1631
+
1632
+ ```markdown
1633
+ # Project: My Awesome TypeScript Library
1634
+
1635
+ ## General Instructions:
1636
+
1637
+ - When generating new TypeScript code, please follow the existing coding style.
1638
+ - Ensure all new functions and classes have JSDoc comments.
1639
+ - Prefer functional programming paradigms where appropriate.
1640
+ - All code should be compatible with TypeScript 5.0 and Node.js 20+.
1641
+
1642
+ ## Coding Style:
1643
+
1644
+ - Use 2 spaces for indentation.
1645
+ - Interface names should be prefixed with `I` (e.g., `IUserService`).
1646
+ - Private class members should be prefixed with an underscore (`_`).
1647
+ - Always use strict equality (`===` and `!==`).
1648
+
1649
+ ## Specific Component: `src/api/client.ts`
1650
+
1651
+ - This file handles all outbound API requests.
1652
+ - When adding new API call functions, ensure they include robust error handling
1653
+ and logging.
1654
+ - Use the existing `fetchWithRetry` utility for all GET requests.
1655
+
1656
+ ## Regarding Dependencies:
1657
+
1658
+ - Avoid introducing new external dependencies unless absolutely necessary.
1659
+ - If a new dependency is required, please state the reason.
1660
+ ```
1661
+
1662
+ This example demonstrates how you can provide general project context, specific
1663
+ coding conventions, and even notes about particular files or components. The
1664
+ more relevant and precise your context files are, the better the AI can assist
1665
+ you. Project-specific context files are highly encouraged to establish
1666
+ conventions and context.
1667
+
1668
+ - **Hierarchical loading and precedence:** The CLI implements a sophisticated
1669
+ hierarchical memory system by loading context files (e.g., `GEMINI.md`) from
1670
+ several locations. Content from files lower in this list (more specific)
1671
+ typically overrides or supplements content from files higher up (more
1672
+ general). The exact concatenation order and final context can be inspected
1673
+ using the `/memory show` command. The typical loading order is:
1674
+ 1. **Global context file:**
1675
+ - Location: `~/.gemini/<configured-context-filename>` (e.g.,
1676
+ `~/.gemini/GEMINI.md` in your user home directory).
1677
+ - Scope: Provides default instructions for all your projects.
1678
+ 2. **Project root and ancestors context files:**
1679
+ - Location: The CLI searches for the configured context file in the
1680
+ current working directory and then in each parent directory up to either
1681
+ the project root (identified by a `.git` folder) or your home directory.
1682
+ - Scope: Provides context relevant to the entire project or a significant
1683
+ portion of it.
1684
+ 3. **Sub-directory context files (contextual/local):**
1685
+ - Location: The CLI also scans for the configured context file in
1686
+ subdirectories _below_ the current working directory (respecting common
1687
+ ignore patterns like `node_modules`, `.git`, etc.). The breadth of this
1688
+ search is limited to 200 directories by default, but can be configured
1689
+ with the `context.discoveryMaxDirs` setting in your `settings.json`
1690
+ file.
1691
+ - Scope: Allows for highly specific instructions relevant to a particular
1692
+ component, module, or subsection of your project.
1693
+ - **Concatenation and UI indication:** The contents of all found context files
1694
+ are concatenated (with separators indicating their origin and path) and
1695
+ provided as part of the system prompt to the Gemini model. The CLI footer
1696
+ displays the count of loaded context files, giving you a quick visual cue
1697
+ about the active instructional context.
1698
+ - **Importing content:** You can modularize your context files by importing
1699
+ other Markdown files using the `@path/to/file.md` syntax. For more details,
1700
+ see the [Memory Import Processor documentation](./memport.md).
1701
+ - **Commands for memory management:**
1702
+ - Use `/memory refresh` to force a re-scan and reload of all context files
1703
+ from all configured locations. This updates the AI's instructional context.
1704
+ - Use `/memory show` to display the combined instructional context currently
1705
+ loaded, allowing you to verify the hierarchy and content being used by the
1706
+ AI.
1707
+ - See the [Commands documentation](./commands.md#memory) for full details on
1708
+ the `/memory` command and its sub-commands (`show` and `refresh`).
1709
+
1710
+ By understanding and utilizing these configuration layers and the hierarchical
1711
+ nature of context files, you can effectively manage the AI's memory and tailor
1712
+ the Gemini CLI's responses to your specific needs and projects.
1713
+
1714
+ ## Sandboxing
1715
+
1716
+ The Gemini CLI can execute potentially unsafe operations (like shell commands
1717
+ and file modifications) within a sandboxed environment to protect your system.
1718
+
1719
+ Sandboxing is disabled by default, but you can enable it in a few ways:
1720
+
1721
+ - Using `--sandbox` or `-s` flag.
1722
+ - Setting `GEMINI_SANDBOX` environment variable.
1723
+ - Sandbox is enabled when using `--yolo` or `--approval-mode=yolo` by default.
1724
+
1725
+ By default, it uses a pre-built `gemini-cli-sandbox` Docker image.
1726
+
1727
+ For project-specific sandboxing needs, you can create a custom Dockerfile at
1728
+ `.gemini/sandbox.Dockerfile` in your project's root directory. This Dockerfile
1729
+ can be based on the base sandbox image:
1730
+
1731
+ ```dockerfile
1732
+ FROM gemini-cli-sandbox
1733
+
1734
+ # Add your custom dependencies or configurations here
1735
+ # For example:
1736
+ # RUN apt-get update && apt-get install -y some-package
1737
+ # COPY ./my-config /app/my-config
1738
+ ```
1739
+
1740
+ When `.gemini/sandbox.Dockerfile` exists, you can use `BUILD_SANDBOX`
1741
+ environment variable when running Gemini CLI to automatically build the custom
1742
+ sandbox image:
1743
+
1744
+ ```bash
1745
+ BUILD_SANDBOX=1 gemini -s
1746
+ ```
1747
+
1748
+ ## Usage statistics
1749
+
1750
+ To help us improve the Gemini CLI, we collect anonymized usage statistics. This
1751
+ data helps us understand how the CLI is used, identify common issues, and
1752
+ prioritize new features.
1753
+
1754
+ **What we collect:**
1755
+
1756
+ - **Tool calls:** We log the names of the tools that are called, whether they
1757
+ succeed or fail, and how long they take to execute. We do not collect the
1758
+ arguments passed to the tools or any data returned by them.
1759
+ - **API requests:** We log the Gemini model used for each request, the duration
1760
+ of the request, and whether it was successful. We do not collect the content
1761
+ of the prompts or responses.
1762
+ - **Session information:** We collect information about the configuration of the
1763
+ CLI, such as the enabled tools and the approval mode.
1764
+
1765
+ **What we DON'T collect:**
1766
+
1767
+ - **Personally identifiable information (PII):** We do not collect any personal
1768
+ information, such as your name, email address, or API keys.
1769
+ - **Prompt and response content:** We do not log the content of your prompts or
1770
+ the responses from the Gemini model.
1771
+ - **File content:** We do not log the content of any files that are read or
1772
+ written by the CLI.
1773
+
1774
+ **How to opt out:**
1775
+
1776
+ You can opt out of usage statistics collection at any time by setting the
1777
+ `usageStatisticsEnabled` property to `false` under the `privacy` category in
1778
+ your `settings.json` file:
1779
+
1780
+ ```json
1781
+ {
1782
+ "privacy": {
1783
+ "usageStatisticsEnabled": false
1784
+ }
1785
+ }
1786
+ ```