Edit pass of docs/extensions.md (#1187)

Co-authored-by: cperry-goog <78765543+cperry-goog@users.noreply.github.com>
This commit is contained in:
starsandskies 2025-06-20 09:49:57 -07:00 committed by GitHub
parent fefe97a1db
commit 71f1dcf39a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 6 deletions

View File

@ -9,15 +9,15 @@ On startup, Gemini CLI looks for extensions in two locations:
1. `<workspace>/.gemini/extensions`
2. `<home>/.gemini/extensions`
It will load all extensions from both locations, but if an extension with the same name exists in both, the one in the workspace directory will take precedence.
Gemini CLI loads all extensions from both locations. If an extension with the same name exists in both locations, the extension in the workspace directory takes precedence.
Each extension is a directory that contains a `gemini-extension.json` file. This file contains the configuration for the extension. For example:
Within each location, individual extensions exist as a directory that contains a `gemini-extension.json` file. For example:
`<workspace>/.gemini/extensions/my-extension/gemini-extension.json`
### `gemini-extension.json`
The `gemini-extension.json` file has the following structure:
The `gemini-extension.json` file contains the configuration for the extension. The file has the following structure:
```json
{
@ -34,7 +34,7 @@ The `gemini-extension.json` file has the following structure:
- `name`: The name of the extension. This is used to uniquely identify the extension. This should match the name of your extension directory.
- `version`: The version of the extension.
- `mcpServers`: A map of MCP servers to configure. The key is the name of the server, and the value is the server configuration. These servers will be loaded on startup just like mcpServers configured in settings.json. If an extension and settings.json configure a mcp server with the same name, settings.json will take precedence.
- `contextFileName`: The name of the file that contains the context for the extension. This will be used to load the context from the workspace. If this property is not used but a `GEMINI.md` is present in your extension directory, then that file will be loaded.
- `mcpServers`: A map of MCP servers to configure. The key is the name of the server, and the value is the server configuration. These servers will be loaded on startup just like MCP servers configured in a [`settings.json` file](./cli/configuration.md). If both an extension and a `settings.json` file configure an MCP server with the same name, the server defined in the `settings.json` file takes precedence.
- `contextFileName`: The name of the file that contains the context for the extension. This will be used to load the context from the workspace. If this property is not used but a `GEMINI.md` file is present in your extension directory, then that file will be loaded.
When Gemini CLI starts, it will load all the extensions and merge their configurations. If there are any conflicts, the workspace configuration will take precedence.
When Gemini CLI starts, it loads all the extensions and merges their configurations. If there are any conflicts, the workspace configuration takes precedence.