@google/gemini-cli-core 0.27.0-preview.3 → 0.28.0-nightly.20260130.d43d772e6

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 (96) hide show
  1. package/dist/docs/changelogs/index.md +17 -0
  2. package/dist/docs/changelogs/latest.md +314 -346
  3. package/dist/docs/changelogs/preview.md +412 -307
  4. package/dist/docs/cli/cli-reference.md +101 -0
  5. package/dist/docs/cli/commands.md +135 -83
  6. package/dist/docs/cli/creating-skills.md +80 -0
  7. package/dist/docs/cli/keyboard-shortcuts.md +12 -11
  8. package/dist/docs/cli/rewind.md +51 -0
  9. package/dist/docs/cli/settings.md +1 -0
  10. package/dist/docs/cli/skills.md +5 -77
  11. package/dist/docs/core/policy-engine.md +8 -3
  12. package/dist/docs/core/subagents.md +34 -29
  13. package/dist/docs/get-started/configuration.md +8 -5
  14. package/dist/docs/sidebar.json +14 -2
  15. package/dist/docs/tools/mcp-server.md +13 -2
  16. package/dist/google-gemini-cli-core-0.28.0-nightly.20260128.adc8e11bb.tgz +0 -0
  17. package/dist/src/code_assist/admin/admin_controls.test.js +17 -17
  18. package/dist/src/code_assist/admin/admin_controls.test.js.map +1 -1
  19. package/dist/src/code_assist/types.d.ts +8 -5
  20. package/dist/src/code_assist/types.js +3 -1
  21. package/dist/src/code_assist/types.js.map +1 -1
  22. package/dist/src/config/config.d.ts +52 -0
  23. package/dist/src/config/config.js.map +1 -1
  24. package/dist/src/config/config.test.js +25 -1
  25. package/dist/src/config/config.test.js.map +1 -1
  26. package/dist/src/core/contentGenerator.js +2 -0
  27. package/dist/src/core/contentGenerator.js.map +1 -1
  28. package/dist/src/core/contentGenerator.test.js +112 -0
  29. package/dist/src/core/contentGenerator.test.js.map +1 -1
  30. package/dist/src/generated/git-commit.d.ts +2 -2
  31. package/dist/src/generated/git-commit.js +2 -2
  32. package/dist/src/generated/git-commit.js.map +1 -1
  33. package/dist/src/hooks/hookEventHandler.d.ts +6 -0
  34. package/dist/src/hooks/hookEventHandler.js +30 -7
  35. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  36. package/dist/src/hooks/hookEventHandler.test.js +43 -0
  37. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  38. package/dist/src/ide/detect-ide.d.ts +4 -0
  39. package/dist/src/ide/detect-ide.js +4 -0
  40. package/dist/src/ide/detect-ide.js.map +1 -1
  41. package/dist/src/ide/detect-ide.test.js +14 -0
  42. package/dist/src/ide/detect-ide.test.js.map +1 -1
  43. package/dist/src/ide/ide-installer.js +74 -3
  44. package/dist/src/ide/ide-installer.js.map +1 -1
  45. package/dist/src/ide/ide-installer.test.js +29 -0
  46. package/dist/src/ide/ide-installer.test.js.map +1 -1
  47. package/dist/src/policy/policies/agent.toml +0 -4
  48. package/dist/src/policy/toml-loader.js +2 -0
  49. package/dist/src/policy/toml-loader.js.map +1 -1
  50. package/dist/src/policy/toml-loader.test.js +14 -0
  51. package/dist/src/policy/toml-loader.test.js.map +1 -1
  52. package/dist/src/policy/types.d.ts +5 -0
  53. package/dist/src/scheduler/policy.d.ts +2 -2
  54. package/dist/src/scheduler/policy.js +8 -3
  55. package/dist/src/scheduler/policy.js.map +1 -1
  56. package/dist/src/scheduler/policy.test.js +6 -6
  57. package/dist/src/scheduler/policy.test.js.map +1 -1
  58. package/dist/src/scheduler/scheduler.js +3 -2
  59. package/dist/src/scheduler/scheduler.js.map +1 -1
  60. package/dist/src/scheduler/scheduler.test.js +58 -8
  61. package/dist/src/scheduler/scheduler.test.js.map +1 -1
  62. package/dist/src/scheduler/tool-executor.js +10 -6
  63. package/dist/src/scheduler/tool-executor.js.map +1 -1
  64. package/dist/src/services/chatCompressionService.test.js +4 -2
  65. package/dist/src/services/chatCompressionService.test.js.map +1 -1
  66. package/dist/src/services/chatRecordingService.d.ts +7 -0
  67. package/dist/src/services/chatRecordingService.js +17 -0
  68. package/dist/src/services/chatRecordingService.js.map +1 -1
  69. package/dist/src/services/chatRecordingService.test.js +56 -0
  70. package/dist/src/services/chatRecordingService.test.js.map +1 -1
  71. package/dist/src/services/environmentSanitization.js +3 -0
  72. package/dist/src/services/environmentSanitization.js.map +1 -1
  73. package/dist/src/services/environmentSanitization.test.js +3 -0
  74. package/dist/src/services/environmentSanitization.test.js.map +1 -1
  75. package/dist/src/services/gitService.d.ts +1 -0
  76. package/dist/src/services/gitService.js +13 -4
  77. package/dist/src/services/gitService.js.map +1 -1
  78. package/dist/src/services/gitService.test.js +11 -0
  79. package/dist/src/services/gitService.test.js.map +1 -1
  80. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +11 -0
  81. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  82. package/dist/src/tools/mcp-client.js +20 -3
  83. package/dist/src/tools/mcp-client.js.map +1 -1
  84. package/dist/src/tools/mcp-client.test.js +65 -2
  85. package/dist/src/tools/mcp-client.test.js.map +1 -1
  86. package/dist/src/utils/fileUtils.d.ts +1 -0
  87. package/dist/src/utils/fileUtils.js +11 -6
  88. package/dist/src/utils/fileUtils.js.map +1 -1
  89. package/dist/src/utils/fileUtils.test.js +35 -6
  90. package/dist/src/utils/fileUtils.test.js.map +1 -1
  91. package/dist/src/utils/terminal.d.ts +4 -0
  92. package/dist/src/utils/terminal.js +12 -0
  93. package/dist/src/utils/terminal.js.map +1 -1
  94. package/dist/tsconfig.tsbuildinfo +1 -1
  95. package/package.json +1 -1
  96. package/dist/google-gemini-cli-core-0.27.0-preview.2.tgz +0 -0
@@ -0,0 +1,101 @@
1
+ # CLI cheatsheet
2
+
3
+ This page provides a reference for commonly used Gemini CLI commands, options,
4
+ and parameters.
5
+
6
+ ## CLI commands
7
+
8
+ | Command | Description | Example |
9
+ | ---------------------------------- | ---------------------------------- | --------------------------------------------------- |
10
+ | `gemini` | Start interactive REPL | `gemini` |
11
+ | `gemini "query"` | Query non-interactively, then exit | `gemini "explain this project"` |
12
+ | `gemini -p "query"` | Query via SDK, then exit | `gemini -p "explain this function"` |
13
+ | `cat file \| gemini -p "query"` | Process piped content | `cat logs.txt \| gemini -p "explain"` |
14
+ | `gemini -i "query"` | Execute and continue interactively | `gemini -i "What is the purpose of this project?"` |
15
+ | `gemini -r "latest"` | Continue most recent session | `gemini -r "latest"` |
16
+ | `gemini -r "latest" "query"` | Continue session with a new prompt | `gemini -r "latest" "Check for type errors"` |
17
+ | `gemini -r "<session-id>" "query"` | Resume session by ID | `gemini -r "abc123" "Finish this PR"` |
18
+ | `gemini update` | Update to latest version | `gemini update` |
19
+ | `gemini extensions` | Manage extensions | See [Extensions Management](#extensions-management) |
20
+ | `gemini mcp` | Configure MCP servers | See [MCP Server Management](#mcp-server-management) |
21
+
22
+ ### Positional arguments
23
+
24
+ | Argument | Type | Description |
25
+ | -------- | ----------------- | ------------------------------------------------------------------------------------------------------------------ |
26
+ | `query` | string (variadic) | Positional prompt. Defaults to one-shot mode. Use `-i/--prompt-interactive` to execute and continue interactively. |
27
+
28
+ ## CLI Options
29
+
30
+ | Option | Alias | Type | Default | Description |
31
+ | -------------------------------- | ----- | ------- | --------- | ---------------------------------------------------------------------------------------------------------- |
32
+ | `--debug` | `-d` | boolean | `false` | Run in debug mode with verbose logging |
33
+ | `--version` | `-v` | - | - | Show CLI version number and exit |
34
+ | `--help` | `-h` | - | - | Show help information |
35
+ | `--model` | `-m` | string | `auto` | Model to use. See [Model Selection](#model-selection) for available values. |
36
+ | `--prompt` | `-p` | string | - | Prompt text. Appended to stdin input if provided. **Deprecated:** Use positional arguments instead. |
37
+ | `--prompt-interactive` | `-i` | string | - | Execute prompt and continue in interactive mode |
38
+ | `--sandbox` | `-s` | boolean | `false` | Run in a sandboxed environment for safer execution |
39
+ | `--approval-mode` | - | string | `default` | Approval mode for tool execution. Choices: `default`, `auto_edit`, `yolo` |
40
+ | `--yolo` | `-y` | boolean | `false` | **Deprecated.** Auto-approve all actions. Use `--approval-mode=yolo` instead. |
41
+ | `--experimental-acp` | - | boolean | - | Start in ACP (Agent Code Pilot) mode. **Experimental feature.** |
42
+ | `--experimental-zed-integration` | - | boolean | - | Run in Zed editor integration mode. **Experimental feature.** |
43
+ | `--allowed-mcp-server-names` | - | array | - | Allowed MCP server names (comma-separated or multiple flags) |
44
+ | `--allowed-tools` | - | array | - | Tools that are allowed to run without confirmation (comma-separated or multiple flags) |
45
+ | `--extensions` | `-e` | array | - | List of extensions to use. If not provided, all extensions are enabled (comma-separated or multiple flags) |
46
+ | `--list-extensions` | `-l` | boolean | - | List all available extensions and exit |
47
+ | `--resume` | `-r` | string | - | Resume a previous session. Use `"latest"` for most recent or index number (e.g. `--resume 5`) |
48
+ | `--list-sessions` | - | boolean | - | List available sessions for the current project and exit |
49
+ | `--delete-session` | - | string | - | Delete a session by index number (use `--list-sessions` to see available sessions) |
50
+ | `--include-directories` | - | array | - | Additional directories to include in the workspace (comma-separated or multiple flags) |
51
+ | `--screen-reader` | - | boolean | - | Enable screen reader mode for accessibility |
52
+ | `--output-format` | `-o` | string | `text` | The format of the CLI output. Choices: `text`, `json`, `stream-json` |
53
+
54
+ ## Model selection
55
+
56
+ The `--model` (or `-m`) flag allows you to specify which Gemini model to use.
57
+ You can use either model aliases (user-friendly names) or concrete model names.
58
+
59
+ ### Model aliases
60
+
61
+ These are convenient shortcuts that map to specific models:
62
+
63
+ | Alias | Resolves To | Description |
64
+ | ------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------- |
65
+ | `auto` | `gemini-2.5-pro` or `gemini-3-pro-preview` | **Default.** Resolves to the preview model if preview features are enabled, otherwise resolves to the standard pro model. |
66
+ | `pro` | `gemini-2.5-pro` or `gemini-3-pro-preview` | For complex reasoning tasks. Uses preview model if enabled. |
67
+ | `flash` | `gemini-2.5-flash` | Fast, balanced model for most tasks. |
68
+ | `flash-lite` | `gemini-2.5-flash-lite` | Fastest model for simple tasks. |
69
+
70
+ ## Extensions management
71
+
72
+ | Command | Description | Example |
73
+ | -------------------------------------------------- | -------------------------------------------- | ------------------------------------------------------------------------------ |
74
+ | `gemini extensions install <source>` | Install extension from Git URL or local path | `gemini extensions install https://github.com/user/my-extension` |
75
+ | `gemini extensions install <source> --ref <ref>` | Install from specific branch/tag/commit | `gemini extensions install https://github.com/user/my-extension --ref develop` |
76
+ | `gemini extensions install <source> --auto-update` | Install with auto-update enabled | `gemini extensions install https://github.com/user/my-extension --auto-update` |
77
+ | `gemini extensions uninstall <name>` | Uninstall one or more extensions | `gemini extensions uninstall my-extension` |
78
+ | `gemini extensions list` | List all installed extensions | `gemini extensions list` |
79
+ | `gemini extensions update <name>` | Update a specific extension | `gemini extensions update my-extension` |
80
+ | `gemini extensions update --all` | Update all extensions | `gemini extensions update --all` |
81
+ | `gemini extensions enable <name>` | Enable an extension | `gemini extensions enable my-extension` |
82
+ | `gemini extensions disable <name>` | Disable an extension | `gemini extensions disable my-extension` |
83
+ | `gemini extensions link <path>` | Link local extension for development | `gemini extensions link /path/to/extension` |
84
+ | `gemini extensions new <path>` | Create new extension from template | `gemini extensions new ./my-extension` |
85
+ | `gemini extensions validate <path>` | Validate extension structure | `gemini extensions validate ./my-extension` |
86
+
87
+ See [Extensions Documentation](../extensions/index.md) for more details.
88
+
89
+ ## MCP server management
90
+
91
+ | Command | Description | Example |
92
+ | ------------------------------------------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------- |
93
+ | `gemini mcp add <name> <command>` | Add stdio-based MCP server | `gemini mcp add github npx -y @modelcontextprotocol/server-github` |
94
+ | `gemini mcp add <name> <url> --transport http` | Add HTTP-based MCP server | `gemini mcp add api-server http://localhost:3000 --transport http` |
95
+ | `gemini mcp add <name> <command> --env KEY=value` | Add with environment variables | `gemini mcp add slack node server.js --env SLACK_TOKEN=xoxb-xxx` |
96
+ | `gemini mcp add <name> <command> --scope user` | Add with user scope | `gemini mcp add db node db-server.js --scope user` |
97
+ | `gemini mcp add <name> <command> --include-tools tool1,tool2` | Add with specific tools | `gemini mcp add github npx -y @modelcontextprotocol/server-github --include-tools list_repos,get_pr` |
98
+ | `gemini mcp remove <name>` | Remove an MCP server | `gemini mcp remove github` |
99
+ | `gemini mcp list` | List all configured MCP servers | `gemini mcp list` |
100
+
101
+ See [MCP Server Integration](../tools/mcp-server.md) for more details.
@@ -10,6 +10,14 @@ Slash commands provide meta-level control over the CLI itself.
10
10
 
11
11
  ### Built-in Commands
12
12
 
13
+ - **`/about`**
14
+ - **Description:** Show version info. Please share this information when
15
+ filing issues.
16
+
17
+ - **`/auth`**
18
+ - **Description:** Open a dialog that lets you change the authentication
19
+ method.
20
+
13
21
  - **`/bug`**
14
22
  - **Description:** File an issue about Gemini CLI. By default, the issue is
15
23
  filed within the GitHub repository for Gemini CLI. The string you enter
@@ -22,10 +30,21 @@ Slash commands provide meta-level control over the CLI itself.
22
30
  conversation state interactively, or resuming a previous state from a later
23
31
  session.
24
32
  - **Sub-commands:**
25
- - **`save`**
33
+ - **`delete <tag>`**
34
+ - **Description:** Deletes a saved conversation checkpoint.
35
+ - **`list`**
36
+ - **Description:** Lists available tags for chat state resumption.
37
+ - **Note:** This command only lists chats saved within the current
38
+ project. Because chat history is project-scoped, chats saved in other
39
+ project directories will not be displayed.
40
+ - **`resume <tag>`**
41
+ - **Description:** Resumes a conversation from a previous save.
42
+ - **Note:** You can only resume chats that were saved within the current
43
+ project. To resume a chat from a different project, you must run the
44
+ Gemini CLI from that project's directory.
45
+ - **`save <tag>`**
26
46
  - **Description:** Saves the current conversation history. You must add a
27
47
  `<tag>` for identifying the conversation state.
28
- - **Usage:** `/chat save <tag>`
29
48
  - **Details on checkpoint location:** The default locations for saved chat
30
49
  checkpoints are:
31
50
  - Linux/macOS: `~/.gemini/tmp/<project_hash>/`
@@ -37,25 +56,11 @@ Slash commands provide meta-level control over the CLI itself.
37
56
  conversation states. For automatic checkpoints created before file
38
57
  modifications, see the
39
58
  [Checkpointing documentation](../cli/checkpointing.md).
40
- - **`resume`**
41
- - **Description:** Resumes a conversation from a previous save.
42
- - **Usage:** `/chat resume <tag>`
43
- - **Note:** You can only resume chats that were saved within the current
44
- project. To resume a chat from a different project, you must run the
45
- Gemini CLI from that project's directory.
46
- - **`list`**
47
- - **Description:** Lists available tags for chat state resumption.
48
- - **Note:** This command only lists chats saved within the current
49
- project. Because chat history is project-scoped, chats saved in other
50
- project directories will not be displayed.
51
- - **`delete`**
52
- - **Description:** Deletes a saved conversation checkpoint.
53
- - **Usage:** `/chat delete <tag>`
54
- - **`share`**
59
+ - **`share [filename]`**
55
60
  - **Description** Writes the current conversation to a provided Markdown
56
- or JSON file.
57
- - **Usage** `/chat share file.md` or `/chat share file.json`. If no
58
- filename is provided, then the CLI will generate one.
61
+ or JSON file. If no filename is provided, then the CLI will generate
62
+ one.
63
+ - **Usage** `/chat share file.md` or `/chat share file.json`.
59
64
 
60
65
  - **`/clear`**
61
66
  - **Description:** Clear the terminal screen, including the visible session
@@ -98,6 +103,9 @@ Slash commands provide meta-level control over the CLI itself.
98
103
  `--include-directories`.
99
104
  - **Usage:** `/directory show`
100
105
 
106
+ - **`/docs`**
107
+ - **Description:** Open the Gemini CLI documentation in your browser.
108
+
101
109
  - **`/editor`**
102
110
  - **Description:** Open a dialog for selecting supported editors.
103
111
 
@@ -109,30 +117,65 @@ Slash commands provide meta-level control over the CLI itself.
109
117
  - **Description:** Display help information about Gemini CLI, including
110
118
  available commands and their usage.
111
119
 
120
+ - **`/hooks`**
121
+ - **Description:** Manage hooks, which allow you to intercept and customize
122
+ Gemini CLI behavior at specific lifecycle events.
123
+ - **Sub-commands:**
124
+ - **`disable-all`**:
125
+ - **Description:** Disable all enabled hooks.
126
+ - **`disable <hook-name>`**:
127
+ - **Description:** Disable a hook by name.
128
+ - **`enable-all`**:
129
+ - **Description:** Enable all disabled hooks.
130
+ - **`enable <hook-name>`**:
131
+ - **Description:** Enable a hook by name.
132
+ - **`list`** (or `show`, `panel`):
133
+ - **Description:** Display all registered hooks with their status.
134
+
135
+ - **`/ide`**
136
+ - **Description:** Manage IDE integration.
137
+ - **Sub-commands:**
138
+ - **`disable`**:
139
+ - **Description:** Disable IDE integration.
140
+ - **`enable`**:
141
+ - **Description:** Enable IDE integration.
142
+ - **`install`**:
143
+ - **Description:** Install required IDE companion.
144
+ - **`status`**:
145
+ - **Description:** Check status of IDE integration.
146
+
147
+ - **`/init`**
148
+ - **Description:** To help users easily create a `GEMINI.md` file, this
149
+ command analyzes the current directory and generates a tailored context
150
+ file, making it simpler for them to provide project-specific instructions to
151
+ the Gemini agent.
152
+
153
+ - **`/introspect`**
154
+ - **Description:** Provide debugging information about the current Gemini CLI
155
+ session, including the state of loaded sub-agents and active hooks. This
156
+ command is primarily for advanced users and developers.
157
+
112
158
  - **`/mcp`**
113
159
  - **Description:** Manage configured Model Context Protocol (MCP) servers.
114
160
  - **Sub-commands:**
115
- - **`list`** or **`ls`**:
116
- - **Description:** List configured MCP servers and tools. This is the
117
- default action if no subcommand is specified.
118
- - **`desc`**
119
- - **Description:** List configured MCP servers and tools with
120
- descriptions.
121
- - **`schema`**:
122
- - **Description:** List configured MCP servers and tools with descriptions
123
- and schemas.
124
161
  - **`auth`**:
125
162
  - **Description:** Authenticate with an OAuth-enabled MCP server.
126
163
  - **Usage:** `/mcp auth <server-name>`
127
164
  - **Details:** If `<server-name>` is provided, it initiates the OAuth flow
128
165
  for that server. If no server name is provided, it lists all configured
129
166
  servers that support OAuth authentication.
167
+ - **`desc`**
168
+ - **Description:** List configured MCP servers and tools with
169
+ descriptions.
170
+ - **`list`** or **`ls`**:
171
+ - **Description:** List configured MCP servers and tools. This is the
172
+ default action if no subcommand is specified.
130
173
  - **`refresh`**:
131
174
  - **Description:** Restarts all MCP servers and re-discovers their
132
175
  available tools.
133
-
134
- - [**`/model`**](./model.md)
135
- - **Description:** Opens a dialog to choose your Gemini model.
176
+ - **`schema`**:
177
+ - **Description:** List configured MCP servers and tools with descriptions
178
+ and schemas.
136
179
 
137
180
  - **`/memory`**
138
181
  - **Description:** Manage the AI's instructional context (hierarchical memory
@@ -141,23 +184,40 @@ Slash commands provide meta-level control over the CLI itself.
141
184
  - **`add`**:
142
185
  - **Description:** Adds the following text to the AI's memory. Usage:
143
186
  `/memory add <text to remember>`
144
- - **`show`**:
145
- - **Description:** Display the full, concatenated content of the current
146
- hierarchical memory that has been loaded from all `GEMINI.md` files.
147
- This lets you inspect the instructional context being provided to the
148
- Gemini model.
187
+ - **`list`**:
188
+ - **Description:** Lists the paths of the GEMINI.md files in use for
189
+ hierarchical memory.
149
190
  - **`refresh`**:
150
191
  - **Description:** Reload the hierarchical instructional memory from all
151
192
  `GEMINI.md` files found in the configured locations (global,
152
193
  project/ancestors, and sub-directories). This command updates the model
153
194
  with the latest `GEMINI.md` content.
154
- - **`list`**:
155
- - **Description:** Lists the paths of the GEMINI.md files in use for
156
- hierarchical memory.
195
+ - **`show`**:
196
+ - **Description:** Display the full, concatenated content of the current
197
+ hierarchical memory that has been loaded from all `GEMINI.md` files.
198
+ This lets you inspect the instructional context being provided to the
199
+ Gemini model.
157
200
  - **Note:** For more details on how `GEMINI.md` files contribute to
158
201
  hierarchical memory, see the
159
202
  [CLI Configuration documentation](../get-started/configuration.md).
160
203
 
204
+ - [**`/model`**](./model.md)
205
+ - **Description:** Opens a dialog to choose your Gemini model.
206
+
207
+ - **`/policies`**
208
+ - **Description:** Manage policies.
209
+ - **Sub-commands:**
210
+ - **`list`**:
211
+ - **Description:** List all active policies grouped by mode.
212
+
213
+ - **`/privacy`**
214
+ - **Description:** Display the Privacy Notice and allow users to select
215
+ whether they consent to the collection of their data for service improvement
216
+ purposes.
217
+
218
+ - **`/quit`** (or **`/exit`**)
219
+ - **Description:** Exit Gemini CLI.
220
+
161
221
  - **`/restore`**
162
222
  - **Description:** Restores the project files to the state they were in just
163
223
  before a tool was executed. This is particularly useful for undoing file
@@ -168,18 +228,24 @@ Slash commands provide meta-level control over the CLI itself.
168
228
  [settings](../get-started/configuration.md). See
169
229
  [Checkpointing documentation](../cli/checkpointing.md) for more details.
170
230
 
231
+ - **`/rewind`**
232
+ - **Description:** Navigates backward through the conversation history,
233
+ allowing you to review past interactions and potentially revert to a
234
+ previous state. This feature helps in managing complex or branched
235
+ conversations.
236
+
171
237
  - **`/resume`**
172
238
  - **Description:** Browse and resume previous conversation sessions. Opens an
173
239
  interactive session browser where you can search, filter, and select from
174
240
  automatically saved conversations.
175
241
  - **Features:**
176
- - **Session Browser:** Interactive interface showing all saved sessions with
177
- timestamps, message counts, and first user message for context
242
+ - **Management:** Delete unwanted sessions directly from the browser
243
+ - **Resume:** Select any session to resume and continue the conversation
178
244
  - **Search:** Use `/` to search through conversation content across all
179
245
  sessions
246
+ - **Session Browser:** Interactive interface showing all saved sessions with
247
+ timestamps, message counts, and first user message for context
180
248
  - **Sorting:** Sort sessions by date or message count
181
- - **Management:** Delete unwanted sessions directly from the browser
182
- - **Resume:** Select any session to resume and continue the conversation
183
249
  - **Note:** All conversations are automatically saved as you chat - no manual
184
250
  saving required. See [Session Management](../cli/session-management.md) for
185
251
  complete details.
@@ -198,19 +264,23 @@ Slash commands provide meta-level control over the CLI itself.
198
264
  modify them as desired. Changes to some settings are applied immediately,
199
265
  while others require a restart.
200
266
 
267
+ - **`/setup-github`**
268
+ - **Description:** Set up GitHub Actions to triage issues and review PRs with
269
+ Gemini.
270
+
201
271
  - [**`/skills`**](./skills.md)
202
272
  - **Description:** Manage Agent Skills, which provide on-demand expertise and
203
273
  specialized workflows.
204
274
  - **Sub-commands:**
275
+ - **`disable <name>`**:
276
+ - **Description:** Disable a specific skill by name.
277
+ - **Usage:** `/skills disable <name>`
278
+ - **`enable <name>`**:
279
+ - **Description:** Enable a specific skill by name.
280
+ - **Usage:** `/skills enable <name>`
205
281
  - **`list`**:
206
282
  - **Description:** List all discovered skills and their current status
207
283
  (enabled/disabled).
208
- - **`enable`**:
209
- - **Description:** Enable a specific skill by name.
210
- - **Usage:** `/skills enable <name>`
211
- - **`disable`**:
212
- - **Description:** Disable a specific skill by name.
213
- - **Usage:** `/skills disable <name>`
214
284
  - **`reload`**:
215
285
  - **Description:** Refresh the list of discovered skills from all tiers
216
286
  (workspace, user, and extensions).
@@ -222,18 +292,14 @@ Slash commands provide meta-level control over the CLI itself.
222
292
  cached tokens are being used, which occurs with API key authentication but
223
293
  not with OAuth authentication at this time.
224
294
 
295
+ - **`/terminal-setup`**
296
+ - **Description:** Configure terminal keybindings for multiline input (VS
297
+ Code, Cursor, Windsurf).
298
+
225
299
  - [**`/theme`**](./themes.md)
226
300
  - **Description:** Open a dialog that lets you change the visual theme of
227
301
  Gemini CLI.
228
302
 
229
- - **`/auth`**
230
- - **Description:** Open a dialog that lets you change the authentication
231
- method.
232
-
233
- - **`/about`**
234
- - **Description:** Show version info. Please share this information when
235
- filing issues.
236
-
237
303
  - [**`/tools`**](../tools/index.md)
238
304
  - **Description:** Display a list of tools that are currently available within
239
305
  Gemini CLI.
@@ -245,37 +311,23 @@ Slash commands provide meta-level control over the CLI itself.
245
311
  - **`nodesc`** or **`nodescriptions`**:
246
312
  - **Description:** Hide tool descriptions, showing only the tool names.
247
313
 
248
- - **`/privacy`**
249
- - **Description:** Display the Privacy Notice and allow users to select
250
- whether they consent to the collection of their data for service improvement
251
- purposes.
252
-
253
- - **`/quit`** (or **`/exit`**)
254
- - **Description:** Exit Gemini CLI.
255
-
256
314
  - **`/vim`**
257
315
  - **Description:** Toggle vim mode on or off. When vim mode is enabled, the
258
316
  input area supports vim-style navigation and editing commands in both NORMAL
259
317
  and INSERT modes.
260
318
  - **Features:**
319
+ - **Count support:** Prefix commands with numbers (e.g., `3h`, `5w`, `10G`)
320
+ - **Editing commands:** Delete with `x`, change with `c`, insert with `i`,
321
+ `a`, `o`, `O`; complex operations like `dd`, `cc`, `dw`, `cw`
322
+ - **INSERT mode:** Standard text input with escape to return to NORMAL mode
261
323
  - **NORMAL mode:** Navigate with `h`, `j`, `k`, `l`; jump by words with `w`,
262
324
  `b`, `e`; go to line start/end with `0`, `$`, `^`; go to specific lines
263
325
  with `G` (or `gg` for first line)
264
- - **INSERT mode:** Standard text input with escape to return to NORMAL mode
265
- - **Editing commands:** Delete with `x`, change with `c`, insert with `i`,
266
- `a`, `o`, `O`; complex operations like `dd`, `cc`, `dw`, `cw`
267
- - **Count support:** Prefix commands with numbers (e.g., `3h`, `5w`, `10G`)
268
- - **Repeat last command:** Use `.` to repeat the last editing operation
269
326
  - **Persistent setting:** Vim mode preference is saved to
270
327
  `~/.gemini/settings.json` and restored between sessions
271
- - **Status indicator:** When enabled, shows `[NORMAL]` or `[INSERT]` in the
272
- footer
273
-
274
- - **`/init`**
275
- - **Description:** To help users easily create a `GEMINI.md` file, this
276
- command analyzes the current directory and generates a tailored context
277
- file, making it simpler for them to provide project-specific instructions to
278
- the Gemini agent.
328
+ - **Repeat last command:** Use `.` to repeat the last editing operation
329
+ - **Status indicator:** When enabled, shows `[NORMAL]` or `[INSERT]` in the
330
+ footer
279
331
 
280
332
  ### Custom commands
281
333
 
@@ -288,12 +340,12 @@ please see the dedicated [Custom Commands documentation](./custom-commands.md).
288
340
  These shortcuts apply directly to the input prompt for text manipulation.
289
341
 
290
342
  - **Undo:**
291
- - **Keyboard shortcut:** Press **Ctrl+z** to undo the last action in the input
292
- prompt.
343
+ - **Keyboard shortcut:** Press **Cmd+z** or **Alt+z** to undo the last action
344
+ in the input prompt.
293
345
 
294
346
  - **Redo:**
295
- - **Keyboard shortcut:** Press **Ctrl+Shift+Z** to redo the last undone action
296
- in the input prompt.
347
+ - **Keyboard shortcut:** Press **Shift+Cmd+Z** or **Shift+Alt+Z** to redo the
348
+ last undone action in the input prompt.
297
349
 
298
350
  ## At commands (`@`)
299
351
 
@@ -0,0 +1,80 @@
1
+ # Creating Agent Skills
2
+
3
+ This guide provides an overview of how to create your own Agent Skills to extend
4
+ the capabilities of Gemini CLI.
5
+
6
+ ## Getting started: The `skill-creator` skill
7
+
8
+ The recommended way to create a new skill is to use the built-in `skill-creator`
9
+ skill. To use it, ask Gemini CLI to create a new skill for you.
10
+
11
+ **Example prompt:**
12
+
13
+ > "create a new skill called 'code-reviewer'"
14
+
15
+ Gemini CLI will then use the `skill-creator` to generate the skill:
16
+
17
+ 1. Generate a new directory for your skill (e.g., `my-new-skill/`).
18
+ 2. Create a `SKILL.md` file with the necessary YAML frontmatter (`name` and
19
+ `description`).
20
+ 3. Create the standard resource directories: `scripts/`, `references/`, and
21
+ `assets/`.
22
+
23
+ ## Manual skill creation
24
+
25
+ If you prefer to create skills manually:
26
+
27
+ 1. **Create a directory** for your skill (e.g., `my-new-skill/`).
28
+ 2. **Create a `SKILL.md` file** inside the new directory.
29
+
30
+ To add additional resources that support the skill, refer to the skill
31
+ structure.
32
+
33
+ ## Skill structure
34
+
35
+ A skill is a directory containing a `SKILL.md` file at its root.
36
+
37
+ ### Folder structure
38
+
39
+ While a `SKILL.md` file is the only required component, we recommend the
40
+ following structure for organizing your skill's resources:
41
+
42
+ ```text
43
+ my-skill/
44
+ ├── SKILL.md (Required) Instructions and metadata
45
+ ├── scripts/ (Optional) Executable scripts
46
+ ├── references/ (Optional) Static documentation
47
+ └── assets/ (Optional) Templates and other resources
48
+ ```
49
+
50
+ ### `SKILL.md` file
51
+
52
+ The `SKILL.md` file is the core of your skill. This file uses YAML frontmatter
53
+ for metadata and Markdown for instructions. For example:
54
+
55
+ ```markdown
56
+ ---
57
+ name: code-reviewer
58
+ description:
59
+ Use this skill to review code. It supports both local changes and remote Pull
60
+ Requests.
61
+ ---
62
+
63
+ # Code Reviewer
64
+
65
+ This skill guides the agent in conducting thorough code reviews.
66
+
67
+ ## Workflow
68
+
69
+ ### 1. Determine Review Target
70
+
71
+ - **Remote PR**: If the user gives a PR number or URL, target that remote PR.
72
+ - **Local Changes**: If changes are local... ...
73
+ ```
74
+
75
+ - **`name`**: A unique identifier for the skill. This should match the directory
76
+ name.
77
+ - **`description`**: A description of what the skill does and when Gemini should
78
+ use it.
79
+ - **Body**: The Markdown body of the file contains the instructions that guide
80
+ the agent's behavior when the skill is active.
@@ -30,17 +30,17 @@ available combinations.
30
30
 
31
31
  #### Editing
32
32
 
33
- | Action | Keys |
34
- | ------------------------------------------------ | --------------------------------------------------------- |
35
- | Delete from the cursor to the end of the line. | `Ctrl + K` |
36
- | Delete from the cursor to the start of the line. | `Ctrl + U` |
37
- | Clear all text in the input field. | `Ctrl + C` |
38
- | Delete the previous word. | `Ctrl + Backspace`<br />`Alt + Backspace`<br />`Ctrl + W` |
39
- | Delete the next word. | `Ctrl + Delete`<br />`Alt + Delete` |
40
- | Delete the character to the left. | `Backspace`<br />`Ctrl + H` |
41
- | Delete the character to the right. | `Delete`<br />`Ctrl + D` |
42
- | Undo the most recent text edit. | `Ctrl + Z (no Shift)` |
43
- | Redo the most recent undone text edit. | `Shift + Ctrl + Z` |
33
+ | Action | Keys |
34
+ | ------------------------------------------------ | ---------------------------------------------------------------- |
35
+ | Delete from the cursor to the end of the line. | `Ctrl + K` |
36
+ | Delete from the cursor to the start of the line. | `Ctrl + U` |
37
+ | Clear all text in the input field. | `Ctrl + C` |
38
+ | Delete the previous word. | `Ctrl + Backspace`<br />`Alt + Backspace`<br />`Ctrl + W` |
39
+ | Delete the next word. | `Ctrl + Delete`<br />`Alt + Delete` |
40
+ | Delete the character to the left. | `Backspace`<br />`Ctrl + H` |
41
+ | Delete the character to the right. | `Delete`<br />`Ctrl + D` |
42
+ | Undo the most recent text edit. | `Cmd + Z (no Shift)`<br />`Alt + Z (no Shift)` |
43
+ | Redo the most recent undone text edit. | `Shift + Ctrl + Z`<br />`Shift + Cmd + Z`<br />`Shift + Alt + Z` |
44
44
 
45
45
  #### Scrolling
46
46
 
@@ -110,6 +110,7 @@ available combinations.
110
110
  | Focus the Gemini input from the shell input. | `Tab` |
111
111
  | Clear the terminal screen and redraw the UI. | `Ctrl + L` |
112
112
  | Restart the application. | `R` |
113
+ | Suspend the application (not yet implemented). | `Ctrl + Z` |
113
114
 
114
115
  <!-- KEYBINDINGS-AUTOGEN:END -->
115
116
 
@@ -0,0 +1,51 @@
1
+ # Rewind
2
+
3
+ The `/rewind` command allows you to go back to a previous state in your
4
+ conversation and, optionally, revert any file changes made by the AI during
5
+ those interactions. This is a powerful tool for undoing mistakes, exploring
6
+ different approaches, or simply cleaning up your session history.
7
+
8
+ ## Usage
9
+
10
+ To use the rewind feature, simply type `/rewind` into the input prompt and press
11
+ **Enter**.
12
+
13
+ Alternatively, you can use the keyboard shortcut: **Press `Esc` twice**.
14
+
15
+ ## Interface
16
+
17
+ When you trigger a rewind, an interactive list of your previous interactions
18
+ appears.
19
+
20
+ 1. **Select Interaction:** Use the **Up/Down arrow keys** to navigate through
21
+ the list. The most recent interactions are at the bottom.
22
+ 2. **Preview:** As you select an interaction, you'll see a preview of the user
23
+ prompt and, if applicable, the number of files changed during that step.
24
+ 3. **Confirm Selection:** Press **Enter** on the interaction you want to rewind
25
+ back to.
26
+ 4. **Action Selection:** After selecting an interaction, you'll be presented
27
+ with a confirmation dialog with up to three options:
28
+ - **Rewind conversation and revert code changes:** Reverts both the chat
29
+ history and the file modifications to the state before the selected
30
+ interaction.
31
+ - **Rewind conversation:** Only reverts the chat history. File changes are
32
+ kept.
33
+ - **Revert code changes:** Only reverts the file modifications. The chat
34
+ history is kept.
35
+ - **Do nothing (esc):** Cancels the rewind operation.
36
+
37
+ If no code changes were made since the selected point, the options related to
38
+ reverting code changes will be hidden.
39
+
40
+ ## Key Considerations
41
+
42
+ - **Destructive Action:** Rewinding is a destructive action for your current
43
+ session history and potentially your files. Use it with care.
44
+ - **Agent Awareness:** When you rewind the conversation, the AI model loses all
45
+ memory of the interactions that were removed. If you only revert code changes,
46
+ you may need to inform the model that the files have changed.
47
+ - **Manual Edits:** Rewinding only affects file changes made by the AI's edit
48
+ tools. It does **not** undo manual edits you've made or changes triggered by
49
+ the shell tool (`!`).
50
+ - **Compression:** Rewind works across chat compression points by reconstructing
51
+ the history from stored session data.
@@ -57,6 +57,7 @@ they appear in the UI.
57
57
  | Show Line Numbers | `ui.showLineNumbers` | Show line numbers in the chat. | `true` |
58
58
  | Show Citations | `ui.showCitations` | Show citations for generated text in the chat. | `false` |
59
59
  | Show Model Info In Chat | `ui.showModelInfoInChat` | Show the model name in the chat for each model turn. | `false` |
60
+ | Show User Identity | `ui.showUserIdentity` | Show the logged-in user's identity (e.g. email) in the UI. | `true` |
60
61
  | Use Alternate Screen Buffer | `ui.useAlternateBuffer` | Use an alternate screen buffer for the UI, preserving shell history. | `false` |
61
62
  | Use Background Color | `ui.useBackgroundColor` | Whether to use background colors in the UI. | `true` |
62
63
  | Incremental Rendering | `ui.incrementalRendering` | Enable incremental rendering for the UI. This option will reduce flickering but may cause rendering artifacts. Only supported when useAlternateBuffer is enabled. | `true` |