@thacio/auditaria 0.30.11 → 0.30.13
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/README.md +14 -10
- package/bundle/docs/admin/enterprise-controls.md +115 -0
- package/bundle/docs/changelogs/index.md +20 -1
- package/bundle/docs/changelogs/latest.md +359 -293
- package/bundle/docs/changelogs/preview.md +296 -349
- package/bundle/docs/cli/checkpointing.md +2 -3
- package/bundle/docs/cli/cli-reference.md +4 -5
- package/bundle/docs/cli/commands.md +376 -650
- package/bundle/docs/cli/custom-commands.md +3 -0
- package/bundle/docs/cli/enterprise.md +1 -1
- package/bundle/docs/cli/gemini-md.md +20 -12
- package/bundle/docs/cli/headless.md +34 -372
- package/bundle/docs/cli/keyboard-shortcuts.md +36 -35
- package/bundle/docs/cli/plan-mode.md +5 -1
- package/bundle/docs/cli/rewind.md +11 -11
- package/bundle/docs/cli/session-management.md +61 -44
- package/bundle/docs/cli/settings.md +10 -5
- package/bundle/docs/cli/skills.md +15 -8
- package/bundle/docs/cli/themes.md +85 -51
- package/bundle/docs/cli/tutorials/automation.md +187 -0
- package/bundle/docs/cli/tutorials/file-management.md +142 -0
- package/bundle/docs/cli/tutorials/mcp-setup.md +105 -0
- package/bundle/docs/cli/tutorials/memory-management.md +126 -0
- package/bundle/docs/cli/tutorials/session-management.md +105 -0
- package/bundle/docs/cli/tutorials/shell-commands.md +107 -0
- package/bundle/docs/cli/tutorials/skills-getting-started.md +36 -31
- package/bundle/docs/cli/tutorials/task-planning.md +93 -0
- package/bundle/docs/cli/tutorials/web-tools.md +78 -0
- package/bundle/docs/core/policy-engine.md +4 -2
- package/bundle/docs/core/subagents.md +38 -38
- package/bundle/docs/extensions/best-practices.md +102 -53
- package/bundle/docs/extensions/index.md +37 -21
- package/bundle/docs/extensions/reference.md +148 -216
- package/bundle/docs/extensions/releasing.md +93 -122
- package/bundle/docs/extensions/writing-extensions.md +87 -76
- package/bundle/docs/get-started/configuration.md +103 -61
- package/bundle/docs/get-started/examples.md +39 -119
- package/bundle/docs/get-started/index.md +5 -4
- package/bundle/docs/get-started/installation.md +110 -77
- package/bundle/docs/index.md +156 -108
- package/bundle/docs/releases.md +2 -2
- package/bundle/docs/sidebar.json +101 -61
- package/bundle/docs/tools/activate-skill.md +43 -0
- package/bundle/docs/tools/ask-user.md +1 -1
- package/bundle/docs/tools/file-system.md +43 -133
- package/bundle/docs/tools/index.md +92 -91
- package/bundle/docs/tools/internal-docs.md +46 -0
- package/bundle/docs/tools/mcp-server.md +2 -2
- package/bundle/docs/tools/memory.md +21 -40
- package/bundle/docs/tools/shell.md +43 -88
- package/bundle/docs/tools/todos.md +22 -44
- package/bundle/docs/tools/web-fetch.md +22 -46
- package/bundle/docs/tools/web-search.md +19 -29
- package/bundle/gemini.js +138556 -136594
- package/bundle/mcp-bridge.js +154 -143
- package/bundle/node_modules/@browserbasehq/stagehand/dist/index.js +165438 -0
- package/bundle/node_modules/@browserbasehq/stagehand/package.json +102 -0
- package/bundle/node_modules/@thacio/auditaria-search/dist/tsconfig.tsbuildinfo +1 -1
- package/bundle/web-client/components/EditorPanel.js +57 -36
- package/bundle/web-client/components/FileTreePanel.js +240 -59
- package/bundle/web-client/index.html +5 -1
- package/bundle/web-client/managers/EditorManager.js +190 -24
- package/bundle/web-client/managers/FileTreeManager.js +301 -69
- package/bundle/web-client/styles/file-browser.css +42 -0
- package/bundle/web-client/styles/themes.css +376 -0
- package/bundle/web-client/utils/theme-manager.js +33 -1
- package/package.json +7 -6
- package/bundle/docs/architecture.md +0 -80
- package/bundle/docs/cli/index.md +0 -67
- package/bundle/docs/cli/tutorials.md +0 -87
- package/bundle/docs/get-started/configuration-v1.md +0 -882
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# CLI commands
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
customize the interface, and control its behavior. These commands are
|
|
5
|
-
with a forward slash (`/`), an at symbol (`@`), or an exclamation mark
|
|
3
|
+
Auditaria CLI supports several built-in commands to help you manage your
|
|
4
|
+
session, customize the interface, and control its behavior. These commands are
|
|
5
|
+
prefixed with a forward slash (`/`), an at symbol (`@`), or an exclamation mark
|
|
6
|
+
(`!`).
|
|
6
7
|
|
|
7
8
|
## Slash commands (`/`)
|
|
8
9
|
|
|
@@ -10,652 +11,377 @@ Slash commands provide meta-level control over the CLI itself.
|
|
|
10
11
|
|
|
11
12
|
### Built-in Commands
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- **
|
|
207
|
-
hierarchical memory
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
- **
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
-
|
|
277
|
-
- **
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
- **
|
|
282
|
-
|
|
283
|
-
- **
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
-
|
|
305
|
-
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
14
|
+
### `/about`
|
|
15
|
+
|
|
16
|
+
- **Description:** Show version info. Share this information when filing issues.
|
|
17
|
+
|
|
18
|
+
### `/auth`
|
|
19
|
+
|
|
20
|
+
- **Description:** Open a dialog that lets you change the authentication method.
|
|
21
|
+
|
|
22
|
+
### `/bug`
|
|
23
|
+
|
|
24
|
+
- **Description:** File an issue about Auditaria CLI. By default, the issue is
|
|
25
|
+
filed within the GitHub repository for Auditaria CLI. The string you enter
|
|
26
|
+
after `/bug` will become the headline for the bug being filed. The default
|
|
27
|
+
`/bug` behavior can be modified using the `advanced.bugCommand` setting in
|
|
28
|
+
your `.gemini/settings.json` files.
|
|
29
|
+
|
|
30
|
+
### `/chat`
|
|
31
|
+
|
|
32
|
+
- **Description:** Save and resume conversation history for branching
|
|
33
|
+
conversation state interactively, or resuming a previous state from a later
|
|
34
|
+
session.
|
|
35
|
+
- **Sub-commands:**
|
|
36
|
+
- **`delete <tag>`**
|
|
37
|
+
- **Description:** Deletes a saved conversation checkpoint.
|
|
38
|
+
- **`list`**
|
|
39
|
+
- **Description:** Lists available tags for chat state resumption.
|
|
40
|
+
- **Note:** This command only lists chats saved within the current project.
|
|
41
|
+
Because chat history is project-scoped, chats saved in other project
|
|
42
|
+
directories will not be displayed.
|
|
43
|
+
- **`resume <tag>`**
|
|
44
|
+
- **Description:** Resumes a conversation from a previous save.
|
|
45
|
+
- **Note:** You can only resume chats that were saved within the current
|
|
46
|
+
project. To resume a chat from a different project, you must run the
|
|
47
|
+
Auditaria CLI from that project's directory.
|
|
48
|
+
- **`save <tag>`**
|
|
49
|
+
- **Description:** Saves the current conversation history. You must add a
|
|
50
|
+
`<tag>` for identifying the conversation state.
|
|
51
|
+
- **Details on checkpoint location:** The default locations for saved chat
|
|
52
|
+
checkpoints are:
|
|
53
|
+
- Linux/macOS: `~/.gemini/tmp/<project_hash>/`
|
|
54
|
+
- Windows: `C:\Users\<YourUsername>\.gemini\tmp\<project_hash>\`
|
|
55
|
+
- **Behavior:** Chats are saved into a project-specific directory,
|
|
56
|
+
determined by where you run the CLI. Consequently, saved chats are only
|
|
57
|
+
accessible when working within that same project.
|
|
58
|
+
- **Note:** These checkpoints are for manually saving and resuming
|
|
59
|
+
conversation states. For automatic checkpoints created before file
|
|
60
|
+
modifications, see the
|
|
61
|
+
[Checkpointing documentation](../cli/checkpointing.md).
|
|
62
|
+
- **`share [filename]`**
|
|
63
|
+
- **Description** Writes the current conversation to a provided Markdown or
|
|
64
|
+
JSON file. If no filename is provided, then the CLI will generate one.
|
|
65
|
+
- **Usage** `/chat share file.md` or `/chat share file.json`.
|
|
66
|
+
|
|
67
|
+
### `/clear`
|
|
68
|
+
|
|
69
|
+
- **Description:** Clear the terminal screen, including the visible session
|
|
70
|
+
history and scrollback within the CLI. The underlying session data (for
|
|
71
|
+
history recall) might be preserved depending on the exact implementation, but
|
|
72
|
+
the visual display is cleared.
|
|
73
|
+
- **Keyboard shortcut:** Press **Ctrl+L** at any time to perform a clear action.
|
|
74
|
+
|
|
75
|
+
### `/commands`
|
|
76
|
+
|
|
77
|
+
- **Description:** Manage custom slash commands loaded from `.toml` files.
|
|
78
|
+
- **Sub-commands:**
|
|
79
|
+
- **`reload`**:
|
|
80
|
+
- **Description:** Reload custom command definitions from all sources
|
|
81
|
+
(user-level `~/.gemini/commands/`, project-level
|
|
82
|
+
`<project>/.gemini/commands/`, MCP prompts, and extensions). Use this to
|
|
83
|
+
pick up new or modified `.toml` files without restarting the CLI.
|
|
84
|
+
- **Usage:** `/commands reload`
|
|
85
|
+
|
|
86
|
+
### `/compress`
|
|
87
|
+
|
|
88
|
+
- **Description:** Replace the entire chat context with a summary. This saves on
|
|
89
|
+
tokens used for future tasks while retaining a high level summary of what has
|
|
90
|
+
happened.
|
|
91
|
+
|
|
92
|
+
### `/copy`
|
|
93
|
+
|
|
94
|
+
- **Description:** Copies the last output produced by Auditaria CLI to your
|
|
95
|
+
clipboard, for easy sharing or reuse.
|
|
96
|
+
- **Behavior:**
|
|
97
|
+
- Local sessions use system clipboard tools (pbcopy/xclip/clip).
|
|
98
|
+
- Remote sessions (SSH/WSL) use OSC 52 and require terminal support.
|
|
99
|
+
- **Note:** This command requires platform-specific clipboard tools to be
|
|
100
|
+
installed.
|
|
101
|
+
- On Linux, it requires `xclip` or `xsel`. You can typically install them
|
|
102
|
+
using your system's package manager.
|
|
103
|
+
- On macOS, it requires `pbcopy`, and on Windows, it requires `clip`. These
|
|
104
|
+
tools are typically pre-installed on their respective systems.
|
|
105
|
+
|
|
106
|
+
### `/directory` (or `/dir`)
|
|
107
|
+
|
|
108
|
+
- **Description:** Manage workspace directories for multi-directory support.
|
|
109
|
+
- **Sub-commands:**
|
|
110
|
+
- **`add`**:
|
|
111
|
+
- **Description:** Add a directory to the workspace. The path can be
|
|
112
|
+
absolute or relative to the current working directory. Moreover, the
|
|
113
|
+
reference from home directory is supported as well.
|
|
114
|
+
- **Usage:** `/directory add <path1>,<path2>`
|
|
115
|
+
- **Note:** Disabled in restrictive sandbox profiles. If you're using that,
|
|
116
|
+
use `--include-directories` when starting the session instead.
|
|
117
|
+
- **`show`**:
|
|
118
|
+
- **Description:** Display all directories added by `/directory add` and
|
|
119
|
+
`--include-directories`.
|
|
120
|
+
- **Usage:** `/directory show`
|
|
121
|
+
|
|
122
|
+
### `/docs`
|
|
123
|
+
|
|
124
|
+
- **Description:** Open the Auditaria CLI documentation in your browser.
|
|
125
|
+
|
|
126
|
+
### `/editor`
|
|
127
|
+
|
|
128
|
+
- **Description:** Open a dialog for selecting supported editors.
|
|
129
|
+
|
|
130
|
+
### `/extensions`
|
|
131
|
+
|
|
132
|
+
- **Description:** Lists all active extensions in the current Auditaria CLI
|
|
133
|
+
session. See [Auditaria CLI Extensions](../extensions/index.md).
|
|
134
|
+
|
|
135
|
+
### `/help` (or `/?`)
|
|
136
|
+
|
|
137
|
+
- **Description:** Display help information about Auditaria CLI, including
|
|
138
|
+
available commands and their usage.
|
|
139
|
+
|
|
140
|
+
### `/hooks`
|
|
141
|
+
|
|
142
|
+
- **Description:** Manage hooks, which allow you to intercept and customize
|
|
143
|
+
Auditaria CLI behavior at specific lifecycle events.
|
|
144
|
+
- **Sub-commands:**
|
|
145
|
+
- **`disable-all`**:
|
|
146
|
+
- **Description:** Disable all enabled hooks.
|
|
147
|
+
- **`disable <hook-name>`**:
|
|
148
|
+
- **Description:** Disable a hook by name.
|
|
149
|
+
- **`enable-all`**:
|
|
150
|
+
- **Description:** Enable all disabled hooks.
|
|
151
|
+
- **`enable <hook-name>`**:
|
|
152
|
+
- **Description:** Enable a hook by name.
|
|
153
|
+
- **`list`** (or `show`, `panel`):
|
|
154
|
+
- **Description:** Display all registered hooks with their status.
|
|
155
|
+
|
|
156
|
+
### `/ide`
|
|
157
|
+
|
|
158
|
+
- **Description:** Manage IDE integration.
|
|
159
|
+
- **Sub-commands:**
|
|
160
|
+
- **`disable`**:
|
|
161
|
+
- **Description:** Disable IDE integration.
|
|
162
|
+
- **`enable`**:
|
|
163
|
+
- **Description:** Enable IDE integration.
|
|
164
|
+
- **`install`**:
|
|
165
|
+
- **Description:** Install required IDE companion.
|
|
166
|
+
- **`status`**:
|
|
167
|
+
- **Description:** Check status of IDE integration.
|
|
168
|
+
|
|
169
|
+
### `/init`
|
|
170
|
+
|
|
171
|
+
- **Description:** To help users easily create a `GEMINI.md` file, this command
|
|
172
|
+
analyzes the current directory and generates a tailored context file, making
|
|
173
|
+
it simpler for them to provide project-specific instructions to the Auditaria
|
|
174
|
+
agent.
|
|
175
|
+
|
|
176
|
+
### `/mcp`
|
|
177
|
+
|
|
178
|
+
- **Description:** Manage configured Model Context Protocol (MCP) servers.
|
|
179
|
+
- **Sub-commands:**
|
|
180
|
+
- **`auth`**:
|
|
181
|
+
- **Description:** Authenticate with an OAuth-enabled MCP server.
|
|
182
|
+
- **Usage:** `/mcp auth <server-name>`
|
|
183
|
+
- **Details:** If `<server-name>` is provided, it initiates the OAuth flow
|
|
184
|
+
for that server. If no server name is provided, it lists all configured
|
|
185
|
+
servers that support OAuth authentication.
|
|
186
|
+
- **`desc`**
|
|
187
|
+
- **Description:** List configured MCP servers and tools with descriptions.
|
|
188
|
+
- **`list`** or **`ls`**:
|
|
189
|
+
- **Description:** List configured MCP servers and tools. This is the
|
|
190
|
+
default action if no subcommand is specified.
|
|
191
|
+
- **`refresh`**:
|
|
192
|
+
- **Description:** Restarts all MCP servers and re-discovers their available
|
|
193
|
+
tools.
|
|
194
|
+
- **`schema`**:
|
|
195
|
+
- **Description:** List configured MCP servers and tools with descriptions
|
|
196
|
+
and schemas.
|
|
197
|
+
|
|
198
|
+
### `/memory`
|
|
199
|
+
|
|
200
|
+
- **Description:** Manage the AI's instructional context (hierarchical memory
|
|
201
|
+
loaded from `GEMINI.md` files).
|
|
202
|
+
- **Sub-commands:**
|
|
203
|
+
- **`add`**:
|
|
204
|
+
- **Description:** Adds the following text to the AI's memory. Usage:
|
|
205
|
+
`/memory add <text to remember>`
|
|
206
|
+
- **`list`**:
|
|
207
|
+
- **Description:** Lists the paths of the GEMINI.md files in use for
|
|
208
|
+
hierarchical memory.
|
|
209
|
+
- **`refresh`**:
|
|
210
|
+
- **Description:** Reload the hierarchical instructional memory from all
|
|
211
|
+
`GEMINI.md` files found in the configured locations (global,
|
|
212
|
+
project/ancestors, and sub-directories). This command updates the model
|
|
213
|
+
with the latest `GEMINI.md` content.
|
|
214
|
+
- **`show`**:
|
|
215
|
+
- **Description:** Display the full, concatenated content of the current
|
|
216
|
+
hierarchical memory that has been loaded from all `GEMINI.md` files. This
|
|
217
|
+
lets you inspect the instructional context being provided to the Gemini
|
|
218
|
+
model.
|
|
219
|
+
- **Note:** For more details on how `GEMINI.md` files contribute to
|
|
220
|
+
hierarchical memory, see the
|
|
221
|
+
[CLI Configuration documentation](../get-started/configuration.md).
|
|
222
|
+
|
|
223
|
+
### `/model`
|
|
224
|
+
|
|
225
|
+
- **Description:** Opens a dialog to choose your Gemini model.
|
|
226
|
+
|
|
227
|
+
### `/plan`
|
|
228
|
+
|
|
229
|
+
- **Description:** Switch to Plan Mode (read-only) and view the current plan if
|
|
230
|
+
one has been generated.
|
|
231
|
+
- **Note:** This feature requires the `experimental.plan` setting to be
|
|
232
|
+
enabled in your configuration.
|
|
233
|
+
|
|
234
|
+
### `/policies`
|
|
235
|
+
|
|
236
|
+
- **Description:** Manage policies.
|
|
237
|
+
- **Sub-commands:**
|
|
238
|
+
- **`list`**:
|
|
239
|
+
- **Description:** List all active policies grouped by mode.
|
|
240
|
+
|
|
241
|
+
### `/privacy`
|
|
242
|
+
|
|
243
|
+
- **Description:** Display the Privacy Notice and allow users to select whether
|
|
244
|
+
they consent to the collection of their data for service improvement purposes.
|
|
245
|
+
|
|
246
|
+
### `/quit` (or `/exit`)
|
|
247
|
+
|
|
248
|
+
- **Description:** Exit Auditaria CLI.
|
|
249
|
+
|
|
250
|
+
### `/restore`
|
|
251
|
+
|
|
252
|
+
- **Description:** Restores the project files to the state they were in just
|
|
253
|
+
before a tool was executed. This is particularly useful for undoing file edits
|
|
254
|
+
made by a tool. If run without a tool call ID, it will list available
|
|
255
|
+
checkpoints to restore from.
|
|
256
|
+
- **Usage:** `/restore [tool_call_id]`
|
|
257
|
+
- **Note:** Only available if checkpointing is configured via
|
|
258
|
+
[settings](../get-started/configuration.md). See
|
|
259
|
+
[Checkpointing documentation](../cli/checkpointing.md) for more details.
|
|
260
|
+
|
|
261
|
+
### `/rewind`
|
|
262
|
+
|
|
263
|
+
- **Description:** Navigates backward through the conversation history, letting
|
|
264
|
+
you review past interactions and potentially revert both chat state and file
|
|
265
|
+
changes.
|
|
266
|
+
- **Usage:** Press **Esc** twice as a shortcut.
|
|
267
|
+
- **Features:**
|
|
268
|
+
- **Select Interaction:** Preview user prompts and file changes.
|
|
269
|
+
- **Action Selection:** Choose to rewind history only, revert code changes
|
|
270
|
+
only, or both.
|
|
271
|
+
|
|
272
|
+
### `/resume`
|
|
273
|
+
|
|
274
|
+
- **Description:** Browse and resume previous conversation sessions. Opens an
|
|
275
|
+
interactive session browser where you can search, filter, and select from
|
|
276
|
+
automatically saved conversations.
|
|
277
|
+
- **Features:**
|
|
278
|
+
- **Management:** Delete unwanted sessions directly from the browser
|
|
279
|
+
- **Resume:** Select any session to resume and continue the conversation
|
|
280
|
+
- **Search:** Use `/` to search through conversation content across all
|
|
281
|
+
sessions
|
|
282
|
+
- **Session Browser:** Interactive interface showing all saved sessions with
|
|
283
|
+
timestamps, message counts, and first user message for context
|
|
284
|
+
- **Sorting:** Sort sessions by date or message count
|
|
285
|
+
- **Note:** All conversations are automatically saved as you chat - no manual
|
|
286
|
+
saving required. See [Session Management](../cli/session-management.md) for
|
|
287
|
+
complete details.
|
|
288
|
+
|
|
289
|
+
### `/settings`
|
|
290
|
+
|
|
291
|
+
- **Description:** Open the settings editor to view and modify Auditaria CLI
|
|
292
|
+
settings.
|
|
293
|
+
- **Details:** This command provides a user-friendly interface for changing
|
|
294
|
+
settings that control the behavior and appearance of Auditaria CLI. It is
|
|
295
|
+
equivalent to manually editing the `.gemini/settings.json` file, but with
|
|
296
|
+
validation and guidance to prevent errors. See the
|
|
297
|
+
[settings documentation](./settings.md) for a full list of available settings.
|
|
298
|
+
- **Usage:** Simply run `/settings` and the editor will open. You can then
|
|
299
|
+
browse or search for specific settings, view their current values, and modify
|
|
300
|
+
them as desired. Changes to some settings are applied immediately, while
|
|
301
|
+
others require a restart.
|
|
302
|
+
|
|
303
|
+
### `/shells` (or `/bashes`)
|
|
304
|
+
|
|
305
|
+
- **Description:** Toggle the background shells view. This allows you to view
|
|
306
|
+
and manage long-running processes that you've sent to the background.
|
|
307
|
+
|
|
308
|
+
### `/setup-github`
|
|
309
|
+
|
|
310
|
+
- **Description:** Set up GitHub Actions to triage issues and review PRs with
|
|
311
|
+
Gemini.
|
|
312
|
+
|
|
313
|
+
### `/skills`
|
|
314
|
+
|
|
315
|
+
- **Description:** Manage Agent Skills, which provide on-demand expertise and
|
|
316
|
+
specialized workflows.
|
|
317
|
+
- **Sub-commands:**
|
|
318
|
+
- **`disable <name>`**:
|
|
319
|
+
- **Description:** Disable a specific skill by name.
|
|
320
|
+
- **Usage:** `/skills disable <name>`
|
|
321
|
+
- **`enable <name>`**:
|
|
322
|
+
- **Description:** Enable a specific skill by name.
|
|
323
|
+
- **Usage:** `/skills enable <name>`
|
|
324
|
+
- **`list`**:
|
|
325
|
+
- **Description:** List all discovered skills and their current status
|
|
326
|
+
(enabled/disabled).
|
|
327
|
+
- **`reload`**:
|
|
328
|
+
- **Description:** Refresh the list of discovered skills from all tiers
|
|
329
|
+
(workspace, user, and extensions).
|
|
330
|
+
|
|
331
|
+
### `/stats`
|
|
332
|
+
|
|
333
|
+
- **Description:** Display detailed statistics for the current Auditaria CLI
|
|
334
|
+
session, including token usage, cached token savings (when available), and
|
|
335
|
+
session duration. Note: Cached token information is only displayed when cached
|
|
336
|
+
tokens are being used, which occurs with API key authentication but not with
|
|
337
|
+
OAuth authentication at this time.
|
|
338
|
+
|
|
339
|
+
### `/terminal-setup`
|
|
340
|
+
|
|
341
|
+
- **Description:** Configure terminal keybindings for multiline input (VS Code,
|
|
342
|
+
Cursor, Windsurf).
|
|
343
|
+
|
|
344
|
+
### `/theme`
|
|
345
|
+
|
|
346
|
+
- **Description:** Open a dialog that lets you change the visual theme of
|
|
347
|
+
Auditaria CLI.
|
|
348
|
+
|
|
349
|
+
### `/tools`
|
|
350
|
+
|
|
351
|
+
- **Description:** Display a list of tools that are currently available within
|
|
352
|
+
Auditaria CLI.
|
|
353
|
+
- **Usage:** `/tools [desc]`
|
|
354
|
+
- **Sub-commands:**
|
|
355
|
+
- **`desc`** or **`descriptions`**:
|
|
356
|
+
- **Description:** Show detailed descriptions of each tool, including each
|
|
357
|
+
tool's name with its full description as provided to the model.
|
|
358
|
+
- **`nodesc`** or **`nodescriptions`**:
|
|
359
|
+
- **Description:** Hide tool descriptions, showing only the tool names.
|
|
360
|
+
|
|
361
|
+
### `/vim`
|
|
362
|
+
|
|
363
|
+
- **Description:** Toggle vim mode on or off. When vim mode is enabled, the
|
|
364
|
+
input area supports vim-style navigation and editing commands in both NORMAL
|
|
365
|
+
and INSERT modes.
|
|
366
|
+
- **Features:**
|
|
367
|
+
- **Count support:** Prefix commands with numbers (e.g., `3h`, `5w`, `10G`)
|
|
368
|
+
- **Editing commands:** Delete with `x`, change with `c`, insert with `i`,
|
|
369
|
+
`a`, `o`, `O`; complex operations like `dd`, `cc`, `dw`, `cw`
|
|
370
|
+
- **INSERT mode:** Standard text input with escape to return to NORMAL mode
|
|
371
|
+
- **NORMAL mode:** Navigate with `h`, `j`, `k`, `l`; jump by words with `w`,
|
|
372
|
+
`b`, `e`; go to line start/end with `0`, `$`, `^`; go to specific lines with
|
|
373
|
+
`G` (or `gg` for first line)
|
|
374
|
+
- **Persistent setting:** Vim mode preference is saved to
|
|
375
|
+
`~/.gemini/settings.json` and restored between sessions
|
|
376
|
+
- **Repeat last command:** Use `.` to repeat the last editing operation
|
|
377
|
+
- **Status indicator:** When enabled, shows `[NORMAL]` or `[INSERT]` in the
|
|
378
|
+
footer
|
|
340
379
|
|
|
341
380
|
### Custom commands
|
|
342
381
|
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
Custom commands allow you to save and reuse your favorite or most frequently
|
|
347
|
-
used prompts as personal shortcuts within Gemini CLI. You can create commands
|
|
348
|
-
that are specific to a single project or commands that are available globally
|
|
349
|
-
across all your projects, streamlining your workflow and ensuring consistency.
|
|
350
|
-
|
|
351
|
-
#### File Locations & Precedence
|
|
352
|
-
|
|
353
|
-
Gemini CLI discovers commands from two locations, loaded in a specific order:
|
|
354
|
-
|
|
355
|
-
1. **User Commands (Global):** Located in `~/.gemini/commands/`. These commands
|
|
356
|
-
are available in any project you are working on.
|
|
357
|
-
2. **Project Commands (Local):** Located in
|
|
358
|
-
`<your-project-root>/.gemini/commands/`. These commands are specific to the
|
|
359
|
-
current project and can be checked into version control to be shared with
|
|
360
|
-
your team.
|
|
361
|
-
|
|
362
|
-
If a command in the project directory has the same name as a command in the user
|
|
363
|
-
directory, the **project command will always be used.** This allows projects to
|
|
364
|
-
override global commands with project-specific versions.
|
|
365
|
-
|
|
366
|
-
#### Naming and Namespacing
|
|
367
|
-
|
|
368
|
-
The name of a command is determined by its file path relative to its `commands`
|
|
369
|
-
directory. Subdirectories are used to create namespaced commands, with the path
|
|
370
|
-
separator (`/` or `\`) being converted to a colon (`:`).
|
|
371
|
-
|
|
372
|
-
- A file at `~/.gemini/commands/test.toml` becomes the command `/test`.
|
|
373
|
-
- A file at `<project>/.gemini/commands/git/commit.toml` becomes the namespaced
|
|
374
|
-
command `/git:commit`.
|
|
375
|
-
|
|
376
|
-
#### TOML File Format (v1)
|
|
377
|
-
|
|
378
|
-
Your command definition files must be written in the TOML format and use the
|
|
379
|
-
`.toml` file extension.
|
|
380
|
-
|
|
381
|
-
##### Required Fields
|
|
382
|
-
|
|
383
|
-
- `prompt` (String): The prompt that will be sent to the Gemini model when the
|
|
384
|
-
command is executed. This can be a single-line or multi-line string.
|
|
385
|
-
|
|
386
|
-
##### Optional Fields
|
|
387
|
-
|
|
388
|
-
- `description` (String): A brief, one-line description of what the command
|
|
389
|
-
does. This text will be displayed next to your command in the `/help` menu.
|
|
390
|
-
**If you omit this field, a generic description will be generated from the
|
|
391
|
-
filename.**
|
|
392
|
-
|
|
393
|
-
#### Handling Arguments
|
|
394
|
-
|
|
395
|
-
Custom commands support two powerful methods for handling arguments. The CLI
|
|
396
|
-
automatically chooses the correct method based on the content of your command's
|
|
397
|
-
`prompt`.
|
|
398
|
-
|
|
399
|
-
##### 1. Context-Aware Injection with `{{args}}`
|
|
400
|
-
|
|
401
|
-
If your `prompt` contains the special placeholder `{{args}}`, the CLI will
|
|
402
|
-
replace that placeholder with the text the user typed after the command name.
|
|
403
|
-
|
|
404
|
-
The behavior of this injection depends on where it is used:
|
|
405
|
-
|
|
406
|
-
**A. Raw Injection (Outside Shell Commands)**
|
|
407
|
-
|
|
408
|
-
When used in the main body of the prompt, the arguments are injected exactly as
|
|
409
|
-
the user typed them.
|
|
410
|
-
|
|
411
|
-
**Example (`git/fix.toml`):**
|
|
412
|
-
|
|
413
|
-
```toml
|
|
414
|
-
# Invoked via: /git:fix "Button is misaligned"
|
|
415
|
-
|
|
416
|
-
description = "Generates a fix for a given issue."
|
|
417
|
-
prompt = "Please provide a code fix for the issue described here: {{args}}."
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
The model receives:
|
|
421
|
-
`Please provide a code fix for the issue described here: "Button is misaligned".`
|
|
422
|
-
|
|
423
|
-
**B. Using Arguments in Shell Commands (Inside `!{...}` Blocks)**
|
|
424
|
-
|
|
425
|
-
When you use `{{args}}` inside a shell injection block (`!{...}`), the arguments
|
|
426
|
-
are automatically **shell-escaped** before replacement. This allows you to
|
|
427
|
-
safely pass arguments to shell commands, ensuring the resulting command is
|
|
428
|
-
syntactically correct and secure while preventing command injection
|
|
429
|
-
vulnerabilities.
|
|
430
|
-
|
|
431
|
-
**Example (`/grep-code.toml`):**
|
|
432
|
-
|
|
433
|
-
```toml
|
|
434
|
-
prompt = """
|
|
435
|
-
Please summarize the findings for the pattern `{{args}}`.
|
|
436
|
-
|
|
437
|
-
Search Results:
|
|
438
|
-
!{grep -r {{args}} .}
|
|
439
|
-
"""
|
|
440
|
-
```
|
|
441
|
-
|
|
442
|
-
When you run `/grep-code It's complicated`:
|
|
443
|
-
|
|
444
|
-
1. The CLI sees `{{args}}` used both outside and inside `!{...}`.
|
|
445
|
-
2. Outside: The first `{{args}}` is replaced raw with `It's complicated`.
|
|
446
|
-
3. Inside: The second `{{args}}` is replaced with the escaped version (e.g., on
|
|
447
|
-
Linux: `"It's complicated"`).
|
|
448
|
-
4. The command executed is `grep -r "It's complicated" .`.
|
|
449
|
-
5. The CLI prompts you to confirm this exact, secure command before execution.
|
|
450
|
-
6. The final prompt is sent.
|
|
451
|
-
|
|
452
|
-
##### 2. Default Argument Handling
|
|
453
|
-
|
|
454
|
-
If your `prompt` does **not** contain the special placeholder `{{args}}`, the
|
|
455
|
-
CLI uses a default behavior for handling arguments.
|
|
456
|
-
|
|
457
|
-
If you provide arguments to the command (e.g., `/mycommand arg1`), the CLI will
|
|
458
|
-
append the full command you typed to the end of the prompt, separated by two
|
|
459
|
-
newlines. This allows the model to see both the original instructions and the
|
|
460
|
-
specific arguments you just provided.
|
|
461
|
-
|
|
462
|
-
If you do **not** provide any arguments (e.g., `/mycommand`), the prompt is sent
|
|
463
|
-
to the model exactly as it is, with nothing appended.
|
|
464
|
-
|
|
465
|
-
**Example (`changelog.toml`):**
|
|
466
|
-
|
|
467
|
-
This example shows how to create a robust command by defining a role for the
|
|
468
|
-
model, explaining where to find the user's input, and specifying the expected
|
|
469
|
-
format and behavior.
|
|
470
|
-
|
|
471
|
-
```toml
|
|
472
|
-
# In: <project>/.gemini/commands/changelog.toml
|
|
473
|
-
# Invoked via: /changelog 1.2.0 added "Support for default argument parsing."
|
|
474
|
-
|
|
475
|
-
description = "Adds a new entry to the project's CHANGELOG.md file."
|
|
476
|
-
prompt = """
|
|
477
|
-
# Task: Update Changelog
|
|
478
|
-
|
|
479
|
-
You are an expert maintainer of this software project. A user has invoked a command to add a new entry to the changelog.
|
|
480
|
-
|
|
481
|
-
**The user's raw command is appended below your instructions.**
|
|
482
|
-
|
|
483
|
-
Your task is to parse the `<version>`, `<change_type>`, and `<message>` from their input and use the `write_file` tool to correctly update the `CHANGELOG.md` file.
|
|
484
|
-
|
|
485
|
-
## Expected Format
|
|
486
|
-
The command follows this format: `/changelog <version> <type> <message>`
|
|
487
|
-
- `<type>` must be one of: "added", "changed", "fixed", "removed".
|
|
488
|
-
|
|
489
|
-
## Behavior
|
|
490
|
-
1. Read the `CHANGELOG.md` file.
|
|
491
|
-
2. Find the section for the specified `<version>`.
|
|
492
|
-
3. Add the `<message>` under the correct `<type>` heading.
|
|
493
|
-
4. If the version or type section doesn't exist, create it.
|
|
494
|
-
5. Adhere strictly to the "Keep a Changelog" format.
|
|
495
|
-
"""
|
|
496
|
-
```
|
|
497
|
-
|
|
498
|
-
When you run `/changelog 1.2.0 added "New feature"`, the final text sent to the
|
|
499
|
-
model will be the original prompt followed by two newlines and the command you
|
|
500
|
-
typed.
|
|
501
|
-
|
|
502
|
-
##### 3. Executing Shell Commands with `!{...}`
|
|
503
|
-
|
|
504
|
-
You can make your commands dynamic by executing shell commands directly within
|
|
505
|
-
your `prompt` and injecting their output. This is ideal for gathering context
|
|
506
|
-
from your local environment, like reading file content or checking the status of
|
|
507
|
-
Git.
|
|
508
|
-
|
|
509
|
-
When a custom command attempts to execute a shell command, Auditaria will
|
|
510
|
-
now prompt you for confirmation before proceeding. This is a security measure to
|
|
511
|
-
ensure that only intended commands can be run.
|
|
512
|
-
|
|
513
|
-
**How It Works:**
|
|
514
|
-
|
|
515
|
-
1. **Inject Commands:** Use the `!{...}` syntax.
|
|
516
|
-
2. **Argument Substitution:** If `{{args}}` is present inside the block, it is
|
|
517
|
-
automatically shell-escaped (see
|
|
518
|
-
[Context-Aware Injection](#1-context-aware-injection-with-args) above).
|
|
519
|
-
3. **Robust Parsing:** The parser correctly handles complex shell commands that
|
|
520
|
-
include nested braces, such as JSON payloads. **Note:** The content inside
|
|
521
|
-
`!{...}` must have balanced braces (`{` and `}`). If you need to execute a
|
|
522
|
-
command containing unbalanced braces, consider wrapping it in an external
|
|
523
|
-
script file and calling the script within the `!{...}` block.
|
|
524
|
-
4. **Security Check and Confirmation:** The CLI performs a security check on
|
|
525
|
-
the final, resolved command (after arguments are escaped and substituted). A
|
|
526
|
-
dialog will appear showing the exact command(s) to be executed.
|
|
527
|
-
5. **Execution and Error Reporting:** The command is executed. If the command
|
|
528
|
-
fails, the output injected into the prompt will include the error messages
|
|
529
|
-
(stderr) followed by a status line, e.g.,
|
|
530
|
-
`[Shell command exited with code 1]`. This helps the model understand the
|
|
531
|
-
context of the failure.
|
|
532
|
-
|
|
533
|
-
**Example (`git/commit.toml`):**
|
|
534
|
-
|
|
535
|
-
This command gets the staged git diff and uses it to ask the model to write a
|
|
536
|
-
commit message.
|
|
537
|
-
|
|
538
|
-
````toml
|
|
539
|
-
# In: <project>/.gemini/commands/git/commit.toml
|
|
540
|
-
# Invoked via: /git:commit
|
|
541
|
-
|
|
542
|
-
description = "Generates a Git commit message based on staged changes."
|
|
543
|
-
|
|
544
|
-
# The prompt uses !{...} to execute the command and inject its output.
|
|
545
|
-
prompt = """
|
|
546
|
-
Please generate a Conventional Commit message based on the following git diff:
|
|
547
|
-
|
|
548
|
-
```diff
|
|
549
|
-
!{git diff --staged}
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
"""
|
|
553
|
-
|
|
554
|
-
````
|
|
555
|
-
|
|
556
|
-
When you run `/git:commit`, the CLI first executes `git diff --staged`, then
|
|
557
|
-
replaces `!{git diff --staged}` with the output of that command before sending
|
|
558
|
-
the final, complete prompt to the model.
|
|
559
|
-
|
|
560
|
-
##### 4. Injecting File Content with `@{...}`
|
|
561
|
-
|
|
562
|
-
You can directly embed the content of a file or a directory listing into your
|
|
563
|
-
prompt using the `@{...}` syntax. This is useful for creating commands that
|
|
564
|
-
operate on specific files.
|
|
565
|
-
|
|
566
|
-
**How It Works:**
|
|
567
|
-
|
|
568
|
-
- **File Injection**: `@{path/to/file.txt}` is replaced by the content of
|
|
569
|
-
`file.txt`.
|
|
570
|
-
- **Multimodal Support**: If the path points to a supported image (e.g., PNG,
|
|
571
|
-
JPEG), PDF, audio, or video file, it will be correctly encoded and injected as
|
|
572
|
-
multimodal input. Other binary files are handled gracefully and skipped.
|
|
573
|
-
- **Directory Listing**: `@{path/to/dir}` is traversed and each file present
|
|
574
|
-
within the directory and all subdirectories are inserted into the prompt. This
|
|
575
|
-
respects `.gitignore` and `.geminiignore` if enabled.
|
|
576
|
-
- **Workspace-Aware**: The command searches for the path in the current
|
|
577
|
-
directory and any other workspace directories. Absolute paths are allowed if
|
|
578
|
-
they are within the workspace.
|
|
579
|
-
- **Processing Order**: File content injection with `@{...}` is processed
|
|
580
|
-
_before_ shell commands (`!{...}`) and argument substitution (`{{args}}`).
|
|
581
|
-
- **Parsing**: The parser requires the content inside `@{...}` (the path) to
|
|
582
|
-
have balanced braces (`{` and `}`).
|
|
583
|
-
|
|
584
|
-
**Example (`review.toml`):**
|
|
585
|
-
|
|
586
|
-
This command injects the content of a _fixed_ best practices file
|
|
587
|
-
(`docs/best-practices.md`) and uses the user's arguments to provide context for
|
|
588
|
-
the review.
|
|
589
|
-
|
|
590
|
-
```toml
|
|
591
|
-
# In: <project>/.gemini/commands/review.toml
|
|
592
|
-
# Invoked via: /review FileCommandLoader.ts
|
|
593
|
-
|
|
594
|
-
description = "Reviews the provided context using a best practice guide."
|
|
595
|
-
prompt = """
|
|
596
|
-
You are an expert code reviewer.
|
|
597
|
-
|
|
598
|
-
Your task is to review {{args}}.
|
|
599
|
-
|
|
600
|
-
Use the following best practices when providing your review:
|
|
601
|
-
|
|
602
|
-
@{docs/best-practices.md}
|
|
603
|
-
"""
|
|
604
|
-
```
|
|
605
|
-
|
|
606
|
-
When you run `/review FileCommandLoader.ts`, the `@{docs/best-practices.md}`
|
|
607
|
-
placeholder is replaced by the content of that file, and `{{args}}` is replaced
|
|
608
|
-
by the text you provided, before the final prompt is sent to the model.
|
|
609
|
-
|
|
610
|
-
---
|
|
611
|
-
|
|
612
|
-
#### Example: A "Pure Function" Refactoring Command
|
|
613
|
-
|
|
614
|
-
Let's create a global command that asks the model to refactor a piece of code.
|
|
615
|
-
|
|
616
|
-
**1. Create the file and directories:**
|
|
617
|
-
|
|
618
|
-
First, ensure the user commands directory exists, then create a `refactor`
|
|
619
|
-
subdirectory for organization and the final TOML file.
|
|
620
|
-
|
|
621
|
-
```bash
|
|
622
|
-
mkdir -p ~/.gemini/commands/refactor
|
|
623
|
-
touch ~/.gemini/commands/refactor/pure.toml
|
|
624
|
-
```
|
|
625
|
-
|
|
626
|
-
**2. Add the content to the file:**
|
|
627
|
-
|
|
628
|
-
Open `~/.gemini/commands/refactor/pure.toml` in your editor and add the
|
|
629
|
-
following content. We are including the optional `description` for best
|
|
630
|
-
practice.
|
|
631
|
-
|
|
632
|
-
```toml
|
|
633
|
-
# In: ~/.gemini/commands/refactor/pure.toml
|
|
634
|
-
# This command will be invoked via: /refactor:pure
|
|
635
|
-
|
|
636
|
-
description = "Asks the model to refactor the current context into a pure function."
|
|
637
|
-
|
|
638
|
-
prompt = """
|
|
639
|
-
Please analyze the code I've provided in the current context.
|
|
640
|
-
Refactor it into a pure function.
|
|
641
|
-
|
|
642
|
-
Your response should include:
|
|
643
|
-
1. The refactored, pure function code block.
|
|
644
|
-
2. A brief explanation of the key changes you made and why they contribute to purity.
|
|
645
|
-
"""
|
|
646
|
-
```
|
|
647
|
-
|
|
648
|
-
**3. Run the Command:**
|
|
649
|
-
|
|
650
|
-
That's it! You can now run your command in the CLI. First, you might add a file
|
|
651
|
-
to the context, and then invoke your command:
|
|
652
|
-
|
|
653
|
-
```
|
|
654
|
-
> @my-messy-function.js
|
|
655
|
-
> /refactor:pure
|
|
656
|
-
```
|
|
657
|
-
|
|
658
|
-
Gemini CLI will then execute the multi-line prompt defined in your TOML file.
|
|
382
|
+
Custom commands allow you to create personalized shortcuts for your most-used
|
|
383
|
+
prompts. For detailed instructions on how to create, manage, and use them,
|
|
384
|
+
please see the dedicated [Custom Commands documentation](./custom-commands.md).
|
|
659
385
|
|
|
660
386
|
## Input prompt shortcuts
|
|
661
387
|
|
|
@@ -718,7 +444,7 @@ your prompt to Gemini. These commands include git-aware filtering.
|
|
|
718
444
|
## Shell mode and passthrough commands (`!`)
|
|
719
445
|
|
|
720
446
|
The `!` prefix lets you interact with your system's shell directly from within
|
|
721
|
-
|
|
447
|
+
Auditaria CLI.
|
|
722
448
|
|
|
723
449
|
- **`!<shell_command>`**
|
|
724
450
|
- **Description:** Execute the given `<shell_command>` using `bash` on
|
|
@@ -726,8 +452,8 @@ Gemini CLI.
|
|
|
726
452
|
override `ComSpec`). Any output or errors from the command are displayed in
|
|
727
453
|
the terminal.
|
|
728
454
|
- **Examples:**
|
|
729
|
-
- `!ls -la` (executes `ls -la` and returns to
|
|
730
|
-
- `!git status` (executes `git status` and returns to
|
|
455
|
+
- `!ls -la` (executes `ls -la` and returns to Auditaria CLI)
|
|
456
|
+
- `!git status` (executes `git status` and returns to Auditaria CLI)
|
|
731
457
|
|
|
732
458
|
- **`!` (Toggle shell mode)**
|
|
733
459
|
- **Description:** Typing `!` on its own toggles shell mode.
|
|
@@ -746,4 +472,4 @@ Gemini CLI.
|
|
|
746
472
|
- **Environment variable:** When a command is executed via `!` or in shell mode,
|
|
747
473
|
the `GEMINI_CLI=1` environment variable is set in the subprocess's
|
|
748
474
|
environment. This allows scripts or tools to detect if they are being run from
|
|
749
|
-
within the
|
|
475
|
+
within the Auditaria CLI.
|