@google/gemini-cli 0.36.0-preview.7 → 0.37.0-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/{chunk-NYCY3Q2B.js → chunk-3TN4SOLW.js} +6652 -4181
- package/bundle/{chunk-S2IQOR7T.js → chunk-7UZ4Y32N.js} +214 -66
- package/bundle/{chunk-2RCLDWUX.js → chunk-A62NZYIK.js} +8052 -2969
- package/bundle/{chunk-VA3P26WZ.js → chunk-LEK5YYAR.js} +6296 -4095
- package/bundle/{chunk-MYI75E6G.js → chunk-R5X4CMUM.js} +233 -70
- package/bundle/{chunk-EHC7O4TG.js → chunk-TJ76C6AA.js} +16848 -9497
- package/bundle/chunk-U4FACSVX.js +30 -0
- package/bundle/{chunk-APAYS2LE.js → chunk-ULC3DHVX.js} +8052 -2969
- package/bundle/{chunk-YTGZ6CSI.js → chunk-XX7JYMTE.js} +8106 -3035
- package/bundle/{core-BHH4RB6L.js → core-5OME6LT4.js} +58 -4
- package/bundle/{dist-SWQPYLLV.js → core-CUCGSGCA.js} +58 -4
- package/bundle/{devtoolsService-STAWBGOY.js → devtoolsService-4FIYD6OW.js} +20 -3
- package/bundle/{devtoolsService-GJALET3B.js → devtoolsService-IDLWLZFQ.js} +21 -5
- package/bundle/{devtoolsService-4QGIZO5B.js → devtoolsService-TVWW3DBW.js} +20 -3
- package/bundle/{dist-YOBWJF52.js → dist-YWCADMDD.js} +58 -4
- package/bundle/docs/CONTRIBUTING.md +10 -7
- package/bundle/docs/assets/theme-tokyonight-dark.png +0 -0
- package/bundle/docs/changelogs/index.md +24 -0
- package/bundle/docs/changelogs/latest.md +366 -459
- package/bundle/docs/changelogs/preview.md +362 -356
- package/bundle/docs/cli/acp-mode.md +126 -0
- package/bundle/docs/cli/cli-reference.md +1 -1
- package/bundle/docs/cli/notifications.md +5 -5
- package/bundle/docs/cli/plan-mode.md +12 -8
- package/bundle/docs/cli/sandbox.md +1 -1
- package/bundle/docs/cli/settings.md +14 -13
- package/bundle/docs/cli/themes.md +5 -0
- package/bundle/docs/core/index.md +2 -2
- package/bundle/docs/core/subagents.md +134 -23
- package/bundle/docs/get-started/gemini-3.md +1 -1
- package/bundle/docs/get-started/index.md +127 -1
- package/bundle/docs/ide-integration/index.md +99 -24
- package/bundle/docs/index.md +0 -2
- package/bundle/docs/redirects.json +1 -0
- package/bundle/docs/reference/commands.md +1 -3
- package/bundle/docs/reference/configuration.md +183 -92
- package/bundle/docs/reference/keyboard-shortcuts.md +14 -6
- package/bundle/docs/reference/policy-engine.md +16 -30
- package/bundle/docs/reference/tools.md +56 -23
- package/bundle/docs/resources/quota-and-pricing.md +23 -9
- package/bundle/docs/sidebar.json +11 -4
- package/bundle/docs/tools/planning.md +6 -4
- package/bundle/events-CLX3JQHP.js +12 -0
- package/bundle/gemini.js +342 -52
- package/bundle/{interactiveCli-YJFA3P4G.js → interactiveCli-4WFWOVAQ.js} +5079 -4022
- package/bundle/{interactiveCli-MEBWWWE7.js → interactiveCli-4ZZ72DR3.js} +5079 -4022
- package/bundle/{interactiveCli-B6Y3UISW.js → interactiveCli-6SIGBRWS.js} +5292 -4252
- package/bundle/{memoryDiscovery-BQGYT4OD.js → memoryDiscovery-NS2EGHYH.js} +3 -1
- package/bundle/{memoryDiscovery-FCEPFZ3M.js → memoryDiscovery-VL3OH25S.js} +3 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/client/main.js +26 -19
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.d.ts +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/_client-assets.js.map +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js +35 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/dist/src/index.js.map +1 -1
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/{oauth2-provider-TIKPJAVU.js → oauth2-provider-HGHECKPY.js} +2 -2
- package/bundle/{oauth2-provider-IGY3DL3D.js → oauth2-provider-TYBJKXSJ.js} +2 -2
- package/bundle/{oauth2-provider-DLPX23GY.js → oauth2-provider-YYRJ44X5.js} +73 -39
- package/bundle/policies/discovered.toml +7 -0
- package/bundle/policies/non-interactive.toml +7 -0
- package/bundle/policies/plan.toml +25 -0
- package/bundle/policies/read-only.toml +6 -0
- package/bundle/policies/sandbox-default.toml +3 -2
- package/bundle/policies/write.toml +21 -0
- package/bundle/policies/yolo.toml +1 -1
- package/package.json +1 -1
- package/bundle/chunk-GDBDMLKR.js +0 -354180
- package/bundle/chunk-QTVUHTZR.js +0 -93293
- package/bundle/devtoolsService-Q6LGZKTJ.js +0 -854
- package/bundle/dist-YHAAIIZP.js +0 -1886
- package/bundle/docs/get-started/examples.md +0 -141
- package/bundle/interactiveCli-HYY2W6AF.js +0 -49298
- package/bundle/oauth2-provider-MKUXMD5I.js +0 -237
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# Gemini CLI examples
|
|
2
|
-
|
|
3
|
-
Gemini CLI helps you automate common engineering tasks by combining AI reasoning
|
|
4
|
-
with local system tools. This document provides examples of how to use the CLI
|
|
5
|
-
for file management, code analysis, and data transformation.
|
|
6
|
-
|
|
7
|
-
<!-- prettier-ignore -->
|
|
8
|
-
> [!NOTE]
|
|
9
|
-
> These examples demonstrate potential capabilities. Your actual
|
|
10
|
-
> results can vary based on the model used and your project environment.
|
|
11
|
-
|
|
12
|
-
## Rename your photographs based on content
|
|
13
|
-
|
|
14
|
-
You can use Gemini CLI to automate file management tasks that require visual
|
|
15
|
-
analysis. In this example, Gemini CLI renames images based on their actual
|
|
16
|
-
subject matter.
|
|
17
|
-
|
|
18
|
-
Scenario: You have a folder containing the following files:
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
photos/photo1.png
|
|
22
|
-
photos/photo2.png
|
|
23
|
-
photos/photo3.png
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Give Gemini the following prompt:
|
|
27
|
-
|
|
28
|
-
```cli
|
|
29
|
-
Rename the photos in my "photos" directory based on their contents.
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Result: Gemini asks for permission to rename your files.
|
|
33
|
-
|
|
34
|
-
Select **Allow once** and your files are renamed:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
photos/yellow_flowers.png
|
|
38
|
-
photos/antique_dresser.png
|
|
39
|
-
photos/green_android_robot.png
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
## Explain a repository by reading its code
|
|
43
|
-
|
|
44
|
-
Gemini CLI is effective for rapid codebase exploration. The following example
|
|
45
|
-
shows how to ask Gemini CLI to fetch, analyze, and summarize a remote project.
|
|
46
|
-
|
|
47
|
-
Scenario: You want to understand how a popular open-source utility works by
|
|
48
|
-
inspecting its code, not just its README.
|
|
49
|
-
|
|
50
|
-
Give Gemini CLI the following prompt:
|
|
51
|
-
|
|
52
|
-
```cli
|
|
53
|
-
Clone the 'chalk' repository from https://github.com/chalk/chalk, read its key source files, and explain how it works.
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
Result: Gemini performs a sequence of actions to answer your request.
|
|
57
|
-
|
|
58
|
-
1. First, it asks for permission to run `git clone` to download the repository.
|
|
59
|
-
2. Next, it finds the important source files and asks for permission to read
|
|
60
|
-
them.
|
|
61
|
-
3. Finally, after analyzing the code, it provides a summary.
|
|
62
|
-
|
|
63
|
-
Gemini CLI returns an explanation based on the actual source code:
|
|
64
|
-
|
|
65
|
-
```markdown
|
|
66
|
-
The `chalk` library is a popular npm package for styling terminal output with
|
|
67
|
-
colors. After analyzing the source code, here's how it works:
|
|
68
|
-
|
|
69
|
-
- **Core functionality:** The main file sets up a chainable API. Each color or
|
|
70
|
-
modifier (like `bold` or `italic`) is a getter that appends the corresponding
|
|
71
|
-
ANSI escape code to an internal stack.
|
|
72
|
-
|
|
73
|
-
- **Chainable API:** When you call `chalk.red.bold('Hello')`, you are accessing
|
|
74
|
-
getters. The `red` getter adds the red color code, and the `bold` getter adds
|
|
75
|
-
the bold code.
|
|
76
|
-
|
|
77
|
-
- **Output generation:** When the chain is treated as a string (e.g., in
|
|
78
|
-
`console.log`), a final `toString()` method is called. This method joins all
|
|
79
|
-
the stored ANSI codes, wraps them around the input string ('Hello'), and adds
|
|
80
|
-
a reset code at the end. This produces the final, styled string that the
|
|
81
|
-
terminal can render.
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
## Combine two spreadsheets into one spreadsheet
|
|
85
|
-
|
|
86
|
-
Gemini CLI can process and transform data across multiple files. Use this
|
|
87
|
-
capability to merge reports or reformat data sets without manual copying.
|
|
88
|
-
|
|
89
|
-
Scenario: You have two .csv files: `Revenue - 2023.csv` and
|
|
90
|
-
`Revenue - 2024.csv`. Each file contains monthly revenue figures.
|
|
91
|
-
|
|
92
|
-
Give Gemini CLI the following prompt:
|
|
93
|
-
|
|
94
|
-
```cli
|
|
95
|
-
Combine the two .csv files into a single .csv file, with each year a different column.
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Result: Gemini CLI reads each file and then asks for permission to write a new
|
|
99
|
-
file. Provide your permission and Gemini CLI provides the combined data:
|
|
100
|
-
|
|
101
|
-
```csv
|
|
102
|
-
Month,2023,2024
|
|
103
|
-
January,0,1000
|
|
104
|
-
February,0,1200
|
|
105
|
-
March,0,2400
|
|
106
|
-
April,900,500
|
|
107
|
-
May,1000,800
|
|
108
|
-
June,1000,900
|
|
109
|
-
July,1200,1000
|
|
110
|
-
August,1800,400
|
|
111
|
-
September,2000,2000
|
|
112
|
-
October,2400,3400
|
|
113
|
-
November,3400,1800
|
|
114
|
-
December,2100,9000
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
## Run unit tests
|
|
118
|
-
|
|
119
|
-
Gemini CLI can generate boilerplate code and tests based on your existing
|
|
120
|
-
implementation. This example demonstrates how to request code coverage for a
|
|
121
|
-
JavaScript component.
|
|
122
|
-
|
|
123
|
-
Scenario: You've written a simple login page. You wish to write unit tests to
|
|
124
|
-
ensure that your login page has code coverage.
|
|
125
|
-
|
|
126
|
-
Give Gemini CLI the following prompt:
|
|
127
|
-
|
|
128
|
-
```cli
|
|
129
|
-
Write unit tests for Login.js.
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Result: Gemini CLI asks for permission to write a new file and creates a test
|
|
133
|
-
for your login page.
|
|
134
|
-
|
|
135
|
-
## Next steps
|
|
136
|
-
|
|
137
|
-
- Follow the [File management](../cli/tutorials/file-management.md) guide to
|
|
138
|
-
start working with your codebase.
|
|
139
|
-
- Follow the [Quickstart](./index.md) to start your first session.
|
|
140
|
-
- See the [Cheatsheet](../cli/cli-reference.md) for a quick reference of
|
|
141
|
-
available commands.
|