@dgxo/mashadevcli 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +393 -0
  3. package/bundle/builtin/skill-creator/SKILL.md +382 -0
  4. package/bundle/builtin/skill-creator/scripts/init_skill.cjs +239 -0
  5. package/bundle/builtin/skill-creator/scripts/package_skill.cjs +131 -0
  6. package/bundle/builtin/skill-creator/scripts/validate_skill.cjs +131 -0
  7. package/bundle/docs/CONTRIBUTING.md +1 -0
  8. package/bundle/docs/admin/enterprise-controls.md +115 -0
  9. package/bundle/docs/assets/connected_devtools.png +0 -0
  10. package/bundle/docs/assets/gemini-screenshot.png +0 -0
  11. package/bundle/docs/assets/monitoring-dashboard-logs.png +0 -0
  12. package/bundle/docs/assets/monitoring-dashboard-metrics.png +0 -0
  13. package/bundle/docs/assets/monitoring-dashboard-overview.png +0 -0
  14. package/bundle/docs/assets/release_patch.png +0 -0
  15. package/bundle/docs/assets/theme-ansi-light.png +0 -0
  16. package/bundle/docs/assets/theme-ansi.png +0 -0
  17. package/bundle/docs/assets/theme-atom-one.png +0 -0
  18. package/bundle/docs/assets/theme-ayu-light.png +0 -0
  19. package/bundle/docs/assets/theme-ayu.png +0 -0
  20. package/bundle/docs/assets/theme-custom.png +0 -0
  21. package/bundle/docs/assets/theme-default-light.png +0 -0
  22. package/bundle/docs/assets/theme-default.png +0 -0
  23. package/bundle/docs/assets/theme-dracula.png +0 -0
  24. package/bundle/docs/assets/theme-github-light.png +0 -0
  25. package/bundle/docs/assets/theme-github.png +0 -0
  26. package/bundle/docs/assets/theme-google-light.png +0 -0
  27. package/bundle/docs/assets/theme-xcode-light.png +0 -0
  28. package/bundle/docs/changelogs/index.md +867 -0
  29. package/bundle/docs/changelogs/latest.md +208 -0
  30. package/bundle/docs/changelogs/preview.md +187 -0
  31. package/bundle/docs/cli/checkpointing.md +93 -0
  32. package/bundle/docs/cli/cli-reference.md +115 -0
  33. package/bundle/docs/cli/creating-skills.md +80 -0
  34. package/bundle/docs/cli/custom-commands.md +327 -0
  35. package/bundle/docs/cli/enterprise.md +604 -0
  36. package/bundle/docs/cli/gemini-ignore.md +71 -0
  37. package/bundle/docs/cli/gemini-md.md +116 -0
  38. package/bundle/docs/cli/generation-settings.md +210 -0
  39. package/bundle/docs/cli/headless.md +50 -0
  40. package/bundle/docs/cli/model-routing.md +42 -0
  41. package/bundle/docs/cli/model.md +53 -0
  42. package/bundle/docs/cli/plan-mode.md +375 -0
  43. package/bundle/docs/cli/rewind.md +51 -0
  44. package/bundle/docs/cli/sandbox.md +257 -0
  45. package/bundle/docs/cli/session-management.md +184 -0
  46. package/bundle/docs/cli/settings.md +165 -0
  47. package/bundle/docs/cli/skills.md +134 -0
  48. package/bundle/docs/cli/system-prompt.md +125 -0
  49. package/bundle/docs/cli/telemetry.md +922 -0
  50. package/bundle/docs/cli/themes.md +269 -0
  51. package/bundle/docs/cli/token-caching.md +20 -0
  52. package/bundle/docs/cli/trusted-folders.md +126 -0
  53. package/bundle/docs/cli/tutorials/automation.md +283 -0
  54. package/bundle/docs/cli/tutorials/file-management.md +142 -0
  55. package/bundle/docs/cli/tutorials/mcp-setup.md +113 -0
  56. package/bundle/docs/cli/tutorials/memory-management.md +126 -0
  57. package/bundle/docs/cli/tutorials/session-management.md +105 -0
  58. package/bundle/docs/cli/tutorials/shell-commands.md +107 -0
  59. package/bundle/docs/cli/tutorials/skills-getting-started.md +110 -0
  60. package/bundle/docs/cli/tutorials/task-planning.md +93 -0
  61. package/bundle/docs/cli/tutorials/web-tools.md +78 -0
  62. package/bundle/docs/core/index.md +107 -0
  63. package/bundle/docs/core/remote-agents.md +84 -0
  64. package/bundle/docs/core/subagents.md +307 -0
  65. package/bundle/docs/examples/proxy-script.md +83 -0
  66. package/bundle/docs/extensions/best-practices.md +188 -0
  67. package/bundle/docs/extensions/index.md +61 -0
  68. package/bundle/docs/extensions/reference.md +333 -0
  69. package/bundle/docs/extensions/releasing.md +154 -0
  70. package/bundle/docs/extensions/writing-extensions.md +308 -0
  71. package/bundle/docs/get-started/authentication.md +402 -0
  72. package/bundle/docs/get-started/examples.md +139 -0
  73. package/bundle/docs/get-started/gemini-3.md +115 -0
  74. package/bundle/docs/get-started/index.md +82 -0
  75. package/bundle/docs/get-started/installation.md +174 -0
  76. package/bundle/docs/hooks/best-practices.md +709 -0
  77. package/bundle/docs/hooks/index.md +164 -0
  78. package/bundle/docs/hooks/reference.md +330 -0
  79. package/bundle/docs/hooks/writing-hooks.md +474 -0
  80. package/bundle/docs/ide-integration/ide-companion-spec.md +267 -0
  81. package/bundle/docs/ide-integration/index.md +224 -0
  82. package/bundle/docs/index.md +141 -0
  83. package/bundle/docs/integration-tests.md +211 -0
  84. package/bundle/docs/issue-and-pr-automation.md +172 -0
  85. package/bundle/docs/local-development.md +134 -0
  86. package/bundle/docs/mermaid/context.mmd +103 -0
  87. package/bundle/docs/mermaid/render-path.mmd +64 -0
  88. package/bundle/docs/npm.md +62 -0
  89. package/bundle/docs/redirects.json +20 -0
  90. package/bundle/docs/reference/commands.md +526 -0
  91. package/bundle/docs/reference/configuration.md +1786 -0
  92. package/bundle/docs/reference/keyboard-shortcuts.md +164 -0
  93. package/bundle/docs/reference/memport.md +246 -0
  94. package/bundle/docs/reference/policy-engine.md +364 -0
  95. package/bundle/docs/reference/tools.md +106 -0
  96. package/bundle/docs/release-confidence.md +164 -0
  97. package/bundle/docs/releases.md +540 -0
  98. package/bundle/docs/resources/faq.md +175 -0
  99. package/bundle/docs/resources/quota-and-pricing.md +165 -0
  100. package/bundle/docs/resources/tos-privacy.md +102 -0
  101. package/bundle/docs/resources/troubleshooting.md +176 -0
  102. package/bundle/docs/resources/uninstall.md +56 -0
  103. package/bundle/docs/sidebar.json +233 -0
  104. package/bundle/docs/tools/activate-skill.md +43 -0
  105. package/bundle/docs/tools/ask-user.md +95 -0
  106. package/bundle/docs/tools/file-system.md +129 -0
  107. package/bundle/docs/tools/internal-docs.md +46 -0
  108. package/bundle/docs/tools/mcp-server.md +1150 -0
  109. package/bundle/docs/tools/memory.md +35 -0
  110. package/bundle/docs/tools/planning.md +58 -0
  111. package/bundle/docs/tools/shell.md +216 -0
  112. package/bundle/docs/tools/todos.md +35 -0
  113. package/bundle/docs/tools/web-fetch.md +35 -0
  114. package/bundle/docs/tools/web-search.md +32 -0
  115. package/bundle/docs/update/update-guide.md +111 -0
  116. package/bundle/masha.js +563471 -0
  117. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/client/main.js +89 -0
  118. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.d.ts +7 -0
  119. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.js +9 -0
  120. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/_client-assets.js.map +1 -0
  121. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.d.ts +48 -0
  122. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.js +299 -0
  123. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/index.js.map +1 -0
  124. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.d.ts +36 -0
  125. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.js +7 -0
  126. package/bundle/node_modules/@dgxo/mashadevcli-devtools/dist/src/types.js.map +1 -0
  127. package/bundle/node_modules/@dgxo/mashadevcli-devtools/package.json +32 -0
  128. package/bundle/policies/conseca.toml +6 -0
  129. package/bundle/policies/discovered.toml +8 -0
  130. package/bundle/policies/plan.toml +109 -0
  131. package/bundle/policies/read-only.toml +53 -0
  132. package/bundle/policies/write.toml +80 -0
  133. package/bundle/policies/yolo.toml +54 -0
  134. package/bundle/sandbox-macos-permissive-open.sb +27 -0
  135. package/bundle/sandbox-macos-permissive-proxied.sb +37 -0
  136. package/bundle/sandbox-macos-restrictive-open.sb +96 -0
  137. package/bundle/sandbox-macos-restrictive-proxied.sb +98 -0
  138. package/bundle/sandbox-macos-strict-open.sb +131 -0
  139. package/bundle/sandbox-macos-strict-proxied.sb +133 -0
  140. package/package.json +169 -0
@@ -0,0 +1,62 @@
1
+ # Package overview
2
+
3
+ This monorepo contains two main packages: `@dgxo/mashadevcli` and
4
+ `@dgxo/mashadevcli-core`.
5
+
6
+ ## `@dgxo/mashadevcli`
7
+
8
+ This is the main package for the Gemini CLI. It is responsible for the user
9
+ interface, command parsing, and all other user-facing functionality.
10
+
11
+ When this package is published, it is bundled into a single executable file.
12
+ This bundle includes all of the package's dependencies, including
13
+ `@dgxo/mashadevcli-core`. This means that whether a user installs the package
14
+ with `npm install -g @dgxo/mashadevcli` or runs it directly with
15
+ `npx @dgxo/mashadevcli`, they are using this single, self-contained executable.
16
+
17
+ ## `@dgxo/mashadevcli-core`
18
+
19
+ This package contains the core logic for interacting with the Gemini API. It is
20
+ responsible for making API requests, handling authentication, and managing the
21
+ local cache.
22
+
23
+ This package is not bundled. When it is published, it is published as a standard
24
+ Node.js package with its own dependencies. This allows it to be used as a
25
+ standalone package in other projects, if needed. All transpiled js code in the
26
+ `dist` folder is included in the package.
27
+
28
+ ## NPM workspaces
29
+
30
+ This project uses
31
+ [NPM Workspaces](https://docs.npmjs.com/cli/v10/using-npm/workspaces) to manage
32
+ the packages within this monorepo. This simplifies development by allowing us to
33
+ manage dependencies and run scripts across multiple packages from the root of
34
+ the project.
35
+
36
+ ### How it works
37
+
38
+ The root `package.json` file defines the workspaces for this project:
39
+
40
+ ```json
41
+ {
42
+ "workspaces": ["packages/*"]
43
+ }
44
+ ```
45
+
46
+ This tells NPM that any folder inside the `packages` directory is a separate
47
+ package that should be managed as part of the workspace.
48
+
49
+ ### Benefits of workspaces
50
+
51
+ - **Simplified dependency management**: Running `npm install` from the root of
52
+ the project will install all dependencies for all packages in the workspace
53
+ and link them together. This means you don't need to run `npm install` in each
54
+ package's directory.
55
+ - **Automatic linking**: Packages within the workspace can depend on each other.
56
+ When you run `npm install`, NPM will automatically create symlinks between the
57
+ packages. This means that when you make changes to one package, the changes
58
+ are immediately available to other packages that depend on it.
59
+ - **Simplified script execution**: You can run scripts in any package from the
60
+ root of the project using the `--workspace` flag. For example, to run the
61
+ `build` script in the `cli` package, you can run
62
+ `npm run build --workspace @dgxo/mashadevcli`.
@@ -0,0 +1,20 @@
1
+ {
2
+ "/docs/architecture": "/docs/cli/index",
3
+ "/docs/cli/commands": "/docs/reference/commands",
4
+ "/docs/cli": "/docs",
5
+ "/docs/cli/index": "/docs",
6
+ "/docs/cli/keyboard-shortcuts": "/docs/reference/keyboard-shortcuts",
7
+ "/docs/cli/uninstall": "/docs/resources/uninstall",
8
+ "/docs/core/concepts": "/docs",
9
+ "/docs/core/memport": "/docs/reference/memport",
10
+ "/docs/core/policy-engine": "/docs/reference/policy-engine",
11
+ "/docs/core/tools-api": "/docs/reference/tools",
12
+ "/docs/reference/tools-api": "/docs/reference/tools",
13
+ "/docs/faq": "/docs/resources/faq",
14
+ "/docs/get-started/configuration": "/docs/reference/configuration",
15
+ "/docs/get-started/configuration-v1": "/docs/reference/configuration",
16
+ "/docs/index": "/docs",
17
+ "/docs/quota-and-pricing": "/docs/resources/quota-and-pricing",
18
+ "/docs/tos-privacy": "/docs/resources/tos-privacy",
19
+ "/docs/troubleshooting": "/docs/resources/troubleshooting"
20
+ }
@@ -0,0 +1,526 @@
1
+ # CLI commands
2
+
3
+ Gemini CLI supports several built-in commands to help you manage your session,
4
+ customize the interface, and control its behavior. These commands are prefixed
5
+ with a forward slash (`/`), an at symbol (`@`), or an exclamation mark (`!`).
6
+
7
+ ## Slash commands (`/`)
8
+
9
+ Slash commands provide meta-level control over the CLI itself.
10
+
11
+ ### Built-in Commands
12
+
13
+ ### `/about`
14
+
15
+ - **Description:** Show version info. Share this information when filing issues.
16
+
17
+ ### `/auth`
18
+
19
+ - **Description:** Open a dialog that lets you change the authentication method.
20
+
21
+ ### `/bug`
22
+
23
+ - **Description:** File an issue about Gemini CLI. By default, the issue is
24
+ filed within the GitHub repository for Gemini CLI. The string you enter after
25
+ `/bug` will become the headline for the bug being filed. The default `/bug`
26
+ behavior can be modified using the `advanced.bugCommand` setting in your
27
+ `.gemini/settings.json` files.
28
+
29
+ ### `/chat`
30
+
31
+ - **Description:** Save and resume conversation history for branching
32
+ conversation state interactively, or resuming a previous state from a later
33
+ session.
34
+ - **Sub-commands:**
35
+ - **`debug`**
36
+ - **Description:** Export the most recent API request as a JSON payload.
37
+ - **`delete <tag>`**
38
+ - **Description:** Deletes a saved conversation checkpoint.
39
+ - **`list`**
40
+ - **Description:** Lists available tags for chat state resumption.
41
+ - **Note:** This command only lists chats saved within the current project.
42
+ Because chat history is project-scoped, chats saved in other project
43
+ directories will not be displayed.
44
+ - **`resume <tag>`**
45
+ - **Description:** Resumes a conversation from a previous save.
46
+ - **Note:** You can only resume chats that were saved within the current
47
+ project. To resume a chat from a different project, you must run the
48
+ Gemini CLI from that project's directory.
49
+ - **`save <tag>`**
50
+ - **Description:** Saves the current conversation history. You must add a
51
+ `<tag>` for identifying the conversation state.
52
+ - **Details on checkpoint location:** The default locations for saved chat
53
+ checkpoints are:
54
+ - Linux/macOS: `~/.gemini/tmp/<project_hash>/`
55
+ - Windows: `C:\Users\<YourUsername>\.gemini\tmp\<project_hash>\`
56
+ - **Behavior:** Chats are saved into a project-specific directory,
57
+ determined by where you run the CLI. Consequently, saved chats are only
58
+ accessible when working within that same project.
59
+ - **Note:** These checkpoints are for manually saving and resuming
60
+ conversation states. For automatic checkpoints created before file
61
+ modifications, see the
62
+ [Checkpointing documentation](../cli/checkpointing.md).
63
+ - **`share [filename]`**
64
+ - **Description** Writes the current conversation to a provided Markdown or
65
+ JSON file. If no filename is provided, then the CLI will generate one.
66
+ - **Usage** `/chat share file.md` or `/chat share file.json`.
67
+
68
+ ### `/clear`
69
+
70
+ - **Description:** Clear the terminal screen, including the visible session
71
+ history and scrollback within the CLI. The underlying session data (for
72
+ history recall) might be preserved depending on the exact implementation, but
73
+ the visual display is cleared.
74
+ - **Keyboard shortcut:** Press **Ctrl+L** at any time to perform a clear action.
75
+
76
+ ### `/commands`
77
+
78
+ - **Description:** Manage custom slash commands loaded from `.toml` files.
79
+ - **Sub-commands:**
80
+ - **`reload`**:
81
+ - **Description:** Reload custom command definitions from all sources
82
+ (user-level `~/.gemini/commands/`, project-level
83
+ `<project>/.gemini/commands/`, MCP prompts, and extensions). Use this to
84
+ pick up new or modified `.toml` files without restarting the CLI.
85
+ - **Usage:** `/commands reload`
86
+
87
+ ### `/compress`
88
+
89
+ - **Description:** Replace the entire chat context with a summary. This saves on
90
+ tokens used for future tasks while retaining a high level summary of what has
91
+ happened.
92
+
93
+ ### `/copy`
94
+
95
+ - **Description:** Copies the last output produced by Gemini CLI to your
96
+ clipboard, for easy sharing or reuse.
97
+ - **Behavior:**
98
+ - Local sessions use system clipboard tools (pbcopy/xclip/clip).
99
+ - Remote sessions (SSH/WSL) use OSC 52 and require terminal support.
100
+ - **Note:** This command requires platform-specific clipboard tools to be
101
+ installed.
102
+ - On Linux, it requires `xclip` or `xsel`. You can typically install them
103
+ using your system's package manager.
104
+ - On macOS, it requires `pbcopy`, and on Windows, it requires `clip`. These
105
+ tools are typically pre-installed on their respective systems.
106
+
107
+ ### `/directory` (or `/dir`)
108
+
109
+ - **Description:** Manage workspace directories for multi-directory support.
110
+ - **Sub-commands:**
111
+ - **`add`**:
112
+ - **Description:** Add a directory to the workspace. The path can be
113
+ absolute or relative to the current working directory. Moreover, the
114
+ reference from home directory is supported as well.
115
+ - **Usage:** `/directory add <path1>,<path2>`
116
+ - **Note:** Disabled in restrictive sandbox profiles. If you're using that,
117
+ use `--include-directories` when starting the session instead.
118
+ - **`show`**:
119
+ - **Description:** Display all directories added by `/directory add` and
120
+ `--include-directories`.
121
+ - **Usage:** `/directory show`
122
+
123
+ ### `/docs`
124
+
125
+ - **Description:** Open the Gemini CLI documentation in your browser.
126
+
127
+ ### `/editor`
128
+
129
+ - **Description:** Open a dialog for selecting supported editors.
130
+
131
+ ### `/extensions`
132
+
133
+ - **Description:** Manage extensions. See
134
+ [Gemini CLI Extensions](../extensions/index.md).
135
+ - **Sub-commands:**
136
+ - **`config`**:
137
+ - **Description:** Configure extension settings.
138
+ - **`disable`**:
139
+ - **Description:** Disable an extension.
140
+ - **`enable`**:
141
+ - **Description:** Enable an extension.
142
+ - **`explore`**:
143
+ - **Description:** Open extensions page in your browser.
144
+ - **`install`**:
145
+ - **Description:** Install an extension from a git repo or local path.
146
+ - **`link`**:
147
+ - **Description:** Link an extension from a local path.
148
+ - **`list`**:
149
+ - **Description:** List active extensions.
150
+ - **`restart`**:
151
+ - **Description:** Restart all extensions.
152
+ - **`uninstall`**:
153
+ - **Description:** Uninstall an extension.
154
+ - **`update`**:
155
+ - **Description:** Update extensions. Usage: update <extension-names>|--all
156
+
157
+ ### `/help` (or `/?`)
158
+
159
+ - **Description:** Display help information about Gemini CLI, including
160
+ available commands and their usage.
161
+
162
+ ### `/hooks`
163
+
164
+ - **Description:** Manage hooks, which allow you to intercept and customize
165
+ Gemini CLI behavior at specific lifecycle events.
166
+ - **Sub-commands:**
167
+ - **`disable-all`**:
168
+ - **Description:** Disable all enabled hooks.
169
+ - **`disable <hook-name>`**:
170
+ - **Description:** Disable a hook by name.
171
+ - **`enable-all`**:
172
+ - **Description:** Enable all disabled hooks.
173
+ - **`enable <hook-name>`**:
174
+ - **Description:** Enable a hook by name.
175
+ - **`list`** (or `show`, `panel`):
176
+ - **Description:** Display all registered hooks with their status.
177
+
178
+ ### `/ide`
179
+
180
+ - **Description:** Manage IDE integration.
181
+ - **Sub-commands:**
182
+ - **`disable`**:
183
+ - **Description:** Disable IDE integration.
184
+ - **`enable`**:
185
+ - **Description:** Enable IDE integration.
186
+ - **`install`**:
187
+ - **Description:** Install required IDE companion.
188
+ - **`status`**:
189
+ - **Description:** Check status of IDE integration.
190
+
191
+ ### `/init`
192
+
193
+ - **Description:** To help users easily create a `GEMINI.md` file, this command
194
+ analyzes the current directory and generates a tailored context file, making
195
+ it simpler for them to provide project-specific instructions to the Gemini
196
+ agent.
197
+
198
+ ### `/mcp`
199
+
200
+ - **Description:** Manage configured Model Context Protocol (MCP) servers.
201
+ - **Sub-commands:**
202
+ - **`auth`**:
203
+ - **Description:** Authenticate with an OAuth-enabled MCP server.
204
+ - **Usage:** `/mcp auth <server-name>`
205
+ - **Details:** If `<server-name>` is provided, it initiates the OAuth flow
206
+ for that server. If no server name is provided, it lists all configured
207
+ servers that support OAuth authentication.
208
+ - **`desc`**
209
+ - **Description:** List configured MCP servers and tools with descriptions.
210
+ - **`disable`**
211
+ - **Description:** Disable an MCP server.
212
+ - **`enable`**
213
+ - **Description:** Enable a disabled MCP server.
214
+ - **`list`** or **`ls`**:
215
+ - **Description:** List configured MCP servers and tools. This is the
216
+ default action if no subcommand is specified.
217
+ - **`refresh`**:
218
+ - **Description:** Restarts all MCP servers and re-discovers their available
219
+ tools.
220
+ - **`schema`**:
221
+ - **Description:** List configured MCP servers and tools with descriptions
222
+ and schemas.
223
+
224
+ ### `/memory`
225
+
226
+ - **Description:** Manage the AI's instructional context (hierarchical memory
227
+ loaded from `GEMINI.md` files).
228
+ - **Sub-commands:**
229
+ - **`add`**:
230
+ - **Description:** Adds the following text to the AI's memory. Usage:
231
+ `/memory add <text to remember>`
232
+ - **`list`**:
233
+ - **Description:** Lists the paths of the GEMINI.md files in use for
234
+ hierarchical memory.
235
+ - **`refresh`**:
236
+ - **Description:** Reload the hierarchical instructional memory from all
237
+ `GEMINI.md` files found in the configured locations (global,
238
+ project/ancestors, and sub-directories). This command updates the model
239
+ with the latest `GEMINI.md` content.
240
+ - **`show`**:
241
+ - **Description:** Display the full, concatenated content of the current
242
+ hierarchical memory that has been loaded from all `GEMINI.md` files. This
243
+ lets you inspect the instructional context being provided to the Gemini
244
+ model.
245
+ - **Note:** For more details on how `GEMINI.md` files contribute to
246
+ hierarchical memory, see the
247
+ [CLI Configuration documentation](./configuration.md).
248
+
249
+ ### `/model`
250
+
251
+ - **Description:** Manage model configuration.
252
+ - **Sub-commands:**
253
+ - **`manage`**:
254
+ - **Description:** Opens a dialog to configure the model.
255
+ - **`set`**:
256
+ - **Description:** Set the model to use.
257
+ - **Usage:** `/model set <model-name> [--persist]`
258
+
259
+ ### `/permissions`
260
+
261
+ - **Description:** Manage folder trust settings and other permissions.
262
+ - **Sub-commands:**
263
+ - **`trust`**:
264
+ - **Description:** Manage folder trust settings.
265
+ - **Usage:** `/permissions trust [<directory-path>]`
266
+
267
+ ### `/plan`
268
+
269
+ - **Description:** Switch to Plan Mode (read-only) and view the current plan if
270
+ one has been generated.
271
+ - **Note:** This feature requires the `experimental.plan` setting to be
272
+ enabled in your configuration.
273
+ - **Sub-commands:**
274
+ - **`copy`**:
275
+ - **Description:** Copy the currently approved plan to your clipboard.
276
+
277
+ ### `/policies`
278
+
279
+ - **Description:** Manage policies.
280
+ - **Sub-commands:**
281
+ - **`list`**:
282
+ - **Description:** List all active policies grouped by mode.
283
+
284
+ ### `/privacy`
285
+
286
+ - **Description:** Display the Privacy Notice and allow users to select whether
287
+ they consent to the collection of their data for service improvement purposes.
288
+
289
+ ### `/quit` (or `/exit`)
290
+
291
+ - **Description:** Exit Gemini CLI.
292
+
293
+ ### `/restore`
294
+
295
+ - **Description:** Restores the project files to the state they were in just
296
+ before a tool was executed. This is particularly useful for undoing file edits
297
+ made by a tool. If run without a tool call ID, it will list available
298
+ checkpoints to restore from.
299
+ - **Usage:** `/restore [tool_call_id]`
300
+ - **Note:** Only available if checkpointing is configured via
301
+ [settings](./configuration.md). See
302
+ [Checkpointing documentation](../cli/checkpointing.md) for more details.
303
+
304
+ ### `/rewind`
305
+
306
+ - **Description:** Navigates backward through the conversation history, letting
307
+ you review past interactions and potentially revert both chat state and file
308
+ changes.
309
+ - **Usage:** Press **Esc** twice as a shortcut.
310
+ - **Features:**
311
+ - **Select Interaction:** Preview user prompts and file changes.
312
+ - **Action Selection:** Choose to rewind history only, revert code changes
313
+ only, or both.
314
+
315
+ ### `/resume`
316
+
317
+ - **Description:** Browse and resume previous conversation sessions. Opens an
318
+ interactive session browser where you can search, filter, and select from
319
+ automatically saved conversations.
320
+ - **Features:**
321
+ - **Management:** Delete unwanted sessions directly from the browser
322
+ - **Resume:** Select any session to resume and continue the conversation
323
+ - **Search:** Use `/` to search through conversation content across all
324
+ sessions
325
+ - **Session Browser:** Interactive interface showing all saved sessions with
326
+ timestamps, message counts, and first user message for context
327
+ - **Sorting:** Sort sessions by date or message count
328
+ - **Note:** All conversations are automatically saved as you chat - no manual
329
+ saving required. See [Session Management](../cli/session-management.md) for
330
+ complete details.
331
+
332
+ ### `/settings`
333
+
334
+ - **Description:** Open the settings editor to view and modify Gemini CLI
335
+ settings.
336
+ - **Details:** This command provides a user-friendly interface for changing
337
+ settings that control the behavior and appearance of Gemini CLI. It is
338
+ equivalent to manually editing the `.gemini/settings.json` file, but with
339
+ validation and guidance to prevent errors. See the
340
+ [settings documentation](../cli/settings.md) for a full list of available
341
+ settings.
342
+ - **Usage:** Simply run `/settings` and the editor will open. You can then
343
+ browse or search for specific settings, view their current values, and modify
344
+ them as desired. Changes to some settings are applied immediately, while
345
+ others require a restart.
346
+
347
+ ### `/shells` (or `/bashes`)
348
+
349
+ - **Description:** Toggle the background shells view. This allows you to view
350
+ and manage long-running processes that you've sent to the background.
351
+
352
+ ### `/setup-github`
353
+
354
+ - **Description:** Set up GitHub Actions to triage issues and review PRs with
355
+ Gemini.
356
+
357
+ ### `/skills`
358
+
359
+ - **Description:** Manage Agent Skills, which provide on-demand expertise and
360
+ specialized workflows.
361
+ - **Sub-commands:**
362
+ - **`disable <name>`**:
363
+ - **Description:** Disable a specific skill by name.
364
+ - **Usage:** `/skills disable <name>`
365
+ - **`enable <name>`**:
366
+ - **Description:** Enable a specific skill by name.
367
+ - **Usage:** `/skills enable <name>`
368
+ - **`list`**:
369
+ - **Description:** List all discovered skills and their current status
370
+ (enabled/disabled).
371
+ - **`reload`**:
372
+ - **Description:** Refresh the list of discovered skills from all tiers
373
+ (workspace, user, and extensions).
374
+
375
+ ### `/stats`
376
+
377
+ - **Description:** Display detailed statistics for the current Gemini CLI
378
+ session.
379
+ - **Sub-commands:**
380
+ - **`session`**:
381
+ - **Description:** Show session-specific usage statistics, including
382
+ duration, tool calls, and performance metrics. This is the default view.
383
+ - **`model`**:
384
+ - **Description:** Show model-specific usage statistics, including token
385
+ counts and quota information.
386
+ - **`tools`**:
387
+ - **Description:** Show tool-specific usage statistics.
388
+
389
+ ### `/terminal-setup`
390
+
391
+ - **Description:** Configure terminal keybindings for multiline input (VS Code,
392
+ Cursor, Windsurf).
393
+
394
+ ### `/theme`
395
+
396
+ - **Description:** Open a dialog that lets you change the visual theme of Gemini
397
+ CLI.
398
+
399
+ ### `/tools`
400
+
401
+ - **Description:** Display a list of tools that are currently available within
402
+ Gemini CLI.
403
+ - **Usage:** `/tools [desc]`
404
+ - **Sub-commands:**
405
+ - **`desc`** or **`descriptions`**:
406
+ - **Description:** Show detailed descriptions of each tool, including each
407
+ tool's name with its full description as provided to the model.
408
+ - **`nodesc`** or **`nodescriptions`**:
409
+ - **Description:** Hide tool descriptions, showing only the tool names.
410
+
411
+ ### `/vim`
412
+
413
+ - **Description:** Toggle vim mode on or off. When vim mode is enabled, the
414
+ input area supports vim-style navigation and editing commands in both NORMAL
415
+ and INSERT modes.
416
+ - **Features:**
417
+ - **Count support:** Prefix commands with numbers (e.g., `3h`, `5w`, `10G`)
418
+ - **Editing commands:** Delete with `x`, change with `c`, insert with `i`,
419
+ `a`, `o`, `O`; complex operations like `dd`, `cc`, `dw`, `cw`
420
+ - **INSERT mode:** Standard text input with escape to return to NORMAL mode
421
+ - **NORMAL mode:** Navigate with `h`, `j`, `k`, `l`; jump by words with `w`,
422
+ `b`, `e`; go to line start/end with `0`, `$`, `^`; go to specific lines with
423
+ `G` (or `gg` for first line)
424
+ - **Persistent setting:** Vim mode preference is saved to
425
+ `~/.gemini/settings.json` and restored between sessions
426
+ - **Repeat last command:** Use `.` to repeat the last editing operation
427
+ - **Status indicator:** When enabled, shows `[NORMAL]` or `[INSERT]` in the
428
+ footer
429
+
430
+ ### Custom commands
431
+
432
+ Custom commands allow you to create personalized shortcuts for your most-used
433
+ prompts. For detailed instructions on how to create, manage, and use them,
434
+ please see the dedicated
435
+ [Custom Commands documentation](../cli/custom-commands.md).
436
+
437
+ ## Input prompt shortcuts
438
+
439
+ These shortcuts apply directly to the input prompt for text manipulation.
440
+
441
+ - **Undo:**
442
+ - **Keyboard shortcut:** Press **Alt+z** or **Cmd+z** to undo the last action
443
+ in the input prompt.
444
+
445
+ - **Redo:**
446
+ - **Keyboard shortcut:** Press **Shift+Alt+Z** or **Shift+Cmd+Z** to redo the
447
+ last undone action in the input prompt.
448
+
449
+ ## At commands (`@`)
450
+
451
+ At commands are used to include the content of files or directories as part of
452
+ your prompt to Gemini. These commands include git-aware filtering.
453
+
454
+ - **`@<path_to_file_or_directory>`**
455
+ - **Description:** Inject the content of the specified file or files into your
456
+ current prompt. This is useful for asking questions about specific code,
457
+ text, or collections of files.
458
+ - **Examples:**
459
+ - `@path/to/your/file.txt Explain this text.`
460
+ - `@src/my_project/ Summarize the code in this directory.`
461
+ - `What is this file about? @README.md`
462
+ - **Details:**
463
+ - If a path to a single file is provided, the content of that file is read.
464
+ - If a path to a directory is provided, the command attempts to read the
465
+ content of files within that directory and any subdirectories.
466
+ - Spaces in paths should be escaped with a backslash (e.g.,
467
+ `@My\ Documents/file.txt`).
468
+ - The command uses the `read_many_files` tool internally. The content is
469
+ fetched and then inserted into your query before being sent to the Gemini
470
+ model.
471
+ - **Git-aware filtering:** By default, git-ignored files (like
472
+ `node_modules/`, `dist/`, `.env`, `.git/`) are excluded. This behavior can
473
+ be changed via the `context.fileFiltering` settings.
474
+ - **File types:** The command is intended for text-based files. While it
475
+ might attempt to read any file, binary files or very large files might be
476
+ skipped or truncated by the underlying `read_many_files` tool to ensure
477
+ performance and relevance. The tool indicates if files were skipped.
478
+ - **Output:** The CLI will show a tool call message indicating that
479
+ `read_many_files` was used, along with a message detailing the status and
480
+ the path(s) that were processed.
481
+
482
+ - **`@` (Lone at symbol)**
483
+ - **Description:** If you type a lone `@` symbol without a path, the query is
484
+ passed as-is to the Gemini model. This might be useful if you are
485
+ specifically talking _about_ the `@` symbol in your prompt.
486
+
487
+ ### Error handling for `@` commands
488
+
489
+ - If the path specified after `@` is not found or is invalid, an error message
490
+ will be displayed, and the query might not be sent to the Gemini model, or it
491
+ will be sent without the file content.
492
+ - If the `read_many_files` tool encounters an error (e.g., permission issues),
493
+ this will also be reported.
494
+
495
+ ## Shell mode and passthrough commands (`!`)
496
+
497
+ The `!` prefix lets you interact with your system's shell directly from within
498
+ Gemini CLI.
499
+
500
+ - **`!<shell_command>`**
501
+ - **Description:** Execute the given `<shell_command>` using `bash` on
502
+ Linux/macOS or `powershell.exe -NoProfile -Command` on Windows (unless you
503
+ override `ComSpec`). Any output or errors from the command are displayed in
504
+ the terminal.
505
+ - **Examples:**
506
+ - `!ls -la` (executes `ls -la` and returns to Gemini CLI)
507
+ - `!git status` (executes `git status` and returns to Gemini CLI)
508
+
509
+ - **`!` (Toggle shell mode)**
510
+ - **Description:** Typing `!` on its own toggles shell mode.
511
+ - **Entering shell mode:**
512
+ - When active, shell mode uses a different coloring and a "Shell Mode
513
+ Indicator".
514
+ - While in shell mode, text you type is interpreted directly as a shell
515
+ command.
516
+ - **Exiting shell mode:**
517
+ - When exited, the UI reverts to its standard appearance and normal Gemini
518
+ CLI behavior resumes.
519
+
520
+ - **Caution for all `!` usage:** Commands you execute in shell mode have the
521
+ same permissions and impact as if you ran them directly in your terminal.
522
+
523
+ - **Environment variable:** When a command is executed via `!` or in shell mode,
524
+ the `GEMINI_CLI=1` environment variable is set in the subprocess's
525
+ environment. This allows scripts or tools to detect if they are being run from
526
+ within the Gemini CLI.