@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,19 +1,19 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Gemini CLI extension best practices
|
|
2
2
|
|
|
3
3
|
This guide covers best practices for developing, securing, and maintaining
|
|
4
4
|
Gemini CLI extensions.
|
|
5
5
|
|
|
6
6
|
## Development
|
|
7
7
|
|
|
8
|
-
Developing extensions for Gemini CLI is
|
|
9
|
-
|
|
8
|
+
Developing extensions for Gemini CLI is a lightweight, iterative process. Use
|
|
9
|
+
these strategies to build robust and efficient extensions.
|
|
10
10
|
|
|
11
11
|
### Structure your extension
|
|
12
12
|
|
|
13
|
-
While simple extensions
|
|
14
|
-
for complex
|
|
13
|
+
While simple extensions may contain only a few files, we recommend a organized
|
|
14
|
+
structure for complex projects.
|
|
15
15
|
|
|
16
|
-
```
|
|
16
|
+
```text
|
|
17
17
|
my-extension/
|
|
18
18
|
├── package.json
|
|
19
19
|
├── tsconfig.json
|
|
@@ -24,47 +24,50 @@ my-extension/
|
|
|
24
24
|
└── dist/
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
- **Use TypeScript
|
|
28
|
-
|
|
29
|
-
- **Separate source and build
|
|
30
|
-
`dist
|
|
31
|
-
- **Bundle dependencies
|
|
32
|
-
|
|
33
|
-
potential conflicts.
|
|
27
|
+
- **Use TypeScript:** We strongly recommend using TypeScript for type safety and
|
|
28
|
+
improved developer experience.
|
|
29
|
+
- **Separate source and build:** Keep your source code in `src/` and output
|
|
30
|
+
build artifacts to `dist/`.
|
|
31
|
+
- **Bundle dependencies:** If your extension has many dependencies, bundle them
|
|
32
|
+
using a tool like `esbuild` to reduce installation time and avoid conflicts.
|
|
34
33
|
|
|
35
34
|
### Iterate with `link`
|
|
36
35
|
|
|
37
|
-
Use `gemini extensions link` to develop locally without
|
|
36
|
+
Use the `gemini extensions link` command to develop locally without reinstalling
|
|
37
|
+
your extension after every change.
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
40
|
cd my-extension
|
|
41
41
|
gemini extensions link .
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Changes to your code
|
|
45
|
-
|
|
44
|
+
Changes to your code are immediately available in the CLI after you rebuild the
|
|
45
|
+
project and restart the session.
|
|
46
46
|
|
|
47
47
|
### Use `GEMINI.md` effectively
|
|
48
48
|
|
|
49
|
-
Your `GEMINI.md` file provides context to the model.
|
|
49
|
+
Your `GEMINI.md` file provides essential context to the model.
|
|
50
50
|
|
|
51
|
-
- **
|
|
52
|
-
|
|
53
|
-
- **
|
|
51
|
+
- **Focus on goals:** Explain the high-level purpose of the extension and how to
|
|
52
|
+
interact with its tools.
|
|
53
|
+
- **Be concise:** Avoid dumping exhaustive documentation into the file. Use
|
|
54
|
+
clear, direct language.
|
|
55
|
+
- **Provide examples:** Include brief examples of how the model should use
|
|
56
|
+
specific tools or commands.
|
|
54
57
|
|
|
55
58
|
## Security
|
|
56
59
|
|
|
57
|
-
|
|
58
|
-
|
|
60
|
+
Follow the principle of least privilege and rigorous input validation when
|
|
61
|
+
building extensions.
|
|
59
62
|
|
|
60
63
|
### Minimal permissions
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
Only request the permissions your MCP server needs to function. Avoid giving the
|
|
66
|
+
model broad access (such as full shell access) if restricted tools are
|
|
67
|
+
sufficient.
|
|
65
68
|
|
|
66
|
-
If
|
|
67
|
-
|
|
69
|
+
If your extension uses powerful tools like `run_shell_command`, restrict them in
|
|
70
|
+
your `gemini-extension.json` file:
|
|
68
71
|
|
|
69
72
|
```json
|
|
70
73
|
{
|
|
@@ -73,27 +76,26 @@ them to specific commands in your `gemini-extension.json`:
|
|
|
73
76
|
}
|
|
74
77
|
```
|
|
75
78
|
|
|
76
|
-
This ensures
|
|
77
|
-
|
|
79
|
+
This ensures the CLI blocks dangerous commands even if the model attempts to
|
|
80
|
+
execute them.
|
|
78
81
|
|
|
79
82
|
### Validate inputs
|
|
80
83
|
|
|
81
|
-
Your MCP server
|
|
82
|
-
|
|
83
|
-
intended scope.
|
|
84
|
+
Your MCP server runs on the user's machine. Always validate tool inputs to
|
|
85
|
+
prevent arbitrary code execution or unauthorized filesystem access.
|
|
84
86
|
|
|
85
87
|
```typescript
|
|
86
|
-
//
|
|
88
|
+
// Example: Validating paths
|
|
87
89
|
if (!path.resolve(inputPath).startsWith(path.resolve(allowedDir) + path.sep)) {
|
|
88
90
|
throw new Error('Access denied');
|
|
89
91
|
}
|
|
90
92
|
```
|
|
91
93
|
|
|
92
|
-
###
|
|
94
|
+
### Secure sensitive settings
|
|
93
95
|
|
|
94
|
-
If your extension requires API keys, use the `sensitive: true`
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
If your extension requires API keys or other secrets, use the `sensitive: true`
|
|
97
|
+
option in your manifest. This ensures keys are stored in the system keychain and
|
|
98
|
+
obfuscated in the CLI output.
|
|
97
99
|
|
|
98
100
|
```json
|
|
99
101
|
"settings": [
|
|
@@ -105,35 +107,82 @@ keychain and obfuscated in the UI.
|
|
|
105
107
|
]
|
|
106
108
|
```
|
|
107
109
|
|
|
108
|
-
##
|
|
110
|
+
## Release
|
|
109
111
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
[releases](releasing.md).
|
|
112
|
+
Follow standard versioning and release practices to ensure a smooth experience
|
|
113
|
+
for your users.
|
|
113
114
|
|
|
114
115
|
### Semantic versioning
|
|
115
116
|
|
|
116
|
-
Follow [Semantic Versioning](https://semver.org/)
|
|
117
|
+
Follow [Semantic Versioning (SemVer)](https://semver.org/) to communicate
|
|
118
|
+
changes clearly.
|
|
117
119
|
|
|
118
|
-
- **Major
|
|
119
|
-
- **Minor
|
|
120
|
-
- **Patch
|
|
120
|
+
- **Major:** Breaking changes (e.g., renaming tools or changing arguments).
|
|
121
|
+
- **Minor:** New features (e.g., adding new tools or commands).
|
|
122
|
+
- **Patch:** Bug fixes and performance improvements.
|
|
121
123
|
|
|
122
|
-
### Release
|
|
124
|
+
### Release channels
|
|
123
125
|
|
|
124
|
-
Use
|
|
125
|
-
|
|
126
|
+
Use Git branches to manage release channels. This lets users choose between
|
|
127
|
+
stability and the latest features.
|
|
126
128
|
|
|
127
129
|
```bash
|
|
128
|
-
#
|
|
130
|
+
# Install the stable version (default branch)
|
|
129
131
|
gemini extensions install github.com/user/repo
|
|
130
132
|
|
|
131
|
-
#
|
|
133
|
+
# Install the development version
|
|
132
134
|
gemini extensions install github.com/user/repo --ref dev
|
|
133
135
|
```
|
|
134
136
|
|
|
135
137
|
### Clean artifacts
|
|
136
138
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
`node_modules
|
|
139
|
+
When using GitHub Releases, ensure your archives only contain necessary files
|
|
140
|
+
(such as `dist/`, `gemini-extension.json`, and `package.json`). Exclude
|
|
141
|
+
`node_modules/` and `src/` to minimize download size.
|
|
142
|
+
|
|
143
|
+
## Test and verify
|
|
144
|
+
|
|
145
|
+
Test your extension thoroughly before releasing it to users.
|
|
146
|
+
|
|
147
|
+
- **Manual verification:** Use `gemini extensions link` to test your extension
|
|
148
|
+
in a live CLI session. Verify that tools appear in the debug console (F12) and
|
|
149
|
+
that custom commands resolve correctly.
|
|
150
|
+
- **Automated testing:** If your extension includes an MCP server, write unit
|
|
151
|
+
tests for your tool logic using a framework like Vitest or Jest. You can test
|
|
152
|
+
MCP tools in isolation by mocking the transport layer.
|
|
153
|
+
|
|
154
|
+
## Troubleshooting
|
|
155
|
+
|
|
156
|
+
Use these tips to diagnose and fix common extension issues.
|
|
157
|
+
|
|
158
|
+
### Extension not loading
|
|
159
|
+
|
|
160
|
+
If your extension doesn't appear in `/extensions list`:
|
|
161
|
+
|
|
162
|
+
- **Check the manifest:** Ensure `gemini-extension.json` is in the root
|
|
163
|
+
directory and contains valid JSON.
|
|
164
|
+
- **Verify the name:** The `name` field in the manifest must match the extension
|
|
165
|
+
directory name exactly.
|
|
166
|
+
- **Restart the CLI:** Extensions are loaded at the start of a session. Restart
|
|
167
|
+
Gemini CLI after making changes to the manifest or linking a new extension.
|
|
168
|
+
|
|
169
|
+
### MCP server failures
|
|
170
|
+
|
|
171
|
+
If your tools aren't working as expected:
|
|
172
|
+
|
|
173
|
+
- **Check the logs:** View the CLI logs to see if the MCP server failed to
|
|
174
|
+
start.
|
|
175
|
+
- **Test the command:** Run the server's `command` and `args` directly in your
|
|
176
|
+
terminal to ensure it starts correctly outside of Gemini CLI.
|
|
177
|
+
- **Debug console:** In interactive mode, press **F12** to open the debug
|
|
178
|
+
console and inspect tool calls and responses.
|
|
179
|
+
|
|
180
|
+
### Command conflicts
|
|
181
|
+
|
|
182
|
+
If a custom command isn't responding:
|
|
183
|
+
|
|
184
|
+
- **Check precedence:** Remember that user and project commands take precedence
|
|
185
|
+
over extension commands. Use the prefixed name (e.g., `/extension.command`) to
|
|
186
|
+
verify the extension's version.
|
|
187
|
+
- **Help command:** Run `/help` to see a list of all available commands and
|
|
188
|
+
their sources.
|
|
@@ -1,24 +1,49 @@
|
|
|
1
1
|
# Gemini CLI extensions
|
|
2
2
|
|
|
3
|
-
Gemini CLI extensions package prompts, MCP servers, custom commands,
|
|
4
|
-
sub-agents, and agent skills into a familiar and user-friendly format.
|
|
5
|
-
extensions, you can expand the capabilities of Gemini CLI and share those
|
|
3
|
+
Gemini CLI extensions package prompts, MCP servers, custom commands, themes,
|
|
4
|
+
hooks, sub-agents, and agent skills into a familiar and user-friendly format.
|
|
5
|
+
With extensions, you can expand the capabilities of Gemini CLI and share those
|
|
6
6
|
capabilities with others. They are designed to be easily installable and
|
|
7
7
|
shareable.
|
|
8
8
|
|
|
9
|
-
To see
|
|
10
|
-
[Gemini CLI
|
|
9
|
+
To see what's possible, browse the
|
|
10
|
+
[Gemini CLI extension gallery](https://geminicli.com/extensions/browse/).
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Choose your path
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Choose the guide that best fits your needs.
|
|
15
|
+
|
|
16
|
+
### I want to use extensions
|
|
17
|
+
|
|
18
|
+
Learn how to discover, install, and manage extensions to enhance your Gemini CLI
|
|
19
|
+
experience.
|
|
20
|
+
|
|
21
|
+
- **[Manage extensions](#manage-extensions):** List and verify your installed
|
|
22
|
+
extensions.
|
|
23
|
+
- **[Install extensions](#installation):** Add new capabilities from GitHub or
|
|
24
|
+
local paths.
|
|
25
|
+
|
|
26
|
+
### I want to build extensions
|
|
27
|
+
|
|
28
|
+
Learn how to create, test, and share your own extensions with the community.
|
|
29
|
+
|
|
30
|
+
- **[Build extensions](writing-extensions.md):** Create your first extension
|
|
31
|
+
from a template.
|
|
32
|
+
- **[Best practices](best-practices.md):** Learn how to build secure and
|
|
33
|
+
reliable extensions.
|
|
34
|
+
- **[Publish to the gallery](releasing.md):** Share your work with the world.
|
|
35
|
+
|
|
36
|
+
## Manage extensions
|
|
37
|
+
|
|
38
|
+
Use the interactive `/extensions` command to verify your installed extensions
|
|
39
|
+
and their status:
|
|
16
40
|
|
|
17
41
|
```bash
|
|
18
42
|
/extensions list
|
|
19
43
|
```
|
|
20
44
|
|
|
21
|
-
|
|
45
|
+
You can also manage extensions from your terminal using the `gemini extensions`
|
|
46
|
+
command group:
|
|
22
47
|
|
|
23
48
|
```bash
|
|
24
49
|
gemini extensions list
|
|
@@ -26,20 +51,11 @@ gemini extensions list
|
|
|
26
51
|
|
|
27
52
|
## Installation
|
|
28
53
|
|
|
29
|
-
|
|
30
|
-
GitHub repository URL in noninteractive mode. For example:
|
|
54
|
+
Install an extension by providing its GitHub repository URL. For example:
|
|
31
55
|
|
|
32
56
|
```bash
|
|
33
57
|
gemini extensions install https://github.com/gemini-cli-extensions/workspace
|
|
34
58
|
```
|
|
35
59
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- [Writing extensions](writing-extensions.md): Learn how to create your first
|
|
39
|
-
extension.
|
|
40
|
-
- [Extensions reference](reference.md): Deeply understand the extension format,
|
|
41
|
-
commands, and configuration.
|
|
42
|
-
- [Best practices](best-practices.md): Learn strategies for building great
|
|
43
|
-
extensions.
|
|
44
|
-
- [Extensions releasing](releasing.md): Learn how to share your extensions with
|
|
45
|
-
the world.
|
|
60
|
+
For more advanced installation options, see the
|
|
61
|
+
[Extension reference](reference.md#install-an-extension).
|