@google/gemini-cli-core 0.21.0-nightly.20251219.70696e364 → 0.21.0-nightly.20251221.8feeffb29

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