@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,140 +0,0 @@
|
|
|
1
|
-
# Gemini CLI keyboard shortcuts
|
|
2
|
-
|
|
3
|
-
Gemini CLI ships with a set of default keyboard shortcuts for editing input,
|
|
4
|
-
navigating history, and controlling the UI. Use this reference to learn the
|
|
5
|
-
available combinations.
|
|
6
|
-
|
|
7
|
-
<!-- KEYBINDINGS-AUTOGEN:START -->
|
|
8
|
-
|
|
9
|
-
#### Basic Controls
|
|
10
|
-
|
|
11
|
-
| Action | Keys |
|
|
12
|
-
| --------------------------------------------------------------- | ---------- |
|
|
13
|
-
| Confirm the current selection or choice. | `Enter` |
|
|
14
|
-
| Dismiss dialogs or cancel the current focus. | `Esc` |
|
|
15
|
-
| Cancel the current request or quit the CLI when input is empty. | `Ctrl + C` |
|
|
16
|
-
| Exit the CLI when the input buffer is empty. | `Ctrl + D` |
|
|
17
|
-
|
|
18
|
-
#### Cursor Movement
|
|
19
|
-
|
|
20
|
-
| Action | Keys |
|
|
21
|
-
| ------------------------------------------- | ------------------------------------------------------------ |
|
|
22
|
-
| Move the cursor to the start of the line. | `Ctrl + A`<br />`Home (no Shift, Ctrl)` |
|
|
23
|
-
| Move the cursor to the end of the line. | `Ctrl + E`<br />`End (no Shift, Ctrl)` |
|
|
24
|
-
| Move the cursor up one line. | `Up Arrow (no Shift, Alt, Ctrl, Cmd)` |
|
|
25
|
-
| Move the cursor down one line. | `Down Arrow (no Shift, Alt, Ctrl, Cmd)` |
|
|
26
|
-
| Move the cursor one character to the left. | `Left Arrow (no Shift, Alt, Ctrl, Cmd)` |
|
|
27
|
-
| Move the cursor one character to the right. | `Right Arrow (no Shift, Alt, Ctrl, Cmd)`<br />`Ctrl + F` |
|
|
28
|
-
| Move the cursor one word to the left. | `Ctrl + Left Arrow`<br />`Alt + Left Arrow`<br />`Alt + B` |
|
|
29
|
-
| Move the cursor one word to the right. | `Ctrl + Right Arrow`<br />`Alt + Right Arrow`<br />`Alt + F` |
|
|
30
|
-
|
|
31
|
-
#### Editing
|
|
32
|
-
|
|
33
|
-
| Action | Keys |
|
|
34
|
-
| ------------------------------------------------ | ---------------------------------------------------------------- |
|
|
35
|
-
| Delete from the cursor to the end of the line. | `Ctrl + K` |
|
|
36
|
-
| Delete from the cursor to the start of the line. | `Ctrl + U` |
|
|
37
|
-
| Clear all text in the input field. | `Ctrl + C` |
|
|
38
|
-
| Delete the previous word. | `Ctrl + Backspace`<br />`Alt + Backspace`<br />`Ctrl + W` |
|
|
39
|
-
| Delete the next word. | `Ctrl + Delete`<br />`Alt + Delete` |
|
|
40
|
-
| Delete the character to the left. | `Backspace`<br />`Ctrl + H` |
|
|
41
|
-
| Delete the character to the right. | `Delete`<br />`Ctrl + D` |
|
|
42
|
-
| Undo the most recent text edit. | `Cmd + Z (no Shift)`<br />`Alt + Z (no Shift)` |
|
|
43
|
-
| Redo the most recent undone text edit. | `Shift + Ctrl + Z`<br />`Shift + Cmd + Z`<br />`Shift + Alt + Z` |
|
|
44
|
-
|
|
45
|
-
#### Scrolling
|
|
46
|
-
|
|
47
|
-
| Action | Keys |
|
|
48
|
-
| ------------------------ | --------------------------------- |
|
|
49
|
-
| Scroll content up. | `Shift + Up Arrow` |
|
|
50
|
-
| Scroll content down. | `Shift + Down Arrow` |
|
|
51
|
-
| Scroll to the top. | `Ctrl + Home`<br />`Shift + Home` |
|
|
52
|
-
| Scroll to the bottom. | `Ctrl + End`<br />`Shift + End` |
|
|
53
|
-
| Scroll up by one page. | `Page Up` |
|
|
54
|
-
| Scroll down by one page. | `Page Down` |
|
|
55
|
-
|
|
56
|
-
#### History & Search
|
|
57
|
-
|
|
58
|
-
| Action | Keys |
|
|
59
|
-
| -------------------------------------------- | --------------------- |
|
|
60
|
-
| Show the previous entry in history. | `Ctrl + P (no Shift)` |
|
|
61
|
-
| Show the next entry in history. | `Ctrl + N (no Shift)` |
|
|
62
|
-
| Start reverse search through history. | `Ctrl + R` |
|
|
63
|
-
| Submit the selected reverse-search match. | `Enter (no Ctrl)` |
|
|
64
|
-
| Accept a suggestion while reverse searching. | `Tab` |
|
|
65
|
-
| Browse and rewind previous interactions. | `Double Esc` |
|
|
66
|
-
|
|
67
|
-
#### Navigation
|
|
68
|
-
|
|
69
|
-
| Action | Keys |
|
|
70
|
-
| -------------------------------------------------- | ------------------------------------------- |
|
|
71
|
-
| Move selection up in lists. | `Up Arrow (no Shift)` |
|
|
72
|
-
| Move selection down in lists. | `Down Arrow (no Shift)` |
|
|
73
|
-
| Move up within dialog options. | `Up Arrow (no Shift)`<br />`K (no Shift)` |
|
|
74
|
-
| Move down within dialog options. | `Down Arrow (no Shift)`<br />`J (no Shift)` |
|
|
75
|
-
| Move to the next item or question in a dialog. | `Tab (no Shift)` |
|
|
76
|
-
| Move to the previous item or question in a dialog. | `Shift + Tab` |
|
|
77
|
-
|
|
78
|
-
#### Suggestions & Completions
|
|
79
|
-
|
|
80
|
-
| Action | Keys |
|
|
81
|
-
| --------------------------------------- | -------------------------------------------------- |
|
|
82
|
-
| Accept the inline suggestion. | `Tab`<br />`Enter (no Ctrl)` |
|
|
83
|
-
| Move to the previous completion option. | `Up Arrow (no Shift)`<br />`Ctrl + P (no Shift)` |
|
|
84
|
-
| Move to the next completion option. | `Down Arrow (no Shift)`<br />`Ctrl + N (no Shift)` |
|
|
85
|
-
| Expand an inline suggestion. | `Right Arrow` |
|
|
86
|
-
| Collapse an inline suggestion. | `Left Arrow` |
|
|
87
|
-
|
|
88
|
-
#### Text Input
|
|
89
|
-
|
|
90
|
-
| Action | Keys |
|
|
91
|
-
| ---------------------------------------------- | ----------------------------------------------------------------------------------------- |
|
|
92
|
-
| Submit the current prompt. | `Enter (no Shift, Alt, Ctrl, Cmd)` |
|
|
93
|
-
| Insert a newline without submitting. | `Ctrl + Enter`<br />`Cmd + Enter`<br />`Alt + Enter`<br />`Shift + Enter`<br />`Ctrl + J` |
|
|
94
|
-
| Open the current prompt in an external editor. | `Ctrl + X` |
|
|
95
|
-
| Paste from the clipboard. | `Ctrl + V`<br />`Cmd + V`<br />`Alt + V` |
|
|
96
|
-
|
|
97
|
-
#### App Controls
|
|
98
|
-
|
|
99
|
-
| Action | Keys |
|
|
100
|
-
| ----------------------------------------------------------------------------------------------------- | -------------------------- |
|
|
101
|
-
| Toggle detailed error information. | `F12` |
|
|
102
|
-
| Toggle the full TODO list. | `Ctrl + T` |
|
|
103
|
-
| Show IDE context details. | `Ctrl + G` |
|
|
104
|
-
| Toggle Markdown rendering. | `Alt + M` |
|
|
105
|
-
| Toggle copy mode when in alternate buffer mode. | `Ctrl + S` |
|
|
106
|
-
| Toggle YOLO (auto-approval) mode for tool calls. | `Ctrl + Y` |
|
|
107
|
-
| Cycle through approval modes: default (prompt), auto_edit (auto-approve edits), and plan (read-only). | `Shift + Tab` |
|
|
108
|
-
| Expand a height-constrained response to show additional lines when not in alternate buffer mode. | `Ctrl + O`<br />`Ctrl + S` |
|
|
109
|
-
| Ctrl+B | `Ctrl + B` |
|
|
110
|
-
| Ctrl+L | `Ctrl + L` |
|
|
111
|
-
| Ctrl+K | `Ctrl + K` |
|
|
112
|
-
| Enter | `Enter` |
|
|
113
|
-
| Esc | `Esc` |
|
|
114
|
-
| Shift+Tab | `Shift + Tab` |
|
|
115
|
-
| Tab | `Tab (no Shift)` |
|
|
116
|
-
| Tab | `Tab (no Shift)` |
|
|
117
|
-
| Focus the shell input from the gemini input. | `Tab (no Shift)` |
|
|
118
|
-
| Focus the Gemini input from the shell input. | `Tab` |
|
|
119
|
-
| Clear the terminal screen and redraw the UI. | `Ctrl + L` |
|
|
120
|
-
| Restart the application. | `R` |
|
|
121
|
-
| Suspend the application (not yet implemented). | `Ctrl + Z` |
|
|
122
|
-
|
|
123
|
-
<!-- KEYBINDINGS-AUTOGEN:END -->
|
|
124
|
-
|
|
125
|
-
## Additional context-specific shortcuts
|
|
126
|
-
|
|
127
|
-
- `Option+B/F/M` (macOS only): Are interpreted as `Cmd+B/F/M` even if your
|
|
128
|
-
terminal isn't configured to send Meta with Option.
|
|
129
|
-
- `!` on an empty prompt: Enter or exit shell mode.
|
|
130
|
-
- `\` (at end of a line) + `Enter`: Insert a newline without leaving single-line
|
|
131
|
-
mode.
|
|
132
|
-
- `Esc` pressed twice quickly: Clear the input prompt if it is not empty,
|
|
133
|
-
otherwise browse and rewind previous interactions.
|
|
134
|
-
- `Up Arrow` / `Down Arrow`: When the cursor is at the top or bottom of a
|
|
135
|
-
single-line input, navigate backward or forward through prompt history.
|
|
136
|
-
- `Number keys (1-9, multi-digit)` inside selection dialogs: Jump directly to
|
|
137
|
-
the numbered radio option and confirm when the full number is entered.
|
|
138
|
-
- `Double-click` on a paste placeholder (`[Pasted Text: X lines]`) in alternate
|
|
139
|
-
buffer mode: Expand to view full content inline. Double-click again to
|
|
140
|
-
collapse.
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Tutorials
|
|
2
|
-
|
|
3
|
-
This page contains tutorials for interacting with Gemini CLI.
|
|
4
|
-
|
|
5
|
-
## Agent Skills
|
|
6
|
-
|
|
7
|
-
- [Getting Started with Agent Skills](./tutorials/skills-getting-started.md)
|
|
8
|
-
|
|
9
|
-
## Setting up a Model Context Protocol (MCP) server
|
|
10
|
-
|
|
11
|
-
> [!CAUTION] Before using a third-party MCP server, ensure you trust its source
|
|
12
|
-
> and understand the tools it provides. Your use of third-party servers is at
|
|
13
|
-
> your own risk.
|
|
14
|
-
|
|
15
|
-
This tutorial demonstrates how to set up an MCP server, using the
|
|
16
|
-
[GitHub MCP server](https://github.com/github/github-mcp-server) as an example.
|
|
17
|
-
The GitHub MCP server provides tools for interacting with GitHub repositories,
|
|
18
|
-
such as creating issues and commenting on pull requests.
|
|
19
|
-
|
|
20
|
-
### Prerequisites
|
|
21
|
-
|
|
22
|
-
Before you begin, ensure you have the following installed and configured:
|
|
23
|
-
|
|
24
|
-
- **Docker:** Install and run [Docker].
|
|
25
|
-
- **GitHub Personal Access Token (PAT):** Create a new [classic] or
|
|
26
|
-
[fine-grained] PAT with the necessary scopes.
|
|
27
|
-
|
|
28
|
-
[Docker]: https://www.docker.com/
|
|
29
|
-
[classic]: https://github.com/settings/tokens/new
|
|
30
|
-
[fine-grained]: https://github.com/settings/personal-access-tokens/new
|
|
31
|
-
|
|
32
|
-
### Guide
|
|
33
|
-
|
|
34
|
-
#### Configure the MCP server in `settings.json`
|
|
35
|
-
|
|
36
|
-
In your project's root directory, create or open the
|
|
37
|
-
[`.gemini/settings.json` file](../get-started/configuration.md). Within the
|
|
38
|
-
file, add the `mcpServers` configuration block, which provides instructions for
|
|
39
|
-
how to launch the GitHub MCP server.
|
|
40
|
-
|
|
41
|
-
```json
|
|
42
|
-
{
|
|
43
|
-
"mcpServers": {
|
|
44
|
-
"github": {
|
|
45
|
-
"command": "docker",
|
|
46
|
-
"args": [
|
|
47
|
-
"run",
|
|
48
|
-
"-i",
|
|
49
|
-
"--rm",
|
|
50
|
-
"-e",
|
|
51
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
|
52
|
-
"ghcr.io/github/github-mcp-server"
|
|
53
|
-
],
|
|
54
|
-
"env": {
|
|
55
|
-
"GITHUB_PERSONAL_ACCESS_TOKEN": "${GITHUB_PERSONAL_ACCESS_TOKEN}"
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
#### Set your GitHub token
|
|
63
|
-
|
|
64
|
-
> [!CAUTION] Using a broadly scoped personal access token that has access to
|
|
65
|
-
> personal and private repositories can lead to information from the private
|
|
66
|
-
> repository being leaked into the public repository. We recommend using a
|
|
67
|
-
> fine-grained access token that doesn't share access to both public and private
|
|
68
|
-
> repositories.
|
|
69
|
-
|
|
70
|
-
Use an environment variable to store your GitHub PAT:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
GITHUB_PERSONAL_ACCESS_TOKEN="pat_YourActualGitHubTokenHere"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Gemini CLI uses this value in the `mcpServers` configuration that you defined in
|
|
77
|
-
the `settings.json` file.
|
|
78
|
-
|
|
79
|
-
#### Launch Gemini CLI and verify the connection
|
|
80
|
-
|
|
81
|
-
When you launch Gemini CLI, it automatically reads your configuration and
|
|
82
|
-
launches the GitHub MCP server in the background. You can then use natural
|
|
83
|
-
language prompts to ask Gemini CLI to perform GitHub actions. For example:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
"get all open issues assigned to me in the 'foo/bar' repo and prioritize them"
|
|
87
|
-
```
|
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
# Policy engine
|
|
2
|
-
|
|
3
|
-
The Gemini CLI includes a powerful policy engine that provides fine-grained
|
|
4
|
-
control over tool execution. It allows users and administrators to define rules
|
|
5
|
-
that determine whether a tool call should be allowed, denied, or require user
|
|
6
|
-
confirmation.
|
|
7
|
-
|
|
8
|
-
## Quick start
|
|
9
|
-
|
|
10
|
-
To create your first policy:
|
|
11
|
-
|
|
12
|
-
1. **Create the policy directory** if it doesn't exist:
|
|
13
|
-
```bash
|
|
14
|
-
mkdir -p ~/.gemini/policies
|
|
15
|
-
```
|
|
16
|
-
2. **Create a new policy file** (e.g., `~/.gemini/policies/my-rules.toml`). You
|
|
17
|
-
can use any filename ending in `.toml`; all such files in this directory
|
|
18
|
-
will be loaded and combined:
|
|
19
|
-
```toml
|
|
20
|
-
[[rule]]
|
|
21
|
-
toolName = "run_shell_command"
|
|
22
|
-
commandPrefix = "git status"
|
|
23
|
-
decision = "allow"
|
|
24
|
-
priority = 100
|
|
25
|
-
```
|
|
26
|
-
3. **Run a command** that triggers the policy (e.g., ask Gemini CLI to
|
|
27
|
-
`git status`). The tool will now execute automatically without prompting for
|
|
28
|
-
confirmation.
|
|
29
|
-
|
|
30
|
-
## Core concepts
|
|
31
|
-
|
|
32
|
-
The policy engine operates on a set of rules. Each rule is a combination of
|
|
33
|
-
conditions and a resulting decision. When a large language model wants to
|
|
34
|
-
execute a tool, the policy engine evaluates all rules to find the
|
|
35
|
-
highest-priority rule that matches the tool call.
|
|
36
|
-
|
|
37
|
-
A rule consists of the following main components:
|
|
38
|
-
|
|
39
|
-
- **Conditions**: Criteria that a tool call must meet for the rule to apply.
|
|
40
|
-
This can include the tool's name, the arguments provided to it, or the current
|
|
41
|
-
approval mode.
|
|
42
|
-
- **Decision**: The action to take if the rule matches (`allow`, `deny`, or
|
|
43
|
-
`ask_user`).
|
|
44
|
-
- **Priority**: A number that determines the rule's precedence. Higher numbers
|
|
45
|
-
win.
|
|
46
|
-
|
|
47
|
-
For example, this rule will ask for user confirmation before executing any `git`
|
|
48
|
-
command.
|
|
49
|
-
|
|
50
|
-
```toml
|
|
51
|
-
[[rule]]
|
|
52
|
-
toolName = "run_shell_command"
|
|
53
|
-
commandPrefix = "git "
|
|
54
|
-
decision = "ask_user"
|
|
55
|
-
priority = 100
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
### Conditions
|
|
59
|
-
|
|
60
|
-
Conditions are the criteria that a tool call must meet for a rule to apply. The
|
|
61
|
-
primary conditions are the tool's name and its arguments.
|
|
62
|
-
|
|
63
|
-
#### Tool Name
|
|
64
|
-
|
|
65
|
-
The `toolName` in the rule must match the name of the tool being called.
|
|
66
|
-
|
|
67
|
-
- **Wildcards**: For Model-hosting-protocol (MCP) servers, you can use a
|
|
68
|
-
wildcard. A `toolName` of `my-server__*` will match any tool from the
|
|
69
|
-
`my-server` MCP.
|
|
70
|
-
|
|
71
|
-
#### Arguments pattern
|
|
72
|
-
|
|
73
|
-
If `argsPattern` is specified, the tool's arguments are converted to a stable
|
|
74
|
-
JSON string, which is then tested against the provided regular expression. If
|
|
75
|
-
the arguments don't match the pattern, the rule does not apply.
|
|
76
|
-
|
|
77
|
-
### Decisions
|
|
78
|
-
|
|
79
|
-
There are three possible decisions a rule can enforce:
|
|
80
|
-
|
|
81
|
-
- `allow`: The tool call is executed automatically without user interaction.
|
|
82
|
-
- `deny`: The tool call is blocked and is not executed.
|
|
83
|
-
- `ask_user`: The user is prompted to approve or deny the tool call. (In
|
|
84
|
-
non-interactive mode, this is treated as `deny`.)
|
|
85
|
-
|
|
86
|
-
### Priority system and tiers
|
|
87
|
-
|
|
88
|
-
The policy engine uses a sophisticated priority system to resolve conflicts when
|
|
89
|
-
multiple rules match a single tool call. The core principle is simple: **the
|
|
90
|
-
rule with the highest priority wins**.
|
|
91
|
-
|
|
92
|
-
To provide a clear hierarchy, policies are organized into three tiers. Each tier
|
|
93
|
-
has a designated number that forms the base of the final priority calculation.
|
|
94
|
-
|
|
95
|
-
| Tier | Base | Description |
|
|
96
|
-
| :------ | :--- | :------------------------------------------------------------------------- |
|
|
97
|
-
| Default | 1 | Built-in policies that ship with the Gemini CLI. |
|
|
98
|
-
| User | 2 | Custom policies defined by the user. |
|
|
99
|
-
| Admin | 3 | Policies managed by an administrator (e.g., in an enterprise environment). |
|
|
100
|
-
|
|
101
|
-
Within a TOML policy file, you assign a priority value from **0 to 999**. The
|
|
102
|
-
engine transforms this into a final priority using the following formula:
|
|
103
|
-
|
|
104
|
-
`final_priority = tier_base + (toml_priority / 1000)`
|
|
105
|
-
|
|
106
|
-
This system guarantees that:
|
|
107
|
-
|
|
108
|
-
- Admin policies always override User and Default policies.
|
|
109
|
-
- User policies always override Default policies.
|
|
110
|
-
- You can still order rules within a single tier with fine-grained control.
|
|
111
|
-
|
|
112
|
-
For example:
|
|
113
|
-
|
|
114
|
-
- A `priority: 50` rule in a Default policy file becomes `1.050`.
|
|
115
|
-
- A `priority: 100` rule in a User policy file becomes `2.100`.
|
|
116
|
-
- A `priority: 20` rule in an Admin policy file becomes `3.020`.
|
|
117
|
-
|
|
118
|
-
### Approval modes
|
|
119
|
-
|
|
120
|
-
Approval modes allow the policy engine to apply different sets of rules based on
|
|
121
|
-
the CLI's operational mode. A rule can be associated with one or more modes
|
|
122
|
-
(e.g., `yolo`, `autoEdit`). The rule will only be active if the CLI is running
|
|
123
|
-
in one of its specified modes. If a rule has no modes specified, it is always
|
|
124
|
-
active.
|
|
125
|
-
|
|
126
|
-
## Rule matching
|
|
127
|
-
|
|
128
|
-
When a tool call is made, the engine checks it against all active rules,
|
|
129
|
-
starting from the highest priority. The first rule that matches determines the
|
|
130
|
-
outcome.
|
|
131
|
-
|
|
132
|
-
A rule matches a tool call if all of its conditions are met:
|
|
133
|
-
|
|
134
|
-
1. **Tool name**: The `toolName` in the rule must match the name of the tool
|
|
135
|
-
being called.
|
|
136
|
-
- **Wildcards**: For Model-hosting-protocol (MCP) servers, you can use a
|
|
137
|
-
wildcard. A `toolName` of `my-server__*` will match any tool from the
|
|
138
|
-
`my-server` MCP.
|
|
139
|
-
2. **Arguments pattern**: If `argsPattern` is specified, the tool's arguments
|
|
140
|
-
are converted to a stable JSON string, which is then tested against the
|
|
141
|
-
provided regular expression. If the arguments don't match the pattern, the
|
|
142
|
-
rule does not apply.
|
|
143
|
-
|
|
144
|
-
## Configuration
|
|
145
|
-
|
|
146
|
-
Policies are defined in `.toml` files. The CLI loads these files from Default,
|
|
147
|
-
User, and (if configured) Admin directories.
|
|
148
|
-
|
|
149
|
-
### Policy locations
|
|
150
|
-
|
|
151
|
-
| Tier | Type | Location |
|
|
152
|
-
| :-------- | :----- | :-------------------------- |
|
|
153
|
-
| **User** | Custom | `~/.gemini/policies/*.toml` |
|
|
154
|
-
| **Admin** | System | _See below (OS specific)_ |
|
|
155
|
-
|
|
156
|
-
#### System-wide policies (Admin)
|
|
157
|
-
|
|
158
|
-
Administrators can enforce system-wide policies (Tier 3) that override all user
|
|
159
|
-
and default settings. These policies must be placed in specific, secure
|
|
160
|
-
directories:
|
|
161
|
-
|
|
162
|
-
| OS | Policy Directory Path |
|
|
163
|
-
| :---------- | :------------------------------------------------ |
|
|
164
|
-
| **Linux** | `/etc/gemini-cli/policies` |
|
|
165
|
-
| **macOS** | `/Library/Application Support/GeminiCli/policies` |
|
|
166
|
-
| **Windows** | `C:\ProgramData\gemini-cli\policies` |
|
|
167
|
-
|
|
168
|
-
**Security Requirements:**
|
|
169
|
-
|
|
170
|
-
To prevent privilege escalation, the CLI enforces strict security checks on
|
|
171
|
-
admin directories. If checks fail, system policies are **ignored**.
|
|
172
|
-
|
|
173
|
-
- **Linux / macOS:** Must be owned by `root` (UID 0) and NOT writable by group
|
|
174
|
-
or others (e.g., `chmod 755`).
|
|
175
|
-
- **Windows:** Must be in `C:\ProgramData`. Standard users (`Users`, `Everyone`)
|
|
176
|
-
must NOT have `Write`, `Modify`, or `Full Control` permissions. _Tip: If you
|
|
177
|
-
see a security warning, use the folder properties to remove write permissions
|
|
178
|
-
for non-admin groups. You may need to "Disable inheritance" in Advanced
|
|
179
|
-
Security Settings._
|
|
180
|
-
|
|
181
|
-
### TOML rule schema
|
|
182
|
-
|
|
183
|
-
Here is a breakdown of the fields available in a TOML policy rule:
|
|
184
|
-
|
|
185
|
-
```toml
|
|
186
|
-
[[rule]]
|
|
187
|
-
# A unique name for the tool, or an array of names.
|
|
188
|
-
toolName = "run_shell_command"
|
|
189
|
-
|
|
190
|
-
# (Optional) The name of an MCP server. Can be combined with toolName
|
|
191
|
-
# to form a composite name like "mcpName__toolName".
|
|
192
|
-
mcpName = "my-custom-server"
|
|
193
|
-
|
|
194
|
-
# (Optional) A regex to match against the tool's arguments.
|
|
195
|
-
argsPattern = '"command":"(git|npm)'
|
|
196
|
-
|
|
197
|
-
# (Optional) A string or array of strings that a shell command must start with.
|
|
198
|
-
# This is syntactic sugar for `toolName = "run_shell_command"` and an `argsPattern`.
|
|
199
|
-
commandPrefix = "git "
|
|
200
|
-
|
|
201
|
-
# (Optional) A regex to match against the entire shell command.
|
|
202
|
-
# This is also syntactic sugar for `toolName = "run_shell_command"`.
|
|
203
|
-
# Note: This pattern is tested against the JSON representation of the arguments (e.g., `{"command":"<your_command>"}`), so anchors like `^` or `$` will apply to the full JSON string, not just the command text.
|
|
204
|
-
# You cannot use commandPrefix and commandRegex in the same rule.
|
|
205
|
-
commandRegex = "^git (commit|push)"
|
|
206
|
-
|
|
207
|
-
# The decision to take. Must be "allow", "deny", or "ask_user".
|
|
208
|
-
decision = "ask_user"
|
|
209
|
-
|
|
210
|
-
# The priority of the rule, from 0 to 999.
|
|
211
|
-
priority = 10
|
|
212
|
-
|
|
213
|
-
# (Optional) A custom message to display when a tool call is denied by this rule.
|
|
214
|
-
# This message is returned to the model and user, useful for explaining *why* it was denied.
|
|
215
|
-
deny_message = "Deletion is permanent"
|
|
216
|
-
|
|
217
|
-
# (Optional) An array of approval modes where this rule is active.
|
|
218
|
-
modes = ["autoEdit"]
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
### Using arrays (lists)
|
|
222
|
-
|
|
223
|
-
To apply the same rule to multiple tools or command prefixes, you can provide an
|
|
224
|
-
array of strings for the `toolName` and `commandPrefix` fields.
|
|
225
|
-
|
|
226
|
-
**Example:**
|
|
227
|
-
|
|
228
|
-
This single rule will apply to both the `write_file` and `replace` tools.
|
|
229
|
-
|
|
230
|
-
```toml
|
|
231
|
-
[[rule]]
|
|
232
|
-
toolName = ["write_file", "replace"]
|
|
233
|
-
decision = "ask_user"
|
|
234
|
-
priority = 10
|
|
235
|
-
```
|
|
236
|
-
|
|
237
|
-
### Special syntax for `run_shell_command`
|
|
238
|
-
|
|
239
|
-
To simplify writing policies for `run_shell_command`, you can use
|
|
240
|
-
`commandPrefix` or `commandRegex` instead of the more complex `argsPattern`.
|
|
241
|
-
|
|
242
|
-
- `commandPrefix`: Matches if the `command` argument starts with the given
|
|
243
|
-
string.
|
|
244
|
-
- `commandRegex`: Matches if the `command` argument matches the given regular
|
|
245
|
-
expression.
|
|
246
|
-
|
|
247
|
-
**Example:**
|
|
248
|
-
|
|
249
|
-
This rule will ask for user confirmation before executing any `git` command.
|
|
250
|
-
|
|
251
|
-
```toml
|
|
252
|
-
[[rule]]
|
|
253
|
-
toolName = "run_shell_command"
|
|
254
|
-
commandPrefix = "git "
|
|
255
|
-
decision = "ask_user"
|
|
256
|
-
priority = 100
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
### Special syntax for MCP tools
|
|
260
|
-
|
|
261
|
-
You can create rules that target tools from Model-hosting-protocol (MCP) servers
|
|
262
|
-
using the `mcpName` field or a wildcard pattern.
|
|
263
|
-
|
|
264
|
-
**1. Using `mcpName`**
|
|
265
|
-
|
|
266
|
-
To target a specific tool from a specific server, combine `mcpName` and
|
|
267
|
-
`toolName`.
|
|
268
|
-
|
|
269
|
-
```toml
|
|
270
|
-
# Allows the `search` tool on the `my-jira-server` MCP
|
|
271
|
-
[[rule]]
|
|
272
|
-
mcpName = "my-jira-server"
|
|
273
|
-
toolName = "search"
|
|
274
|
-
decision = "allow"
|
|
275
|
-
priority = 200
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
**2. Using a wildcard**
|
|
279
|
-
|
|
280
|
-
To create a rule that applies to _all_ tools on a specific MCP server, specify
|
|
281
|
-
only the `mcpName`.
|
|
282
|
-
|
|
283
|
-
```toml
|
|
284
|
-
# Denies all tools from the `untrusted-server` MCP
|
|
285
|
-
[[rule]]
|
|
286
|
-
mcpName = "untrusted-server"
|
|
287
|
-
decision = "deny"
|
|
288
|
-
priority = 500
|
|
289
|
-
deny_message = "This server is not trusted by the admin."
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
## Default policies
|
|
293
|
-
|
|
294
|
-
The Gemini CLI ships with a set of default policies to provide a safe
|
|
295
|
-
out-of-the-box experience.
|
|
296
|
-
|
|
297
|
-
- **Read-only tools** (like `read_file`, `glob`) are generally **allowed**.
|
|
298
|
-
- **Agent delegation** defaults to **`ask_user`** to ensure remote agents can
|
|
299
|
-
prompt for confirmation, but local sub-agent actions are executed silently and
|
|
300
|
-
checked individually.
|
|
301
|
-
- **Write tools** (like `write_file`, `run_shell_command`) default to
|
|
302
|
-
**`ask_user`**.
|
|
303
|
-
- In **`yolo`** mode, a high-priority rule allows all tools.
|
|
304
|
-
- In **`autoEdit`** mode, rules allow certain write operations to happen without
|
|
305
|
-
prompting.
|