@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.
Files changed (68) hide show
  1. package/README.md +14 -10
  2. package/bundle/docs/admin/enterprise-controls.md +115 -0
  3. package/bundle/docs/changelogs/index.md +20 -1
  4. package/bundle/docs/changelogs/latest.md +359 -293
  5. package/bundle/docs/changelogs/preview.md +296 -349
  6. package/bundle/docs/cli/checkpointing.md +2 -3
  7. package/bundle/docs/cli/cli-reference.md +4 -5
  8. package/bundle/docs/cli/commands.md +376 -650
  9. package/bundle/docs/cli/custom-commands.md +3 -0
  10. package/bundle/docs/cli/enterprise.md +1 -1
  11. package/bundle/docs/cli/gemini-md.md +20 -12
  12. package/bundle/docs/cli/headless.md +34 -372
  13. package/bundle/docs/cli/keyboard-shortcuts.md +36 -35
  14. package/bundle/docs/cli/plan-mode.md +5 -1
  15. package/bundle/docs/cli/rewind.md +11 -11
  16. package/bundle/docs/cli/session-management.md +61 -44
  17. package/bundle/docs/cli/settings.md +10 -5
  18. package/bundle/docs/cli/skills.md +15 -8
  19. package/bundle/docs/cli/themes.md +85 -51
  20. package/bundle/docs/cli/tutorials/automation.md +187 -0
  21. package/bundle/docs/cli/tutorials/file-management.md +142 -0
  22. package/bundle/docs/cli/tutorials/mcp-setup.md +105 -0
  23. package/bundle/docs/cli/tutorials/memory-management.md +126 -0
  24. package/bundle/docs/cli/tutorials/session-management.md +105 -0
  25. package/bundle/docs/cli/tutorials/shell-commands.md +107 -0
  26. package/bundle/docs/cli/tutorials/skills-getting-started.md +36 -31
  27. package/bundle/docs/cli/tutorials/task-planning.md +93 -0
  28. package/bundle/docs/cli/tutorials/web-tools.md +78 -0
  29. package/bundle/docs/core/policy-engine.md +4 -2
  30. package/bundle/docs/core/subagents.md +38 -38
  31. package/bundle/docs/extensions/best-practices.md +102 -53
  32. package/bundle/docs/extensions/index.md +37 -21
  33. package/bundle/docs/extensions/reference.md +148 -216
  34. package/bundle/docs/extensions/releasing.md +93 -122
  35. package/bundle/docs/extensions/writing-extensions.md +87 -76
  36. package/bundle/docs/get-started/configuration.md +103 -61
  37. package/bundle/docs/get-started/examples.md +39 -119
  38. package/bundle/docs/get-started/index.md +5 -4
  39. package/bundle/docs/get-started/installation.md +110 -77
  40. package/bundle/docs/index.md +156 -108
  41. package/bundle/docs/releases.md +2 -2
  42. package/bundle/docs/sidebar.json +101 -61
  43. package/bundle/docs/tools/activate-skill.md +43 -0
  44. package/bundle/docs/tools/ask-user.md +1 -1
  45. package/bundle/docs/tools/file-system.md +43 -133
  46. package/bundle/docs/tools/index.md +92 -91
  47. package/bundle/docs/tools/internal-docs.md +46 -0
  48. package/bundle/docs/tools/mcp-server.md +2 -2
  49. package/bundle/docs/tools/memory.md +21 -40
  50. package/bundle/docs/tools/shell.md +43 -88
  51. package/bundle/docs/tools/todos.md +22 -44
  52. package/bundle/docs/tools/web-fetch.md +22 -46
  53. package/bundle/docs/tools/web-search.md +19 -29
  54. package/bundle/gemini.js +138221 -136590
  55. package/bundle/mcp-bridge.js +154 -143
  56. package/bundle/node_modules/@browserbasehq/stagehand/dist/index.js +430 -257
  57. package/bundle/node_modules/@thacio/auditaria-search/dist/tsconfig.tsbuildinfo +1 -1
  58. package/bundle/web-client/components/EditorPanel.js +57 -36
  59. package/bundle/web-client/components/FileTreePanel.js +77 -2
  60. package/bundle/web-client/index.html +5 -1
  61. package/bundle/web-client/managers/EditorManager.js +190 -24
  62. package/bundle/web-client/styles/themes.css +376 -0
  63. package/bundle/web-client/utils/theme-manager.js +33 -1
  64. package/package.json +6 -6
  65. package/bundle/docs/architecture.md +0 -80
  66. package/bundle/docs/cli/index.md +0 -67
  67. package/bundle/docs/cli/tutorials.md +0 -87
  68. package/bundle/docs/get-started/configuration-v1.md +0 -882
@@ -1,134 +1,113 @@
1
- # Extensions reference
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
- ## Extension management
6
+ ## Manage extensions
7
7
 
8
- We offer a suite of extension management tools using `gemini extensions`
9
- commands.
8
+ Use the `gemini extensions` command group to manage your extensions from the
9
+ terminal.
10
10
 
11
- Note that these commands (e.g. `gemini extensions install`) are not supported
12
- from within the CLI's **interactive mode**, although you can list installed
13
- extensions using the `/extensions list` slash command.
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
- Note that all of these management operations (including updates to slash
16
- commands) will only be reflected in active CLI sessions on **restart**.
16
+ ### Install an extension
17
17
 
18
- ### Installing an extension
18
+ Install an extension by providing its GitHub repository URL or a local file
19
+ path.
19
20
 
20
- You can install an extension using `gemini extensions install` with either a
21
- GitHub URL or a local path.
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
- Note that we create a copy of the installed extension, so you will need to run
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 github URL or local path of the extension to install.
37
- - `--ref`: The git ref to install from.
38
- - `--auto-update`: Enable auto-update for this extension.
39
- - `--pre-release`: Enable pre-release versions for this extension.
40
- - `--consent`: Acknowledge the security risks of installing an extension and
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
- ### Uninstalling an extension
35
+ ### Uninstall an extension
44
36
 
45
- To uninstall one or more extensions, run
46
- `gemini extensions uninstall <name...>`:
37
+ To uninstall one or more extensions, use the `uninstall` command:
47
38
 
48
- ```
49
- gemini extensions uninstall gemini-cli-security gemini-cli-another-extension
39
+ ```bash
40
+ gemini extensions uninstall <name...>
50
41
  ```
51
42
 
52
- ### Disabling an extension
43
+ ### Disable an extension
53
44
 
54
- Extensions are, by default, enabled across all workspaces. You can disable an
55
- extension entirely or for specific workspace.
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
- ### Enabling an extension
55
+ ### Enable an extension
65
56
 
66
- You can enable extensions using `gemini extensions enable <name>`. You can also
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
- ### Updating an extension
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
- You can update all extensions with:
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 boilerplate extension
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
- To copy one of these examples into a development directory using the type of
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 path to create the extension in.
103
- - `[template]`: The boilerplate template to use.
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
- The `gemini extensions link` command will create a symbolic link from the
108
- extension installation directory to the development path.
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
- On startup, Gemini CLI looks for extensions in `<home>/.gemini/extensions`
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 `gemini-extension.json` file contains the configuration for the extension.
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`: The name of the extension. This is used to uniquely identify the
149
- extension and for conflict resolution when extension commands have the same
150
- name as user or project commands. The name should be lowercase or numbers and
151
- use dashes instead of underscores or spaces. This is how users will refer to
152
- your extension in the CLI. Note that we expect this name to match the
153
- extension directory name.
154
- - `version`: The version of the extension.
155
- - `description`: A short description of the extension. This will be displayed on
156
- [geminicli.com/extensions](https://geminicli.com/extensions).
157
- - `mcpServers`: A map of MCP servers to settings. The key is the name of the
158
- server, and the value is the server configuration. These servers will be
159
- loaded on startup just like MCP servers settingsd in a
160
- [`settings.json` file](../get-started/configuration.md). If both an extension
161
- and a `settings.json` file settings an MCP server with the same name, the
162
- server defined in the `settings.json` file takes precedence.
163
- - Note that all MCP server configuration options are supported except for
164
- `trust`.
165
- - `contextFileName`: The name of the file that contains the context for the
166
- extension. This will be used to load the context from the extension directory.
167
- If this property is not used but a `GEMINI.md` file is present in your
168
- extension directory, then that file will be loaded.
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
- When a user installs this extension, they will be prompted to enter their API
211
- key. The value will be saved to a `.env` file in the extension's directory
212
- (e.g., `<home>/.gemini/extensions/my-api-extension/.env`).
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
- You can view a list of an extension's settings by running:
170
+ To update an extension's settings:
215
171
 
216
- ```
217
- gemini extensions list
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
- Extensions can provide [custom commands](../cli/custom-commands.md) by placing
232
- TOML files in a `commands/` subdirectory within the extension directory. These
233
- commands follow the same format as user and project custom commands and use
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
- Would provide these commands:
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
- Extensions can provide [hooks](../hooks/index.md) to intercept and customize
257
- Gemini CLI behavior at specific lifecycle events. Hooks provided by an extension
258
- must be defined in a `hooks/hooks.json` file within the extension directory.
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
- Extensions can bundle [Agent Skills](../cli/skills.md) to provide specialized
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
- Will expose a `security-audit` skill that the model can activate.
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: Sub-agents are currently an experimental feature.**
201
+ > **Note:** Sub-agents are a preview feature currently under active development.
285
202
 
286
- Extensions can provide [sub-agents](../core/subagents.md) that users can
287
- delegate tasks to.
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
- To bundle sub-agents with your extension, create an `agents/` directory in your
290
- extension's root folder and add your agent definition files (`.md`) there.
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
- .gemini/extensions/my-extension/
296
- ├── gemini-extension.json
297
- └── agents/
298
- ├── security-auditor.md
299
- └── database-expert.md
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
- Gemini CLI will automatically discover and load these agents when the extension
303
- is installed and enabled.
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. When a conflict occurs with user
308
- or project commands:
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 extensions allow variable substitution in both
323
- `gemini-extension.json` and `hooks/hooks.json`. This can be useful if e.g., you
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
- | variable | description |
330
- | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
331
- | `${extensionPath}` | The fully-qualified path of the extension in the user's filesystem e.g., '/Users/username/.gemini/extensions/example-extension'. This will not unwrap symlinks. |
332
- | `${workspacePath}` | The fully-qualified path of the current workspace. |
333
- | `${/} or ${pathSeparator}` | The path separator (differs per OS). |
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. |