@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
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Uninstalling the CLI
|
|
2
|
-
|
|
3
|
-
Your uninstall method depends on how you ran the CLI. Follow the instructions
|
|
4
|
-
for either npx or a global npm installation.
|
|
5
|
-
|
|
6
|
-
## Method 1: Using npx
|
|
7
|
-
|
|
8
|
-
npx runs packages from a temporary cache without a permanent installation. To
|
|
9
|
-
"uninstall" the CLI, you must clear this cache, which will remove gemini-cli and
|
|
10
|
-
any other packages previously executed with npx.
|
|
11
|
-
|
|
12
|
-
The npx cache is a directory named `_npx` inside your main npm cache folder. You
|
|
13
|
-
can find your npm cache path by running `npm config get cache`.
|
|
14
|
-
|
|
15
|
-
**For macOS / Linux**
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
# The path is typically ~/.npm/_npx
|
|
19
|
-
rm -rf "$(npm config get cache)/_npx"
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
**For Windows**
|
|
23
|
-
|
|
24
|
-
_Command Prompt_
|
|
25
|
-
|
|
26
|
-
```cmd
|
|
27
|
-
:: The path is typically %LocalAppData%\npm-cache\_npx
|
|
28
|
-
rmdir /s /q "%LocalAppData%\npm-cache\_npx"
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
_PowerShell_
|
|
32
|
-
|
|
33
|
-
```powershell
|
|
34
|
-
# The path is typically $env:LocalAppData\npm-cache\_npx
|
|
35
|
-
Remove-Item -Path (Join-Path $env:LocalAppData "npm-cache\_npx") -Recurse -Force
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Method 2: Using npm (global install)
|
|
39
|
-
|
|
40
|
-
If you installed the CLI globally (e.g., `npm install -g @google/gemini-cli`),
|
|
41
|
-
use the `npm uninstall` command with the `-g` flag to remove it.
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
npm uninstall -g @google/gemini-cli
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
This command completely removes the package from your system.
|
|
48
|
-
|
|
49
|
-
## Method 3: Homebrew
|
|
50
|
-
|
|
51
|
-
If you installed the CLI globally using Homebrew (e.g.,
|
|
52
|
-
`brew install gemini-cli`), use the `brew uninstall` command to remove it.
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
brew uninstall gemini-cli
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
## Method 4: MacPorts
|
|
59
|
-
|
|
60
|
-
If you installed the CLI globally using MacPorts (e.g.,
|
|
61
|
-
`sudo port install gemini-cli`), use the `port uninstall` command to remove it.
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
sudo port uninstall gemini-cli
|
|
65
|
-
```
|
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
# Memory Import Processor
|
|
2
|
-
|
|
3
|
-
The Memory Import Processor is a feature that allows you to modularize your
|
|
4
|
-
GEMINI.md files by importing content from other files using the `@file.md`
|
|
5
|
-
syntax.
|
|
6
|
-
|
|
7
|
-
## Overview
|
|
8
|
-
|
|
9
|
-
This feature enables you to break down large GEMINI.md files into smaller, more
|
|
10
|
-
manageable components that can be reused across different contexts. The import
|
|
11
|
-
processor supports both relative and absolute paths, with built-in safety
|
|
12
|
-
features to prevent circular imports and ensure file access security.
|
|
13
|
-
|
|
14
|
-
## Syntax
|
|
15
|
-
|
|
16
|
-
Use the `@` symbol followed by the path to the file you want to import:
|
|
17
|
-
|
|
18
|
-
```markdown
|
|
19
|
-
# Main GEMINI.md file
|
|
20
|
-
|
|
21
|
-
This is the main content.
|
|
22
|
-
|
|
23
|
-
@./components/instructions.md
|
|
24
|
-
|
|
25
|
-
More content here.
|
|
26
|
-
|
|
27
|
-
@./shared/configuration.md
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Supported path formats
|
|
31
|
-
|
|
32
|
-
### Relative paths
|
|
33
|
-
|
|
34
|
-
- `@./file.md` - Import from the same directory
|
|
35
|
-
- `@../file.md` - Import from parent directory
|
|
36
|
-
- `@./components/file.md` - Import from subdirectory
|
|
37
|
-
|
|
38
|
-
### Absolute paths
|
|
39
|
-
|
|
40
|
-
- `@/absolute/path/to/file.md` - Import using absolute path
|
|
41
|
-
|
|
42
|
-
## Examples
|
|
43
|
-
|
|
44
|
-
### Basic import
|
|
45
|
-
|
|
46
|
-
```markdown
|
|
47
|
-
# My GEMINI.md
|
|
48
|
-
|
|
49
|
-
Welcome to my project!
|
|
50
|
-
|
|
51
|
-
@./get-started.md
|
|
52
|
-
|
|
53
|
-
## Features
|
|
54
|
-
|
|
55
|
-
@./features/overview.md
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Nested imports
|
|
59
|
-
|
|
60
|
-
The imported files can themselves contain imports, creating a nested structure:
|
|
61
|
-
|
|
62
|
-
```markdown
|
|
63
|
-
# main.md
|
|
64
|
-
|
|
65
|
-
@./header.md @./content.md @./footer.md
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
```markdown
|
|
69
|
-
# header.md
|
|
70
|
-
|
|
71
|
-
# Project Header
|
|
72
|
-
|
|
73
|
-
@./shared/title.md
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Safety features
|
|
77
|
-
|
|
78
|
-
### Circular import detection
|
|
79
|
-
|
|
80
|
-
The processor automatically detects and prevents circular imports:
|
|
81
|
-
|
|
82
|
-
```markdown
|
|
83
|
-
# file-a.md
|
|
84
|
-
|
|
85
|
-
@./file-b.md
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
```markdown
|
|
89
|
-
# file-b.md
|
|
90
|
-
|
|
91
|
-
@./file-a.md <!-- This will be detected and prevented -->
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### File access security
|
|
95
|
-
|
|
96
|
-
The `validateImportPath` function ensures that imports are only allowed from
|
|
97
|
-
specified directories, preventing access to sensitive files outside the allowed
|
|
98
|
-
scope.
|
|
99
|
-
|
|
100
|
-
### Maximum import depth
|
|
101
|
-
|
|
102
|
-
To prevent infinite recursion, there's a configurable maximum import depth
|
|
103
|
-
(default: 5 levels).
|
|
104
|
-
|
|
105
|
-
## Error handling
|
|
106
|
-
|
|
107
|
-
### Missing files
|
|
108
|
-
|
|
109
|
-
If a referenced file doesn't exist, the import will fail gracefully with an
|
|
110
|
-
error comment in the output.
|
|
111
|
-
|
|
112
|
-
### File access errors
|
|
113
|
-
|
|
114
|
-
Permission issues or other file system errors are handled gracefully with
|
|
115
|
-
appropriate error messages.
|
|
116
|
-
|
|
117
|
-
## Code region detection
|
|
118
|
-
|
|
119
|
-
The import processor uses the `marked` library to detect code blocks and inline
|
|
120
|
-
code spans, ensuring that `@` imports inside these regions are properly ignored.
|
|
121
|
-
This provides robust handling of nested code blocks and complex Markdown
|
|
122
|
-
structures.
|
|
123
|
-
|
|
124
|
-
## Import tree structure
|
|
125
|
-
|
|
126
|
-
The processor returns an import tree that shows the hierarchy of imported files,
|
|
127
|
-
similar to Claude's `/memory` feature. This helps users debug problems with
|
|
128
|
-
their GEMINI.md files by showing which files were read and their import
|
|
129
|
-
relationships.
|
|
130
|
-
|
|
131
|
-
Example tree structure:
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
Memory Files
|
|
135
|
-
L project: GEMINI.md
|
|
136
|
-
L a.md
|
|
137
|
-
L b.md
|
|
138
|
-
L c.md
|
|
139
|
-
L d.md
|
|
140
|
-
L e.md
|
|
141
|
-
L f.md
|
|
142
|
-
L included.md
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
The tree preserves the order that files were imported and shows the complete
|
|
146
|
-
import chain for debugging purposes.
|
|
147
|
-
|
|
148
|
-
## Comparison to Claude Code's `/memory` (`claude.md`) approach
|
|
149
|
-
|
|
150
|
-
Claude Code's `/memory` feature (as seen in `claude.md`) produces a flat, linear
|
|
151
|
-
document by concatenating all included files, always marking file boundaries
|
|
152
|
-
with clear comments and path names. It does not explicitly present the import
|
|
153
|
-
hierarchy, but the LLM receives all file contents and paths, which is sufficient
|
|
154
|
-
for reconstructing the hierarchy if needed.
|
|
155
|
-
|
|
156
|
-
> [!NOTE] The import tree is mainly for clarity during development and has
|
|
157
|
-
> limited relevance to LLM consumption.
|
|
158
|
-
|
|
159
|
-
## API reference
|
|
160
|
-
|
|
161
|
-
### `processImports(content, basePath, debugMode?, importState?)`
|
|
162
|
-
|
|
163
|
-
Processes import statements in GEMINI.md content.
|
|
164
|
-
|
|
165
|
-
**Parameters:**
|
|
166
|
-
|
|
167
|
-
- `content` (string): The content to process for imports
|
|
168
|
-
- `basePath` (string): The directory path where the current file is located
|
|
169
|
-
- `debugMode` (boolean, optional): Whether to enable debug logging (default:
|
|
170
|
-
false)
|
|
171
|
-
- `importState` (ImportState, optional): State tracking for circular import
|
|
172
|
-
prevention
|
|
173
|
-
|
|
174
|
-
**Returns:** Promise<ProcessImportsResult> - Object containing processed
|
|
175
|
-
content and import tree
|
|
176
|
-
|
|
177
|
-
### `ProcessImportsResult`
|
|
178
|
-
|
|
179
|
-
```typescript
|
|
180
|
-
interface ProcessImportsResult {
|
|
181
|
-
content: string; // The processed content with imports resolved
|
|
182
|
-
importTree: MemoryFile; // Tree structure showing the import hierarchy
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### `MemoryFile`
|
|
187
|
-
|
|
188
|
-
```typescript
|
|
189
|
-
interface MemoryFile {
|
|
190
|
-
path: string; // The file path
|
|
191
|
-
imports?: MemoryFile[]; // Direct imports, in the order they were imported
|
|
192
|
-
}
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
### `validateImportPath(importPath, basePath, allowedDirectories)`
|
|
196
|
-
|
|
197
|
-
Validates import paths to ensure they are safe and within allowed directories.
|
|
198
|
-
|
|
199
|
-
**Parameters:**
|
|
200
|
-
|
|
201
|
-
- `importPath` (string): The import path to validate
|
|
202
|
-
- `basePath` (string): The base directory for resolving relative paths
|
|
203
|
-
- `allowedDirectories` (string[]): Array of allowed directory paths
|
|
204
|
-
|
|
205
|
-
**Returns:** boolean - Whether the import path is valid
|
|
206
|
-
|
|
207
|
-
### `findProjectRoot(startDir)`
|
|
208
|
-
|
|
209
|
-
Finds the project root by searching for a `.git` directory upwards from the
|
|
210
|
-
given start directory. Implemented as an **async** function using non-blocking
|
|
211
|
-
file system APIs to avoid blocking the Node.js event loop.
|
|
212
|
-
|
|
213
|
-
**Parameters:**
|
|
214
|
-
|
|
215
|
-
- `startDir` (string): The directory to start searching from
|
|
216
|
-
|
|
217
|
-
**Returns:** Promise<string> - The project root directory (or the start
|
|
218
|
-
directory if no `.git` is found)
|
|
219
|
-
|
|
220
|
-
## Best Practices
|
|
221
|
-
|
|
222
|
-
1. **Use descriptive file names** for imported components
|
|
223
|
-
2. **Keep imports shallow** - avoid deeply nested import chains
|
|
224
|
-
3. **Document your structure** - maintain a clear hierarchy of imported files
|
|
225
|
-
4. **Test your imports** - ensure all referenced files exist and are accessible
|
|
226
|
-
5. **Use relative paths** when possible for better portability
|
|
227
|
-
|
|
228
|
-
## Troubleshooting
|
|
229
|
-
|
|
230
|
-
### Common issues
|
|
231
|
-
|
|
232
|
-
1. **Import not working**: Check that the file exists and the path is correct
|
|
233
|
-
2. **Circular import warnings**: Review your import structure for circular
|
|
234
|
-
references
|
|
235
|
-
3. **Permission errors**: Ensure the files are readable and within allowed
|
|
236
|
-
directories
|
|
237
|
-
4. **Path resolution issues**: Use absolute paths if relative paths aren't
|
|
238
|
-
resolving correctly
|
|
239
|
-
|
|
240
|
-
### Debug mode
|
|
241
|
-
|
|
242
|
-
Enable debug mode to see detailed logging of the import process:
|
|
243
|
-
|
|
244
|
-
```typescript
|
|
245
|
-
const result = await processImports(content, basePath, true);
|
|
246
|
-
```
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
# Gemini CLI core: Tools API
|
|
2
|
-
|
|
3
|
-
The Gemini CLI core (`packages/core`) features a robust system for defining,
|
|
4
|
-
registering, and executing tools. These tools extend the capabilities of the
|
|
5
|
-
Gemini model, allowing it to interact with the local environment, fetch web
|
|
6
|
-
content, and perform various actions beyond simple text generation.
|
|
7
|
-
|
|
8
|
-
## Core concepts
|
|
9
|
-
|
|
10
|
-
- **Tool (`tools.ts`):** An interface and base class (`BaseTool`) that defines
|
|
11
|
-
the contract for all tools. Each tool must have:
|
|
12
|
-
- `name`: A unique internal name (used in API calls to Gemini).
|
|
13
|
-
- `displayName`: A user-friendly name.
|
|
14
|
-
- `description`: A clear explanation of what the tool does, which is provided
|
|
15
|
-
to the Gemini model.
|
|
16
|
-
- `parameterSchema`: A JSON schema defining the parameters that the tool
|
|
17
|
-
accepts. This is crucial for the Gemini model to understand how to call the
|
|
18
|
-
tool correctly.
|
|
19
|
-
- `validateToolParams()`: A method to validate incoming parameters.
|
|
20
|
-
- `getDescription()`: A method to provide a human-readable description of what
|
|
21
|
-
the tool will do with specific parameters before execution.
|
|
22
|
-
- `shouldConfirmExecute()`: A method to determine if user confirmation is
|
|
23
|
-
required before execution (e.g., for potentially destructive operations).
|
|
24
|
-
- `execute()`: The core method that performs the tool's action and returns a
|
|
25
|
-
`ToolResult`.
|
|
26
|
-
|
|
27
|
-
- **`ToolResult` (`tools.ts`):** An interface defining the structure of a tool's
|
|
28
|
-
execution outcome:
|
|
29
|
-
- `llmContent`: The factual content to be included in the history sent back to
|
|
30
|
-
the LLM for context. This can be a simple string or a `PartListUnion` (an
|
|
31
|
-
array of `Part` objects and strings) for rich content.
|
|
32
|
-
- `returnDisplay`: A user-friendly string (often Markdown) or a special object
|
|
33
|
-
(like `FileDiff`) for display in the CLI.
|
|
34
|
-
|
|
35
|
-
- **Returning rich content:** Tools are not limited to returning simple text.
|
|
36
|
-
The `llmContent` can be a `PartListUnion`, which is an array that can contain
|
|
37
|
-
a mix of `Part` objects (for images, audio, etc.) and `string`s. This allows a
|
|
38
|
-
single tool execution to return multiple pieces of rich content.
|
|
39
|
-
|
|
40
|
-
- **Tool registry (`tool-registry.ts`):** A class (`ToolRegistry`) responsible
|
|
41
|
-
for:
|
|
42
|
-
- **Registering tools:** Holding a collection of all available built-in tools
|
|
43
|
-
(e.g., `ReadFileTool`, `ShellTool`).
|
|
44
|
-
- **Discovering tools:** It can also discover tools dynamically:
|
|
45
|
-
- **Command-based discovery:** If `tools.discoveryCommand` is configured in
|
|
46
|
-
settings, this command is executed. It's expected to output JSON
|
|
47
|
-
describing custom tools, which are then registered as `DiscoveredTool`
|
|
48
|
-
instances.
|
|
49
|
-
- **MCP-based discovery:** If `mcp.serverCommand` is configured, the
|
|
50
|
-
registry can connect to a Model Context Protocol (MCP) server to list and
|
|
51
|
-
register tools (`DiscoveredMCPTool`).
|
|
52
|
-
- **Providing schemas:** Exposing the `FunctionDeclaration` schemas of all
|
|
53
|
-
registered tools to the Gemini model, so it knows what tools are available
|
|
54
|
-
and how to use them.
|
|
55
|
-
- **Retrieving tools:** Allowing the core to get a specific tool by name for
|
|
56
|
-
execution.
|
|
57
|
-
|
|
58
|
-
## Built-in tools
|
|
59
|
-
|
|
60
|
-
The core comes with a suite of pre-defined tools, typically found in
|
|
61
|
-
`packages/core/src/tools/`. These include:
|
|
62
|
-
|
|
63
|
-
- **File system tools:**
|
|
64
|
-
- `LSTool` (`ls.ts`): Lists directory contents.
|
|
65
|
-
- `ReadFileTool` (`read-file.ts`): Reads the content of a single file.
|
|
66
|
-
- `WriteFileTool` (`write-file.ts`): Writes content to a file.
|
|
67
|
-
- `GrepTool` (`grep.ts`): Searches for patterns in files.
|
|
68
|
-
- `GlobTool` (`glob.ts`): Finds files matching glob patterns.
|
|
69
|
-
- `EditTool` (`edit.ts`): Performs in-place modifications to files (often
|
|
70
|
-
requiring confirmation).
|
|
71
|
-
- `ReadManyFilesTool` (`read-many-files.ts`): Reads and concatenates content
|
|
72
|
-
from multiple files or glob patterns (used by the `@` command in CLI).
|
|
73
|
-
- **Execution tools:**
|
|
74
|
-
- `ShellTool` (`shell.ts`): Executes arbitrary shell commands (requires
|
|
75
|
-
careful sandboxing and user confirmation).
|
|
76
|
-
- **Web tools:**
|
|
77
|
-
- `WebFetchTool` (`web-fetch.ts`): Fetches content from a URL.
|
|
78
|
-
- `WebSearchTool` (`web-search.ts`): Performs a web search.
|
|
79
|
-
- **Memory tools:**
|
|
80
|
-
- `MemoryTool` (`memoryTool.ts`): Interacts with the AI's memory.
|
|
81
|
-
|
|
82
|
-
Each of these tools extends `BaseTool` and implements the required methods for
|
|
83
|
-
its specific functionality.
|
|
84
|
-
|
|
85
|
-
## Tool execution flow
|
|
86
|
-
|
|
87
|
-
1. **Model request:** The Gemini model, based on the user's prompt and the
|
|
88
|
-
provided tool schemas, decides to use a tool and returns a `FunctionCall`
|
|
89
|
-
part in its response, specifying the tool name and arguments.
|
|
90
|
-
2. **Core receives request:** The core parses this `FunctionCall`.
|
|
91
|
-
3. **Tool retrieval:** It looks up the requested tool in the `ToolRegistry`.
|
|
92
|
-
4. **Parameter validation:** The tool's `validateToolParams()` method is
|
|
93
|
-
called.
|
|
94
|
-
5. **Confirmation (if needed):**
|
|
95
|
-
- The tool's `shouldConfirmExecute()` method is called.
|
|
96
|
-
- If it returns details for confirmation, the core communicates this back to
|
|
97
|
-
the CLI, which prompts the user.
|
|
98
|
-
- The user's decision (e.g., proceed, cancel) is sent back to the core.
|
|
99
|
-
6. **Execution:** If validated and confirmed (or if no confirmation is needed),
|
|
100
|
-
the core calls the tool's `execute()` method with the provided arguments and
|
|
101
|
-
an `AbortSignal` (for potential cancellation).
|
|
102
|
-
7. **Result processing:** The `ToolResult` from `execute()` is received by the
|
|
103
|
-
core.
|
|
104
|
-
8. **Response to model:** The `llmContent` from the `ToolResult` is packaged as
|
|
105
|
-
a `FunctionResponse` and sent back to the Gemini model so it can continue
|
|
106
|
-
generating a user-facing response.
|
|
107
|
-
9. **Display to user:** The `returnDisplay` from the `ToolResult` is sent to
|
|
108
|
-
the CLI to show the user what the tool did.
|
|
109
|
-
|
|
110
|
-
## Extending with custom tools
|
|
111
|
-
|
|
112
|
-
While direct programmatic registration of new tools by users isn't explicitly
|
|
113
|
-
detailed as a primary workflow in the provided files for typical end-users, the
|
|
114
|
-
architecture supports extension through:
|
|
115
|
-
|
|
116
|
-
- **Command-based discovery:** Advanced users or project administrators can
|
|
117
|
-
define a `tools.discoveryCommand` in `settings.json`. This command, when run
|
|
118
|
-
by the Gemini CLI core, should output a JSON array of `FunctionDeclaration`
|
|
119
|
-
objects. The core will then make these available as `DiscoveredTool`
|
|
120
|
-
instances. The corresponding `tools.callCommand` would then be responsible for
|
|
121
|
-
actually executing these custom tools.
|
|
122
|
-
- **MCP server(s):** For more complex scenarios, one or more MCP servers can be
|
|
123
|
-
set up and configured via the `mcpServers` setting in `settings.json`. The
|
|
124
|
-
Gemini CLI core can then discover and use tools exposed by these servers. As
|
|
125
|
-
mentioned, if you have multiple MCP servers, the tool names will be prefixed
|
|
126
|
-
with the server name from your configuration (e.g.,
|
|
127
|
-
`serverAlias__actualToolName`).
|
|
128
|
-
|
|
129
|
-
This tool system provides a flexible and powerful way to augment the Gemini
|
|
130
|
-
model's capabilities, making the Gemini CLI a versatile assistant for a wide
|
|
131
|
-
range of tasks.
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
# Frequently asked questions (FAQ)
|
|
2
|
-
|
|
3
|
-
This page provides answers to common questions and solutions to frequent
|
|
4
|
-
problems encountered while using Gemini CLI.
|
|
5
|
-
|
|
6
|
-
## General issues
|
|
7
|
-
|
|
8
|
-
### Why am I getting an `API error: 429 - Resource exhausted`?
|
|
9
|
-
|
|
10
|
-
This error indicates that you have exceeded your API request limit. The Gemini
|
|
11
|
-
API has rate limits to prevent abuse and ensure fair usage.
|
|
12
|
-
|
|
13
|
-
To resolve this, you can:
|
|
14
|
-
|
|
15
|
-
- **Check your usage:** Review your API usage in the Google AI Studio or your
|
|
16
|
-
Google Cloud project dashboard.
|
|
17
|
-
- **Optimize your prompts:** If you are making many requests in a short period,
|
|
18
|
-
try to batch your prompts or introduce delays between requests.
|
|
19
|
-
- **Request a quota increase:** If you consistently need a higher limit, you can
|
|
20
|
-
request a quota increase from Google.
|
|
21
|
-
|
|
22
|
-
### Why am I getting an `ERR_REQUIRE_ESM` error when running `npm run start`?
|
|
23
|
-
|
|
24
|
-
This error typically occurs in Node.js projects when there is a mismatch between
|
|
25
|
-
CommonJS and ES Modules.
|
|
26
|
-
|
|
27
|
-
This is often due to a misconfiguration in your `package.json` or
|
|
28
|
-
`tsconfig.json`. Ensure that:
|
|
29
|
-
|
|
30
|
-
1. Your `package.json` has `"type": "module"`.
|
|
31
|
-
2. Your `tsconfig.json` has `"module": "NodeNext"` or a compatible setting in
|
|
32
|
-
the `compilerOptions`.
|
|
33
|
-
|
|
34
|
-
If the problem persists, try deleting your `node_modules` directory and
|
|
35
|
-
`package-lock.json` file, and then run `npm install` again.
|
|
36
|
-
|
|
37
|
-
### Why don't I see cached token counts in my stats output?
|
|
38
|
-
|
|
39
|
-
Cached token information is only displayed when cached tokens are being used.
|
|
40
|
-
This feature is available for API key users (Gemini API key or Google Cloud
|
|
41
|
-
Vertex AI) but not for OAuth users (such as Google Personal/Enterprise accounts
|
|
42
|
-
like Google Gmail or Google Workspace, respectively). This is because the Gemini
|
|
43
|
-
Code Assist API does not support cached content creation. You can still view
|
|
44
|
-
your total token usage using the `/stats` command in Gemini CLI.
|
|
45
|
-
|
|
46
|
-
## Installation and updates
|
|
47
|
-
|
|
48
|
-
### How do I update Gemini CLI to the latest version?
|
|
49
|
-
|
|
50
|
-
If you installed it globally via `npm`, update it using the command
|
|
51
|
-
`npm install -g @google/gemini-cli@latest`. If you compiled it from source, pull
|
|
52
|
-
the latest changes from the repository, and then rebuild using the command
|
|
53
|
-
`npm run build`.
|
|
54
|
-
|
|
55
|
-
## Platform-specific issues
|
|
56
|
-
|
|
57
|
-
### Why does the CLI crash on Windows when I run a command like `chmod +x`?
|
|
58
|
-
|
|
59
|
-
Commands like `chmod` are specific to Unix-like operating systems (Linux,
|
|
60
|
-
macOS). They are not available on Windows by default.
|
|
61
|
-
|
|
62
|
-
To resolve this, you can:
|
|
63
|
-
|
|
64
|
-
- **Use Windows-equivalent commands:** Instead of `chmod`, you can use `icacls`
|
|
65
|
-
to modify file permissions on Windows.
|
|
66
|
-
- **Use a compatibility layer:** Tools like Git Bash or Windows Subsystem for
|
|
67
|
-
Linux (WSL) provide a Unix-like environment on Windows where these commands
|
|
68
|
-
will work.
|
|
69
|
-
|
|
70
|
-
## Configuration
|
|
71
|
-
|
|
72
|
-
### How do I configure my `GOOGLE_CLOUD_PROJECT`?
|
|
73
|
-
|
|
74
|
-
You can configure your Google Cloud Project ID using an environment variable.
|
|
75
|
-
|
|
76
|
-
Set the `GOOGLE_CLOUD_PROJECT` environment variable in your shell:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
export GOOGLE_CLOUD_PROJECT="your-project-id"
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
To make this setting permanent, add this line to your shell's startup file
|
|
83
|
-
(e.g., `~/.bashrc`, `~/.zshrc`).
|
|
84
|
-
|
|
85
|
-
### What is the best way to store my API keys securely?
|
|
86
|
-
|
|
87
|
-
Exposing API keys in scripts or checking them into source control is a security
|
|
88
|
-
risk.
|
|
89
|
-
|
|
90
|
-
To store your API keys securely, you can:
|
|
91
|
-
|
|
92
|
-
- **Use a `.env` file:** Create a `.env` file in your project's `.gemini`
|
|
93
|
-
directory (`.gemini/.env`) and store your keys there. Gemini CLI will
|
|
94
|
-
automatically load these variables.
|
|
95
|
-
- **Use your system's keyring:** For the most secure storage, use your operating
|
|
96
|
-
system's secret management tool (like macOS Keychain, Windows Credential
|
|
97
|
-
Manager, or a secret manager on Linux). You can then have your scripts or
|
|
98
|
-
environment load the key from the secure storage at runtime.
|
|
99
|
-
|
|
100
|
-
### Where are the Gemini CLI configuration and settings files stored?
|
|
101
|
-
|
|
102
|
-
The Gemini CLI configuration is stored in two `settings.json` files:
|
|
103
|
-
|
|
104
|
-
1. In your home directory: `~/.gemini/settings.json`.
|
|
105
|
-
2. In your project's root directory: `./.gemini/settings.json`.
|
|
106
|
-
|
|
107
|
-
Refer to [Gemini CLI Configuration](./get-started/configuration.md) for more
|
|
108
|
-
details.
|
|
109
|
-
|
|
110
|
-
## Google AI Pro/Ultra and subscription FAQs
|
|
111
|
-
|
|
112
|
-
### Where can I learn more about my Google AI Pro or Google AI Ultra subscription?
|
|
113
|
-
|
|
114
|
-
To learn more about your Google AI Pro or Google AI Ultra subscription, visit
|
|
115
|
-
**Manage subscription** in your [subscription settings](https://one.google.com).
|
|
116
|
-
|
|
117
|
-
### How do I know if I have higher limits for Google AI Pro or Ultra?
|
|
118
|
-
|
|
119
|
-
If you're subscribed to Google AI Pro or Ultra, you automatically have higher
|
|
120
|
-
limits to Gemini Code Assist and Gemini CLI. These are shared across Gemini CLI
|
|
121
|
-
and agent mode in the IDE. You can confirm you have higher limits by checking if
|
|
122
|
-
you are still subscribed to Google AI Pro or Ultra in your
|
|
123
|
-
[subscription settings](https://one.google.com).
|
|
124
|
-
|
|
125
|
-
### What is the privacy policy for using Gemini Code Assist or Gemini CLI if I've subscribed to Google AI Pro or Ultra?
|
|
126
|
-
|
|
127
|
-
To learn more about your privacy policy and terms of service governed by your
|
|
128
|
-
subscription, visit
|
|
129
|
-
[Gemini Code Assist: Terms of Service and Privacy Policies](https://developers.google.com/gemini-code-assist/resources/privacy-notices).
|
|
130
|
-
|
|
131
|
-
### I've upgraded to Google AI Pro or Ultra but it still says I am hitting quota limits. Is this a bug?
|
|
132
|
-
|
|
133
|
-
The higher limits in your Google AI Pro or Ultra subscription are for Gemini 2.5
|
|
134
|
-
across both Gemini 2.5 Pro and Flash. They are shared quota across Gemini CLI
|
|
135
|
-
and agent mode in Gemini Code Assist IDE extensions. You can learn more about
|
|
136
|
-
quota limits for Gemini CLI, Gemini Code Assist and agent mode in Gemini Code
|
|
137
|
-
Assist at
|
|
138
|
-
[Quotas and limits](https://developers.google.com/gemini-code-assist/resources/quotas).
|
|
139
|
-
|
|
140
|
-
### If I upgrade to higher limits for Gemini CLI and Gemini Code Assist by purchasing a Google AI Pro or Ultra subscription, will Gemini start using my data to improve its machine learning models?
|
|
141
|
-
|
|
142
|
-
Google does not use your data to improve Google's machine learning models if you
|
|
143
|
-
purchase a paid plan. Note: If you decide to remain on the free version of
|
|
144
|
-
Gemini Code Assist, Gemini Code Assist for individuals, you can also opt out of
|
|
145
|
-
using your data to improve Google's machine learning models. See the
|
|
146
|
-
[Gemini Code Assist for individuals privacy notice](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals)
|
|
147
|
-
for more information.
|
|
148
|
-
|
|
149
|
-
## Not seeing your question?
|
|
150
|
-
|
|
151
|
-
Search the
|
|
152
|
-
[Gemini CLI Q&A discussions on GitHub](https://github.com/google-gemini/gemini-cli/discussions/categories/q-a)
|
|
153
|
-
or
|
|
154
|
-
[start a new discussion on GitHub](https://github.com/google-gemini/gemini-cli/discussions/new?category=q-a)
|