@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,54 @@
1
+ # Memory tool (`save_memory`)
2
+
3
+ This document describes the `save_memory` tool for the Gemini CLI.
4
+
5
+ ## Description
6
+
7
+ Use `save_memory` to save and recall information across your Gemini CLI
8
+ sessions. With `save_memory`, you can direct the CLI to remember key details
9
+ across sessions, providing personalized and directed assistance.
10
+
11
+ ### Arguments
12
+
13
+ `save_memory` takes one argument:
14
+
15
+ - `fact` (string, required): The specific fact or piece of information to
16
+ remember. This should be a clear, self-contained statement written in natural
17
+ language.
18
+
19
+ ## How to use `save_memory` with the Gemini CLI
20
+
21
+ The tool appends the provided `fact` to a special `GEMINI.md` file located in
22
+ the user's home directory (`~/.gemini/GEMINI.md`). This file can be configured
23
+ to have a different name.
24
+
25
+ Once added, the facts are stored under a `## Gemini Added Memories` section.
26
+ This file is loaded as context in subsequent sessions, allowing the CLI to
27
+ recall the saved information.
28
+
29
+ Usage:
30
+
31
+ ```
32
+ save_memory(fact="Your fact here.")
33
+ ```
34
+
35
+ ### `save_memory` examples
36
+
37
+ Remember a user preference:
38
+
39
+ ```
40
+ save_memory(fact="My preferred programming language is Python.")
41
+ ```
42
+
43
+ Store a project-specific detail:
44
+
45
+ ```
46
+ save_memory(fact="The project I'm currently working on is called 'gemini-cli'.")
47
+ ```
48
+
49
+ ## Important notes
50
+
51
+ - **General usage:** This tool should be used for concise, important facts. It
52
+ is not intended for storing large amounts of data or conversational history.
53
+ - **Memory file:** The memory file is a plain text Markdown file, so you can
54
+ view and edit it manually if needed.
@@ -0,0 +1,260 @@
1
+ # Shell tool (`run_shell_command`)
2
+
3
+ This document describes the `run_shell_command` tool for the Gemini CLI.
4
+
5
+ ## Description
6
+
7
+ Use `run_shell_command` to interact with the underlying system, run scripts, or
8
+ perform command-line operations. `run_shell_command` executes a given shell
9
+ command, including interactive commands that require user input (e.g., `vim`,
10
+ `git rebase -i`) if the `tools.shell.enableInteractiveShell` setting is set to
11
+ `true`.
12
+
13
+ On Windows, commands are executed with `powershell.exe -NoProfile -Command`
14
+ (unless you explicitly point `ComSpec` at another shell). On other platforms,
15
+ they are executed with `bash -c`.
16
+
17
+ ### Arguments
18
+
19
+ `run_shell_command` takes the following arguments:
20
+
21
+ - `command` (string, required): The exact shell command to execute.
22
+ - `description` (string, optional): A brief description of the command's
23
+ purpose, which will be shown to the user.
24
+ - `directory` (string, optional): The directory (relative to the project root)
25
+ in which to execute the command. If not provided, the command runs in the
26
+ project root.
27
+
28
+ ## How to use `run_shell_command` with the Gemini CLI
29
+
30
+ When using `run_shell_command`, the command is executed as a subprocess.
31
+ `run_shell_command` can start background processes using `&`. The tool returns
32
+ detailed information about the execution, including:
33
+
34
+ - `Command`: The command that was executed.
35
+ - `Directory`: The directory where the command was run.
36
+ - `Stdout`: Output from the standard output stream.
37
+ - `Stderr`: Output from the standard error stream.
38
+ - `Error`: Any error message reported by the subprocess.
39
+ - `Exit Code`: The exit code of the command.
40
+ - `Signal`: The signal number if the command was terminated by a signal.
41
+ - `Background PIDs`: A list of PIDs for any background processes started.
42
+
43
+ Usage:
44
+
45
+ ```
46
+ run_shell_command(command="Your commands.", description="Your description of the command.", directory="Your execution directory.")
47
+ ```
48
+
49
+ ## `run_shell_command` examples
50
+
51
+ List files in the current directory:
52
+
53
+ ```
54
+ run_shell_command(command="ls -la")
55
+ ```
56
+
57
+ Run a script in a specific directory:
58
+
59
+ ```
60
+ run_shell_command(command="./my_script.sh", directory="scripts", description="Run my custom script")
61
+ ```
62
+
63
+ Start a background server:
64
+
65
+ ```
66
+ run_shell_command(command="npm run dev &", description="Start development server in background")
67
+ ```
68
+
69
+ ## Configuration
70
+
71
+ You can configure the behavior of the `run_shell_command` tool by modifying your
72
+ `settings.json` file or by using the `/settings` command in the Gemini CLI.
73
+
74
+ ### Enabling interactive commands
75
+
76
+ To enable interactive commands, you need to set the
77
+ `tools.shell.enableInteractiveShell` setting to `true`. This will use `node-pty`
78
+ for shell command execution, which allows for interactive sessions. If
79
+ `node-pty` is not available, it will fall back to the `child_process`
80
+ implementation, which does not support interactive commands.
81
+
82
+ **Example `settings.json`:**
83
+
84
+ ```json
85
+ {
86
+ "tools": {
87
+ "shell": {
88
+ "enableInteractiveShell": true
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Showing color in output
95
+
96
+ To show color in the shell output, you need to set the `tools.shell.showColor`
97
+ setting to `true`. **Note: This setting only applies when
98
+ `tools.shell.enableInteractiveShell` is enabled.**
99
+
100
+ **Example `settings.json`:**
101
+
102
+ ```json
103
+ {
104
+ "tools": {
105
+ "shell": {
106
+ "showColor": true
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ ### Setting the pager
113
+
114
+ You can set a custom pager for the shell output by setting the
115
+ `tools.shell.pager` setting. The default pager is `cat`. **Note: This setting
116
+ only applies when `tools.shell.enableInteractiveShell` is enabled.**
117
+
118
+ **Example `settings.json`:**
119
+
120
+ ```json
121
+ {
122
+ "tools": {
123
+ "shell": {
124
+ "pager": "less"
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ ## Interactive commands
131
+
132
+ The `run_shell_command` tool now supports interactive commands by integrating a
133
+ pseudo-terminal (pty). This allows you to run commands that require real-time
134
+ user input, such as text editors (`vim`, `nano`), terminal-based UIs (`htop`),
135
+ and interactive version control operations (`git rebase -i`).
136
+
137
+ When an interactive command is running, you can send input to it from the Gemini
138
+ CLI. To focus on the interactive shell, press `ctrl+f`. The terminal output,
139
+ including complex TUIs, will be rendered correctly.
140
+
141
+ ## Important notes
142
+
143
+ - **Security:** Be cautious when executing commands, especially those
144
+ constructed from user input, to prevent security vulnerabilities.
145
+ - **Error handling:** Check the `Stderr`, `Error`, and `Exit Code` fields to
146
+ determine if a command executed successfully.
147
+ - **Background processes:** When a command is run in the background with `&`,
148
+ the tool will return immediately and the process will continue to run in the
149
+ background. The `Background PIDs` field will contain the process ID of the
150
+ background process.
151
+
152
+ ## Environment variables
153
+
154
+ When `run_shell_command` executes a command, it sets the `GEMINI_CLI=1`
155
+ environment variable in the subprocess's environment. This allows scripts or
156
+ tools to detect if they are being run from within the Gemini CLI.
157
+
158
+ ## Command restrictions
159
+
160
+ You can restrict the commands that can be executed by the `run_shell_command`
161
+ tool by using the `tools.core` and `tools.exclude` settings in your
162
+ configuration file.
163
+
164
+ - `tools.core`: To restrict `run_shell_command` to a specific set of commands,
165
+ add entries to the `core` list under the `tools` category in the format
166
+ `run_shell_command(<command>)`. For example,
167
+ `"tools": {"core": ["run_shell_command(git)"]}` will only allow `git`
168
+ commands. Including the generic `run_shell_command` acts as a wildcard,
169
+ allowing any command not explicitly blocked.
170
+ - `tools.exclude`: To block specific commands, add entries to the `exclude` list
171
+ under the `tools` category in the format `run_shell_command(<command>)`. For
172
+ example, `"tools": {"exclude": ["run_shell_command(rm)"]}` will block `rm`
173
+ commands.
174
+
175
+ The validation logic is designed to be secure and flexible:
176
+
177
+ 1. **Command chaining disabled**: The tool automatically splits commands
178
+ chained with `&&`, `||`, or `;` and validates each part separately. If any
179
+ part of the chain is disallowed, the entire command is blocked.
180
+ 2. **Prefix matching**: The tool uses prefix matching. For example, if you
181
+ allow `git`, you can run `git status` or `git log`.
182
+ 3. **Blocklist precedence**: The `tools.exclude` list is always checked first.
183
+ If a command matches a blocked prefix, it will be denied, even if it also
184
+ matches an allowed prefix in `tools.core`.
185
+
186
+ ### Command restriction examples
187
+
188
+ **Allow only specific command prefixes**
189
+
190
+ To allow only `git` and `npm` commands, and block all others:
191
+
192
+ ```json
193
+ {
194
+ "tools": {
195
+ "core": ["run_shell_command(git)", "run_shell_command(npm)"]
196
+ }
197
+ }
198
+ ```
199
+
200
+ - `git status`: Allowed
201
+ - `npm install`: Allowed
202
+ - `ls -l`: Blocked
203
+
204
+ **Block specific command prefixes**
205
+
206
+ To block `rm` and allow all other commands:
207
+
208
+ ```json
209
+ {
210
+ "tools": {
211
+ "core": ["run_shell_command"],
212
+ "exclude": ["run_shell_command(rm)"]
213
+ }
214
+ }
215
+ ```
216
+
217
+ - `rm -rf /`: Blocked
218
+ - `git status`: Allowed
219
+ - `npm install`: Allowed
220
+
221
+ **Blocklist takes precedence**
222
+
223
+ If a command prefix is in both `tools.core` and `tools.exclude`, it will be
224
+ blocked.
225
+
226
+ ```json
227
+ {
228
+ "tools": {
229
+ "core": ["run_shell_command(git)"],
230
+ "exclude": ["run_shell_command(git push)"]
231
+ }
232
+ }
233
+ ```
234
+
235
+ - `git push origin main`: Blocked
236
+ - `git status`: Allowed
237
+
238
+ **Block all shell commands**
239
+
240
+ To block all shell commands, add the `run_shell_command` wildcard to
241
+ `tools.exclude`:
242
+
243
+ ```json
244
+ {
245
+ "tools": {
246
+ "exclude": ["run_shell_command"]
247
+ }
248
+ }
249
+ ```
250
+
251
+ - `ls -l`: Blocked
252
+ - `any other command`: Blocked
253
+
254
+ ## Security note for `excludeTools`
255
+
256
+ Command-specific restrictions in `excludeTools` for `run_shell_command` are
257
+ based on simple string matching and can be easily bypassed. This feature is
258
+ **not a security mechanism** and should not be relied upon to safely execute
259
+ untrusted code. It is recommended to use `coreTools` to explicitly select
260
+ commands that can be executed.
@@ -0,0 +1,57 @@
1
+ # Todo tool (`write_todos`)
2
+
3
+ This document describes the `write_todos` tool for the Gemini CLI.
4
+
5
+ ## Description
6
+
7
+ The `write_todos` tool allows the Gemini agent to create and manage a list of
8
+ subtasks for complex user requests. This provides you, the user, with greater
9
+ visibility into the agent's plan and its current progress. It also helps with
10
+ alignment where the agent is less likely to lose track of its current goal.
11
+
12
+ ### Arguments
13
+
14
+ `write_todos` takes one argument:
15
+
16
+ - `todos` (array of objects, required): The complete list of todo items. This
17
+ replaces the existing list. Each item includes:
18
+ - `description` (string): The task description.
19
+ - `status` (string): The current status (`pending`, `in_progress`,
20
+ `completed`, or `cancelled`).
21
+
22
+ ## Behavior
23
+
24
+ The agent uses this tool to break down complex multi-step requests into a clear
25
+ plan.
26
+
27
+ - **Progress tracking:** The agent updates this list as it works, marking tasks
28
+ as `completed` when done.
29
+ - **Single focus:** Only one task will be marked `in_progress` at a time,
30
+ indicating exactly what the agent is currently working on.
31
+ - **Dynamic updates:** The plan may evolve as the agent discovers new
32
+ information, leading to new tasks being added or unnecessary ones being
33
+ cancelled.
34
+
35
+ When active, the current `in_progress` task is displayed above the input box,
36
+ keeping you informed of the immediate action. You can toggle the full view of
37
+ the todo list at any time by pressing `Ctrl+T`.
38
+
39
+ Usage example (internal representation):
40
+
41
+ ```javascript
42
+ write_todos({
43
+ todos: [
44
+ { description: 'Initialize new React project', status: 'completed' },
45
+ { description: 'Implement state management', status: 'in_progress' },
46
+ { description: 'Create API service', status: 'pending' },
47
+ ],
48
+ });
49
+ ```
50
+
51
+ ## Important notes
52
+
53
+ - **Enabling:** This tool is enabled by default. You can disable it in your
54
+ `settings.json` file by setting `"useWriteTodos": false`.
55
+
56
+ - **Intended use:** This tool is primarily used by the agent for complex,
57
+ multi-turn tasks. It is generally not used for simple, single-turn questions.
@@ -0,0 +1,59 @@
1
+ # Web fetch tool (`web_fetch`)
2
+
3
+ This document describes the `web_fetch` tool for the Gemini CLI.
4
+
5
+ ## Description
6
+
7
+ Use `web_fetch` to summarize, compare, or extract information from web pages.
8
+ The `web_fetch` tool processes content from one or more URLs (up to 20) embedded
9
+ in a prompt. `web_fetch` takes a natural language prompt and returns a generated
10
+ response.
11
+
12
+ ### Arguments
13
+
14
+ `web_fetch` takes one argument:
15
+
16
+ - `prompt` (string, required): A comprehensive prompt that includes the URL(s)
17
+ (up to 20) to fetch and specific instructions on how to process their content.
18
+ For example:
19
+ `"Summarize https://example.com/article and extract key points from https://another.com/data"`.
20
+ The prompt must contain at least one URL starting with `http://` or
21
+ `https://`.
22
+
23
+ ## How to use `web_fetch` with the Gemini CLI
24
+
25
+ To use `web_fetch` with the Gemini CLI, provide a natural language prompt that
26
+ contains URLs. The tool will ask for confirmation before fetching any URLs. Once
27
+ confirmed, the tool will process URLs through Gemini API's `urlContext`.
28
+
29
+ If the Gemini API cannot access the URL, the tool will fall back to fetching
30
+ content directly from the local machine. The tool will format the response,
31
+ including source attribution and citations where possible. The tool will then
32
+ provide the response to the user.
33
+
34
+ Usage:
35
+
36
+ ```
37
+ web_fetch(prompt="Your prompt, including a URL such as https://google.com.")
38
+ ```
39
+
40
+ ## `web_fetch` examples
41
+
42
+ Summarize a single article:
43
+
44
+ ```
45
+ web_fetch(prompt="Can you summarize the main points of https://example.com/news/latest")
46
+ ```
47
+
48
+ Compare two articles:
49
+
50
+ ```
51
+ web_fetch(prompt="What are the differences in the conclusions of these two papers: https://arxiv.org/abs/2401.0001 and https://arxiv.org/abs/2401.0002?")
52
+ ```
53
+
54
+ ## Important notes
55
+
56
+ - **URL processing:** `web_fetch` relies on the Gemini API's ability to access
57
+ and process the given URLs.
58
+ - **Output quality:** The quality of the output will depend on the clarity of
59
+ the instructions in the prompt.
@@ -0,0 +1,42 @@
1
+ # Web search tool (`google_web_search`)
2
+
3
+ This document describes the `google_web_search` tool.
4
+
5
+ ## Description
6
+
7
+ Use `google_web_search` to perform a web search using Google Search via the
8
+ Gemini API. The `google_web_search` tool returns a summary of web results with
9
+ sources.
10
+
11
+ ### Arguments
12
+
13
+ `google_web_search` takes one argument:
14
+
15
+ - `query` (string, required): The search query.
16
+
17
+ ## How to use `google_web_search` with the Gemini CLI
18
+
19
+ The `google_web_search` tool sends a query to the Gemini API, which then
20
+ performs a web search. `google_web_search` will return a generated response
21
+ based on the search results, including citations and sources.
22
+
23
+ Usage:
24
+
25
+ ```
26
+ google_web_search(query="Your query goes here.")
27
+ ```
28
+
29
+ ## `google_web_search` examples
30
+
31
+ Get information on a topic:
32
+
33
+ ```
34
+ google_web_search(query="latest advancements in AI-powered code generation")
35
+ ```
36
+
37
+ ## Important notes
38
+
39
+ - **Response returned:** The `google_web_search` tool returns a processed
40
+ summary, not a raw list of search results.
41
+ - **Citations:** The response includes citations to the sources used to generate
42
+ the summary.
@@ -0,0 +1,96 @@
1
+ # Gemini CLI: License, Terms of Service, and Privacy Notices
2
+
3
+ Gemini CLI is an open-source tool that lets you interact with Google's powerful
4
+ AI services directly from your command-line interface. The Gemini CLI software
5
+ is licensed under the
6
+ [Apache 2.0 license](https://github.com/google-gemini/gemini-cli/blob/main/LICENSE).
7
+ When you use Gemini CLI to access or use Google’s services, the Terms of Service
8
+ and Privacy Notices applicable to those services apply to such access and use.
9
+
10
+ Your Gemini CLI Usage Statistics are handled in accordance with Google's Privacy
11
+ Policy.
12
+
13
+ **Note:** See [quotas and pricing](/docs/quota-and-pricing.md) for the quota and
14
+ pricing details that apply to your usage of the Gemini CLI.
15
+
16
+ ## Supported authentication methods
17
+
18
+ Your authentication method refers to the method you use to log into and access
19
+ Google’s services with Gemini CLI. Supported authentication methods include:
20
+
21
+ - Logging in with your Google account to Gemini Code Assist.
22
+ - Using an API key with Gemini Developer API.
23
+ - Using an API key with Vertex AI GenAI API.
24
+
25
+ The Terms of Service and Privacy Notices applicable to the aforementioned Google
26
+ services are set forth in the table below.
27
+
28
+ If you log in with your Google account and you do not already have a Gemini Code
29
+ Assist account associated with your Google account, you will be directed to the
30
+ sign up flow for Gemini Code Assist for individuals. If your Google account is
31
+ managed by your organization, your administrator may not permit access to Gemini
32
+ Code Assist for individuals. Please see the
33
+ [Gemini Code Assist for individuals FAQs](https://developers.google.com/gemini-code-assist/resources/faqs)
34
+ for further information.
35
+
36
+ | Authentication Method | Service(s) | Terms of Service | Privacy Notice |
37
+ | :----------------------- | :--------------------------- | :------------------------------------------------------------------------------------------------------ | :-------------------------------------------------------------------------------------------- |
38
+ | Google Account | Gemini Code Assist services | [Terms of Service](https://developers.google.com/gemini-code-assist/resources/privacy-notices) | [Privacy Notices](https://developers.google.com/gemini-code-assist/resources/privacy-notices) |
39
+ | Gemini Developer API Key | Gemini API - Unpaid Services | [Gemini API Terms of Service - Unpaid Services](https://ai.google.dev/gemini-api/terms#unpaid-services) | [Google Privacy Policy](https://policies.google.com/privacy) |
40
+ | Gemini Developer API Key | Gemini API - Paid Services | [Gemini API Terms of Service - Paid Services](https://ai.google.dev/gemini-api/terms#paid-services) | [Google Privacy Policy](https://policies.google.com/privacy) |
41
+ | Vertex AI GenAI API Key | Vertex AI GenAI API | [Google Cloud Platform Terms of Service](https://cloud.google.com/terms/service-terms/) | [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice) |
42
+
43
+ ## 1. If you have logged in with your Google account to Gemini Code Assist
44
+
45
+ For users who use their Google account to access
46
+ [Gemini Code Assist](https://codeassist.google), these Terms of Service and
47
+ Privacy Notice documents apply:
48
+
49
+ - Gemini Code Assist for individuals:
50
+ [Google Terms of Service](https://policies.google.com/terms) and
51
+ [Gemini Code Assist for individuals Privacy Notice](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals).
52
+ - Gemini Code Assist with Google AI Pro or Ultra subscription:
53
+ [Google Terms of Service](https://policies.google.com/terms),
54
+ [Google One Additional Terms of Service](https://one.google.com/terms-of-service)
55
+ and [Google Privacy Policy\*](https://policies.google.com/privacy).
56
+ - Gemini Code Assist Standard and Enterprise editions:
57
+ [Google Cloud Platform Terms of Service](https://cloud.google.com/terms) and
58
+ [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).
59
+
60
+ _\* If your account is also associated with an active subscription to Gemini
61
+ Code Assist Standard or Enterprise edition, the terms and privacy policy of
62
+ Gemini Code Assist Standard or Enterprise edition will apply to all your use of
63
+ Gemini Code Assist._
64
+
65
+ ## 2. If you have logged in with a Gemini API key to the Gemini Developer API
66
+
67
+ If you are using a Gemini API key for authentication with the
68
+ [Gemini Developer API](https://ai.google.dev/gemini-api/docs), these Terms of
69
+ Service and Privacy Notice documents apply:
70
+
71
+ - Terms of Service: Your use of the Gemini CLI is governed by the
72
+ [Gemini API Terms of Service](https://ai.google.dev/gemini-api/terms). These
73
+ terms may differ depending on whether you are using an unpaid or paid service:
74
+ - For unpaid services, refer to the
75
+ [Gemini API Terms of Service - Unpaid Services](https://ai.google.dev/gemini-api/terms#unpaid-services).
76
+ - For paid services, refer to the
77
+ [Gemini API Terms of Service - Paid Services](https://ai.google.dev/gemini-api/terms#paid-services).
78
+ - Privacy Notice: The collection and use of your data is described in the
79
+ [Google Privacy Policy](https://policies.google.com/privacy).
80
+
81
+ ## 3. If you have logged in with a Gemini API key to the Vertex AI GenAI API
82
+
83
+ If you are using a Gemini API key for authentication with a
84
+ [Vertex AI GenAI API](https://cloud.google.com/vertex-ai/generative-ai/docs/reference/rest)
85
+ backend, these Terms of Service and Privacy Notice documents apply:
86
+
87
+ - Terms of Service: Your use of the Gemini CLI is governed by the
88
+ [Google Cloud Platform Service Terms](https://cloud.google.com/terms/service-terms/).
89
+ - Privacy Notice: The collection and use of your data is described in the
90
+ [Google Cloud Privacy Notice](https://cloud.google.com/terms/cloud-privacy-notice).
91
+
92
+ ## Usage statistics opt-out
93
+
94
+ You may opt-out from sending Gemini CLI Usage Statistics to Google by following
95
+ the instructions available here:
96
+ [Usage Statistics Configuration](https://github.com/google-gemini/gemini-cli/blob/main/docs/get-started/configuration.md#usage-statistics).