@thacio/auditaria 0.30.12 → 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 +138221 -136590
- package/bundle/mcp-bridge.js +154 -143
- package/bundle/node_modules/@browserbasehq/stagehand/dist/index.js +430 -257
- 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 +77 -2
- package/bundle/web-client/index.html +5 -1
- package/bundle/web-client/managers/EditorManager.js +190 -24
- package/bundle/web-client/styles/themes.css +376 -0
- package/bundle/web-client/utils/theme-manager.js +33 -1
- package/package.json +6 -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,134 +1,113 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Extension reference
|
|
2
2
|
|
|
3
3
|
This guide covers the `gemini extensions` commands and the structure of the
|
|
4
4
|
`gemini-extension.json` configuration file.
|
|
5
5
|
|
|
6
|
-
##
|
|
6
|
+
## Manage extensions
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
Use the `gemini extensions` command group to manage your extensions from the
|
|
9
|
+
terminal.
|
|
10
10
|
|
|
11
|
-
Note that
|
|
12
|
-
|
|
13
|
-
extensions
|
|
11
|
+
Note that commands like `gemini extensions install` are not supported within the
|
|
12
|
+
CLI's interactive mode. However, you can use the `/extensions list` command to
|
|
13
|
+
view installed extensions. All management operations, including updates to slash
|
|
14
|
+
commands, take effect only after you restart the CLI session.
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
commands) will only be reflected in active CLI sessions on **restart**.
|
|
16
|
+
### Install an extension
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
Install an extension by providing its GitHub repository URL or a local file
|
|
19
|
+
path.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
Gemini CLI creates a copy of the extension during installation. You must run
|
|
22
|
+
`gemini extensions update` to pull changes from the source. To install from
|
|
23
|
+
GitHub, you must have `git` installed on your machine.
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
`gemini extensions update` to pull in changes from both locally-defined
|
|
25
|
-
extensions and those on GitHub.
|
|
26
|
-
|
|
27
|
-
NOTE: If you are installing an extension from GitHub, you'll need to have `git`
|
|
28
|
-
installed on your machine. See
|
|
29
|
-
[git installation instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
|
|
30
|
-
for help.
|
|
31
|
-
|
|
32
|
-
```
|
|
25
|
+
```bash
|
|
33
26
|
gemini extensions install <source> [--ref <ref>] [--auto-update] [--pre-release] [--consent]
|
|
34
27
|
```
|
|
35
28
|
|
|
36
|
-
- `<source>`: The
|
|
37
|
-
- `--ref`: The git ref to install
|
|
38
|
-
- `--auto-update`: Enable
|
|
39
|
-
- `--pre-release`: Enable pre-release versions
|
|
40
|
-
- `--consent`: Acknowledge
|
|
41
|
-
skip the confirmation prompt.
|
|
29
|
+
- `<source>`: The GitHub URL or local path of the extension.
|
|
30
|
+
- `--ref`: The git ref (branch, tag, or commit) to install.
|
|
31
|
+
- `--auto-update`: Enable automatic updates for this extension.
|
|
32
|
+
- `--pre-release`: Enable installation of pre-release versions.
|
|
33
|
+
- `--consent`: Acknowledge security risks and skip the confirmation prompt.
|
|
42
34
|
|
|
43
|
-
###
|
|
35
|
+
### Uninstall an extension
|
|
44
36
|
|
|
45
|
-
To uninstall one or more extensions,
|
|
46
|
-
`gemini extensions uninstall <name...>`:
|
|
37
|
+
To uninstall one or more extensions, use the `uninstall` command:
|
|
47
38
|
|
|
48
|
-
```
|
|
49
|
-
gemini extensions uninstall
|
|
39
|
+
```bash
|
|
40
|
+
gemini extensions uninstall <name...>
|
|
50
41
|
```
|
|
51
42
|
|
|
52
|
-
###
|
|
43
|
+
### Disable an extension
|
|
53
44
|
|
|
54
|
-
Extensions are
|
|
55
|
-
|
|
45
|
+
Extensions are enabled globally by default. You can disable an extension
|
|
46
|
+
entirely or for a specific workspace.
|
|
56
47
|
|
|
57
|
-
```
|
|
48
|
+
```bash
|
|
58
49
|
gemini extensions disable <name> [--scope <scope>]
|
|
59
50
|
```
|
|
60
51
|
|
|
61
52
|
- `<name>`: The name of the extension to disable.
|
|
62
53
|
- `--scope`: The scope to disable the extension in (`user` or `workspace`).
|
|
63
54
|
|
|
64
|
-
###
|
|
55
|
+
### Enable an extension
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
enable an extension for a specific workspace using
|
|
68
|
-
`gemini extensions enable <name> --scope=workspace` from within that workspace.
|
|
57
|
+
Re-enable a disabled extension using the `enable` command:
|
|
69
58
|
|
|
70
|
-
```
|
|
59
|
+
```bash
|
|
71
60
|
gemini extensions enable <name> [--scope <scope>]
|
|
72
61
|
```
|
|
73
62
|
|
|
74
63
|
- `<name>`: The name of the extension to enable.
|
|
75
64
|
- `--scope`: The scope to enable the extension in (`user` or `workspace`).
|
|
76
65
|
|
|
77
|
-
###
|
|
78
|
-
|
|
79
|
-
For extensions installed from a local path or a git repository, you can
|
|
80
|
-
explicitly update to the latest version (as reflected in the
|
|
81
|
-
`gemini-extension.json` `version` field) with `gemini extensions update <name>`.
|
|
66
|
+
### Update an extension
|
|
82
67
|
|
|
83
|
-
|
|
68
|
+
Update an extension to the version specified in its `gemini-extension.json`
|
|
69
|
+
file.
|
|
84
70
|
|
|
71
|
+
```bash
|
|
72
|
+
gemini extensions update <name>
|
|
85
73
|
```
|
|
74
|
+
|
|
75
|
+
To update all installed extensions at once:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
86
78
|
gemini extensions update --all
|
|
87
79
|
```
|
|
88
80
|
|
|
89
|
-
### Create a
|
|
90
|
-
|
|
91
|
-
We offer several example extensions `context`, `custom-commands`,
|
|
92
|
-
`exclude-tools` and `mcp-server`. You can view these examples
|
|
93
|
-
[here](https://github.com/google-gemini/gemini-cli/tree/main/packages/cli/src/commands/extensions/examples).
|
|
81
|
+
### Create an extension from a template
|
|
94
82
|
|
|
95
|
-
|
|
96
|
-
your choosing, run:
|
|
83
|
+
Create a new extension directory using a built-in template.
|
|
97
84
|
|
|
98
|
-
```
|
|
85
|
+
```bash
|
|
99
86
|
gemini extensions new <path> [template]
|
|
100
87
|
```
|
|
101
88
|
|
|
102
|
-
- `<path>`: The
|
|
103
|
-
- `[template]`: The
|
|
89
|
+
- `<path>`: The directory to create.
|
|
90
|
+
- `[template]`: The template to use (e.g., `mcp-server`, `context`,
|
|
91
|
+
`custom-commands`).
|
|
104
92
|
|
|
105
93
|
### Link a local extension
|
|
106
94
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
This is useful so you don't have to run `gemini extensions update` every time
|
|
111
|
-
you make changes you'd like to test.
|
|
95
|
+
Create a symbolic link between your development directory and the Gemini CLI
|
|
96
|
+
extensions directory. This lets you test changes immediately without
|
|
97
|
+
reinstalling.
|
|
112
98
|
|
|
113
|
-
```
|
|
99
|
+
```bash
|
|
114
100
|
gemini extensions link <path>
|
|
115
101
|
```
|
|
116
102
|
|
|
117
|
-
- `<path>`: The path of the extension to link.
|
|
118
|
-
|
|
119
103
|
## Extension format
|
|
120
104
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
Extensions exist as a directory that contains a `gemini-extension.json` file.
|
|
124
|
-
For example:
|
|
125
|
-
|
|
126
|
-
`<home>/.gemini/extensions/my-extension/gemini-extension.json`
|
|
105
|
+
Gemini CLI loads extensions from `<home>/.gemini/extensions`. Each extension
|
|
106
|
+
must have a `gemini-extension.json` file in its root directory.
|
|
127
107
|
|
|
128
108
|
### `gemini-extension.json`
|
|
129
109
|
|
|
130
|
-
The
|
|
131
|
-
The file has the following structure:
|
|
110
|
+
The manifest file defines the extension's behavior and configuration.
|
|
132
111
|
|
|
133
112
|
```json
|
|
134
113
|
{
|
|
@@ -145,53 +124,27 @@ The file has the following structure:
|
|
|
145
124
|
}
|
|
146
125
|
```
|
|
147
126
|
|
|
148
|
-
- `name`:
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
- `
|
|
156
|
-
|
|
157
|
-
- `
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
[
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
- `excludeTools`: An array of tool names to exclude from the model. You can also
|
|
170
|
-
specify command-specific restrictions for tools that support it, like the
|
|
171
|
-
`run_shell_command` tool. For example,
|
|
172
|
-
`"excludeTools": ["run_shell_command(rm -rf)"]` will block the `rm -rf`
|
|
173
|
-
command. Note that this differs from the MCP server `excludeTools`
|
|
174
|
-
functionality, which can be listed in the MCP server config.
|
|
175
|
-
|
|
176
|
-
When Gemini CLI starts, it loads all the extensions and merges their
|
|
177
|
-
configurations. If there are any conflicts, the workspace configuration takes
|
|
178
|
-
precedence.
|
|
179
|
-
|
|
180
|
-
### Settings
|
|
181
|
-
|
|
182
|
-
Extensions can define settings that the user will be prompted to provide upon
|
|
183
|
-
installation. This is useful for things like API keys, URLs, or other
|
|
184
|
-
configuration that the extension needs to function.
|
|
185
|
-
|
|
186
|
-
To define settings, add a `settings` array to your `gemini-extension.json` file.
|
|
187
|
-
Each object in the array should have the following properties:
|
|
188
|
-
|
|
189
|
-
- `name`: A user-friendly name for the setting.
|
|
190
|
-
- `description`: A description of the setting and what it's used for.
|
|
191
|
-
- `envVar`: The name of the environment variable that the setting will be stored
|
|
192
|
-
as.
|
|
193
|
-
- `sensitive`: Optional boolean. If true, obfuscates the input the user provides
|
|
194
|
-
and stores the secret in keychain storage. **Example**
|
|
127
|
+
- `name`: A unique identifier for the extension. Use lowercase letters, numbers,
|
|
128
|
+
and dashes. This name must match the extension's directory name.
|
|
129
|
+
- `version`: The current version of the extension.
|
|
130
|
+
- `description`: A short summary shown in the extension gallery.
|
|
131
|
+
- <a id="mcp-servers"></a>`mcpServers`: A map of Model Context Protocol (MCP)
|
|
132
|
+
servers. Extension servers follow the same format as standard
|
|
133
|
+
[CLI configuration](../get-started/configuration.md).
|
|
134
|
+
- `contextFileName`: The name of the context file (defaults to `GEMINI.md`). Can
|
|
135
|
+
also be an array of strings to load multiple context files.
|
|
136
|
+
- `excludeTools`: An array of tools to block from the model. You can restrict
|
|
137
|
+
specific arguments, such as `run_shell_command(rm -rf)`.
|
|
138
|
+
- `themes`: An optional list of themes provided by the extension. See
|
|
139
|
+
[Themes](../cli/themes.md) for more information.
|
|
140
|
+
|
|
141
|
+
### Extension settings
|
|
142
|
+
|
|
143
|
+
Extensions can define settings that users provide during installation, such as
|
|
144
|
+
API keys or URLs. These values are stored in a `.env` file within the extension
|
|
145
|
+
directory.
|
|
146
|
+
|
|
147
|
+
To define settings, add a `settings` array to your manifest:
|
|
195
148
|
|
|
196
149
|
```json
|
|
197
150
|
{
|
|
@@ -201,133 +154,112 @@ Each object in the array should have the following properties:
|
|
|
201
154
|
{
|
|
202
155
|
"name": "API Key",
|
|
203
156
|
"description": "Your API key for the service.",
|
|
204
|
-
"envVar": "MY_API_KEY"
|
|
157
|
+
"envVar": "MY_API_KEY",
|
|
158
|
+
"sensitive": true
|
|
205
159
|
}
|
|
206
160
|
]
|
|
207
161
|
}
|
|
208
162
|
```
|
|
209
163
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
164
|
+
- `name`: The setting's display name.
|
|
165
|
+
- `description`: A clear explanation of the setting.
|
|
166
|
+
- `envVar`: The environment variable name where the value is stored.
|
|
167
|
+
- `sensitive`: If `true`, the value is stored in the system keychain and
|
|
168
|
+
obfuscated in the UI.
|
|
213
169
|
|
|
214
|
-
|
|
170
|
+
To update an extension's settings:
|
|
215
171
|
|
|
216
|
-
```
|
|
217
|
-
gemini extensions
|
|
172
|
+
```bash
|
|
173
|
+
gemini extensions config <name> [setting] [--scope <scope>]
|
|
218
174
|
```
|
|
219
175
|
|
|
220
|
-
and you can update a given setting using:
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
gemini extensions config <extension name> [setting name] [--scope <scope>]
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
- `--scope`: The scope to set the setting in (`user` or `workspace`). This is
|
|
227
|
-
optional and will default to `user`.
|
|
228
|
-
|
|
229
176
|
### Custom commands
|
|
230
177
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
standard naming conventions.
|
|
235
|
-
|
|
236
|
-
**Example**
|
|
237
|
-
|
|
238
|
-
An extension named `gcp` with the following structure:
|
|
178
|
+
Provide [custom commands](../cli/custom-commands.md) by placing TOML files in a
|
|
179
|
+
`commands/` subdirectory. Gemini CLI uses the directory structure to determine
|
|
180
|
+
the command name.
|
|
239
181
|
|
|
240
|
-
|
|
241
|
-
.gemini/extensions/gcp/
|
|
242
|
-
├── gemini-extension.json
|
|
243
|
-
└── commands/
|
|
244
|
-
├── deploy.toml
|
|
245
|
-
└── gcs/
|
|
246
|
-
└── sync.toml
|
|
247
|
-
```
|
|
182
|
+
For an extension named `gcp`:
|
|
248
183
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
- `/deploy` - Shows as `[gcp] Custom command from deploy.toml` in help
|
|
252
|
-
- `/gcs:sync` - Shows as `[gcp] Custom command from sync.toml` in help
|
|
184
|
+
- `commands/deploy.toml` becomes `/deploy`
|
|
185
|
+
- `commands/gcs/sync.toml` becomes `/gcs:sync` (namespaced with a colon)
|
|
253
186
|
|
|
254
187
|
### Hooks
|
|
255
188
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
> [!IMPORTANT] Hooks are not defined directly in `gemini-extension.json`. The
|
|
261
|
-
> CLI specifically looks for the `hooks/hooks.json` file.
|
|
262
|
-
|
|
263
|
-
### Agent Skills
|
|
189
|
+
Intercept and customize CLI behavior using [hooks](../hooks/index.md). Define
|
|
190
|
+
hooks in a `hooks/hooks.json` file within your extension directory. Note that
|
|
191
|
+
hooks are not defined in the `gemini-extension.json` manifest.
|
|
264
192
|
|
|
265
|
-
|
|
266
|
-
workflows. Skills must be placed in a `skills/` directory within the extension.
|
|
267
|
-
|
|
268
|
-
**Example**
|
|
269
|
-
|
|
270
|
-
An extension with the following structure:
|
|
271
|
-
|
|
272
|
-
```
|
|
273
|
-
.gemini/extensions/my-extension/
|
|
274
|
-
├── gemini-extension.json
|
|
275
|
-
└── skills/
|
|
276
|
-
└── security-audit/
|
|
277
|
-
└── SKILL.md
|
|
278
|
-
```
|
|
193
|
+
### Agent skills
|
|
279
194
|
|
|
280
|
-
|
|
195
|
+
Bundle [agent skills](../cli/skills.md) to provide specialized workflows. Place
|
|
196
|
+
skill definitions in a `skills/` directory. For example,
|
|
197
|
+
`skills/security-audit/SKILL.md` exposes a `security-audit` skill.
|
|
281
198
|
|
|
282
199
|
### Sub-agents
|
|
283
200
|
|
|
284
|
-
> **Note
|
|
201
|
+
> **Note:** Sub-agents are a preview feature currently under active development.
|
|
285
202
|
|
|
286
|
-
|
|
287
|
-
|
|
203
|
+
Provide [sub-agents](../core/subagents.md) that users can delegate tasks to. Add
|
|
204
|
+
agent definition files (`.md`) to an `agents/` directory in your extension root.
|
|
288
205
|
|
|
289
|
-
|
|
290
|
-
|
|
206
|
+
### Themes
|
|
207
|
+
|
|
208
|
+
Extensions can provide custom themes to personalize the CLI UI. Themes are
|
|
209
|
+
defined in the `themes` array in `gemini-extension.json`.
|
|
291
210
|
|
|
292
211
|
**Example**
|
|
293
212
|
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
213
|
+
```json
|
|
214
|
+
{
|
|
215
|
+
"name": "my-green-extension",
|
|
216
|
+
"version": "1.0.0",
|
|
217
|
+
"themes": [
|
|
218
|
+
{
|
|
219
|
+
"name": "shades-of-green",
|
|
220
|
+
"type": "custom",
|
|
221
|
+
"background": {
|
|
222
|
+
"primary": "#1a362a"
|
|
223
|
+
},
|
|
224
|
+
"text": {
|
|
225
|
+
"primary": "#a6e3a1",
|
|
226
|
+
"secondary": "#6e8e7a",
|
|
227
|
+
"link": "#89e689"
|
|
228
|
+
},
|
|
229
|
+
"status": {
|
|
230
|
+
"success": "#76c076",
|
|
231
|
+
"warning": "#d9e689",
|
|
232
|
+
"error": "#b34e4e"
|
|
233
|
+
},
|
|
234
|
+
"border": {
|
|
235
|
+
"default": "#4a6c5a"
|
|
236
|
+
},
|
|
237
|
+
"ui": {
|
|
238
|
+
"comment": "#6e8e7a"
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
300
243
|
```
|
|
301
244
|
|
|
302
|
-
|
|
303
|
-
|
|
245
|
+
Custom themes provided by extensions can be selected using the `/theme` command
|
|
246
|
+
or by setting the `ui.theme` property in your `settings.json` file. Note that
|
|
247
|
+
when referring to a theme from an extension, the extension name is appended to
|
|
248
|
+
the theme name in parentheses, e.g., `shades-of-green (my-green-extension)`.
|
|
304
249
|
|
|
305
250
|
### Conflict resolution
|
|
306
251
|
|
|
307
|
-
Extension commands have the lowest precedence.
|
|
308
|
-
or project
|
|
309
|
-
|
|
310
|
-
1. **No conflict**: Extension command uses its natural name (e.g., `/deploy`)
|
|
311
|
-
2. **With conflict**: Extension command is renamed with the extension prefix
|
|
312
|
-
(e.g., `/gcp.deploy`)
|
|
313
|
-
|
|
314
|
-
For example, if both a user and the `gcp` extension define a `deploy` command:
|
|
315
|
-
|
|
316
|
-
- `/deploy` - Executes the user's deploy command
|
|
317
|
-
- `/gcp.deploy` - Executes the extension's deploy command (marked with `[gcp]`
|
|
318
|
-
tag)
|
|
252
|
+
Extension commands have the lowest precedence. If an extension command name
|
|
253
|
+
conflicts with a user or project command, the extension command is prefixed with
|
|
254
|
+
the extension name (e.g., `/gcp.deploy`) using a dot separator.
|
|
319
255
|
|
|
320
256
|
## Variables
|
|
321
257
|
|
|
322
|
-
Gemini CLI
|
|
323
|
-
`
|
|
324
|
-
need the current directory to run an MCP server using an argument like
|
|
325
|
-
`"args": ["${extensionPath}${/}dist${/}server.js"]`.
|
|
326
|
-
|
|
327
|
-
**Supported variables:**
|
|
258
|
+
Gemini CLI supports variable substitution in `gemini-extension.json` and
|
|
259
|
+
`hooks/hooks.json`.
|
|
328
260
|
|
|
329
|
-
|
|
|
330
|
-
|
|
|
331
|
-
| `${extensionPath}`
|
|
332
|
-
| `${workspacePath}`
|
|
333
|
-
| `${/}
|
|
261
|
+
| Variable | Description |
|
|
262
|
+
| :----------------- | :---------------------------------------------- |
|
|
263
|
+
| `${extensionPath}` | The absolute path to the extension's directory. |
|
|
264
|
+
| `${workspacePath}` | The absolute path to the current workspace. |
|
|
265
|
+
| `${/}` | The platform-specific path separator. |
|