@mmmbuto/gemini-cli-termux 0.30.3-termux → 0.30.5-termux
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 +42 -193
- package/bundle/docs/cli/settings.md +8 -9
- package/bundle/docs/extensions/reference.md +14 -38
- package/bundle/docs/hooks/reference.md +0 -8
- package/bundle/docs/reference/configuration.md +0 -8
- package/bundle/gemini.js +10730 -11704
- package/bundle/node_modules/@google/gemini-cli-devtools/package.json +1 -1
- package/bundle/package.json +2 -1
- package/package.json +67 -5
- package/packages/cli/dist/index.js +0 -0
- package/packages/cli/dist/package.json +2 -2
- package/packages/cli/dist/src/commands/extensions/examples/custom-commands/gemini-extension.json +2 -2
- package/packages/cli/dist/src/commands/extensions/examples/exclude-tools/gemini-extension.json +3 -3
- package/packages/cli/dist/src/commands/extensions/examples/hooks/gemini-extension.json +2 -2
- package/packages/cli/dist/src/commands/extensions/examples/hooks/hooks/hooks.json +11 -11
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/example.js +1 -1
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/gemini-extension.json +8 -8
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/package.json +9 -9
- package/packages/cli/dist/src/commands/extensions/examples/skills/gemini-extension.json +2 -2
- package/packages/cli/dist/src/commands/extensions/examples/themes-example/README.md +8 -5
- package/packages/cli/dist/src/commands/extensions/examples/themes-example/gemini-extension.json +27 -27
- package/packages/cli/dist/src/config/config.js +4 -65
- package/packages/cli/dist/src/config/config.js.map +1 -1
- package/packages/cli/dist/src/config/settingsSchema.d.ts +1 -235
- package/packages/cli/dist/src/config/settingsSchema.js +1 -235
- package/packages/cli/dist/src/config/settingsSchema.js.map +1 -1
- package/packages/cli/dist/src/gemini.js +0 -2
- package/packages/cli/dist/src/gemini.js.map +1 -1
- package/packages/cli/dist/src/generated/git-commit.d.ts +2 -2
- package/packages/cli/dist/src/generated/git-commit.js +2 -2
- package/packages/cli/dist/src/patches/empty-module.d.ts +2 -0
- package/packages/cli/dist/src/patches/empty-module.js +2 -0
- package/packages/cli/dist/src/patches/empty-module.js.map +1 -0
- package/packages/cli/dist/src/services/McpPromptLoader.js +3 -6
- package/packages/cli/dist/src/services/McpPromptLoader.js.map +1 -1
- package/packages/cli/dist/src/ui/components/AgentConfigDialog.js +19 -5
- package/packages/cli/dist/src/ui/components/AgentConfigDialog.js.map +1 -1
- package/packages/cli/dist/src/ui/components/AgentConfigDialog.test.js +41 -19
- package/packages/cli/dist/src/ui/components/AgentConfigDialog.test.js.map +1 -1
- package/packages/cli/dist/src/ui/components/DialogManager.d.ts +1 -1
- package/packages/cli/dist/src/ui/components/DialogManager.js +34 -7
- package/packages/cli/dist/src/ui/components/DialogManager.js.map +1 -1
- package/packages/cli/dist/src/ui/components/InputPrompt.d.ts +9 -0
- package/packages/cli/dist/src/ui/components/InputPrompt.js +350 -125
- package/packages/cli/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/packages/cli/dist/src/ui/components/InputPrompt.test.js +788 -35
- package/packages/cli/dist/src/ui/components/InputPrompt.test.js.map +1 -1
- package/packages/cli/dist/src/ui/components/messages/ShellToolMessage.js +2 -2
- package/packages/cli/dist/src/ui/components/messages/ShellToolMessage.js.map +1 -1
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessage.js +4 -77
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -51
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
- package/packages/cli/dist/src/ui/components/messages/ToolMessage.js +2 -2
- package/packages/cli/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/packages/cli/dist/src/ui/components/messages/ToolShared.d.ts +0 -1
- package/packages/cli/dist/src/ui/components/messages/ToolShared.js +2 -2
- package/packages/cli/dist/src/ui/components/messages/ToolShared.js.map +1 -1
- package/packages/cli/dist/src/ui/components/shared/BaseSettingsDialog.js +4 -1
- package/packages/cli/dist/src/ui/components/shared/BaseSettingsDialog.js.map +1 -1
- package/packages/cli/dist/src/ui/components/shared/BaseSettingsDialog.test.js +139 -40
- package/packages/cli/dist/src/ui/components/shared/BaseSettingsDialog.test.js.map +1 -1
- package/packages/cli/dist/src/ui/components/shared/TextInput.js +2 -1
- package/packages/cli/dist/src/ui/components/shared/TextInput.js.map +1 -1
- package/packages/cli/dist/src/ui/hooks/toolMapping.js +0 -1
- package/packages/cli/dist/src/ui/hooks/toolMapping.js.map +1 -1
- package/packages/cli/dist/src/ui/hooks/toolMapping.test.js +0 -13
- package/packages/cli/dist/src/ui/hooks/toolMapping.test.js.map +1 -1
- package/packages/cli/dist/src/ui/hooks/useToolScheduler.js +2 -18
- package/packages/cli/dist/src/ui/hooks/useToolScheduler.js.map +1 -1
- package/packages/cli/dist/src/ui/hooks/useToolScheduler.test.js +0 -44
- package/packages/cli/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/packages/cli/dist/src/ui/keyMatchers.test.js.map +1 -1
- package/packages/cli/dist/src/ui/types.d.ts +0 -1
- package/packages/cli/dist/src/ui/types.js.map +1 -1
- package/packages/cli/dist/src/ui/utils/commandUtils.js +4 -1
- package/packages/cli/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/packages/cli/dist/src/utils/activityLogger.js +23 -94
- package/packages/cli/dist/src/utils/activityLogger.js.map +1 -1
- package/packages/cli/dist/src/utils/handleAutoUpdate.d.ts +1 -1
- package/packages/cli/dist/src/utils/handleAutoUpdate.js +1 -1
- package/packages/cli/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/packages/cli/dist/src/utils/handleAutoUpdate.test.js +11 -11
- package/packages/cli/dist/src/utils/handleAutoUpdate.test.js.map +1 -1
- package/{bundle/sandbox-macos-restrictive-closed.sb → packages/cli/dist/src/utils/sandbox-macos-strict-open.sb} +42 -4
- package/packages/cli/dist/src/utils/{sandbox-macos-restrictive-closed.sb → sandbox-macos-strict-proxied.sb} +44 -4
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/docs/admin/enterprise-controls.md +115 -0
- package/packages/core/dist/docs/changelogs/index.md +57 -1
- package/packages/core/dist/docs/changelogs/latest.md +357 -314
- package/packages/core/dist/docs/changelogs/preview.md +288 -411
- package/packages/core/dist/docs/cli/checkpointing.md +2 -3
- package/packages/core/dist/docs/cli/cli-reference.md +42 -28
- package/packages/core/dist/docs/cli/custom-commands.md +3 -0
- package/packages/core/dist/docs/cli/enterprise.md +28 -8
- package/packages/core/dist/docs/cli/gemini-md.md +21 -13
- package/packages/core/dist/docs/cli/headless.md +34 -372
- package/packages/core/dist/docs/cli/model.md +1 -1
- package/packages/core/dist/docs/cli/plan-mode.md +245 -0
- package/packages/core/dist/docs/cli/rewind.md +11 -11
- package/packages/core/dist/docs/cli/sandbox.md +6 -5
- package/packages/core/dist/docs/cli/session-management.md +61 -44
- package/packages/core/dist/docs/cli/settings.md +64 -49
- package/packages/core/dist/docs/cli/skills.md +29 -7
- package/packages/core/dist/docs/cli/telemetry.md +41 -5
- package/packages/core/dist/docs/cli/themes.md +88 -54
- package/packages/core/dist/docs/cli/trusted-folders.md +31 -0
- package/packages/core/dist/docs/cli/tutorials/automation.md +187 -0
- package/packages/core/dist/docs/cli/tutorials/file-management.md +142 -0
- package/packages/core/dist/docs/cli/tutorials/mcp-setup.md +105 -0
- package/packages/core/dist/docs/cli/tutorials/memory-management.md +126 -0
- package/packages/core/dist/docs/cli/tutorials/session-management.md +105 -0
- package/packages/core/dist/docs/cli/tutorials/shell-commands.md +107 -0
- package/packages/core/dist/docs/cli/tutorials/skills-getting-started.md +36 -31
- package/packages/core/dist/docs/cli/tutorials/task-planning.md +93 -0
- package/packages/core/dist/docs/cli/tutorials/web-tools.md +78 -0
- package/packages/core/dist/docs/core/index.md +7 -7
- package/packages/core/dist/docs/core/subagents.md +40 -40
- package/packages/core/dist/docs/extensions/best-practices.md +102 -53
- package/packages/core/dist/docs/extensions/index.md +37 -21
- package/packages/core/dist/docs/extensions/reference.md +148 -219
- package/packages/core/dist/docs/extensions/releasing.md +93 -122
- package/packages/core/dist/docs/extensions/writing-extensions.md +87 -76
- package/packages/core/dist/docs/get-started/authentication.md +4 -4
- package/packages/core/dist/docs/get-started/examples.md +39 -119
- package/packages/core/dist/docs/get-started/gemini-3.md +17 -3
- package/packages/core/dist/docs/get-started/index.md +16 -5
- package/packages/core/dist/docs/get-started/installation.md +110 -77
- package/packages/core/dist/docs/hooks/best-practices.md +1 -1
- package/packages/core/dist/docs/hooks/reference.md +2 -2
- package/packages/core/dist/docs/index.md +142 -149
- package/packages/core/dist/docs/redirects.json +19 -0
- package/packages/core/dist/docs/reference/commands.md +523 -0
- package/{bundle/docs/get-started → packages/core/dist/docs/reference}/configuration.md +180 -71
- package/packages/core/dist/docs/{cli → reference}/keyboard-shortcuts.md +49 -35
- package/packages/core/dist/docs/{core → reference}/policy-engine.md +76 -32
- package/packages/core/dist/docs/releases.md +2 -2
- package/{bundle/docs → packages/core/dist/docs/resources}/faq.md +1 -1
- package/packages/core/dist/docs/{quota-and-pricing.md → resources/quota-and-pricing.md} +12 -5
- package/{bundle/docs → packages/core/dist/docs/resources}/tos-privacy.md +3 -3
- package/packages/core/dist/docs/{troubleshooting.md → resources/troubleshooting.md} +1 -1
- package/packages/core/dist/docs/sidebar.json +194 -113
- package/packages/core/dist/docs/tools/activate-skill.md +43 -0
- package/packages/core/dist/docs/tools/ask-user.md +95 -0
- package/packages/core/dist/docs/tools/file-system.md +55 -143
- package/packages/core/dist/docs/tools/index.md +97 -93
- package/packages/core/dist/docs/tools/internal-docs.md +46 -0
- package/packages/core/dist/docs/tools/mcp-server.md +65 -16
- package/packages/core/dist/docs/tools/memory.md +21 -40
- package/packages/core/dist/docs/tools/planning.md +57 -0
- package/packages/core/dist/docs/tools/shell.md +44 -88
- package/packages/core/dist/docs/tools/todos.md +22 -44
- package/packages/core/dist/docs/tools/web-fetch.md +22 -46
- package/packages/core/dist/docs/tools/web-search.md +19 -29
- package/packages/core/dist/src/code_assist/types.d.ts +14 -14
- package/packages/core/dist/src/config/config.d.ts +1 -13
- package/packages/core/dist/src/config/config.js +6 -39
- package/packages/core/dist/src/config/config.js.map +1 -1
- package/packages/core/dist/src/confirmation-bus/types.d.ts +0 -3
- package/packages/core/dist/src/confirmation-bus/types.js.map +1 -1
- package/packages/core/dist/src/core/coreToolHookTriggers.d.ts +1 -1
- package/packages/core/dist/src/core/coreToolHookTriggers.js +3 -8
- package/packages/core/dist/src/core/coreToolHookTriggers.js.map +1 -1
- package/packages/core/dist/src/generated/git-commit.d.ts +2 -2
- package/packages/core/dist/src/generated/git-commit.js +2 -2
- package/packages/core/dist/src/hooks/hookEventHandler.d.ts +2 -2
- package/packages/core/dist/src/hooks/hookEventHandler.js +2 -8
- package/packages/core/dist/src/hooks/hookEventHandler.js.map +1 -1
- package/packages/core/dist/src/hooks/hookSystem.d.ts +2 -2
- package/packages/core/dist/src/hooks/hookSystem.js +4 -4
- package/packages/core/dist/src/hooks/hookSystem.js.map +1 -1
- package/packages/core/dist/src/hooks/types.d.ts +0 -18
- package/packages/core/dist/src/hooks/types.js +0 -17
- package/packages/core/dist/src/hooks/types.js.map +1 -1
- package/packages/core/dist/src/ide/ide-client.js +1 -1
- package/packages/core/dist/src/ide/ide-client.js.map +1 -1
- package/packages/core/dist/src/ide/types.d.ts +8 -8
- package/packages/core/dist/src/index.d.ts +2 -0
- package/packages/core/dist/src/index.js +2 -0
- package/packages/core/dist/src/index.js.map +1 -1
- package/packages/core/dist/src/policy/policies/plan.toml +29 -43
- package/packages/core/dist/src/policy/policies/read-only.toml +12 -11
- package/packages/core/dist/src/policy/policies/write.toml +11 -10
- package/packages/core/dist/src/policy/policies/yolo.toml +24 -12
- package/packages/core/dist/src/policy/policy-engine.js +1 -5
- package/packages/core/dist/src/policy/policy-engine.js.map +1 -1
- package/packages/core/dist/src/policy/types.d.ts +1 -2
- package/packages/core/dist/src/policy/types.js +0 -1
- package/packages/core/dist/src/policy/types.js.map +1 -1
- package/packages/core/dist/src/safety/context-builder.d.ts +3 -3
- package/packages/core/dist/src/safety/context-builder.js +4 -60
- package/packages/core/dist/src/safety/context-builder.js.map +1 -1
- package/packages/core/dist/src/safety/context-builder.test.js +18 -98
- package/packages/core/dist/src/safety/context-builder.test.js.map +1 -1
- package/packages/core/dist/src/safety/protocol.d.ts +0 -4
- package/packages/core/dist/src/safety/registry.d.ts +1 -2
- package/packages/core/dist/src/safety/registry.js +4 -14
- package/packages/core/dist/src/safety/registry.js.map +1 -1
- package/packages/core/dist/src/safety/registry.test.js +2 -5
- package/packages/core/dist/src/safety/registry.test.js.map +1 -1
- package/packages/core/dist/src/scheduler/scheduler.d.ts +1 -1
- package/packages/core/dist/src/scheduler/scheduler.js +4 -49
- package/packages/core/dist/src/scheduler/scheduler.js.map +1 -1
- package/packages/core/dist/src/scheduler/scheduler.test.js +0 -91
- package/packages/core/dist/src/scheduler/scheduler.test.js.map +1 -1
- package/packages/core/dist/src/scheduler/state-manager.d.ts +0 -6
- package/packages/core/dist/src/scheduler/state-manager.js +0 -12
- package/packages/core/dist/src/scheduler/state-manager.js.map +1 -1
- package/packages/core/dist/src/scheduler/tool-executor.js +7 -9
- package/packages/core/dist/src/scheduler/tool-executor.js.map +1 -1
- package/packages/core/dist/src/scheduler/tool-executor.test.js +1 -1
- package/packages/core/dist/src/scheduler/tool-executor.test.js.map +1 -1
- package/packages/core/dist/src/scheduler/types.d.ts +0 -13
- package/packages/core/dist/src/services/shellExecutionService.d.ts +1 -1
- package/packages/core/dist/src/services/shellExecutionService.js +7 -8
- package/packages/core/dist/src/services/shellExecutionService.js.map +1 -1
- package/packages/core/dist/src/services/shellExecutionService.test.js +5 -5
- package/packages/core/dist/src/services/shellExecutionService.test.js.map +1 -1
- package/packages/core/dist/src/services/test-data/resolved-aliases-retry.golden.json +251 -251
- package/packages/core/dist/src/services/test-data/resolved-aliases.golden.json +251 -251
- package/packages/core/dist/src/skills/builtin/skill-creator/scripts/init_skill.cjs +5 -1
- package/packages/core/dist/src/skills/builtin/skill-creator/scripts/package_skill.cjs +5 -1
- package/packages/core/dist/src/skills/builtin/skill-creator/scripts/validate_skill.cjs +5 -1
- package/packages/core/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +1 -3
- package/packages/core/dist/src/telemetry/clearcut-logger/clearcut-logger.js +0 -2
- package/packages/core/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
- package/packages/core/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +1 -9
- package/packages/core/dist/src/telemetry/clearcut-logger/event-metadata-key.js +1 -19
- package/packages/core/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
- package/packages/core/dist/src/telemetry/index.d.ts +1 -2
- package/packages/core/dist/src/telemetry/index.js +1 -2
- package/packages/core/dist/src/telemetry/index.js.map +1 -1
- package/packages/core/dist/src/telemetry/loggers.js +0 -4
- package/packages/core/dist/src/telemetry/loggers.js.map +1 -1
- package/packages/core/dist/src/telemetry/trace.js.map +1 -1
- package/packages/core/dist/src/telemetry/types.d.ts +0 -26
- package/packages/core/dist/src/telemetry/types.js +2 -76
- package/packages/core/dist/src/telemetry/types.js.map +1 -1
- package/packages/core/dist/src/tools/diffOptions.d.ts +2 -2
- package/packages/core/dist/src/tools/diffOptions.js.map +1 -1
- package/packages/core/dist/src/tools/mcp-client.test.js.map +1 -1
- package/packages/core/dist/src/tools/mcp-tool.d.ts +1 -3
- package/packages/core/dist/src/tools/mcp-tool.js +2 -9
- package/packages/core/dist/src/tools/mcp-tool.js.map +1 -1
- package/packages/core/dist/src/tools/memoryTool.d.ts +0 -10
- package/packages/core/dist/src/tools/memoryTool.js +30 -25
- package/packages/core/dist/src/tools/memoryTool.js.map +1 -1
- package/packages/core/dist/src/tools/tool-names.d.ts +6 -0
- package/packages/core/dist/src/tools/tool-names.js +16 -1
- package/packages/core/dist/src/tools/tool-names.js.map +1 -1
- package/packages/core/dist/src/tools/tools.d.ts +0 -11
- package/packages/core/dist/src/tools/tools.js.map +1 -1
- package/packages/core/dist/src/utils/getPty.d.ts +14 -1
- package/packages/core/dist/src/utils/getPty.js +67 -2
- package/packages/core/dist/src/utils/getPty.js.map +1 -1
- package/packages/core/dist/src/utils/memoryDiscovery.d.ts +11 -3
- package/packages/core/dist/src/utils/memoryDiscovery.js +56 -21
- package/packages/core/dist/src/utils/memoryDiscovery.js.map +1 -1
- package/packages/core/dist/src/utils/secure-browser-launcher.js +40 -29
- package/packages/core/dist/src/utils/secure-browser-launcher.js.map +1 -1
- package/packages/core/dist/src/utils/textUtils.d.ts +0 -9
- package/packages/core/dist/src/utils/textUtils.js +0 -15
- package/packages/core/dist/src/utils/textUtils.js.map +1 -1
- package/packages/core/dist/src/utils/textUtils.test.js +1 -42
- package/packages/core/dist/src/utils/textUtils.test.js.map +1 -1
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/test-utils/dist/tsconfig.tsbuildinfo +1 -1
- package/bundle/docs/ROADMAP.md +0 -113
- package/bundle/docs/TERMUX.md +0 -95
- package/bundle/docs/architecture.md +0 -80
- package/bundle/docs/assets/hero.png +0 -0
- package/bundle/docs/cli/authentication.md +0 -3
- package/bundle/docs/cli/commands.md +0 -430
- package/bundle/docs/cli/context-memory.md +0 -69
- package/bundle/docs/cli/index.md +0 -65
- package/bundle/docs/cli/keyboard-shortcuts.md +0 -140
- package/bundle/docs/cli/tutorials.md +0 -87
- package/bundle/docs/core/policy-engine.md +0 -305
- package/bundle/docs/get-started/configuration-v1.md +0 -888
- package/bundle/docs/patches/README.md +0 -74
- package/bundle/docs/patches/mcp-sdk-typings-shim.md +0 -27
- package/bundle/docs/quota-and-pricing.md +0 -158
- package/bundle/docs/termux-api/COMMANDS.md +0 -592
- package/bundle/docs/termux-api/DISCOVERY_SETUP.md +0 -670
- package/bundle/docs/termux-api/EXECUTION_PLAN.md +0 -532
- package/bundle/docs/termux-api/MERGE_STRATEGY.md +0 -365
- package/bundle/docs/termux-api/PATCHES.md +0 -480
- package/bundle/docs/termux-api/README.md +0 -416
- package/bundle/docs/troubleshooting.md +0 -173
- package/bundle/policies/conseca.toml +0 -6
- package/bundle/sandbox-macos-permissive-closed.sb +0 -32
- package/packages/cli/README.md +0 -173
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/example.d.ts +0 -6
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/example.js.map +0 -1
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/example.test.d.ts +0 -6
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/example.test.js +0 -111
- package/packages/cli/dist/src/commands/extensions/examples/mcp-server/example.test.js.map +0 -1
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessageOverflow.test.d.ts +0 -6
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessageOverflow.test.js +0 -93
- package/packages/cli/dist/src/ui/components/messages/ToolConfirmationMessageOverflow.test.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -42
- package/packages/cli/dist/src/ui/hooks/useReactToolScheduler.js +0 -105
- package/packages/cli/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useReactToolScheduler.test.d.ts +0 -6
- package/packages/cli/dist/src/ui/hooks/useReactToolScheduler.test.js +0 -58
- package/packages/cli/dist/src/ui/hooks/useReactToolScheduler.test.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
- package/packages/cli/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
- package/packages/cli/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
- package/packages/cli/dist/src/ui/hooks/useShowMemoryCommand.js +0 -59
- package/packages/cli/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useToolExecutionScheduler.d.ts +0 -30
- package/packages/cli/dist/src/ui/hooks/useToolExecutionScheduler.js +0 -149
- package/packages/cli/dist/src/ui/hooks/useToolExecutionScheduler.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useToolExecutionScheduler.test.d.ts +0 -6
- package/packages/cli/dist/src/ui/hooks/useToolExecutionScheduler.test.js +0 -376
- package/packages/cli/dist/src/ui/hooks/useToolExecutionScheduler.test.js.map +0 -1
- package/packages/cli/dist/src/ui/hooks/useToolSchedulerFacade.test.d.ts +0 -6
- package/packages/cli/dist/src/ui/hooks/useToolSchedulerFacade.test.js +0 -45
- package/packages/cli/dist/src/ui/hooks/useToolSchedulerFacade.test.js.map +0 -1
- package/packages/cli/dist/src/ui/utils/InlineMarkdownRenderer.test.d.ts +0 -6
- package/packages/cli/dist/src/ui/utils/InlineMarkdownRenderer.test.js +0 -21
- package/packages/cli/dist/src/ui/utils/InlineMarkdownRenderer.test.js.map +0 -1
- package/packages/cli/dist/src/ui/utils/terminalUtils.test.d.ts +0 -6
- package/packages/cli/dist/src/ui/utils/terminalUtils.test.js +0 -40
- package/packages/cli/dist/src/ui/utils/terminalUtils.test.js.map +0 -1
- package/packages/cli/dist/src/utils/checks.d.ts +0 -19
- package/packages/cli/dist/src/utils/checks.js +0 -24
- package/packages/cli/dist/src/utils/checks.js.map +0 -1
- package/packages/cli/dist/src/utils/checks.test.d.ts +0 -6
- package/packages/cli/dist/src/utils/checks.test.js +0 -29
- package/packages/cli/dist/src/utils/checks.test.js.map +0 -1
- package/packages/cli/dist/src/utils/sandbox-macos-permissive-closed.sb +0 -32
- package/packages/cli/index.js +0 -2
- package/packages/core/dist/docs/TERMUX.md +0 -95
- package/packages/core/dist/docs/architecture.md +0 -80
- package/packages/core/dist/docs/assets/hero.png +0 -0
- package/packages/core/dist/docs/cli/authentication.md +0 -3
- package/packages/core/dist/docs/cli/commands.md +0 -430
- package/packages/core/dist/docs/cli/context-memory.md +0 -69
- package/packages/core/dist/docs/cli/index.md +0 -65
- package/packages/core/dist/docs/cli/tutorials.md +0 -87
- package/packages/core/dist/docs/cli/uninstall.md +0 -65
- package/packages/core/dist/docs/core/memport.md +0 -246
- package/packages/core/dist/docs/core/tools-api.md +0 -131
- package/packages/core/dist/docs/faq.md +0 -154
- package/packages/core/dist/docs/get-started/configuration-v1.md +0 -888
- package/packages/core/dist/docs/get-started/configuration.md +0 -1585
- package/packages/core/dist/docs/patches/README.md +0 -74
- package/packages/core/dist/docs/patches/mcp-sdk-typings-shim.md +0 -27
- package/packages/core/dist/docs/termux-api/COMMANDS.md +0 -592
- package/packages/core/dist/docs/termux-api/DISCOVERY_SETUP.md +0 -670
- package/packages/core/dist/docs/termux-api/EXECUTION_PLAN.md +0 -532
- package/packages/core/dist/docs/termux-api/MERGE_STRATEGY.md +0 -365
- package/packages/core/dist/docs/termux-api/PATCHES.md +0 -480
- package/packages/core/dist/docs/termux-api/README.md +0 -416
- package/packages/core/dist/docs/tos-privacy.md +0 -96
- package/packages/core/dist/src/safety/conseca/conseca.d.ts +0 -31
- package/packages/core/dist/src/safety/conseca/conseca.js +0 -105
- package/packages/core/dist/src/safety/conseca/conseca.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/conseca.test.d.ts +0 -6
- package/packages/core/dist/src/safety/conseca/conseca.test.js +0 -226
- package/packages/core/dist/src/safety/conseca/conseca.test.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/integration.test.d.ts +0 -6
- package/packages/core/dist/src/safety/conseca/integration.test.js +0 -19
- package/packages/core/dist/src/safety/conseca/integration.test.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/policy-enforcer.d.ts +0 -13
- package/packages/core/dist/src/safety/conseca/policy-enforcer.js +0 -135
- package/packages/core/dist/src/safety/conseca/policy-enforcer.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/policy-enforcer.test.d.ts +0 -6
- package/packages/core/dist/src/safety/conseca/policy-enforcer.test.js +0 -141
- package/packages/core/dist/src/safety/conseca/policy-enforcer.test.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/policy-generator.d.ts +0 -15
- package/packages/core/dist/src/safety/conseca/policy-generator.js +0 -144
- package/packages/core/dist/src/safety/conseca/policy-generator.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/policy-generator.test.d.ts +0 -6
- package/packages/core/dist/src/safety/conseca/policy-generator.test.js +0 -84
- package/packages/core/dist/src/safety/conseca/policy-generator.test.js.map +0 -1
- package/packages/core/dist/src/safety/conseca/types.d.ts +0 -15
- package/packages/core/dist/src/safety/conseca/types.js +0 -7
- package/packages/core/dist/src/safety/conseca/types.js.map +0 -1
- package/packages/core/dist/src/telemetry/conseca-logger.d.ts +0 -9
- package/packages/core/dist/src/telemetry/conseca-logger.js +0 -91
- package/packages/core/dist/src/telemetry/conseca-logger.js.map +0 -1
- package/packages/core/dist/src/telemetry/conseca-logger.test.d.ts +0 -6
- package/packages/core/dist/src/telemetry/conseca-logger.test.js +0 -89
- package/packages/core/dist/src/telemetry/conseca-logger.test.js.map +0 -1
- package/packages/core/dist/src/tools/mcpImportTool.d.ts +0 -31
- package/packages/core/dist/src/tools/mcpImportTool.js +0 -143
- package/packages/core/dist/src/tools/mcpImportTool.js.map +0 -1
- package/packages/core/dist/src/utils/contextMemory.d.ts +0 -67
- package/packages/core/dist/src/utils/contextMemory.js +0 -493
- package/packages/core/dist/src/utils/contextMemory.js.map +0 -1
- package/packages/core/dist/src/utils/contextMemory.test.d.ts +0 -6
- package/packages/core/dist/src/utils/contextMemory.test.js +0 -183
- package/packages/core/dist/src/utils/contextMemory.test.js.map +0 -1
- /package/{bundle/docs/core → packages/core/dist/docs/reference}/memport.md +0 -0
- /package/{bundle/docs/core → packages/core/dist/docs/reference}/tools-api.md +0 -0
- /package/{bundle/docs/cli → packages/core/dist/docs/resources}/uninstall.md +0 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Web search and fetch
|
|
2
|
+
|
|
3
|
+
Access the live internet directly from your prompt. In this guide, you'll learn
|
|
4
|
+
how to search for up-to-date documentation, fetch deep context from specific
|
|
5
|
+
URLs, and apply that knowledge to your code.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Gemini CLI installed and authenticated.
|
|
10
|
+
- An internet connection.
|
|
11
|
+
|
|
12
|
+
## How to research new technologies
|
|
13
|
+
|
|
14
|
+
Imagine you want to use a library released yesterday. The model doesn't know
|
|
15
|
+
about it yet. You need to teach it.
|
|
16
|
+
|
|
17
|
+
### Scenario: Find documentation
|
|
18
|
+
|
|
19
|
+
**Prompt:**
|
|
20
|
+
`Search for the 'Bun 1.0' release notes and summarize the key changes.`
|
|
21
|
+
|
|
22
|
+
Gemini uses the `google_web_search` tool to find relevant pages and synthesizes
|
|
23
|
+
an answer. This "grounding" process ensures the agent isn't hallucinating
|
|
24
|
+
features that don't exist.
|
|
25
|
+
|
|
26
|
+
**Prompt:** `Find the documentation for the 'React Router v7' loader API.`
|
|
27
|
+
|
|
28
|
+
## How to fetch deep context
|
|
29
|
+
|
|
30
|
+
Search gives you a summary, but sometimes you need the raw details. The
|
|
31
|
+
`web_fetch` tool lets you feed a specific URL directly into the agent's context.
|
|
32
|
+
|
|
33
|
+
### Scenario: Reading a blog post
|
|
34
|
+
|
|
35
|
+
You found a blog post with the exact solution to your bug.
|
|
36
|
+
|
|
37
|
+
**Prompt:**
|
|
38
|
+
`Read https://example.com/fixing-memory-leaks and explain how to apply it to my code.`
|
|
39
|
+
|
|
40
|
+
Gemini will retrieve the page content (stripping away ads and navigation) and
|
|
41
|
+
use it to answer your question.
|
|
42
|
+
|
|
43
|
+
### Scenario: Comparing sources
|
|
44
|
+
|
|
45
|
+
You can even fetch multiple pages to compare approaches.
|
|
46
|
+
|
|
47
|
+
**Prompt:**
|
|
48
|
+
`Compare the pagination patterns in https://api.example.com/v1/docs and https://api.example.com/v2/docs.`
|
|
49
|
+
|
|
50
|
+
## How to apply knowledge to code
|
|
51
|
+
|
|
52
|
+
The real power comes when you combine web tools with file editing.
|
|
53
|
+
|
|
54
|
+
**Workflow:**
|
|
55
|
+
|
|
56
|
+
1. **Search:** "How do I implement auth with Supabase?"
|
|
57
|
+
2. **Fetch:** "Read this guide: https://supabase.com/docs/guides/auth."
|
|
58
|
+
3. **Implement:** "Great. Now use that pattern to create an `auth.ts` file in
|
|
59
|
+
my project."
|
|
60
|
+
|
|
61
|
+
## How to troubleshoot errors
|
|
62
|
+
|
|
63
|
+
When you hit an obscure error message, paste it into the chat.
|
|
64
|
+
|
|
65
|
+
**Prompt:**
|
|
66
|
+
`I'm getting 'Error: hydration mismatch' in Next.js. Search for recent solutions.`
|
|
67
|
+
|
|
68
|
+
The agent will search sources such as GitHub issues, StackOverflow, and forums
|
|
69
|
+
to find relevant fixes that might be too new to be in its base training set.
|
|
70
|
+
|
|
71
|
+
## Next steps
|
|
72
|
+
|
|
73
|
+
- Explore [File management](file-management.md) to see how to apply the code you
|
|
74
|
+
generate.
|
|
75
|
+
- See the [Web search tool reference](../../tools/web-search.md) for citation
|
|
76
|
+
details.
|
|
77
|
+
- See the [Web fetch tool reference](../../tools/web-fetch.md) for technical
|
|
78
|
+
limitations.
|
|
@@ -9,11 +9,11 @@ requests sent from `packages/cli`. For a general overview of Gemini CLI, see the
|
|
|
9
9
|
|
|
10
10
|
- **[Sub-agents (experimental)](./subagents.md):** Learn how to create and use
|
|
11
11
|
specialized sub-agents for complex tasks.
|
|
12
|
-
- **[Core tools API](
|
|
13
|
-
registered, and used by the core.
|
|
14
|
-
- **[Memory Import Processor](
|
|
15
|
-
GEMINI.md import feature using @file.md syntax.
|
|
16
|
-
- **[Policy Engine](
|
|
12
|
+
- **[Core tools API](../reference/tools-api.md):** Information on how tools are
|
|
13
|
+
defined, registered, and used by the core.
|
|
14
|
+
- **[Memory Import Processor](../reference/memport.md):** Documentation for the
|
|
15
|
+
modular GEMINI.md import feature using @file.md syntax.
|
|
16
|
+
- **[Policy Engine](../reference/policy-engine.md):** Use the Policy Engine for
|
|
17
17
|
fine-grained control over tool execution.
|
|
18
18
|
|
|
19
19
|
## Role of the core
|
|
@@ -92,8 +92,8 @@ This allows you to have global, project-level, and component-level context
|
|
|
92
92
|
files, which are all combined to provide the model with the most relevant
|
|
93
93
|
information.
|
|
94
94
|
|
|
95
|
-
You can use the [`/memory` command](../
|
|
96
|
-
`refresh` the content of loaded `GEMINI.md` files.
|
|
95
|
+
You can use the [`/memory` command](../reference/commands.md) to `show`, `add`,
|
|
96
|
+
and `refresh` the content of loaded `GEMINI.md` files.
|
|
97
97
|
|
|
98
98
|
## Citations
|
|
99
99
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Subagents (experimental)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Subagents are specialized agents that operate within your main Gemini CLI
|
|
4
4
|
session. They are designed to handle specific, complex tasks—like deep codebase
|
|
5
5
|
analysis, documentation lookup, or domain-specific reasoning—without cluttering
|
|
6
6
|
the main agent's context or toolset.
|
|
7
7
|
|
|
8
|
-
> **Note:
|
|
8
|
+
> **Note: Subagents are currently an experimental feature.**
|
|
9
9
|
>
|
|
10
|
-
> To use custom
|
|
10
|
+
> To use custom subagents, you must explicitly enable them in your
|
|
11
11
|
> `settings.json`:
|
|
12
12
|
>
|
|
13
13
|
> ```json
|
|
@@ -16,31 +16,31 @@ the main agent's context or toolset.
|
|
|
16
16
|
> }
|
|
17
17
|
> ```
|
|
18
18
|
>
|
|
19
|
-
> **Warning:**
|
|
20
|
-
> ["YOLO mode"](../
|
|
19
|
+
> **Warning:** Subagents currently operate in
|
|
20
|
+
> ["YOLO mode"](../reference/configuration.md#command-line-arguments), meaning
|
|
21
21
|
> they may execute tools without individual user confirmation for each step.
|
|
22
22
|
> Proceed with caution when defining agents with powerful tools like
|
|
23
23
|
> `run_shell_command` or `write_file`.
|
|
24
24
|
|
|
25
|
-
## What are
|
|
25
|
+
## What are subagents?
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Subagents are "specialists" that the main Gemini agent can hire for a specific
|
|
28
28
|
job.
|
|
29
29
|
|
|
30
|
-
- **Focused context:** Each
|
|
31
|
-
- **Specialized tools:**
|
|
30
|
+
- **Focused context:** Each subagent has its own system prompt and persona.
|
|
31
|
+
- **Specialized tools:** Subagents can have a restricted or specialized set of
|
|
32
32
|
tools.
|
|
33
|
-
- **Independent context window:** Interactions with a
|
|
33
|
+
- **Independent context window:** Interactions with a subagent happen in a
|
|
34
34
|
separate context loop, which saves tokens in your main conversation history.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
main agent calls the tool, it delegates the task to the
|
|
38
|
-
|
|
36
|
+
Subagents are exposed to the main agent as a tool of the same name. When the
|
|
37
|
+
main agent calls the tool, it delegates the task to the subagent. Once the
|
|
38
|
+
subagent completes its task, it reports back to the main agent with its
|
|
39
39
|
findings.
|
|
40
40
|
|
|
41
|
-
## Built-in
|
|
41
|
+
## Built-in subagents
|
|
42
42
|
|
|
43
|
-
Gemini CLI comes with the following built-in
|
|
43
|
+
Gemini CLI comes with the following built-in subagents:
|
|
44
44
|
|
|
45
45
|
### Codebase Investigator
|
|
46
46
|
|
|
@@ -75,15 +75,15 @@ Gemini CLI comes with the following built-in sub-agents:
|
|
|
75
75
|
### Generalist Agent
|
|
76
76
|
|
|
77
77
|
- **Name:** `generalist_agent`
|
|
78
|
-
- **Purpose:** Route tasks to the appropriate specialized
|
|
78
|
+
- **Purpose:** Route tasks to the appropriate specialized subagent.
|
|
79
79
|
- **When to use:** Implicitly used by the main agent for routing. Not directly
|
|
80
80
|
invoked by the user.
|
|
81
81
|
- **Configuration:** Enabled by default. No specific configuration options.
|
|
82
82
|
|
|
83
|
-
## Creating custom
|
|
83
|
+
## Creating custom subagents
|
|
84
84
|
|
|
85
|
-
You can create your own
|
|
86
|
-
specific personas. To use custom
|
|
85
|
+
You can create your own subagents to automate specific workflows or enforce
|
|
86
|
+
specific personas. To use custom subagents, you must enable them in your
|
|
87
87
|
`settings.json`:
|
|
88
88
|
|
|
89
89
|
```json
|
|
@@ -116,7 +116,7 @@ description: Specialized in finding security vulnerabilities in code.
|
|
|
116
116
|
kind: local
|
|
117
117
|
tools:
|
|
118
118
|
- read_file
|
|
119
|
-
-
|
|
119
|
+
- grep_search
|
|
120
120
|
model: gemini-2.5-pro
|
|
121
121
|
temperature: 0.2
|
|
122
122
|
max_turns: 10
|
|
@@ -138,20 +138,20 @@ it yourself; just report it.
|
|
|
138
138
|
|
|
139
139
|
### Configuration schema
|
|
140
140
|
|
|
141
|
-
| Field | Type | Required | Description
|
|
142
|
-
| :------------- | :----- | :------- |
|
|
143
|
-
| `name` | string | Yes | Unique identifier (slug) used as the tool name for the agent. Only lowercase letters, numbers, hyphens, and underscores.
|
|
144
|
-
| `description` | string | Yes | Short description of what the agent does. This is visible to the main agent to help it decide when to call this
|
|
145
|
-
| `kind` | string | No | `local` (default) or `remote`.
|
|
146
|
-
| `tools` | array | No | List of tool names this agent can use. If omitted, it may have access to a default set.
|
|
147
|
-
| `model` | string | No | Specific model to use (e.g., `gemini-2.5-pro`). Defaults to `inherit` (uses the main session model).
|
|
148
|
-
| `temperature` | number | No | Model temperature (0.0 - 2.0).
|
|
149
|
-
| `max_turns` | number | No | Maximum number of conversation turns allowed for this agent before it must return.
|
|
150
|
-
| `timeout_mins` | number | No | Maximum execution time in minutes.
|
|
141
|
+
| Field | Type | Required | Description |
|
|
142
|
+
| :------------- | :----- | :------- | :------------------------------------------------------------------------------------------------------------------------ |
|
|
143
|
+
| `name` | string | Yes | Unique identifier (slug) used as the tool name for the agent. Only lowercase letters, numbers, hyphens, and underscores. |
|
|
144
|
+
| `description` | string | Yes | Short description of what the agent does. This is visible to the main agent to help it decide when to call this subagent. |
|
|
145
|
+
| `kind` | string | No | `local` (default) or `remote`. |
|
|
146
|
+
| `tools` | array | No | List of tool names this agent can use. If omitted, it may have access to a default set. |
|
|
147
|
+
| `model` | string | No | Specific model to use (e.g., `gemini-2.5-pro`). Defaults to `inherit` (uses the main session model). |
|
|
148
|
+
| `temperature` | number | No | Model temperature (0.0 - 2.0). |
|
|
149
|
+
| `max_turns` | number | No | Maximum number of conversation turns allowed for this agent before it must return. Defaults to `15`. |
|
|
150
|
+
| `timeout_mins` | number | No | Maximum execution time in minutes. Defaults to `5`. |
|
|
151
151
|
|
|
152
|
-
### Optimizing your
|
|
152
|
+
### Optimizing your subagent
|
|
153
153
|
|
|
154
|
-
The main agent's system prompt encourages it to use an expert
|
|
154
|
+
The main agent's system prompt encourages it to use an expert subagent when one
|
|
155
155
|
is available. It decides whether an agent is a relevant expert based on the
|
|
156
156
|
agent's description. You can improve the reliability with which an agent is used
|
|
157
157
|
by updating the description to more clearly indicate:
|
|
@@ -160,7 +160,7 @@ by updating the description to more clearly indicate:
|
|
|
160
160
|
- When it should be used.
|
|
161
161
|
- Some example scenarios.
|
|
162
162
|
|
|
163
|
-
For example, the following
|
|
163
|
+
For example, the following subagent description should be called fairly
|
|
164
164
|
consistently for Git operations.
|
|
165
165
|
|
|
166
166
|
> Git expert agent which should be used for all local and remote git operations.
|
|
@@ -170,13 +170,13 @@ consistently for Git operations.
|
|
|
170
170
|
> - Searching for regressions with bisect
|
|
171
171
|
> - Interacting with source control and issues providers such as GitHub.
|
|
172
172
|
|
|
173
|
-
If you need to further tune your
|
|
173
|
+
If you need to further tune your subagent, you can do so by selecting the model
|
|
174
174
|
to optimize for with `/model` and then asking the model why it does not think
|
|
175
|
-
that your
|
|
175
|
+
that your subagent was called with a specific prompt and the given description.
|
|
176
176
|
|
|
177
177
|
## Remote subagents (Agent2Agent) (experimental)
|
|
178
178
|
|
|
179
|
-
Gemini CLI can also delegate tasks to remote
|
|
179
|
+
Gemini CLI can also delegate tasks to remote subagents using the Agent-to-Agent
|
|
180
180
|
(A2A) protocol.
|
|
181
181
|
|
|
182
182
|
> **Note: Remote subagents are currently an experimental feature.**
|
|
@@ -184,8 +184,8 @@ Gemini CLI can also delegate tasks to remote sub-agents using the Agent-to-Agent
|
|
|
184
184
|
See the [Remote Subagents documentation](/docs/core/remote-agents) for detailed
|
|
185
185
|
configuration and usage instructions.
|
|
186
186
|
|
|
187
|
-
## Extension
|
|
187
|
+
## Extension subagents
|
|
188
188
|
|
|
189
|
-
Extensions can bundle and distribute
|
|
190
|
-
[Extensions documentation](../extensions/index.md#
|
|
189
|
+
Extensions can bundle and distribute subagents. See the
|
|
190
|
+
[Extensions documentation](../extensions/index.md#subagents) for details on how
|
|
191
191
|
to package agents within an extension.
|
|
@@ -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).
|