@wxp212/gemini-cli 0.28.3-2

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 (117) 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 +235 -0
  5. package/bundle/builtin/skill-creator/scripts/package_skill.cjs +102 -0
  6. package/bundle/builtin/skill-creator/scripts/validate_skill.cjs +127 -0
  7. package/bundle/docs/architecture.md +80 -0
  8. package/bundle/docs/assets/connected_devtools.png +0 -0
  9. package/bundle/docs/assets/gemini-screenshot.png +0 -0
  10. package/bundle/docs/assets/monitoring-dashboard-logs.png +0 -0
  11. package/bundle/docs/assets/monitoring-dashboard-metrics.png +0 -0
  12. package/bundle/docs/assets/monitoring-dashboard-overview.png +0 -0
  13. package/bundle/docs/assets/release_patch.png +0 -0
  14. package/bundle/docs/assets/theme-ansi-light.png +0 -0
  15. package/bundle/docs/assets/theme-ansi.png +0 -0
  16. package/bundle/docs/assets/theme-atom-one.png +0 -0
  17. package/bundle/docs/assets/theme-ayu-light.png +0 -0
  18. package/bundle/docs/assets/theme-ayu.png +0 -0
  19. package/bundle/docs/assets/theme-custom.png +0 -0
  20. package/bundle/docs/assets/theme-default-light.png +0 -0
  21. package/bundle/docs/assets/theme-default.png +0 -0
  22. package/bundle/docs/assets/theme-dracula.png +0 -0
  23. package/bundle/docs/assets/theme-github-light.png +0 -0
  24. package/bundle/docs/assets/theme-github.png +0 -0
  25. package/bundle/docs/assets/theme-google-light.png +0 -0
  26. package/bundle/docs/assets/theme-xcode-light.png +0 -0
  27. package/bundle/docs/changelogs/index.md +743 -0
  28. package/bundle/docs/changelogs/latest.md +338 -0
  29. package/bundle/docs/changelogs/preview.md +437 -0
  30. package/bundle/docs/cli/authentication.md +3 -0
  31. package/bundle/docs/cli/checkpointing.md +94 -0
  32. package/bundle/docs/cli/cli-reference.md +101 -0
  33. package/bundle/docs/cli/commands.md +430 -0
  34. package/bundle/docs/cli/creating-skills.md +80 -0
  35. package/bundle/docs/cli/custom-commands.md +315 -0
  36. package/bundle/docs/cli/enterprise.md +582 -0
  37. package/bundle/docs/cli/gemini-ignore.md +71 -0
  38. package/bundle/docs/cli/gemini-md.md +108 -0
  39. package/bundle/docs/cli/generation-settings.md +210 -0
  40. package/bundle/docs/cli/headless.md +388 -0
  41. package/bundle/docs/cli/index.md +65 -0
  42. package/bundle/docs/cli/keyboard-shortcuts.md +141 -0
  43. package/bundle/docs/cli/model-routing.md +42 -0
  44. package/bundle/docs/cli/model.md +62 -0
  45. package/bundle/docs/cli/rewind.md +51 -0
  46. package/bundle/docs/cli/sandbox.md +171 -0
  47. package/bundle/docs/cli/session-management.md +158 -0
  48. package/bundle/docs/cli/settings.md +141 -0
  49. package/bundle/docs/cli/skills.md +112 -0
  50. package/bundle/docs/cli/system-prompt.md +125 -0
  51. package/bundle/docs/cli/telemetry.md +826 -0
  52. package/bundle/docs/cli/themes.md +235 -0
  53. package/bundle/docs/cli/token-caching.md +20 -0
  54. package/bundle/docs/cli/trusted-folders.md +95 -0
  55. package/bundle/docs/cli/tutorials/skills-getting-started.md +97 -0
  56. package/bundle/docs/cli/tutorials.md +87 -0
  57. package/bundle/docs/cli/uninstall.md +65 -0
  58. package/bundle/docs/core/index.md +107 -0
  59. package/bundle/docs/core/memport.md +246 -0
  60. package/bundle/docs/core/policy-engine.md +305 -0
  61. package/bundle/docs/core/remote-agents.md +84 -0
  62. package/bundle/docs/core/subagents.md +191 -0
  63. package/bundle/docs/core/tools-api.md +131 -0
  64. package/bundle/docs/examples/proxy-script.md +83 -0
  65. package/bundle/docs/extensions/best-practices.md +139 -0
  66. package/bundle/docs/extensions/index.md +45 -0
  67. package/bundle/docs/extensions/reference.md +336 -0
  68. package/bundle/docs/extensions/releasing.md +183 -0
  69. package/bundle/docs/extensions/writing-extensions.md +281 -0
  70. package/bundle/docs/faq.md +154 -0
  71. package/bundle/docs/get-started/authentication.md +321 -0
  72. package/bundle/docs/get-started/configuration-v1.md +880 -0
  73. package/bundle/docs/get-started/configuration.md +1602 -0
  74. package/bundle/docs/get-started/examples.md +219 -0
  75. package/bundle/docs/get-started/gemini-3.md +101 -0
  76. package/bundle/docs/get-started/index.md +71 -0
  77. package/bundle/docs/get-started/installation.md +141 -0
  78. package/bundle/docs/hooks/best-practices.md +677 -0
  79. package/bundle/docs/hooks/index.md +164 -0
  80. package/bundle/docs/hooks/reference.md +322 -0
  81. package/bundle/docs/hooks/writing-hooks.md +450 -0
  82. package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
  83. package/bundle/docs/ide-integration/index.md +202 -0
  84. package/bundle/docs/index.md +123 -0
  85. package/bundle/docs/integration-tests.md +211 -0
  86. package/bundle/docs/issue-and-pr-automation.md +134 -0
  87. package/bundle/docs/local-development.md +128 -0
  88. package/bundle/docs/mermaid/context.mmd +103 -0
  89. package/bundle/docs/mermaid/render-path.mmd +64 -0
  90. package/bundle/docs/npm.md +62 -0
  91. package/bundle/docs/quota-and-pricing.md +158 -0
  92. package/bundle/docs/release-confidence.md +164 -0
  93. package/bundle/docs/releases.md +540 -0
  94. package/bundle/docs/sidebar.json +152 -0
  95. package/bundle/docs/tools/file-system.md +216 -0
  96. package/bundle/docs/tools/index.md +98 -0
  97. package/bundle/docs/tools/mcp-server.md +1068 -0
  98. package/bundle/docs/tools/memory.md +54 -0
  99. package/bundle/docs/tools/shell.md +260 -0
  100. package/bundle/docs/tools/todos.md +57 -0
  101. package/bundle/docs/tools/web-fetch.md +59 -0
  102. package/bundle/docs/tools/web-search.md +42 -0
  103. package/bundle/docs/tos-privacy.md +96 -0
  104. package/bundle/docs/troubleshooting.md +173 -0
  105. package/bundle/gemini.js +538280 -0
  106. package/bundle/policies/discovered.toml +8 -0
  107. package/bundle/policies/plan.toml +86 -0
  108. package/bundle/policies/read-only.toml +51 -0
  109. package/bundle/policies/write.toml +78 -0
  110. package/bundle/policies/yolo.toml +32 -0
  111. package/bundle/sandbox-macos-permissive-closed.sb +32 -0
  112. package/bundle/sandbox-macos-permissive-open.sb +27 -0
  113. package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
  114. package/bundle/sandbox-macos-restrictive-closed.sb +93 -0
  115. package/bundle/sandbox-macos-restrictive-open.sb +96 -0
  116. package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
  117. package/package.json +154 -0
@@ -0,0 +1,880 @@
1
+ # Gemini CLI configuration
2
+
3
+ **Note on deprecated configuration format**
4
+
5
+ This document describes the legacy v1 format for the `settings.json` file. This
6
+ format is now deprecated.
7
+
8
+ - The new format will be supported in the stable release starting
9
+ **[09/10/25]**.
10
+ - Automatic migration from the old format to the new format will begin on
11
+ **[09/17/25]**.
12
+
13
+ For details on the new, recommended format, please see the
14
+ [current Configuration documentation](./configuration.md).
15
+
16
+ Gemini CLI offers several ways to configure its behavior, including environment
17
+ variables, command-line arguments, and settings files. This document outlines
18
+ the different configuration methods and available settings.
19
+
20
+ ## Configuration layers
21
+
22
+ Configuration is applied in the following order of precedence (lower numbers are
23
+ overridden by higher numbers):
24
+
25
+ 1. **Default values:** Hardcoded defaults within the application.
26
+ 2. **System defaults file:** System-wide default settings that can be
27
+ overridden by other settings files.
28
+ 3. **User settings file:** Global settings for the current user.
29
+ 4. **Project settings file:** Project-specific settings.
30
+ 5. **System settings file:** System-wide settings that override all other
31
+ settings files.
32
+ 6. **Environment variables:** System-wide or session-specific variables,
33
+ potentially loaded from `.env` files.
34
+ 7. **Command-line arguments:** Values passed when launching the CLI.
35
+
36
+ ## Settings files
37
+
38
+ Gemini CLI uses JSON settings files for persistent configuration. There are four
39
+ locations for these files:
40
+
41
+ - **System defaults file:**
42
+ - **Location:** `/etc/gemini-cli/system-defaults.json` (Linux),
43
+ `C:\ProgramData\gemini-cli\system-defaults.json` (Windows) or
44
+ `/Library/Application Support/GeminiCli/system-defaults.json` (macOS). The
45
+ path can be overridden using the `GEMINI_CLI_SYSTEM_DEFAULTS_PATH`
46
+ environment variable.
47
+ - **Scope:** Provides a base layer of system-wide default settings. These
48
+ settings have the lowest precedence and are intended to be overridden by
49
+ user, project, or system override settings.
50
+ - **User settings file:**
51
+ - **Location:** `~/.gemini/settings.json` (where `~` is your home directory).
52
+ - **Scope:** Applies to all Gemini CLI sessions for the current user. User
53
+ settings override system defaults.
54
+ - **Project settings file:**
55
+ - **Location:** `.gemini/settings.json` within your project's root directory.
56
+ - **Scope:** Applies only when running Gemini CLI from that specific project.
57
+ Project settings override user settings and system defaults.
58
+ - **System settings file:**
59
+ - **Location:** `/etc/gemini-cli/settings.json` (Linux),
60
+ `C:\ProgramData\gemini-cli\settings.json` (Windows) or
61
+ `/Library/Application Support/GeminiCli/settings.json` (macOS). The path can
62
+ be overridden using the `GEMINI_CLI_SYSTEM_SETTINGS_PATH` environment
63
+ variable.
64
+ - **Scope:** Applies to all Gemini CLI sessions on the system, for all users.
65
+ System settings act as overrides, taking precedence over all other settings
66
+ files. May be useful for system administrators at enterprises to have
67
+ controls over users' Gemini CLI setups.
68
+
69
+ **Note on environment variables in settings:** String values within your
70
+ `settings.json` files can reference environment variables using either
71
+ `$VAR_NAME` or `${VAR_NAME}` syntax. These variables will be automatically
72
+ resolved when the settings are loaded. For example, if you have an environment
73
+ variable `MY_API_TOKEN`, you could use it in `settings.json` like this:
74
+ `"apiKey": "$MY_API_TOKEN"`.
75
+
76
+ > **Note for Enterprise Users:** For guidance on deploying and managing Gemini
77
+ > CLI in a corporate environment, please see the
78
+ > [Enterprise Configuration](../cli/enterprise.md) documentation.
79
+
80
+ ### The `.gemini` directory in your project
81
+
82
+ In addition to a project settings file, a project's `.gemini` directory can
83
+ contain other project-specific files related to Gemini CLI's operation, such as:
84
+
85
+ - [Custom sandbox profiles](#sandboxing) (e.g.,
86
+ `.gemini/sandbox-macos-custom.sb`, `.gemini/sandbox.Dockerfile`).
87
+
88
+ ### Available settings in `settings.json`:
89
+
90
+ - **`contextFileName`** (string or array of strings):
91
+ - **Description:** Specifies the filename for context files (e.g.,
92
+ `GEMINI.md`, `AGENTS.md`). Can be a single filename or a list of accepted
93
+ filenames.
94
+ - **Default:** `GEMINI.md`
95
+ - **Example:** `"contextFileName": "AGENTS.md"`
96
+
97
+ - **`bugCommand`** (object):
98
+ - **Description:** Overrides the default URL for the `/bug` command.
99
+ - **Default:**
100
+ `"urlTemplate": "https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title={title}&info={info}"`
101
+ - **Properties:**
102
+ - **`urlTemplate`** (string): A URL that can contain `{title}` and `{info}`
103
+ placeholders.
104
+ - **Example:**
105
+ ```json
106
+ "bugCommand": {
107
+ "urlTemplate": "https://bug.example.com/new?title={title}&info={info}"
108
+ }
109
+ ```
110
+
111
+ - **`fileFiltering`** (object):
112
+ - **Description:** Controls git-aware file filtering behavior for @ commands
113
+ and file discovery tools.
114
+ - **Default:** `"respectGitIgnore": true, "enableRecursiveFileSearch": true`
115
+ - **Properties:**
116
+ - **`respectGitIgnore`** (boolean): Whether to respect .gitignore patterns
117
+ when discovering files. When set to `true`, git-ignored files (like
118
+ `node_modules/`, `dist/`, `.env`) are automatically excluded from @
119
+ commands and file listing operations.
120
+ - **`enableRecursiveFileSearch`** (boolean): Whether to enable searching
121
+ recursively for filenames under the current tree when completing @
122
+ prefixes in the prompt.
123
+ - **`disableFuzzySearch`** (boolean): When `true`, disables the fuzzy search
124
+ capabilities when searching for files, which can improve performance on
125
+ projects with a large number of files.
126
+ - **Example:**
127
+ ```json
128
+ "fileFiltering": {
129
+ "respectGitIgnore": true,
130
+ "enableRecursiveFileSearch": false,
131
+ "disableFuzzySearch": true
132
+ }
133
+ ```
134
+
135
+ ### Troubleshooting file search performance
136
+
137
+ If you are experiencing performance issues with file searching (e.g., with `@`
138
+ completions), especially in projects with a very large number of files, here are
139
+ a few things you can try in order of recommendation:
140
+
141
+ 1. **Use `.geminiignore`:** Create a `.geminiignore` file in your project root
142
+ to exclude directories that contain a large number of files that you don't
143
+ need to reference (e.g., build artifacts, logs, `node_modules`). Reducing
144
+ the total number of files crawled is the most effective way to improve
145
+ performance.
146
+
147
+ 2. **Disable fuzzy search:** If ignoring files is not enough, you can disable
148
+ fuzzy search by setting `disableFuzzySearch` to `true` in your
149
+ `settings.json` file. This will use a simpler, non-fuzzy matching algorithm,
150
+ which can be faster.
151
+
152
+ 3. **Disable recursive file search:** As a last resort, you can disable
153
+ recursive file search entirely by setting `enableRecursiveFileSearch` to
154
+ `false`. This will be the fastest option as it avoids a recursive crawl of
155
+ your project. However, it means you will need to type the full path to files
156
+ when using `@` completions.
157
+
158
+ - **`coreTools`** (array of strings):
159
+ - **Description:** Allows you to specify a list of core tool names that should
160
+ be made available to the model. This can be used to restrict the set of
161
+ built-in tools. See [Built-in Tools](../core/tools-api.md#built-in-tools)
162
+ for a list of core tools. You can also specify command-specific restrictions
163
+ for tools that support it, like the `ShellTool`. For example,
164
+ `"coreTools": ["ShellTool(ls -l)"]` will only allow the `ls -l` command to
165
+ be executed.
166
+ - **Default:** All tools available for use by the Gemini model.
167
+ - **Example:** `"coreTools": ["ReadFileTool", "GlobTool", "ShellTool(ls)"]`.
168
+
169
+ - **`allowedTools`** (array of strings):
170
+ - **Default:** `undefined`
171
+ - **Description:** A list of tool names that will bypass the confirmation
172
+ dialog. This is useful for tools that you trust and use frequently. The
173
+ match semantics are the same as `coreTools`.
174
+ - **Example:** `"allowedTools": ["ShellTool(git status)"]`.
175
+
176
+ - **`excludeTools`** (array of strings):
177
+ - **Description:** Allows you to specify a list of core tool names that should
178
+ be excluded from the model. A tool listed in both `excludeTools` and
179
+ `coreTools` is excluded. You can also specify command-specific restrictions
180
+ for tools that support it, like the `ShellTool`. For example,
181
+ `"excludeTools": ["ShellTool(rm -rf)"]` will block the `rm -rf` command.
182
+ - **Default**: No tools excluded.
183
+ - **Example:** `"excludeTools": ["run_shell_command", "findFiles"]`.
184
+ - **Security Note:** Command-specific restrictions in `excludeTools` for
185
+ `run_shell_command` are based on simple string matching and can be easily
186
+ bypassed. This feature is **not a security mechanism** and should not be
187
+ relied upon to safely execute untrusted code. It is recommended to use
188
+ `coreTools` to explicitly select commands that can be executed.
189
+
190
+ - **`allowMCPServers`** (array of strings):
191
+ - **Description:** Allows you to specify a list of MCP server names that
192
+ should be made available to the model. This can be used to restrict the set
193
+ of MCP servers to connect to. Note that this will be ignored if
194
+ `--allowed-mcp-server-names` is set.
195
+ - **Default:** All MCP servers are available for use by the Gemini model.
196
+ - **Example:** `"allowMCPServers": ["myPythonServer"]`.
197
+ - **Security note:** This uses simple string matching on MCP server names,
198
+ which can be modified. If you're a system administrator looking to prevent
199
+ users from bypassing this, consider configuring the `mcpServers` at the
200
+ system settings level such that the user will not be able to configure any
201
+ MCP servers of their own. This should not be used as an airtight security
202
+ mechanism.
203
+
204
+ - **`excludeMCPServers`** (array of strings):
205
+ - **Description:** Allows you to specify a list of MCP server names that
206
+ should be excluded from the model. A server listed in both
207
+ `excludeMCPServers` and `allowMCPServers` is excluded. Note that this will
208
+ be ignored if `--allowed-mcp-server-names` is set.
209
+ - **Default**: No MCP servers excluded.
210
+ - **Example:** `"excludeMCPServers": ["myNodeServer"]`.
211
+ - **Security note:** This uses simple string matching on MCP server names,
212
+ which can be modified. If you're a system administrator looking to prevent
213
+ users from bypassing this, consider configuring the `mcpServers` at the
214
+ system settings level such that the user will not be able to configure any
215
+ MCP servers of their own. This should not be used as an airtight security
216
+ mechanism.
217
+
218
+ - **`theme`** (string):
219
+ - **Description:** Sets the visual [theme](../cli/themes.md) for Gemini CLI.
220
+ - **Default:** `"Default"`
221
+ - **Example:** `"theme": "GitHub"`
222
+
223
+ - **`vimMode`** (boolean):
224
+ - **Description:** Enables or disables vim mode for input editing. When
225
+ enabled, the input area supports vim-style navigation and editing commands
226
+ with NORMAL and INSERT modes. The vim mode status is displayed in the footer
227
+ and persists between sessions.
228
+ - **Default:** `false`
229
+ - **Example:** `"vimMode": true`
230
+
231
+ - **`sandbox`** (boolean or string):
232
+ - **Description:** Controls whether and how to use sandboxing for tool
233
+ execution. If set to `true`, Gemini CLI uses a pre-built
234
+ `gemini-cli-sandbox` Docker image. For more information, see
235
+ [Sandboxing](#sandboxing).
236
+ - **Default:** `false`
237
+ - **Example:** `"sandbox": "docker"`
238
+
239
+ - **`toolDiscoveryCommand`** (string):
240
+ - **Description:** Defines a custom shell command for discovering tools from
241
+ your project. The shell command must return on `stdout` a JSON array of
242
+ [function declarations](https://ai.google.dev/gemini-api/docs/function-calling#function-declarations).
243
+ Tool wrappers are optional.
244
+ - **Default:** Empty
245
+ - **Example:** `"toolDiscoveryCommand": "bin/get_tools"`
246
+
247
+ - **`toolCallCommand`** (string):
248
+ - **Description:** Defines a custom shell command for calling a specific tool
249
+ that was discovered using `toolDiscoveryCommand`. The shell command must
250
+ meet the following criteria:
251
+ - It must take function `name` (exactly as in
252
+ [function declaration](https://ai.google.dev/gemini-api/docs/function-calling#function-declarations))
253
+ as first command line argument.
254
+ - It must read function arguments as JSON on `stdin`, analogous to
255
+ [`functionCall.args`](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#functioncall).
256
+ - It must return function output as JSON on `stdout`, analogous to
257
+ [`functionResponse.response.content`](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#functionresponse).
258
+ - **Default:** Empty
259
+ - **Example:** `"toolCallCommand": "bin/call_tool"`
260
+
261
+ - **`mcpServers`** (object):
262
+ - **Description:** Configures connections to one or more Model-Context
263
+ Protocol (MCP) servers for discovering and using custom tools. Gemini CLI
264
+ attempts to connect to each configured MCP server to discover available
265
+ tools. If multiple MCP servers expose a tool with the same name, the tool
266
+ names will be prefixed with the server alias you defined in the
267
+ configuration (e.g., `serverAlias__actualToolName`) to avoid conflicts. Note
268
+ that the system might strip certain schema properties from MCP tool
269
+ definitions for compatibility. At least one of `command`, `url`, or
270
+ `httpUrl` must be provided. If multiple are specified, the order of
271
+ precedence is `httpUrl`, then `url`, then `command`.
272
+ - **Default:** Empty
273
+ - **Properties:**
274
+ - **`<SERVER_NAME>`** (object): The server parameters for the named server.
275
+ - `command` (string, optional): The command to execute to start the MCP
276
+ server via standard I/O.
277
+ - `args` (array of strings, optional): Arguments to pass to the command.
278
+ - `env` (object, optional): Environment variables to set for the server
279
+ process.
280
+ - `cwd` (string, optional): The working directory in which to start the
281
+ server.
282
+ - `url` (string, optional): The URL of an MCP server that uses Server-Sent
283
+ Events (SSE) for communication.
284
+ - `httpUrl` (string, optional): The URL of an MCP server that uses
285
+ streamable HTTP for communication.
286
+ - `headers` (object, optional): A map of HTTP headers to send with
287
+ requests to `url` or `httpUrl`.
288
+ - `timeout` (number, optional): Timeout in milliseconds for requests to
289
+ this MCP server.
290
+ - `trust` (boolean, optional): Trust this server and bypass all tool call
291
+ confirmations.
292
+ - `description` (string, optional): A brief description of the server,
293
+ which may be used for display purposes.
294
+ - `includeTools` (array of strings, optional): List of tool names to
295
+ include from this MCP server. When specified, only the tools listed here
296
+ will be available from this server (allowlist behavior). If not
297
+ specified, all tools from the server are enabled by default.
298
+ - `excludeTools` (array of strings, optional): List of tool names to
299
+ exclude from this MCP server. Tools listed here will not be available to
300
+ the model, even if they are exposed by the server. **Note:**
301
+ `excludeTools` takes precedence over `includeTools` - if a tool is in
302
+ both lists, it will be excluded.
303
+ - **Example:**
304
+ ```json
305
+ "mcpServers": {
306
+ "myPythonServer": {
307
+ "command": "python",
308
+ "args": ["mcp_server.py", "--port", "8080"],
309
+ "cwd": "./mcp_tools/python",
310
+ "timeout": 5000,
311
+ "includeTools": ["safe_tool", "file_reader"],
312
+ },
313
+ "myNodeServer": {
314
+ "command": "node",
315
+ "args": ["mcp_server.js"],
316
+ "cwd": "./mcp_tools/node",
317
+ "excludeTools": ["dangerous_tool", "file_deleter"]
318
+ },
319
+ "myDockerServer": {
320
+ "command": "docker",
321
+ "args": ["run", "-i", "--rm", "-e", "API_KEY", "ghcr.io/foo/bar"],
322
+ "env": {
323
+ "API_KEY": "$MY_API_TOKEN"
324
+ }
325
+ },
326
+ "mySseServer": {
327
+ "url": "http://localhost:8081/events",
328
+ "headers": {
329
+ "Authorization": "Bearer $MY_SSE_TOKEN"
330
+ },
331
+ "description": "An example SSE-based MCP server."
332
+ },
333
+ "myStreamableHttpServer": {
334
+ "httpUrl": "http://localhost:8082/stream",
335
+ "headers": {
336
+ "X-API-Key": "$MY_HTTP_API_KEY"
337
+ },
338
+ "description": "An example Streamable HTTP-based MCP server."
339
+ }
340
+ }
341
+ ```
342
+
343
+ - **`checkpointing`** (object):
344
+ - **Description:** Configures the checkpointing feature, which allows you to
345
+ save and restore conversation and file states. See the
346
+ [Checkpointing documentation](../cli/checkpointing.md) for more details.
347
+ - **Default:** `{"enabled": false}`
348
+ - **Properties:**
349
+ - **`enabled`** (boolean): When `true`, the `/restore` command is available.
350
+
351
+ - **`preferredEditor`** (string):
352
+ - **Description:** Specifies the preferred editor to use for viewing diffs.
353
+ - **Default:** `vscode`
354
+ - **Example:** `"preferredEditor": "vscode"`
355
+
356
+ - **`telemetry`** (object)
357
+ - **Description:** Configures logging and metrics collection for Gemini CLI.
358
+ For more information, see [Telemetry](../cli/telemetry.md).
359
+ - **Default:**
360
+ `{"enabled": false, "target": "local", "otlpEndpoint": "http://localhost:4317", "logPrompts": true}`
361
+ - **Properties:**
362
+ - **`enabled`** (boolean): Whether or not telemetry is enabled.
363
+ - **`target`** (string): The destination for collected telemetry. Supported
364
+ values are `local` and `gcp`.
365
+ - **`otlpEndpoint`** (string): The endpoint for the OTLP Exporter.
366
+ - **`logPrompts`** (boolean): Whether or not to include the content of user
367
+ prompts in the logs.
368
+ - **Example:**
369
+ ```json
370
+ "telemetry": {
371
+ "enabled": true,
372
+ "target": "local",
373
+ "otlpEndpoint": "http://localhost:16686",
374
+ "logPrompts": false
375
+ }
376
+ ```
377
+ - **`usageStatisticsEnabled`** (boolean):
378
+ - **Description:** Enables or disables the collection of usage statistics. See
379
+ [Usage Statistics](#usage-statistics) for more information.
380
+ - **Default:** `true`
381
+ - **Example:**
382
+ ```json
383
+ "usageStatisticsEnabled": false
384
+ ```
385
+
386
+ - **`hideTips`** (boolean):
387
+ - **Description:** Enables or disables helpful tips in the CLI interface.
388
+ - **Default:** `false`
389
+ - **Example:**
390
+
391
+ ```json
392
+ "hideTips": true
393
+ ```
394
+
395
+ - **`hideBanner`** (boolean):
396
+ - **Description:** Enables or disables the startup banner (ASCII art logo) in
397
+ the CLI interface.
398
+ - **Default:** `false`
399
+ - **Example:**
400
+
401
+ ```json
402
+ "hideBanner": true
403
+ ```
404
+
405
+ - **`maxSessionTurns`** (number):
406
+ - **Description:** Sets the maximum number of turns for a session. If the
407
+ session exceeds this limit, the CLI will stop processing and start a new
408
+ chat.
409
+ - **Default:** `-1` (unlimited)
410
+ - **Example:**
411
+ ```json
412
+ "maxSessionTurns": 10
413
+ ```
414
+
415
+ - **`summarizeToolOutput`** (object):
416
+ - **Description:** Enables or disables the summarization of tool output. You
417
+ can specify the token budget for the summarization using the `tokenBudget`
418
+ setting.
419
+ - Note: Currently only the `run_shell_command` tool is supported.
420
+ - **Default:** `{}` (Disabled by default)
421
+ - **Example:**
422
+ ```json
423
+ "summarizeToolOutput": {
424
+ "run_shell_command": {
425
+ "tokenBudget": 2000
426
+ }
427
+ }
428
+ ```
429
+
430
+ - **`excludedProjectEnvVars`** (array of strings):
431
+ - **Description:** Specifies environment variables that should be excluded
432
+ from being loaded from project `.env` files. This prevents project-specific
433
+ environment variables (like `DEBUG=true`) from interfering with gemini-cli
434
+ behavior. Variables from `.gemini/.env` files are never excluded.
435
+ - **Default:** `["DEBUG", "DEBUG_MODE"]`
436
+ - **Example:**
437
+ ```json
438
+ "excludedProjectEnvVars": ["DEBUG", "DEBUG_MODE", "NODE_ENV"]
439
+ ```
440
+
441
+ - **`includeDirectories`** (array of strings):
442
+ - **Description:** Specifies an array of additional absolute or relative paths
443
+ to include in the workspace context. Missing directories will be skipped
444
+ with a warning by default. Paths can use `~` to refer to the user's home
445
+ directory. This setting can be combined with the `--include-directories`
446
+ command-line flag.
447
+ - **Default:** `[]`
448
+ - **Example:**
449
+ ```json
450
+ "includeDirectories": [
451
+ "/path/to/another/project",
452
+ "../shared-library",
453
+ "~/common-utils"
454
+ ]
455
+ ```
456
+
457
+ - **`loadMemoryFromIncludeDirectories`** (boolean):
458
+ - **Description:** Controls the behavior of the `/memory refresh` command. If
459
+ set to `true`, `GEMINI.md` files should be loaded from all directories that
460
+ are added. If set to `false`, `GEMINI.md` should only be loaded from the
461
+ current directory.
462
+ - **Default:** `false`
463
+ - **Example:**
464
+ ```json
465
+ "loadMemoryFromIncludeDirectories": true
466
+ ```
467
+
468
+ - **`showLineNumbers`** (boolean):
469
+ - **Description:** Controls whether line numbers are displayed in code blocks
470
+ in the CLI output.
471
+ - **Default:** `true`
472
+ - **Example:**
473
+ ```json
474
+ "showLineNumbers": false
475
+ ```
476
+
477
+ - **`accessibility`** (object):
478
+ - **Description:** Configures accessibility features for the CLI.
479
+ - **Properties:**
480
+ - **`screenReader`** (boolean): Enables screen reader mode, which adjusts
481
+ the TUI for better compatibility with screen readers. This can also be
482
+ enabled with the `--screen-reader` command-line flag, which will take
483
+ precedence over the setting.
484
+ - **`disableLoadingPhrases`** (boolean): Disables the display of loading
485
+ phrases during operations.
486
+ - **Default:** `{"screenReader": false, "disableLoadingPhrases": false}`
487
+ - **Example:**
488
+ ```json
489
+ "accessibility": {
490
+ "screenReader": true,
491
+ "disableLoadingPhrases": true
492
+ }
493
+ ```
494
+
495
+ ### Example `settings.json`:
496
+
497
+ ```json
498
+ {
499
+ "theme": "GitHub",
500
+ "sandbox": "docker",
501
+ "toolDiscoveryCommand": "bin/get_tools",
502
+ "toolCallCommand": "bin/call_tool",
503
+ "mcpServers": {
504
+ "mainServer": {
505
+ "command": "bin/mcp_server.py"
506
+ },
507
+ "anotherServer": {
508
+ "command": "node",
509
+ "args": ["mcp_server.js", "--verbose"]
510
+ }
511
+ },
512
+ "telemetry": {
513
+ "enabled": true,
514
+ "target": "local",
515
+ "otlpEndpoint": "http://localhost:4317",
516
+ "logPrompts": true
517
+ },
518
+ "usageStatisticsEnabled": true,
519
+ "hideTips": false,
520
+ "hideBanner": false,
521
+ "maxSessionTurns": 10,
522
+ "summarizeToolOutput": {
523
+ "run_shell_command": {
524
+ "tokenBudget": 100
525
+ }
526
+ },
527
+ "excludedProjectEnvVars": ["DEBUG", "DEBUG_MODE", "NODE_ENV"],
528
+ "includeDirectories": ["path/to/dir1", "~/path/to/dir2", "../path/to/dir3"],
529
+ "loadMemoryFromIncludeDirectories": true
530
+ }
531
+ ```
532
+
533
+ ## Shell history
534
+
535
+ The CLI keeps a history of shell commands you run. To avoid conflicts between
536
+ different projects, this history is stored in a project-specific directory
537
+ within your user's home folder.
538
+
539
+ - **Location:** `~/.gemini/tmp/<project_hash>/shell_history`
540
+ - `<project_hash>` is a unique identifier generated from your project's root
541
+ path.
542
+ - The history is stored in a file named `shell_history`.
543
+
544
+ ## Environment variables and `.env` files
545
+
546
+ Environment variables are a common way to configure applications, especially for
547
+ sensitive information like API keys or for settings that might change between
548
+ environments. For authentication setup, see the
549
+ [Authentication documentation](./authentication.md) which covers all available
550
+ authentication methods.
551
+
552
+ The CLI automatically loads environment variables from an `.env` file. The
553
+ loading order is:
554
+
555
+ 1. `.env` file in the current working directory.
556
+ 2. If not found, it searches upwards in parent directories until it finds an
557
+ `.env` file or reaches the project root (identified by a `.git` folder) or
558
+ the home directory.
559
+ 3. If still not found, it looks for `~/.env` (in the user's home directory).
560
+
561
+ **Environment variable exclusion:** Some environment variables (like `DEBUG` and
562
+ `DEBUG_MODE`) are automatically excluded from being loaded from project `.env`
563
+ files to prevent interference with gemini-cli behavior. Variables from
564
+ `.gemini/.env` files are never excluded. You can customize this behavior using
565
+ the `excludedProjectEnvVars` setting in your `settings.json` file.
566
+
567
+ - **`GEMINI_API_KEY`**:
568
+ - Your API key for the Gemini API.
569
+ - One of several available [authentication methods](./authentication.md).
570
+ - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env`
571
+ file.
572
+ - **`GEMINI_MODEL`**:
573
+ - Specifies the default Gemini model to use.
574
+ - Overrides the hardcoded default
575
+ - Example: `export GEMINI_MODEL="gemini-2.5-flash"`
576
+ - **`GOOGLE_API_KEY`**:
577
+ - Your Google Cloud API key.
578
+ - Required for using Vertex AI in express mode.
579
+ - Ensure you have the necessary permissions.
580
+ - Example: `export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"`.
581
+ - **`GOOGLE_CLOUD_PROJECT`**:
582
+ - Your Google Cloud Project ID.
583
+ - Required for using Code Assist or Vertex AI.
584
+ - If using Vertex AI, ensure you have the necessary permissions in this
585
+ project.
586
+ - **Cloud Shell note:** When running in a Cloud Shell environment, this
587
+ variable defaults to a special project allocated for Cloud Shell users. If
588
+ you have `GOOGLE_CLOUD_PROJECT` set in your global environment in Cloud
589
+ Shell, it will be overridden by this default. To use a different project in
590
+ Cloud Shell, you must define `GOOGLE_CLOUD_PROJECT` in a `.env` file.
591
+ - Example: `export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.
592
+ - **`GOOGLE_APPLICATION_CREDENTIALS`** (string):
593
+ - **Description:** The path to your Google Application Credentials JSON file.
594
+ - **Example:**
595
+ `export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json"`
596
+ - **`OTLP_GOOGLE_CLOUD_PROJECT`**:
597
+ - Your Google Cloud Project ID for Telemetry in Google Cloud
598
+ - Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.
599
+ - **`GOOGLE_CLOUD_LOCATION`**:
600
+ - Your Google Cloud Project Location (e.g., us-central1).
601
+ - Required for using Vertex AI in non express mode.
602
+ - Example: `export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"`.
603
+ - **`GEMINI_SANDBOX`**:
604
+ - Alternative to the `sandbox` setting in `settings.json`.
605
+ - Accepts `true`, `false`, `docker`, `podman`, or a custom command string.
606
+ - **`HTTP_PROXY` / `HTTPS_PROXY`**:
607
+ - Specifies the proxy server to use for outgoing HTTP/HTTPS requests.
608
+ - Example: `export HTTPS_PROXY="http://proxy.example.com:8080"`
609
+ - **`SEATBELT_PROFILE`** (macOS specific):
610
+ - Switches the Seatbelt (`sandbox-exec`) profile on macOS.
611
+ - `permissive-open`: (Default) Restricts writes to the project folder (and a
612
+ few other folders, see
613
+ `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other
614
+ operations.
615
+ - `strict`: Uses a strict profile that declines operations by default.
616
+ - `<profile_name>`: Uses a custom profile. To define a custom profile, create
617
+ a file named `sandbox-macos-<profile_name>.sb` in your project's `.gemini/`
618
+ directory (e.g., `my-project/.gemini/sandbox-macos-custom.sb`).
619
+ - **`DEBUG` or `DEBUG_MODE`** (often used by underlying libraries or the CLI
620
+ itself):
621
+ - Set to `true` or `1` to enable verbose debug logging, which can be helpful
622
+ for troubleshooting.
623
+ - **Note:** These variables are automatically excluded from project `.env`
624
+ files by default to prevent interference with gemini-cli behavior. Use
625
+ `.gemini/.env` files if you need to set these for gemini-cli specifically.
626
+ - **`NO_COLOR`**:
627
+ - Set to any value to disable all color output in the CLI.
628
+ - **`CLI_TITLE`**:
629
+ - Set to a string to customize the title of the CLI.
630
+ - **`CODE_ASSIST_ENDPOINT`**:
631
+ - Specifies the endpoint for the code assist server.
632
+ - This is useful for development and testing.
633
+
634
+ ## Command-line arguments
635
+
636
+ Arguments passed directly when running the CLI can override other configurations
637
+ for that specific session.
638
+
639
+ - **`--model <model_name>`** (**`-m <model_name>`**):
640
+ - Specifies the Gemini model to use for this session.
641
+ - Example: `npm start -- --model gemini-1.5-pro-latest`
642
+ - **`--prompt <your_prompt>`** (**`-p <your_prompt>`**):
643
+ - Used to pass a prompt directly to the command. This invokes Gemini CLI in a
644
+ non-interactive mode.
645
+ - **`--prompt-interactive <your_prompt>`** (**`-i <your_prompt>`**):
646
+ - Starts an interactive session with the provided prompt as the initial input.
647
+ - The prompt is processed within the interactive session, not before it.
648
+ - Cannot be used when piping input from stdin.
649
+ - Example: `gemini -i "explain this code"`
650
+ - **`--sandbox`** (**`-s`**):
651
+ - Enables sandbox mode for this session.
652
+ - **`--sandbox-image`**:
653
+ - Sets the sandbox image URI.
654
+ - **`--debug`** (**`-d`**):
655
+ - Enables debug mode for this session, providing more verbose output.
656
+
657
+ - **`--help`** (or **`-h`**):
658
+ - Displays help information about command-line arguments.
659
+ - **`--show-memory-usage`**:
660
+ - Displays the current memory usage.
661
+ - **`--yolo`**:
662
+ - Enables YOLO mode, which automatically approves all tool calls.
663
+ - **`--approval-mode <mode>`**:
664
+ - Sets the approval mode for tool calls. Available modes:
665
+ - `default`: Prompt for approval on each tool call (default behavior)
666
+ - `auto_edit`: Automatically approve edit tools (replace, write_file) while
667
+ prompting for others
668
+ - `yolo`: Automatically approve all tool calls (equivalent to `--yolo`)
669
+ - Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of
670
+ `--yolo` for the new unified approach.
671
+ - Example: `gemini --approval-mode auto_edit`
672
+ - **`--allowed-tools <tool1,tool2,...>`**:
673
+ - A comma-separated list of tool names that will bypass the confirmation
674
+ dialog.
675
+ - Example: `gemini --allowed-tools "ShellTool(git status)"`
676
+ - **`--telemetry`**:
677
+ - Enables [telemetry](../cli/telemetry.md).
678
+ - **`--telemetry-target`**:
679
+ - Sets the telemetry target. See [telemetry](../cli/telemetry.md) for more
680
+ information.
681
+ - **`--telemetry-otlp-endpoint`**:
682
+ - Sets the OTLP endpoint for telemetry. See [telemetry](../cli/telemetry.md)
683
+ for more information.
684
+ - **`--telemetry-otlp-protocol`**:
685
+ - Sets the OTLP protocol for telemetry (`grpc` or `http`). Defaults to `grpc`.
686
+ See [telemetry](../cli/telemetry.md) for more information.
687
+ - **`--telemetry-log-prompts`**:
688
+ - Enables logging of prompts for telemetry. See
689
+ [telemetry](../cli/telemetry.md) for more information.
690
+ - **`--extensions <extension_name ...>`** (**`-e <extension_name ...>`**):
691
+ - Specifies a list of extensions to use for the session. If not provided, all
692
+ available extensions are used.
693
+ - Use the special term `gemini -e none` to disable all extensions.
694
+ - Example: `gemini -e my-extension -e my-other-extension`
695
+ - **`--list-extensions`** (**`-l`**):
696
+ - Lists all available extensions and exits.
697
+ - **`--include-directories <dir1,dir2,...>`**:
698
+ - Includes additional directories in the workspace for multi-directory
699
+ support.
700
+ - Can be specified multiple times or as comma-separated values.
701
+ - 5 directories can be added at maximum.
702
+ - Example: `--include-directories /path/to/project1,/path/to/project2` or
703
+ `--include-directories /path/to/project1 --include-directories /path/to/project2`
704
+ - **`--screen-reader`**:
705
+ - Enables screen reader mode for accessibility.
706
+ - **`--version`**:
707
+ - Displays the version of the CLI.
708
+
709
+ ## Context files (hierarchical instructional context)
710
+
711
+ While not strictly configuration for the CLI's _behavior_, context files
712
+ (defaulting to `GEMINI.md` but configurable via the `contextFileName` setting)
713
+ are crucial for configuring the _instructional context_ (also referred to as
714
+ "memory") provided to the Gemini model. This powerful feature allows you to give
715
+ project-specific instructions, coding style guides, or any relevant background
716
+ information to the AI, making its responses more tailored and accurate to your
717
+ needs. The CLI includes UI elements, such as an indicator in the footer showing
718
+ the number of loaded context files, to keep you informed about the active
719
+ context.
720
+
721
+ - **Purpose:** These Markdown files contain instructions, guidelines, or context
722
+ that you want the Gemini model to be aware of during your interactions. The
723
+ system is designed to manage this instructional context hierarchically.
724
+
725
+ ### Example context file content (e.g., `GEMINI.md`)
726
+
727
+ Here's a conceptual example of what a context file at the root of a TypeScript
728
+ project might contain:
729
+
730
+ ```markdown
731
+ # Project: My Awesome TypeScript Library
732
+
733
+ ## General Instructions:
734
+
735
+ - When generating new TypeScript code, please follow the existing coding style.
736
+ - Ensure all new functions and classes have JSDoc comments.
737
+ - Prefer functional programming paradigms where appropriate.
738
+ - All code should be compatible with TypeScript 5.0 and Node.js 20+.
739
+
740
+ ## Coding Style:
741
+
742
+ - Use 2 spaces for indentation.
743
+ - Interface names should be prefixed with `I` (e.g., `IUserService`).
744
+ - Private class members should be prefixed with an underscore (`_`).
745
+ - Always use strict equality (`===` and `!==`).
746
+
747
+ ## Specific Component: `src/api/client.ts`
748
+
749
+ - This file handles all outbound API requests.
750
+ - When adding new API call functions, ensure they include robust error handling
751
+ and logging.
752
+ - Use the existing `fetchWithRetry` utility for all GET requests.
753
+
754
+ ## Regarding Dependencies:
755
+
756
+ - Avoid introducing new external dependencies unless absolutely necessary.
757
+ - If a new dependency is required, please state the reason.
758
+ ```
759
+
760
+ This example demonstrates how you can provide general project context, specific
761
+ coding conventions, and even notes about particular files or components. The
762
+ more relevant and precise your context files are, the better the AI can assist
763
+ you. Project-specific context files are highly encouraged to establish
764
+ conventions and context.
765
+
766
+ - **Hierarchical loading and precedence:** The CLI implements a sophisticated
767
+ hierarchical memory system by loading context files (e.g., `GEMINI.md`) from
768
+ several locations. Content from files lower in this list (more specific)
769
+ typically overrides or supplements content from files higher up (more
770
+ general). The exact concatenation order and final context can be inspected
771
+ using the `/memory show` command. The typical loading order is:
772
+ 1. **Global context file:**
773
+ - Location: `~/.gemini/<contextFileName>` (e.g., `~/.gemini/GEMINI.md` in
774
+ your user home directory).
775
+ - Scope: Provides default instructions for all your projects.
776
+ 2. **Project root and ancestors context files:**
777
+ - Location: The CLI searches for the configured context file in the
778
+ current working directory and then in each parent directory up to either
779
+ the project root (identified by a `.git` folder) or your home directory.
780
+ - Scope: Provides context relevant to the entire project or a significant
781
+ portion of it.
782
+ 3. **Sub-directory context files (contextual/local):**
783
+ - Location: The CLI also scans for the configured context file in
784
+ subdirectories _below_ the current working directory (respecting common
785
+ ignore patterns like `node_modules`, `.git`, etc.). The breadth of this
786
+ search is limited to 200 directories by default, but can be configured
787
+ with a `memoryDiscoveryMaxDirs` field in your `settings.json` file.
788
+ - Scope: Allows for highly specific instructions relevant to a particular
789
+ component, module, or subsection of your project.
790
+ - **Concatenation and UI indication:** The contents of all found context files
791
+ are concatenated (with separators indicating their origin and path) and
792
+ provided as part of the system prompt to the Gemini model. The CLI footer
793
+ displays the count of loaded context files, giving you a quick visual cue
794
+ about the active instructional context.
795
+ - **Importing content:** You can modularize your context files by importing
796
+ other Markdown files using the `@path/to/file.md` syntax. For more details,
797
+ see the [Memory Import Processor documentation](../core/memport.md).
798
+ - **Commands for memory management:**
799
+ - Use `/memory refresh` to force a re-scan and reload of all context files
800
+ from all configured locations. This updates the AI's instructional context.
801
+ - Use `/memory show` to display the combined instructional context currently
802
+ loaded, allowing you to verify the hierarchy and content being used by the
803
+ AI.
804
+ - See the [Commands documentation](../cli/commands.md#memory) for full details
805
+ on the `/memory` command and its sub-commands (`show` and `refresh`).
806
+
807
+ By understanding and utilizing these configuration layers and the hierarchical
808
+ nature of context files, you can effectively manage the AI's memory and tailor
809
+ the Gemini CLI's responses to your specific needs and projects.
810
+
811
+ ## Sandboxing
812
+
813
+ The Gemini CLI can execute potentially unsafe operations (like shell commands
814
+ and file modifications) within a sandboxed environment to protect your system.
815
+
816
+ Sandboxing is disabled by default, but you can enable it in a few ways:
817
+
818
+ - Using `--sandbox` or `-s` flag.
819
+ - Setting `GEMINI_SANDBOX` environment variable.
820
+ - Sandbox is enabled when using `--yolo` or `--approval-mode=yolo` by default.
821
+
822
+ By default, it uses a pre-built `gemini-cli-sandbox` Docker image.
823
+
824
+ For project-specific sandboxing needs, you can create a custom Dockerfile at
825
+ `.gemini/sandbox.Dockerfile` in your project's root directory. This Dockerfile
826
+ can be based on the base sandbox image:
827
+
828
+ ```dockerfile
829
+ FROM gemini-cli-sandbox
830
+
831
+ # Add your custom dependencies or configurations here
832
+ # For example:
833
+ # RUN apt-get update && apt-get install -y some-package
834
+ # COPY ./my-config /app/my-config
835
+ ```
836
+
837
+ When `.gemini/sandbox.Dockerfile` exists, you can use `BUILD_SANDBOX`
838
+ environment variable when running Gemini CLI to automatically build the custom
839
+ sandbox image:
840
+
841
+ ```bash
842
+ BUILD_SANDBOX=1 gemini -s
843
+ ```
844
+
845
+ ## Usage statistics
846
+
847
+ To help us improve the Gemini CLI, we collect anonymized usage statistics. This
848
+ data helps us understand how the CLI is used, identify common issues, and
849
+ prioritize new features.
850
+
851
+ **What we collect:**
852
+
853
+ - **Tool calls:** We log the names of the tools that are called, whether they
854
+ succeed or fail, and how long they take to execute. We do not collect the
855
+ arguments passed to the tools or any data returned by them.
856
+ - **API requests:** We log the Gemini model used for each request, the duration
857
+ of the request, and whether it was successful. We do not collect the content
858
+ of the prompts or responses.
859
+ - **Session information:** We collect information about the configuration of the
860
+ CLI, such as the enabled tools and the approval mode.
861
+
862
+ **What we DON'T collect:**
863
+
864
+ - **Personally identifiable information (PII):** We do not collect any personal
865
+ information, such as your name, email address, or API keys.
866
+ - **Prompt and response content:** We do not log the content of your prompts or
867
+ the responses from the Gemini model.
868
+ - **File content:** We do not log the content of any files that are read or
869
+ written by the CLI.
870
+
871
+ **How to opt out:**
872
+
873
+ You can opt out of usage statistics collection at any time by setting the
874
+ `usageStatisticsEnabled` property to `false` in your `settings.json` file:
875
+
876
+ ```json
877
+ {
878
+ "usageStatisticsEnabled": false
879
+ }
880
+ ```