@google/gemini-cli-core 0.24.0-preview.0 → 0.25.0-nightly.20260112.15891721a
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 +1 -1
- package/dist/docs/changelogs/index.md +22 -0
- package/dist/docs/changelogs/latest.md +137 -209
- package/dist/docs/changelogs/preview.md +116 -114
- package/dist/docs/changelogs/releases.md +273 -7
- package/dist/docs/cli/model-routing.md +1 -1
- package/dist/docs/cli/model.md +1 -1
- package/dist/docs/cli/settings.md +67 -53
- package/dist/docs/core/policy-engine.md +3 -2
- package/dist/docs/extensions/index.md +57 -7
- package/dist/docs/get-started/configuration.md +13 -7
- package/dist/docs/get-started/gemini-3.md +2 -17
- package/dist/docs/hooks/best-practices.md +1 -1
- package/dist/docs/hooks/index.md +47 -11
- package/dist/docs/hooks/reference.md +19 -9
- package/dist/docs/hooks/writing-hooks.md +19 -1
- package/dist/docs/troubleshooting.md +9 -3
- package/dist/google-gemini-cli-core-0.25.0-nightly.20260107.59a18e710.tgz +0 -0
- package/dist/src/agents/a2a-client-manager.d.ts +4 -0
- package/dist/src/agents/a2a-client-manager.js +22 -22
- package/dist/src/agents/a2a-client-manager.js.map +1 -1
- package/dist/src/agents/a2a-client-manager.test.js +44 -0
- package/dist/src/agents/a2a-client-manager.test.js.map +1 -1
- package/dist/src/agents/agentLoader.d.ts +68 -0
- package/dist/src/agents/{toml-loader.js → agentLoader.js} +83 -78
- package/dist/src/agents/agentLoader.js.map +1 -0
- package/dist/src/agents/agentLoader.test.js +283 -0
- package/dist/src/agents/agentLoader.test.js.map +1 -0
- package/dist/src/agents/{introspection-agent.d.ts → cli-help-agent.d.ts} +3 -2
- package/dist/src/agents/{introspection-agent.js → cli-help-agent.js} +17 -11
- package/dist/src/agents/cli-help-agent.js.map +1 -0
- package/dist/src/agents/{introspection-agent.test.js → cli-help-agent.test.js} +25 -7
- package/dist/src/agents/cli-help-agent.test.js.map +1 -0
- package/dist/src/agents/delegate-to-agent-tool.js +17 -10
- package/dist/src/agents/delegate-to-agent-tool.js.map +1 -1
- package/dist/src/agents/delegate-to-agent-tool.test.js +52 -10
- package/dist/src/agents/delegate-to-agent-tool.test.js.map +1 -1
- package/dist/src/agents/local-executor.js +35 -1
- package/dist/src/agents/local-executor.js.map +1 -1
- package/dist/src/agents/local-executor.test.js +53 -0
- package/dist/src/agents/local-executor.test.js.map +1 -1
- package/dist/src/agents/registry.d.ts +10 -0
- package/dist/src/agents/registry.js +61 -26
- package/dist/src/agents/registry.js.map +1 -1
- package/dist/src/agents/registry.test.js +66 -11
- package/dist/src/agents/registry.test.js.map +1 -1
- package/dist/src/agents/remote-invocation.js +4 -2
- package/dist/src/agents/remote-invocation.js.map +1 -1
- package/dist/src/agents/remote-invocation.test.js +1 -1
- package/dist/src/agents/remote-invocation.test.js.map +1 -1
- package/dist/src/availability/fallbackIntegration.test.js +58 -0
- package/dist/src/availability/fallbackIntegration.test.js.map +1 -0
- package/dist/src/code_assist/experiments/experiments.d.ts +1 -1
- package/dist/src/code_assist/experiments/experiments.js +21 -0
- package/dist/src/code_assist/experiments/experiments.js.map +1 -1
- package/dist/src/code_assist/experiments/experiments_local.test.d.ts +6 -0
- package/dist/src/code_assist/experiments/experiments_local.test.js +110 -0
- package/dist/src/code_assist/experiments/experiments_local.test.js.map +1 -0
- package/dist/src/code_assist/oauth-credential-storage.js +3 -4
- package/dist/src/code_assist/oauth-credential-storage.js.map +1 -1
- package/dist/src/code_assist/oauth2.js.map +1 -1
- package/dist/src/code_assist/oauth2.test.js +44 -19
- package/dist/src/code_assist/oauth2.test.js.map +1 -1
- package/dist/src/code_assist/telemetry.js +2 -1
- package/dist/src/code_assist/telemetry.js.map +1 -1
- package/dist/src/code_assist/telemetry.test.js +2 -1
- package/dist/src/code_assist/telemetry.test.js.map +1 -1
- package/dist/src/code_assist/types.d.ts +7 -0
- package/dist/src/code_assist/types.js +7 -0
- package/dist/src/code_assist/types.js.map +1 -1
- package/dist/src/config/config.d.ts +26 -6
- package/dist/src/config/config.js +79 -37
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/config.test.js +13 -3
- package/dist/src/config/config.test.js.map +1 -1
- package/dist/src/config/models.d.ts +7 -0
- package/dist/src/config/models.js +11 -0
- package/dist/src/config/models.js.map +1 -1
- package/dist/src/config/models.test.js +17 -1
- package/dist/src/config/models.test.js.map +1 -1
- package/dist/src/config/storage.d.ts +1 -0
- package/dist/src/config/storage.js +5 -2
- package/dist/src/config/storage.js.map +1 -1
- package/dist/src/core/client.js +27 -8
- package/dist/src/core/client.js.map +1 -1
- package/dist/src/core/client.test.js +98 -42
- package/dist/src/core/client.test.js.map +1 -1
- package/dist/src/core/coreToolHookTriggers.d.ts +8 -4
- package/dist/src/core/coreToolHookTriggers.js +43 -5
- package/dist/src/core/coreToolHookTriggers.js.map +1 -1
- package/dist/src/core/coreToolScheduler.d.ts +1 -8
- package/dist/src/core/coreToolScheduler.js +54 -60
- package/dist/src/core/coreToolScheduler.js.map +1 -1
- package/dist/src/core/coreToolScheduler.test.js +30 -8
- package/dist/src/core/coreToolScheduler.test.js.map +1 -1
- package/dist/src/core/geminiChat.d.ts +26 -1
- package/dist/src/core/geminiChat.js +74 -8
- package/dist/src/core/geminiChat.js.map +1 -1
- package/dist/src/core/geminiChat.test.js +109 -0
- package/dist/src/core/geminiChat.test.js.map +1 -1
- package/dist/src/core/geminiChatHookTriggers.d.ts +8 -4
- package/dist/src/core/geminiChatHookTriggers.js +31 -9
- package/dist/src/core/geminiChatHookTriggers.js.map +1 -1
- package/dist/src/core/geminiChatHookTriggers.test.d.ts +6 -0
- package/dist/src/core/geminiChatHookTriggers.test.js +153 -0
- package/dist/src/core/geminiChatHookTriggers.test.js.map +1 -0
- package/dist/src/core/loggingContentGenerator.js +5 -0
- package/dist/src/core/loggingContentGenerator.js.map +1 -1
- package/dist/src/core/loggingContentGenerator.test.js +30 -0
- package/dist/src/core/loggingContentGenerator.test.js.map +1 -1
- package/dist/src/core/nonInteractiveToolExecutor.test.js +4 -2
- package/dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -1
- package/dist/src/core/prompts.js +8 -8
- package/dist/src/core/prompts.js.map +1 -1
- package/dist/src/core/prompts.test.js +4 -2
- package/dist/src/core/prompts.test.js.map +1 -1
- package/dist/src/core/tokenLimits.js +6 -12
- package/dist/src/core/tokenLimits.js.map +1 -1
- package/dist/src/core/tokenLimits.test.js +8 -4
- package/dist/src/core/tokenLimits.test.js.map +1 -1
- package/dist/src/core/turn.d.ts +2 -0
- package/dist/src/core/turn.js +14 -0
- package/dist/src/core/turn.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/generated/git-commit.js.map +1 -1
- package/dist/src/hooks/hookEventHandler.d.ts +3 -3
- package/dist/src/hooks/hookEventHandler.js +27 -8
- package/dist/src/hooks/hookEventHandler.js.map +1 -1
- package/dist/src/hooks/hookEventHandler.test.js +145 -0
- package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
- package/dist/src/hooks/hookSystem.d.ts +12 -0
- package/dist/src/hooks/hookSystem.js +36 -0
- package/dist/src/hooks/hookSystem.js.map +1 -1
- package/dist/src/hooks/hookTranslator.js +2 -1
- package/dist/src/hooks/hookTranslator.js.map +1 -1
- package/dist/src/hooks/index.d.ts +0 -1
- package/dist/src/hooks/index.js +0 -2
- package/dist/src/hooks/index.js.map +1 -1
- package/dist/src/hooks/types.d.ts +21 -0
- package/dist/src/hooks/types.js +0 -15
- package/dist/src/hooks/types.js.map +1 -1
- package/dist/src/hooks/types.test.js +4 -28
- package/dist/src/hooks/types.test.js.map +1 -1
- package/dist/src/ide/detect-ide.d.ts +4 -0
- package/dist/src/ide/detect-ide.js +7 -2
- package/dist/src/ide/detect-ide.js.map +1 -1
- package/dist/src/ide/detect-ide.test.js +10 -0
- package/dist/src/ide/detect-ide.test.js.map +1 -1
- package/dist/src/ide/ide-installer.js +2 -2
- package/dist/src/ide/ide-installer.js.map +1 -1
- package/dist/src/ide/ide-installer.test.js +11 -2
- package/dist/src/ide/ide-installer.test.js.map +1 -1
- package/dist/src/index.d.ts +8 -1
- package/dist/src/index.js +10 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/mcp/token-storage/file-token-storage.js +2 -2
- package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
- package/dist/src/policy/persistence.test.js +1 -1
- package/dist/src/policy/persistence.test.js.map +1 -1
- package/dist/src/policy/policies/agent.toml +1 -1
- package/dist/src/policy/policies/yolo.toml +1 -0
- package/dist/src/policy/policy-updater.test.js +3 -3
- package/dist/src/policy/policy-updater.test.js.map +1 -1
- package/dist/src/policy/utils.js +4 -1
- package/dist/src/policy/utils.js.map +1 -1
- package/dist/src/policy/utils.test.js +34 -6
- package/dist/src/policy/utils.test.js.map +1 -1
- package/dist/src/routing/routingStrategy.d.ts +2 -0
- package/dist/src/routing/strategies/classifierStrategy.js +1 -1
- package/dist/src/routing/strategies/classifierStrategy.js.map +1 -1
- package/dist/src/routing/strategies/classifierStrategy.test.js +16 -0
- package/dist/src/routing/strategies/classifierStrategy.test.js.map +1 -1
- package/dist/src/routing/strategies/fallbackStrategy.d.ts +1 -1
- package/dist/src/routing/strategies/fallbackStrategy.js +2 -2
- package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
- package/dist/src/routing/strategies/fallbackStrategy.test.js +13 -0
- package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
- package/dist/src/routing/strategies/overrideStrategy.d.ts +1 -1
- package/dist/src/routing/strategies/overrideStrategy.js +5 -5
- package/dist/src/routing/strategies/overrideStrategy.js.map +1 -1
- package/dist/src/routing/strategies/overrideStrategy.test.js +14 -0
- package/dist/src/routing/strategies/overrideStrategy.test.js.map +1 -1
- package/dist/src/scheduler/tool-executor.js +2 -2
- package/dist/src/scheduler/tool-executor.js.map +1 -1
- package/dist/src/scheduler/tool-modifier.d.ts +23 -0
- package/dist/src/scheduler/tool-modifier.js +50 -0
- package/dist/src/scheduler/tool-modifier.js.map +1 -0
- package/dist/src/scheduler/tool-modifier.test.d.ts +6 -0
- package/dist/src/scheduler/tool-modifier.test.js +159 -0
- package/dist/src/scheduler/tool-modifier.test.js.map +1 -0
- package/dist/src/services/chatCompressionService.js +3 -10
- package/dist/src/services/chatCompressionService.js.map +1 -1
- package/dist/src/services/chatCompressionService.test.js +1 -0
- package/dist/src/services/chatCompressionService.test.js.map +1 -1
- package/dist/src/services/chatRecordingService.d.ts +7 -1
- package/dist/src/services/chatRecordingService.js +20 -2
- package/dist/src/services/chatRecordingService.js.map +1 -1
- package/dist/src/services/chatRecordingService.test.js +43 -0
- package/dist/src/services/chatRecordingService.test.js.map +1 -1
- package/dist/src/services/environmentSanitization.js +4 -3
- package/dist/src/services/environmentSanitization.js.map +1 -1
- package/dist/src/services/gitService.test.js +10 -2
- package/dist/src/services/gitService.test.js.map +1 -1
- package/dist/src/services/modelConfig.integration.test.js +2 -2
- package/dist/src/services/modelConfig.integration.test.js.map +1 -1
- package/dist/src/services/modelConfigService.d.ts +29 -1
- package/dist/src/services/modelConfigService.js +116 -69
- package/dist/src/services/modelConfigService.js.map +1 -1
- package/dist/src/services/modelConfigService.test.js +116 -0
- package/dist/src/services/modelConfigService.test.js.map +1 -1
- package/dist/src/services/shellExecutionService.js +1 -1
- package/dist/src/services/shellExecutionService.js.map +1 -1
- package/dist/src/services/shellExecutionService.test.js +43 -2
- package/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/dist/src/skills/skillLoader.d.ts +3 -0
- package/dist/src/skills/skillLoader.js +2 -2
- package/dist/src/skills/skillLoader.js.map +1 -1
- package/dist/src/skills/skillLoader.test.js +4 -2
- package/dist/src/skills/skillLoader.test.js.map +1 -1
- package/dist/src/skills/skillManager.d.ts +9 -0
- package/dist/src/skills/skillManager.js +24 -5
- package/dist/src/skills/skillManager.js.map +1 -1
- package/dist/src/skills/skillManager.test.js +36 -0
- package/dist/src/skills/skillManager.test.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +4 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +12 -8
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +43 -4
- package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
- package/dist/src/telemetry/loggers.test.js +1 -0
- package/dist/src/telemetry/loggers.test.js.map +1 -1
- package/dist/src/telemetry/types.js +4 -2
- package/dist/src/telemetry/types.js.map +1 -1
- package/dist/src/tools/activate-skill.js +23 -10
- package/dist/src/tools/activate-skill.js.map +1 -1
- package/dist/src/tools/activate-skill.test.js +24 -6
- package/dist/src/tools/activate-skill.test.js.map +1 -1
- package/dist/src/tools/edit.js +2 -0
- package/dist/src/tools/edit.js.map +1 -1
- package/dist/src/tools/get-internal-docs.js +11 -18
- package/dist/src/tools/get-internal-docs.js.map +1 -1
- package/dist/src/tools/mcp-tool.d.ts +18 -3
- package/dist/src/tools/mcp-tool.js +1 -1
- package/dist/src/tools/mcp-tool.js.map +1 -1
- package/dist/src/tools/tool-error.d.ts +4 -0
- package/dist/src/tools/tool-error.js +4 -0
- package/dist/src/tools/tool-error.js.map +1 -1
- package/dist/src/tools/tools.d.ts +2 -0
- package/dist/src/tools/tools.js.map +1 -1
- package/dist/src/tools/write-file.js +2 -0
- package/dist/src/tools/write-file.js.map +1 -1
- package/dist/src/utils/apiConversionUtils.d.ts +12 -0
- package/dist/src/utils/apiConversionUtils.js +46 -0
- package/dist/src/utils/apiConversionUtils.js.map +1 -0
- package/dist/src/utils/apiConversionUtils.test.d.ts +6 -0
- package/dist/src/utils/apiConversionUtils.test.js +150 -0
- package/dist/src/utils/apiConversionUtils.test.js.map +1 -0
- package/dist/src/utils/editor.d.ts +2 -2
- package/dist/src/utils/editor.js +19 -2
- package/dist/src/utils/editor.js.map +1 -1
- package/dist/src/utils/editor.test.js +27 -4
- package/dist/src/utils/editor.test.js.map +1 -1
- package/dist/src/utils/events.d.ts +7 -1
- package/dist/src/utils/events.js +7 -0
- package/dist/src/utils/events.js.map +1 -1
- package/dist/src/utils/fileDiffUtils.d.ts +18 -0
- package/dist/src/utils/fileDiffUtils.js +37 -0
- package/dist/src/utils/fileDiffUtils.js.map +1 -0
- package/dist/src/utils/fileDiffUtils.test.d.ts +6 -0
- package/dist/src/utils/fileDiffUtils.test.js +84 -0
- package/dist/src/utils/fileDiffUtils.test.js.map +1 -0
- package/dist/src/utils/gitIgnoreParser.js +9 -10
- package/dist/src/utils/gitIgnoreParser.js.map +1 -1
- package/dist/src/utils/installationManager.test.js +11 -3
- package/dist/src/utils/installationManager.test.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.js +1 -2
- package/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/dist/src/utils/memoryDiscovery.test.js +9 -0
- package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
- package/dist/src/utils/paths.d.ts +10 -0
- package/dist/src/utils/paths.js +20 -1
- package/dist/src/utils/paths.js.map +1 -1
- package/dist/src/utils/userAccountManager.test.js +5 -5
- package/dist/src/utils/userAccountManager.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/dist/docs/cli/configuration.md +0 -780
- package/dist/docs/get-started/deployment.md +0 -143
- package/dist/src/agents/introspection-agent.js.map +0 -1
- package/dist/src/agents/introspection-agent.test.js.map +0 -1
- package/dist/src/agents/toml-loader.d.ts +0 -74
- package/dist/src/agents/toml-loader.js.map +0 -1
- package/dist/src/agents/toml-loader.test.js +0 -309
- package/dist/src/agents/toml-loader.test.js.map +0 -1
- package/dist/src/core/sessionHookTriggers.d.ts +0 -29
- package/dist/src/core/sessionHookTriggers.js +0 -75
- package/dist/src/core/sessionHookTriggers.js.map +0 -1
- package/dist/src/utils/shell-permissions.d.ts +0 -52
- package/dist/src/utils/shell-permissions.js +0 -188
- package/dist/src/utils/shell-permissions.js.map +0 -1
- package/dist/src/utils/shell-permissions.test.js +0 -369
- package/dist/src/utils/shell-permissions.test.js.map +0 -1
- /package/dist/src/agents/{introspection-agent.test.d.ts → agentLoader.test.d.ts} +0 -0
- /package/dist/src/agents/{toml-loader.test.d.ts → cli-help-agent.test.d.ts} +0 -0
- /package/dist/src/{utils/shell-permissions.test.d.ts → availability/fallbackIntegration.test.d.ts} +0 -0
|
@@ -18,45 +18,49 @@ Note: Workspace settings override user settings.
|
|
|
18
18
|
Here is a list of all the available settings, grouped by category and ordered as
|
|
19
19
|
they appear in the UI.
|
|
20
20
|
|
|
21
|
+
<!-- SETTINGS-AUTOGEN:START -->
|
|
22
|
+
|
|
21
23
|
### General
|
|
22
24
|
|
|
23
|
-
| UI Label | Setting | Description
|
|
24
|
-
| ------------------------------- | ---------------------------------- |
|
|
25
|
-
| Preview Features (e.g., models) | `general.previewFeatures` | Enable preview features (e.g., preview models).
|
|
26
|
-
| Vim Mode | `general.vimMode` | Enable Vim keybindings
|
|
27
|
-
| Disable Auto Update | `general.disableAutoUpdate` | Disable automatic updates
|
|
28
|
-
| Enable Prompt Completion | `general.enablePromptCompletion` | Enable AI-powered prompt completion suggestions while typing.
|
|
29
|
-
| Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console.
|
|
30
|
-
| Session
|
|
31
|
-
| Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup. | `false` |
|
|
25
|
+
| UI Label | Setting | Description | Default |
|
|
26
|
+
| ------------------------------- | ---------------------------------- | ------------------------------------------------------------- | ------- |
|
|
27
|
+
| Preview Features (e.g., models) | `general.previewFeatures` | Enable preview features (e.g., preview models). | `false` |
|
|
28
|
+
| Vim Mode | `general.vimMode` | Enable Vim keybindings | `false` |
|
|
29
|
+
| Disable Auto Update | `general.disableAutoUpdate` | Disable automatic updates | `false` |
|
|
30
|
+
| Enable Prompt Completion | `general.enablePromptCompletion` | Enable AI-powered prompt completion suggestions while typing. | `false` |
|
|
31
|
+
| Debug Keystroke Logging | `general.debugKeystrokeLogging` | Enable debug logging of keystrokes to the console. | `false` |
|
|
32
|
+
| Enable Session Cleanup | `general.sessionRetention.enabled` | Enable automatic session cleanup | `false` |
|
|
32
33
|
|
|
33
34
|
### Output
|
|
34
35
|
|
|
35
|
-
| UI Label | Setting | Description | Default
|
|
36
|
-
| ------------- | --------------- | ------------------------------------------------------ |
|
|
37
|
-
| Output Format | `output.format` | The format of the CLI output. Can be `text` or `json`. | `text`
|
|
36
|
+
| UI Label | Setting | Description | Default |
|
|
37
|
+
| ------------- | --------------- | ------------------------------------------------------ | -------- |
|
|
38
|
+
| Output Format | `output.format` | The format of the CLI output. Can be `text` or `json`. | `"text"` |
|
|
38
39
|
|
|
39
40
|
### UI
|
|
40
41
|
|
|
41
|
-
| UI Label | Setting | Description
|
|
42
|
-
| ------------------------------ | ---------------------------------------- |
|
|
43
|
-
| Hide Window Title | `ui.hideWindowTitle` | Hide the window title bar
|
|
44
|
-
| Show Status in Title | `ui.showStatusInTitle` | Show Gemini CLI status and thoughts in the terminal window title
|
|
45
|
-
|
|
|
46
|
-
| Hide
|
|
47
|
-
| Hide
|
|
48
|
-
| Hide
|
|
49
|
-
| Hide
|
|
50
|
-
| Hide
|
|
51
|
-
| Hide
|
|
52
|
-
| Hide
|
|
53
|
-
|
|
|
54
|
-
| Show
|
|
55
|
-
| Show
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
| Screen
|
|
42
|
+
| UI Label | Setting | Description | Default |
|
|
43
|
+
| ------------------------------ | ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
44
|
+
| Hide Window Title | `ui.hideWindowTitle` | Hide the window title bar | `false` |
|
|
45
|
+
| Show Status in Title | `ui.showStatusInTitle` | Show Gemini CLI status and thoughts in the terminal window title | `false` |
|
|
46
|
+
| Show Home Directory Warning | `ui.showHomeDirectoryWarning` | Show a warning when running Gemini CLI in the home directory. | `true` |
|
|
47
|
+
| Hide Tips | `ui.hideTips` | Hide helpful tips in the UI | `false` |
|
|
48
|
+
| Hide Banner | `ui.hideBanner` | Hide the application banner | `false` |
|
|
49
|
+
| Hide Context Summary | `ui.hideContextSummary` | Hide the context summary (GEMINI.md, MCP servers) above the input. | `false` |
|
|
50
|
+
| Hide CWD | `ui.footer.hideCWD` | Hide the current working directory path in the footer. | `false` |
|
|
51
|
+
| Hide Sandbox Status | `ui.footer.hideSandboxStatus` | Hide the sandbox status indicator in the footer. | `false` |
|
|
52
|
+
| Hide Model Info | `ui.footer.hideModelInfo` | Hide the model name and context usage in the footer. | `false` |
|
|
53
|
+
| Hide Context Window Percentage | `ui.footer.hideContextPercentage` | Hides the context window remaining percentage. | `true` |
|
|
54
|
+
| Hide Footer | `ui.hideFooter` | Hide the footer from the UI | `false` |
|
|
55
|
+
| Show Memory Usage | `ui.showMemoryUsage` | Display memory usage information in the UI | `false` |
|
|
56
|
+
| Show Line Numbers | `ui.showLineNumbers` | Show line numbers in the chat. | `true` |
|
|
57
|
+
| Show Citations | `ui.showCitations` | Show citations for generated text in the chat. | `false` |
|
|
58
|
+
| Show Model Info In Chat | `ui.showModelInfoInChat` | Show the model name in the chat for each model turn. | `false` |
|
|
59
|
+
| Use Full Width | `ui.useFullWidth` | Use the entire width of the terminal for output. | `true` |
|
|
60
|
+
| Use Alternate Screen Buffer | `ui.useAlternateBuffer` | Use an alternate screen buffer for the UI, preserving shell history. | `false` |
|
|
61
|
+
| Incremental Rendering | `ui.incrementalRendering` | Enable incremental rendering for the UI. This option will reduce flickering but may cause rendering artifacts. Only supported when useAlternateBuffer is enabled. | `true` |
|
|
62
|
+
| Disable Loading Phrases | `ui.accessibility.disableLoadingPhrases` | Disable loading phrases for accessibility | `false` |
|
|
63
|
+
| Screen Reader Mode | `ui.accessibility.screenReader` | Render output in plain-text to be more screen reader accessible | `false` |
|
|
60
64
|
|
|
61
65
|
### IDE
|
|
62
66
|
|
|
@@ -69,7 +73,7 @@ they appear in the UI.
|
|
|
69
73
|
| UI Label | Setting | Description | Default |
|
|
70
74
|
| ----------------------- | ---------------------------- | -------------------------------------------------------------------------------------- | ------- |
|
|
71
75
|
| Max Session Turns | `model.maxSessionTurns` | Maximum number of user/model/tool turns to keep in a session. -1 means unlimited. | `-1` |
|
|
72
|
-
| Compression Threshold | `model.compressionThreshold` | The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3). | `0.
|
|
76
|
+
| Compression Threshold | `model.compressionThreshold` | The fraction of context usage at which to trigger context compression (e.g. 0.2, 0.3). | `0.5` |
|
|
73
77
|
| Skip Next Speaker Check | `model.skipNextSpeakerCheck` | Skip the next speaker check. | `true` |
|
|
74
78
|
|
|
75
79
|
### Context
|
|
@@ -85,30 +89,40 @@ they appear in the UI.
|
|
|
85
89
|
|
|
86
90
|
### Tools
|
|
87
91
|
|
|
88
|
-
| UI Label | Setting | Description | Default
|
|
89
|
-
| -------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------- |
|
|
90
|
-
| Enable Interactive Shell | `tools.shell.enableInteractiveShell` | Use node-pty for an interactive shell experience. Fallback to child_process still applies. | `true`
|
|
91
|
-
| Show Color | `tools.shell.showColor` | Show color in shell output. | `false`
|
|
92
|
-
| Auto Accept | `tools.autoAccept` | Automatically accept and execute tool calls that are considered safe (e.g., read-only operations). | `false`
|
|
93
|
-
| Use Ripgrep | `tools.useRipgrep` | Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance. | `true`
|
|
94
|
-
| Enable Tool Output Truncation | `tools.enableToolOutputTruncation` | Enable truncation of large tool outputs. | `true`
|
|
95
|
-
| Tool Output Truncation Threshold | `tools.truncateToolOutputThreshold` | Truncate tool output if it is larger than this many characters. Set to -1 to disable. | `
|
|
96
|
-
| Tool Output Truncation Lines | `tools.truncateToolOutputLines` | The number of lines to keep when truncating tool output. | `
|
|
92
|
+
| UI Label | Setting | Description | Default |
|
|
93
|
+
| -------------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------------------------------- | --------- |
|
|
94
|
+
| Enable Interactive Shell | `tools.shell.enableInteractiveShell` | Use node-pty for an interactive shell experience. Fallback to child_process still applies. | `true` |
|
|
95
|
+
| Show Color | `tools.shell.showColor` | Show color in shell output. | `false` |
|
|
96
|
+
| Auto Accept | `tools.autoAccept` | Automatically accept and execute tool calls that are considered safe (e.g., read-only operations). | `false` |
|
|
97
|
+
| Use Ripgrep | `tools.useRipgrep` | Use ripgrep for file content search instead of the fallback implementation. Provides faster search performance. | `true` |
|
|
98
|
+
| Enable Tool Output Truncation | `tools.enableToolOutputTruncation` | Enable truncation of large tool outputs. | `true` |
|
|
99
|
+
| Tool Output Truncation Threshold | `tools.truncateToolOutputThreshold` | Truncate tool output if it is larger than this many characters. Set to -1 to disable. | `4000000` |
|
|
100
|
+
| Tool Output Truncation Lines | `tools.truncateToolOutputLines` | The number of lines to keep when truncating tool output. | `1000` |
|
|
97
101
|
|
|
98
102
|
### Security
|
|
99
103
|
|
|
100
|
-
| UI Label
|
|
101
|
-
|
|
|
102
|
-
| Disable YOLO Mode
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
104
|
+
| UI Label | Setting | Description | Default |
|
|
105
|
+
| ------------------------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------- | ------- |
|
|
106
|
+
| Disable YOLO Mode | `security.disableYoloMode` | Disable YOLO mode, even if enabled by a flag. | `false` |
|
|
107
|
+
| Allow Permanent Tool Approval | `security.enablePermanentToolApproval` | Enable the "Allow for all future sessions" option in tool confirmation dialogs. | `false` |
|
|
108
|
+
| Blocks extensions from Git | `security.blockGitExtensions` | Blocks installing and loading extensions from Git. | `false` |
|
|
109
|
+
| Folder Trust | `security.folderTrust.enabled` | Setting to track whether Folder trust is enabled. | `false` |
|
|
110
|
+
| Enable Environment Variable Redaction | `security.environmentVariableRedaction.enabled` | Enable redaction of environment variables that may contain secrets. | `false` |
|
|
107
111
|
|
|
108
112
|
### Experimental
|
|
109
113
|
|
|
110
|
-
| UI Label | Setting | Description
|
|
111
|
-
| ----------------------------------- | ------------------------------------------------------- |
|
|
112
|
-
|
|
|
113
|
-
| Codebase Investigator
|
|
114
|
-
|
|
|
114
|
+
| UI Label | Setting | Description | Default |
|
|
115
|
+
| ----------------------------------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------- |
|
|
116
|
+
| Agent Skills | `experimental.skills` | Enable Agent Skills (experimental). | `false` |
|
|
117
|
+
| Enable Codebase Investigator | `experimental.codebaseInvestigatorSettings.enabled` | Enable the Codebase Investigator agent. | `true` |
|
|
118
|
+
| Codebase Investigator Max Num Turns | `experimental.codebaseInvestigatorSettings.maxNumTurns` | Maximum number of turns for the Codebase Investigator agent. | `10` |
|
|
119
|
+
| Use OSC 52 Paste | `experimental.useOSC52Paste` | Use OSC 52 sequence for pasting instead of clipboardy (useful for remote sessions). | `false` |
|
|
120
|
+
| Enable CLI Help Agent | `experimental.cliHelpAgentSettings.enabled` | Enable the CLI Help Agent. | `true` |
|
|
121
|
+
|
|
122
|
+
### Hooks
|
|
123
|
+
|
|
124
|
+
| UI Label | Setting | Description | Default |
|
|
125
|
+
| ------------------ | --------------------- | ------------------------------------------------ | ------- |
|
|
126
|
+
| Hook Notifications | `hooks.notifications` | Show visual indicators when hooks are executing. | `true` |
|
|
127
|
+
|
|
128
|
+
<!-- SETTINGS-AUTOGEN:END -->
|
|
@@ -258,8 +258,9 @@ The Gemini CLI ships with a set of default policies to provide a safe
|
|
|
258
258
|
out-of-the-box experience.
|
|
259
259
|
|
|
260
260
|
- **Read-only tools** (like `read_file`, `glob`) are generally **allowed**.
|
|
261
|
-
- **Agent delegation** (like `delegate_to_agent`)
|
|
262
|
-
|
|
261
|
+
- **Agent delegation** (like `delegate_to_agent`) defaults to **`ask_user`** to
|
|
262
|
+
ensure remote agents can prompt for confirmation, but local sub-agent actions
|
|
263
|
+
are executed silently and checked individually.
|
|
263
264
|
- **Write tools** (like `write_file`, `run_shell_command`) default to
|
|
264
265
|
**`ask_user`**.
|
|
265
266
|
- In **`yolo`** mode, a high-priority rule allows all tools.
|
|
@@ -165,7 +165,7 @@ The file has the following structure:
|
|
|
165
165
|
- `version`: The version of the extension.
|
|
166
166
|
- `mcpServers`: A map of MCP servers to settings. The key is the name of the
|
|
167
167
|
server, and the value is the server configuration. These servers will be
|
|
168
|
-
loaded on startup just like MCP servers
|
|
168
|
+
loaded on startup just like MCP servers settings in a
|
|
169
169
|
[`settings.json` file](../get-started/configuration.md). If both an extension
|
|
170
170
|
and a `settings.json` file settings an MCP server with the same name, the
|
|
171
171
|
server defined in the `settings.json` file takes precedence.
|
|
@@ -226,13 +226,13 @@ key. The value will be saved to a `.env` file in the extension's directory
|
|
|
226
226
|
You can view a list of an extension's settings by running:
|
|
227
227
|
|
|
228
228
|
```
|
|
229
|
-
gemini extensions
|
|
229
|
+
gemini extensions list
|
|
230
230
|
```
|
|
231
231
|
|
|
232
232
|
and you can update a given setting using:
|
|
233
233
|
|
|
234
234
|
```
|
|
235
|
-
gemini extensions
|
|
235
|
+
gemini extensions config <extension name> [setting name] [--scope <scope>]
|
|
236
236
|
```
|
|
237
237
|
|
|
238
238
|
- `--scope`: The scope to set the setting in (`user` or `workspace`). This is
|
|
@@ -263,6 +263,54 @@ Would provide these commands:
|
|
|
263
263
|
- `/deploy` - Shows as `[gcp] Custom command from deploy.toml` in help
|
|
264
264
|
- `/gcs:sync` - Shows as `[gcp] Custom command from sync.toml` in help
|
|
265
265
|
|
|
266
|
+
### Hooks
|
|
267
|
+
|
|
268
|
+
Extensions can provide [hooks](../hooks/index.md) to intercept and customize
|
|
269
|
+
Gemini CLI behavior at specific lifecycle events. Hooks provided by an extension
|
|
270
|
+
must be defined in a `hooks/hooks.json` file within the extension directory.
|
|
271
|
+
|
|
272
|
+
> [!IMPORTANT] Hooks are not defined directly in `gemini-extension.json`. The
|
|
273
|
+
> CLI specifically looks for the `hooks/hooks.json` file.
|
|
274
|
+
|
|
275
|
+
#### Directory structure
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
.gemini/extensions/my-extension/
|
|
279
|
+
├── gemini-extension.json
|
|
280
|
+
└── hooks/
|
|
281
|
+
└── hooks.json
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
#### `hooks/hooks.json` format
|
|
285
|
+
|
|
286
|
+
The `hooks.json` file contains a `hooks` object where keys are
|
|
287
|
+
[event names](../hooks/reference.md#supported-events) and values are arrays of
|
|
288
|
+
[hook definitions](../hooks/reference.md#hook-definition).
|
|
289
|
+
|
|
290
|
+
```json
|
|
291
|
+
{
|
|
292
|
+
"hooks": {
|
|
293
|
+
"before_agent": [
|
|
294
|
+
{
|
|
295
|
+
"hooks": [
|
|
296
|
+
{
|
|
297
|
+
"type": "command",
|
|
298
|
+
"command": "node ${extensionPath}/scripts/setup.js",
|
|
299
|
+
"name": "Extension Setup"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
#### Supported variables
|
|
309
|
+
|
|
310
|
+
Just like `gemini-extension.json`, the `hooks/hooks.json` file supports
|
|
311
|
+
[variable substitution](#variables). This is particularly useful for referencing
|
|
312
|
+
scripts within the extension directory using `${extensionPath}`.
|
|
313
|
+
|
|
266
314
|
### Conflict resolution
|
|
267
315
|
|
|
268
316
|
Extension commands have the lowest precedence. When a conflict occurs with user
|
|
@@ -278,11 +326,12 @@ For example, if both a user and the `gcp` extension define a `deploy` command:
|
|
|
278
326
|
- `/gcp.deploy` - Executes the extension's deploy command (marked with `[gcp]`
|
|
279
327
|
tag)
|
|
280
328
|
|
|
281
|
-
|
|
329
|
+
### Variables
|
|
282
330
|
|
|
283
|
-
Gemini CLI extensions allow variable substitution in
|
|
284
|
-
This can be useful if e.g., you
|
|
285
|
-
|
|
331
|
+
Gemini CLI extensions allow variable substitution in both
|
|
332
|
+
`gemini-extension.json` and `hooks/hooks.json`. This can be useful if e.g., you
|
|
333
|
+
need the current directory to run an MCP server or hook script using
|
|
334
|
+
`"cwd": "${extensionPath}${/}run.ts"`.
|
|
286
335
|
|
|
287
336
|
**Supported variables:**
|
|
288
337
|
|
|
@@ -291,3 +340,4 @@ using `"cwd": "${extensionPath}${/}run.ts"`.
|
|
|
291
340
|
| `${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. |
|
|
292
341
|
| `${workspacePath}` | The fully-qualified path of the current workspace. |
|
|
293
342
|
| `${/} or ${pathSeparator}` | The path separator (differs per OS). |
|
|
343
|
+
| `${process.execPath}` | The path to the Node.js binary executing the CLI. |
|
|
@@ -159,7 +159,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
159
159
|
#### `output`
|
|
160
160
|
|
|
161
161
|
- **`output.format`** (enum):
|
|
162
|
-
- **Description:** The format of the CLI output.
|
|
162
|
+
- **Description:** The format of the CLI output. Can be `text` or `json`.
|
|
163
163
|
- **Default:** `"text"`
|
|
164
164
|
- **Values:** `"text"`, `"json"`
|
|
165
165
|
|
|
@@ -184,6 +184,12 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
184
184
|
title
|
|
185
185
|
- **Default:** `false`
|
|
186
186
|
|
|
187
|
+
- **`ui.showHomeDirectoryWarning`** (boolean):
|
|
188
|
+
- **Description:** Show a warning when running Gemini CLI in the home
|
|
189
|
+
directory.
|
|
190
|
+
- **Default:** `true`
|
|
191
|
+
- **Requires restart:** Yes
|
|
192
|
+
|
|
187
193
|
- **`ui.hideTips`** (boolean):
|
|
188
194
|
- **Description:** Hide helpful tips in the UI
|
|
189
195
|
- **Default:** `false`
|
|
@@ -269,7 +275,7 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
269
275
|
#### `ide`
|
|
270
276
|
|
|
271
277
|
- **`ide.enabled`** (boolean):
|
|
272
|
-
- **Description:** Enable IDE integration mode
|
|
278
|
+
- **Description:** Enable IDE integration mode.
|
|
273
279
|
- **Default:** `false`
|
|
274
280
|
- **Requires restart:** Yes
|
|
275
281
|
|
|
@@ -573,12 +579,12 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
573
579
|
- **Default:** `false`
|
|
574
580
|
|
|
575
581
|
- **`context.fileFiltering.respectGitIgnore`** (boolean):
|
|
576
|
-
- **Description:** Respect .gitignore files when searching
|
|
582
|
+
- **Description:** Respect .gitignore files when searching.
|
|
577
583
|
- **Default:** `true`
|
|
578
584
|
- **Requires restart:** Yes
|
|
579
585
|
|
|
580
586
|
- **`context.fileFiltering.respectGeminiIgnore`** (boolean):
|
|
581
|
-
- **Description:** Respect .geminiignore files when searching
|
|
587
|
+
- **Description:** Respect .geminiignore files when searching.
|
|
582
588
|
- **Default:** `true`
|
|
583
589
|
- **Requires restart:** Yes
|
|
584
590
|
|
|
@@ -851,9 +857,9 @@ their corresponding top-level category object in your `settings.json` file.
|
|
|
851
857
|
(useful for remote sessions).
|
|
852
858
|
- **Default:** `false`
|
|
853
859
|
|
|
854
|
-
- **`experimental.
|
|
855
|
-
- **Description:** Enable the
|
|
856
|
-
- **Default:** `
|
|
860
|
+
- **`experimental.cliHelpAgentSettings.enabled`** (boolean):
|
|
861
|
+
- **Description:** Enable the CLI Help Agent.
|
|
862
|
+
- **Default:** `true`
|
|
857
863
|
- **Requires restart:** Yes
|
|
858
864
|
|
|
859
865
|
#### `skills`
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
# Gemini 3 Pro and Gemini 3 Flash on Gemini CLI
|
|
2
2
|
|
|
3
|
-
Gemini 3 Pro and Gemini 3 Flash are
|
|
4
|
-
paid customers of Gemini CLI will have access to both Gemini 3 Pro and Gemini 3
|
|
5
|
-
Flash, including the following subscribers:
|
|
6
|
-
|
|
7
|
-
- Google AI Pro and Google AI Ultra (excluding business customers).
|
|
8
|
-
- Gemini Code Assist Standard and Enterprise (requires
|
|
9
|
-
[administrative enablement](#administrator-instructions)).
|
|
10
|
-
- Paid Gemini API and Vertex API key holders.
|
|
11
|
-
|
|
12
|
-
For free tier users:
|
|
13
|
-
|
|
14
|
-
- If you signed up for the waitlist, please check your email for details. We’ve
|
|
15
|
-
onboarded everyone who signed up to the previously available waitlist.
|
|
16
|
-
- If you were not on our waitlist, we’re rolling out additional access gradually
|
|
17
|
-
to ensure the experience remains fast and reliable. Stay tuned for more
|
|
18
|
-
details.
|
|
3
|
+
Gemini 3 Pro and Gemini 3 Flash are available on Gemini CLI for all users!
|
|
19
4
|
|
|
20
5
|
## How to get started with Gemini 3 on Gemini CLI
|
|
21
6
|
|
|
22
|
-
Get started by upgrading Gemini CLI to the latest version
|
|
7
|
+
Get started by upgrading Gemini CLI to the latest version:
|
|
23
8
|
|
|
24
9
|
```bash
|
|
25
10
|
npm install -g @google/gemini-cli@latest
|
|
@@ -852,5 +852,5 @@ console.log(JSON.stringify(sanitizeOutput(hookOutput)));
|
|
|
852
852
|
|
|
853
853
|
- [Hooks Reference](index.md) - Complete API reference
|
|
854
854
|
- [Writing Hooks](writing-hooks.md) - Tutorial and examples
|
|
855
|
-
- [Configuration](../
|
|
855
|
+
- [Configuration](../get-started/configuration.md) - Gemini CLI settings
|
|
856
856
|
- [Hooks Design Document](../hooks-design.md) - Technical architecture
|
package/dist/docs/hooks/index.md
CHANGED
|
@@ -4,6 +4,19 @@ Hooks are scripts or programs that Gemini CLI executes at specific points in the
|
|
|
4
4
|
agentic loop, allowing you to intercept and customize behavior without modifying
|
|
5
5
|
the CLI's source code.
|
|
6
6
|
|
|
7
|
+
> **Note: Hooks are currently an experimental feature.**
|
|
8
|
+
>
|
|
9
|
+
> To use hooks, you must explicitly enable them in your `settings.json`:
|
|
10
|
+
>
|
|
11
|
+
> ```json
|
|
12
|
+
> {
|
|
13
|
+
> "tools": { "enableHooks": true },
|
|
14
|
+
> "hooks": { "enabled": true }
|
|
15
|
+
> }
|
|
16
|
+
> ```
|
|
17
|
+
>
|
|
18
|
+
> Both of these are needed in this experimental phase.
|
|
19
|
+
|
|
7
20
|
See [writing hooks guide](writing-hooks.md) for a tutorial on creating your
|
|
8
21
|
first hook and a comprehensive example.
|
|
9
22
|
|
|
@@ -29,10 +42,10 @@ Gemini CLI waits for all matching hooks to complete before continuing.
|
|
|
29
42
|
|
|
30
43
|
## Security and Risks
|
|
31
44
|
|
|
32
|
-
>
|
|
33
|
-
|
|
34
|
-
By configuring hooks, you are explicitly allowing Gemini CLI to run shell
|
|
35
|
-
commands on your machine. Malicious or poorly configured hooks can:
|
|
45
|
+
> **Warning: Hooks execute arbitrary code with your user privileges.**
|
|
46
|
+
>
|
|
47
|
+
> By configuring hooks, you are explicitly allowing Gemini CLI to run shell
|
|
48
|
+
> commands on your machine. Malicious or poorly configured hooks can:
|
|
36
49
|
|
|
37
50
|
- **Exfiltrate data**: Read sensitive files (`.env`, ssh keys) and send them to
|
|
38
51
|
remote servers.
|
|
@@ -46,6 +59,11 @@ project hook (identified by its name and command), but it is **your
|
|
|
46
59
|
responsibility** to review these hooks (and any installed extensions) before
|
|
47
60
|
trusting them.
|
|
48
61
|
|
|
62
|
+
> **Note:** Extension hooks are subject to a mandatory security warning and
|
|
63
|
+
> consent flow during extension installation or update if hooks are detected.
|
|
64
|
+
> You must explicitly approve the installation or update of any extension that
|
|
65
|
+
> contains hooks.
|
|
66
|
+
|
|
49
67
|
See [Security Considerations](best-practices.md#using-hooks-securely) for a
|
|
50
68
|
detailed threat model and mitigation strategies.
|
|
51
69
|
|
|
@@ -444,7 +462,8 @@ numbers run first):
|
|
|
444
462
|
2. **User settings:** `~/.gemini/settings.json`
|
|
445
463
|
3. **System settings:** `/etc/gemini-cli/settings.json`
|
|
446
464
|
4. **Extensions:** Internal hooks defined by installed extensions (lowest
|
|
447
|
-
priority)
|
|
465
|
+
priority). See [Extensions documentation](../extensions/index.md#hooks) for
|
|
466
|
+
details on how extensions define and configure hooks.
|
|
448
467
|
|
|
449
468
|
#### Deduplication and shadowing
|
|
450
469
|
|
|
@@ -514,14 +533,29 @@ Use the `/hooks panel` command to view all registered hooks:
|
|
|
514
533
|
|
|
515
534
|
This command displays:
|
|
516
535
|
|
|
517
|
-
- All
|
|
536
|
+
- All configured hooks organized by event
|
|
518
537
|
- Hook source (user, project, system)
|
|
519
538
|
- Hook type (command or plugin)
|
|
520
|
-
-
|
|
539
|
+
- Individual hook status (enabled/disabled)
|
|
540
|
+
|
|
541
|
+
### Enable and disable all hooks at once
|
|
542
|
+
|
|
543
|
+
You can enable or disable all hooks at once using commands:
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
/hooks enable-all
|
|
547
|
+
/hooks disable-all
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
These commands provide a shortcut to enable or disable all configured hooks
|
|
551
|
+
without managing them individually. The `enable-all` command removes all hooks
|
|
552
|
+
from the `hooks.disabled` array, while `disable-all` adds all configured hooks
|
|
553
|
+
to the disabled list. Changes take effect immediately without requiring a
|
|
554
|
+
restart.
|
|
521
555
|
|
|
522
|
-
### Enable and disable hooks
|
|
556
|
+
### Enable and disable individual hooks
|
|
523
557
|
|
|
524
|
-
You can
|
|
558
|
+
You can enable or disable individual hooks using commands:
|
|
525
559
|
|
|
526
560
|
```bash
|
|
527
561
|
/hooks enable hook-name
|
|
@@ -530,7 +564,8 @@ You can temporarily enable or disable individual hooks using commands:
|
|
|
530
564
|
|
|
531
565
|
These commands allow you to control hook execution without editing configuration
|
|
532
566
|
files. The hook name should match the `name` field in your hook configuration.
|
|
533
|
-
Changes made via these commands are persisted to your
|
|
567
|
+
Changes made via these commands are persisted to your settings. The settings are
|
|
568
|
+
saved to workspace scope if available, otherwise to your global user settings
|
|
534
569
|
(`~/.gemini/settings.json`).
|
|
535
570
|
|
|
536
571
|
### Disabled hooks configuration
|
|
@@ -683,5 +718,6 @@ matchers:
|
|
|
683
718
|
- [Best Practices](best-practices.md) - Security, performance, and debugging
|
|
684
719
|
- [Custom Commands](../cli/custom-commands.md) - Create reusable prompt
|
|
685
720
|
shortcuts
|
|
686
|
-
- [Configuration](../
|
|
721
|
+
- [Configuration](../get-started/configuration.md) - Gemini CLI configuration
|
|
722
|
+
options
|
|
687
723
|
- [Hooks Design Document](../hooks-design.md) - Technical architecture details
|
|
@@ -46,6 +46,16 @@ specific event.
|
|
|
46
46
|
- `tool_input`: (`object`) The arguments passed to the tool.
|
|
47
47
|
- `tool_response`: (`object`, **AfterTool only**) The raw output from the tool
|
|
48
48
|
execution.
|
|
49
|
+
- `mcp_context`: (`object`, **optional**) Present only for MCP tool invocations.
|
|
50
|
+
Contains server identity information:
|
|
51
|
+
- `server_name`: (`string`) The configured name of the MCP server.
|
|
52
|
+
- `tool_name`: (`string`) The original tool name from the MCP server.
|
|
53
|
+
- `command`: (`string`, optional) For stdio transport, the command used to
|
|
54
|
+
start the server.
|
|
55
|
+
- `args`: (`string[]`, optional) For stdio transport, the command arguments.
|
|
56
|
+
- `cwd`: (`string`, optional) For stdio transport, the working directory.
|
|
57
|
+
- `url`: (`string`, optional) For SSE/HTTP transport, the server URL.
|
|
58
|
+
- `tcp`: (`string`, optional) For WebSocket transport, the TCP address.
|
|
49
59
|
|
|
50
60
|
#### Agent Events (`BeforeAgent`, `AfterAgent`)
|
|
51
61
|
|
|
@@ -84,15 +94,15 @@ If the hook exits with `0`, the CLI attempts to parse `stdout` as JSON.
|
|
|
84
94
|
|
|
85
95
|
### Common Output Fields
|
|
86
96
|
|
|
87
|
-
| Field | Type | Description
|
|
88
|
-
| :------------------- | :-------- |
|
|
89
|
-
| `decision` | `string` | One of: `allow`, `deny`, `block`, `ask`, `approve`.
|
|
90
|
-
| `reason` | `string` | Explanation shown to the **agent** when a decision is `deny` or `block`.
|
|
91
|
-
| `systemMessage` | `string` | Message displayed to the **user**
|
|
92
|
-
| `continue` | `boolean` | If `false`, immediately terminates the agent loop for this turn.
|
|
93
|
-
| `stopReason` | `string` | Message shown to the user when `continue` is `false`.
|
|
94
|
-
| `suppressOutput` | `boolean` | If `true`, the hook execution is hidden from the CLI transcript.
|
|
95
|
-
| `hookSpecificOutput` | `object` | Container for event-specific data (see below).
|
|
97
|
+
| Field | Type | Description |
|
|
98
|
+
| :------------------- | :-------- | :------------------------------------------------------------------------------------- |
|
|
99
|
+
| `decision` | `string` | One of: `allow`, `deny`, `block`, `ask`, `approve`. |
|
|
100
|
+
| `reason` | `string` | Explanation shown to the **agent** when a decision is `deny` or `block`. |
|
|
101
|
+
| `systemMessage` | `string` | Message displayed in Gemini CLI terminal to provide warning or context to the **user** |
|
|
102
|
+
| `continue` | `boolean` | If `false`, immediately terminates the agent loop for this turn. |
|
|
103
|
+
| `stopReason` | `string` | Message shown to the user when `continue` is `false`. |
|
|
104
|
+
| `suppressOutput` | `boolean` | If `true`, the hook execution is hidden from the CLI transcript. |
|
|
105
|
+
| `hookSpecificOutput` | `object` | Container for event-specific data (see below). |
|
|
96
106
|
|
|
97
107
|
### `hookSpecificOutput` Reference
|
|
98
108
|
|
|
@@ -1018,9 +1018,27 @@ const SECRET_PATTERNS = [
|
|
|
1018
1018
|
];
|
|
1019
1019
|
```
|
|
1020
1020
|
|
|
1021
|
+
## Packaging as an extension
|
|
1022
|
+
|
|
1023
|
+
While project-level hooks are great for specific repositories, you might want to
|
|
1024
|
+
share your hooks across multiple projects or with other users. You can do this
|
|
1025
|
+
by packaging your hooks as a [Gemini CLI extension](../extensions/index.md).
|
|
1026
|
+
|
|
1027
|
+
Packaging as an extension provides:
|
|
1028
|
+
|
|
1029
|
+
- **Easy distribution:** Share hooks via a git repository or GitHub release.
|
|
1030
|
+
- **Centralized management:** Install, update, and disable hooks using
|
|
1031
|
+
`gemini extensions` commands.
|
|
1032
|
+
- **Version control:** Manage hook versions separately from your project code.
|
|
1033
|
+
- **Variable substitution:** Use `${extensionPath}` and `${process.execPath}`
|
|
1034
|
+
for portable, cross-platform scripts.
|
|
1035
|
+
|
|
1036
|
+
To package hooks as an extension, follow the
|
|
1037
|
+
[extensions hook documentation](../extensions/index.md#hooks).
|
|
1038
|
+
|
|
1021
1039
|
## Learn more
|
|
1022
1040
|
|
|
1023
1041
|
- [Hooks Reference](index.md) - Complete API reference and configuration
|
|
1024
1042
|
- [Best Practices](best-practices.md) - Security, performance, and debugging
|
|
1025
|
-
- [Configuration](../
|
|
1043
|
+
- [Configuration](../get-started/configuration.md) - Gemini CLI settings
|
|
1026
1044
|
- [Custom Commands](../cli/custom-commands.md) - Create custom commands
|
|
@@ -43,9 +43,15 @@ topics on:
|
|
|
43
43
|
- **Cause:** You may be on a corporate network with a firewall that intercepts
|
|
44
44
|
and inspects SSL/TLS traffic. This often requires a custom root CA
|
|
45
45
|
certificate to be trusted by Node.js.
|
|
46
|
-
- **Solution:**
|
|
47
|
-
|
|
48
|
-
-
|
|
46
|
+
- **Solution:** First try setting `NODE_USE_SYSTEM_CA`; if that does not
|
|
47
|
+
resolve the issue, set `NODE_EXTRA_CA_CERTS`.
|
|
48
|
+
- Set the `NODE_USE_SYSTEM_CA=1` environment variable to tell Node.js to use
|
|
49
|
+
the operating system's native certificate store (where corporate
|
|
50
|
+
certificates are typically already installed).
|
|
51
|
+
- Example: `export NODE_USE_SYSTEM_CA=1`
|
|
52
|
+
- Set the `NODE_EXTRA_CA_CERTS` environment variable to the absolute path of
|
|
53
|
+
your corporate root CA certificate file.
|
|
54
|
+
- Example: `export NODE_EXTRA_CA_CERTS=/path/to/your/corporate-ca.crt`
|
|
49
55
|
|
|
50
56
|
## Common error messages and solutions
|
|
51
57
|
|
|
@@ -32,6 +32,10 @@ export declare class A2AClientManager {
|
|
|
32
32
|
* @returns The loaded AgentCard.
|
|
33
33
|
*/
|
|
34
34
|
loadAgent(name: string, agentCardUrl: string, authHandler?: AuthenticationHandler): Promise<AgentCard>;
|
|
35
|
+
/**
|
|
36
|
+
* Invalidates all cached clients and agent cards.
|
|
37
|
+
*/
|
|
38
|
+
clearCache(): void;
|
|
35
39
|
/**
|
|
36
40
|
* Sends a message to a loaded agent.
|
|
37
41
|
* @param agentName The name of the agent to send the message to.
|