@google/gemini-cli 0.10.0-nightly.20250926.1487841d → 0.10.0-nightly.20251009.cd354aeb
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 +108 -71
- package/dist/package.json +8 -2
- package/dist/src/commands/extensions/examples/context/GEMINI.md +9 -3
- package/dist/src/commands/extensions/examples/context/gemini-extension.json +1 -2
- package/dist/src/commands/extensions/install.d.ts +2 -2
- package/dist/src/commands/extensions/install.js +33 -34
- package/dist/src/commands/extensions/install.js.map +1 -1
- package/dist/src/commands/extensions/install.test.js +13 -22
- package/dist/src/commands/extensions/install.test.js.map +1 -1
- package/dist/src/commands/extensions/new.js +22 -7
- package/dist/src/commands/extensions/new.js.map +1 -1
- package/dist/src/commands/extensions/new.test.js +14 -7
- package/dist/src/commands/extensions/new.test.js.map +1 -1
- package/dist/src/commands/extensions/update.js +18 -8
- package/dist/src/commands/extensions/update.js.map +1 -1
- package/dist/src/commands/mcp/list.js +5 -4
- package/dist/src/commands/mcp/list.js.map +1 -1
- package/dist/src/config/config.d.ts +5 -4
- package/dist/src/config/config.js +61 -21
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +22 -18
- package/dist/src/config/extension.js +65 -82
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.d.ts +12 -9
- package/dist/src/config/extensions/extensionEnablement.js +36 -9
- package/dist/src/config/extensions/extensionEnablement.js.map +1 -1
- package/dist/src/config/extensions/extensionEnablement.test.js +72 -0
- package/dist/src/config/extensions/extensionEnablement.test.js.map +1 -1
- package/dist/src/config/extensions/github.d.ts +9 -1
- package/dist/src/config/extensions/github.js +49 -79
- package/dist/src/config/extensions/github.js.map +1 -1
- package/dist/src/config/extensions/github.test.js +119 -12
- package/dist/src/config/extensions/github.test.js.map +1 -1
- package/dist/src/config/extensions/github_fetch.d.ts +7 -0
- package/dist/src/config/extensions/github_fetch.js +34 -0
- package/dist/src/config/extensions/github_fetch.js.map +1 -0
- package/dist/src/config/extensions/update.d.ts +4 -5
- package/dist/src/config/extensions/update.js +60 -41
- package/dist/src/config/extensions/update.js.map +1 -1
- package/dist/src/config/extensions/update.test.js +84 -69
- package/dist/src/config/extensions/update.test.js.map +1 -1
- package/dist/src/config/keyBindings.js +1 -1
- package/dist/src/config/keyBindings.js.map +1 -1
- package/dist/src/config/policy.js +2 -2
- package/dist/src/config/policy.js.map +1 -1
- package/dist/src/config/settings.d.ts +10 -0
- package/dist/src/config/settings.js +2 -1
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/config/settingsSchema.d.ts +69 -4
- package/dist/src/config/settingsSchema.js +68 -3
- package/dist/src/config/settingsSchema.js.map +1 -1
- package/dist/src/config/settingsSchema.test.js +9 -1
- package/dist/src/config/settingsSchema.test.js.map +1 -1
- package/dist/src/gemini.js +14 -10
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/gemini.test.js +20 -8
- package/dist/src/gemini.test.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +2 -2
- package/dist/src/generated/git-commit.js +2 -2
- package/dist/src/services/BuiltinCommandLoader.js +3 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
- package/dist/src/services/BuiltinCommandLoader.test.js +37 -0
- package/dist/src/services/BuiltinCommandLoader.test.js.map +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js +1 -1
- package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -1
- package/dist/src/test-utils/render.d.ts +3 -1
- package/dist/src/test-utils/render.js +4 -1
- package/dist/src/test-utils/render.js.map +1 -1
- package/dist/src/ui/App.js +7 -9
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/AppContainer.js +59 -12
- package/dist/src/ui/AppContainer.js.map +1 -1
- package/dist/src/ui/AppContainer.test.js +269 -7
- package/dist/src/ui/AppContainer.test.js.map +1 -1
- package/dist/src/ui/IdeIntegrationNudge.js +3 -0
- package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.js +8 -1
- package/dist/src/ui/auth/AuthDialog.js.map +1 -1
- package/dist/src/ui/auth/AuthDialog.test.js +1 -0
- package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
- package/dist/src/ui/auth/AuthInProgress.js +2 -2
- package/dist/src/ui/auth/AuthInProgress.js.map +1 -1
- package/dist/src/ui/commands/chatCommand.js +7 -24
- package/dist/src/ui/commands/chatCommand.js.map +1 -1
- package/dist/src/ui/commands/extensionsCommand.js +39 -37
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
- package/dist/src/ui/commands/mcpCommand.js +78 -260
- package/dist/src/ui/commands/mcpCommand.js.map +1 -1
- package/dist/src/ui/commands/memoryCommand.js +18 -1
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/profileCommand.d.ts +7 -0
- package/dist/src/ui/commands/profileCommand.js +23 -0
- package/dist/src/ui/commands/profileCommand.js.map +1 -0
- package/dist/src/ui/commands/setupGithubCommand.test.js +2 -1
- package/dist/src/ui/commands/setupGithubCommand.test.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.js +10 -24
- package/dist/src/ui/commands/toolsCommand.js.map +1 -1
- package/dist/src/ui/commands/types.d.ts +7 -5
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/components/CliSpinner.d.ts +10 -0
- package/dist/src/ui/components/CliSpinner.js +20 -0
- package/dist/src/ui/components/CliSpinner.js.map +1 -0
- package/dist/src/ui/components/Composer.js +4 -21
- package/dist/src/ui/components/Composer.js.map +1 -1
- package/dist/src/ui/components/ConsentPrompt.d.ts +13 -0
- package/dist/src/ui/components/ConsentPrompt.js +19 -0
- package/dist/src/ui/components/ConsentPrompt.js.map +1 -0
- package/dist/src/ui/components/ConsentPrompt.test.d.ts +6 -0
- package/dist/src/ui/components/ConsentPrompt.test.js +67 -0
- package/dist/src/ui/components/ConsentPrompt.test.js.map +1 -0
- package/dist/src/ui/components/DebugProfiler.d.ts +15 -0
- package/dist/src/ui/components/DebugProfiler.js +136 -12
- package/dist/src/ui/components/DebugProfiler.js.map +1 -1
- package/dist/src/ui/components/DebugProfiler.test.d.ts +6 -0
- package/dist/src/ui/components/DebugProfiler.test.js +131 -0
- package/dist/src/ui/components/DebugProfiler.test.js.map +1 -0
- package/dist/src/ui/components/DialogManager.d.ts +2 -1
- package/dist/src/ui/components/DialogManager.js +9 -9
- package/dist/src/ui/components/DialogManager.js.map +1 -1
- package/dist/src/ui/components/EditorSettingsDialog.js +11 -2
- package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
- package/dist/src/ui/components/ExitWarning.d.ts +7 -0
- package/dist/src/ui/components/ExitWarning.js +9 -0
- package/dist/src/ui/components/ExitWarning.js.map +1 -0
- package/dist/src/ui/components/FolderTrustDialog.js +3 -0
- package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
- package/dist/src/ui/components/FolderTrustDialog.test.js +2 -2
- package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -19
- package/dist/src/ui/components/Footer.js +30 -2
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/GeminiRespondingSpinner.js +2 -2
- package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -1
- package/dist/src/ui/components/Help.js +1 -1
- package/dist/src/ui/components/Help.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.d.ts +1 -0
- package/dist/src/ui/components/HistoryItemDisplay.js +6 -2
- package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
- package/dist/src/ui/components/HistoryItemDisplay.test.js +50 -10
- package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
- package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +11 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js +32 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.js.map +1 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +6 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js +57 -0
- package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +6 -0
- package/dist/src/ui/components/InputPrompt.js +43 -13
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/LoopDetectionConfirmation.js +2 -0
- package/dist/src/ui/components/LoopDetectionConfirmation.js.map +1 -1
- package/dist/src/ui/components/MainContent.js +6 -1
- package/dist/src/ui/components/MainContent.js.map +1 -1
- package/dist/src/ui/components/ModelDialog.js +4 -0
- package/dist/src/ui/components/ModelDialog.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js +3 -0
- package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +1 -1
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +0 -4
- package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.js +2 -0
- package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
- package/dist/src/ui/components/ProQuotaDialog.test.js +2 -0
- package/dist/src/ui/components/ProQuotaDialog.test.js.map +1 -1
- package/dist/src/ui/components/SettingsDialog.js +5 -2
- package/dist/src/ui/components/SettingsDialog.js.map +1 -1
- package/dist/src/ui/components/ShellConfirmationDialog.js +3 -0
- package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +2 -0
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +2 -2
- package/dist/src/ui/components/WorkspaceMigrationDialog.js +4 -4
- package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -1
- package/dist/src/ui/components/messages/CompressionMessage.js +2 -2
- package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +14 -0
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolMessage.js +25 -2
- package/dist/src/ui/components/messages/ToolMessage.js.map +1 -1
- package/dist/src/ui/components/messages/UserMessage.js +1 -2
- package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.d.ts +5 -10
- package/dist/src/ui/components/shared/BaseSelectionList.js +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.js.map +1 -1
- package/dist/src/ui/components/shared/BaseSelectionList.test.js +7 -5
- package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +2 -3
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +13 -2
- package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +2 -3
- package/dist/src/ui/components/shared/RadioButtonSelect.js +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js +5 -3
- package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +1 -1
- package/dist/src/ui/components/shared/ScopeSelector.js +4 -1
- package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -1
- package/dist/src/ui/components/views/ChatList.d.ts +12 -0
- package/dist/src/ui/components/views/ChatList.js +17 -0
- package/dist/src/ui/components/views/ChatList.js.map +1 -0
- package/dist/src/ui/components/views/ChatList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ChatList.test.js +42 -0
- package/dist/src/ui/components/views/ChatList.test.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.d.ts +27 -0
- package/dist/src/ui/components/views/McpStatus.js +77 -0
- package/dist/src/ui/components/views/McpStatus.js.map +1 -0
- package/dist/src/ui/components/views/McpStatus.test.d.ts +6 -0
- package/dist/src/ui/components/views/McpStatus.test.js +117 -0
- package/dist/src/ui/components/views/McpStatus.test.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.d.ts +14 -0
- package/dist/src/ui/components/views/ToolsList.js +7 -0
- package/dist/src/ui/components/views/ToolsList.js.map +1 -0
- package/dist/src/ui/components/views/ToolsList.test.d.ts +6 -0
- package/dist/src/ui/components/views/ToolsList.test.js +45 -0
- package/dist/src/ui/components/views/ToolsList.test.js.map +1 -0
- package/dist/src/ui/contexts/UIStateContext.d.ts +5 -1
- package/dist/src/ui/contexts/UIStateContext.js +1 -0
- package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +2 -2
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +6 -5
- package/dist/src/ui/hooks/slashCommandProcessor.js +5 -2
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.d.ts +10 -1
- package/dist/src/ui/hooks/useExtensionUpdates.js +145 -49
- package/dist/src/ui/hooks/useExtensionUpdates.js.map +1 -1
- package/dist/src/ui/hooks/useExtensionUpdates.test.js +161 -80
- package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +1 -1
- package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -1
- package/dist/src/ui/hooks/useFolderTrust.js +12 -3
- package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
- package/dist/src/ui/hooks/useGeminiStream.js +32 -2
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useHistoryManager.js +3 -3
- package/dist/src/ui/hooks/useHistoryManager.js.map +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.d.ts +4 -2
- package/dist/src/ui/hooks/useIdeTrustListener.js +40 -14
- package/dist/src/ui/hooks/useIdeTrustListener.js.map +1 -1
- package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +6 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js +183 -0
- package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +1 -0
- package/dist/src/ui/hooks/useQuotaAndFallback.js +3 -17
- package/dist/src/ui/hooks/useQuotaAndFallback.js.map +1 -1
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js +13 -43
- package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.d.ts +1 -0
- package/dist/src/ui/hooks/useSelectionList.js +63 -43
- package/dist/src/ui/hooks/useSelectionList.js.map +1 -1
- package/dist/src/ui/hooks/useSelectionList.test.js +111 -37
- package/dist/src/ui/hooks/useSelectionList.test.js.map +1 -1
- package/dist/src/ui/hooks/useToolScheduler.test.js +2 -2
- package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
- package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +2 -2
- package/dist/src/ui/hooks/useWorkspaceMigration.js +13 -8
- package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -1
- package/dist/src/ui/layouts/DefaultAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js +13 -0
- package/dist/src/ui/layouts/DefaultAppLayout.js.map +1 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +7 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js +14 -0
- package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +1 -0
- package/dist/src/ui/noninteractive/nonInteractiveUi.js +3 -1
- package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +1 -1
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +2 -2
- package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -1
- package/dist/src/ui/state/extensions.d.ts +46 -0
- package/dist/src/ui/state/extensions.js +67 -0
- package/dist/src/ui/state/extensions.js.map +1 -1
- package/dist/src/ui/types.d.ts +54 -3
- package/dist/src/ui/types.js +3 -0
- package/dist/src/ui/types.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.js +1 -2
- package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
- package/dist/src/ui/utils/MarkdownDisplay.test.js +94 -91
- package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.d.ts +1 -0
- package/dist/src/ui/utils/displayUtils.js +3 -0
- package/dist/src/ui/utils/displayUtils.js.map +1 -1
- package/dist/src/ui/utils/displayUtils.test.js +36 -17
- package/dist/src/ui/utils/displayUtils.test.js.map +1 -1
- package/dist/src/utils/commentJson.js +95 -13
- package/dist/src/utils/commentJson.js.map +1 -1
- package/dist/src/utils/commentJson.test.js +161 -0
- package/dist/src/utils/commentJson.test.js.map +1 -1
- package/dist/src/utils/handleAutoUpdate.js +4 -1
- package/dist/src/utils/handleAutoUpdate.js.map +1 -1
- package/dist/src/utils/installationInfo.d.ts +1 -0
- package/dist/src/utils/installationInfo.js +2 -0
- package/dist/src/utils/installationInfo.js.map +1 -1
- package/dist/src/utils/sessionCleanup.d.ts +22 -0
- package/dist/src/utils/sessionCleanup.integration.test.d.ts +6 -0
- package/dist/src/utils/sessionCleanup.integration.test.js +182 -0
- package/dist/src/utils/sessionCleanup.integration.test.js.map +1 -0
- package/dist/src/utils/sessionCleanup.js +214 -0
- package/dist/src/utils/sessionCleanup.js.map +1 -0
- package/dist/src/utils/sessionCleanup.test.d.ts +6 -0
- package/dist/src/utils/sessionCleanup.test.js +1232 -0
- package/dist/src/utils/sessionCleanup.test.js.map +1 -0
- package/dist/src/utils/sessionUtils.d.ts +37 -0
- package/dist/src/utils/sessionUtils.js +71 -0
- package/dist/src/utils/sessionUtils.js.map +1 -0
- package/dist/src/utils/windowTitle.d.ts +12 -0
- package/dist/src/utils/windowTitle.js +19 -0
- package/dist/src/utils/windowTitle.js.map +1 -0
- package/dist/src/utils/windowTitle.test.d.ts +6 -0
- package/dist/src/utils/windowTitle.test.js +49 -0
- package/dist/src/utils/windowTitle.test.js.map +1 -0
- package/dist/src/zed-integration/acp.js +1 -2
- package/dist/src/zed-integration/acp.js.map +1 -1
- package/dist/src/zed-integration/fileSystemService.d.ts +1 -0
- package/dist/src/zed-integration/fileSystemService.js +3 -0
- package/dist/src/zed-integration/fileSystemService.js.map +1 -1
- package/dist/src/zed-integration/schema.d.ts +48 -48
- package/dist/src/zed-integration/zedIntegration.d.ts +2 -3
- package/dist/src/zed-integration/zedIntegration.js +3 -1
- package/dist/src/zed-integration/zedIntegration.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -7,16 +7,21 @@
|
|
|
7
7
|
|
|
8
8
|

|
|
9
9
|
|
|
10
|
-
Gemini CLI is an open-source AI agent that brings the power of Gemini directly
|
|
10
|
+
Gemini CLI is an open-source AI agent that brings the power of Gemini directly
|
|
11
|
+
into your terminal. It provides lightweight access to Gemini, giving you the
|
|
12
|
+
most direct path from your prompt to our model.
|
|
11
13
|
|
|
12
14
|
## 🚀 Why Gemini CLI?
|
|
13
15
|
|
|
14
|
-
- **🎯 Free tier**: 60 requests/min and 1,000 requests/day with personal Google
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
-
|
|
16
|
+
- **🎯 Free tier**: 60 requests/min and 1,000 requests/day with personal Google
|
|
17
|
+
account.
|
|
18
|
+
- **🧠 Powerful Gemini 2.5 Pro**: Access to 1M token context window.
|
|
19
|
+
- **🔧 Built-in tools**: Google Search grounding, file operations, shell
|
|
20
|
+
commands, web fetching.
|
|
21
|
+
- **🔌 Extensible**: MCP (Model Context Protocol) support for custom
|
|
22
|
+
integrations.
|
|
23
|
+
- **💻 Terminal-first**: Designed for developers who live in the command line.
|
|
24
|
+
- **🛡️ Open source**: Apache 2.0 licensed.
|
|
20
25
|
|
|
21
26
|
## 📦 Installation
|
|
22
27
|
|
|
@@ -52,7 +57,9 @@ See [Releases](./docs/releases.md) for more details.
|
|
|
52
57
|
|
|
53
58
|
### Preview
|
|
54
59
|
|
|
55
|
-
New preview releases will be published each week at UTC 2359 on Tuesdays. These
|
|
60
|
+
New preview releases will be published each week at UTC 2359 on Tuesdays. These
|
|
61
|
+
releases will not have been fully vetted and may contain regressions or other
|
|
62
|
+
outstanding issues. Please help us test and install with `preview` tag.
|
|
56
63
|
|
|
57
64
|
```bash
|
|
58
65
|
npm install -g @google/gemini-cli@preview
|
|
@@ -60,7 +67,9 @@ npm install -g @google/gemini-cli@preview
|
|
|
60
67
|
|
|
61
68
|
### Stable
|
|
62
69
|
|
|
63
|
-
- New stable releases will be published each week at UTC 2000 on Tuesdays, this
|
|
70
|
+
- New stable releases will be published each week at UTC 2000 on Tuesdays, this
|
|
71
|
+
will be the full promotion of last week's `preview` release + any bug fixes
|
|
72
|
+
and validations. Use `latest` tag.
|
|
64
73
|
|
|
65
74
|
```bash
|
|
66
75
|
npm install -g @google/gemini-cli@latest
|
|
@@ -68,7 +77,9 @@ npm install -g @google/gemini-cli@latest
|
|
|
68
77
|
|
|
69
78
|
### Nightly
|
|
70
79
|
|
|
71
|
-
- New releases will be published each week at UTC 0000 each day, This will be
|
|
80
|
+
- New releases will be published each week at UTC 0000 each day, This will be
|
|
81
|
+
all changes from the main branch as represented at time of release. It should
|
|
82
|
+
be assumed there are pending validations and issues. Use `nightly` tag.
|
|
72
83
|
|
|
73
84
|
```bash
|
|
74
85
|
npm install -g @google/gemini-cli@nightly
|
|
@@ -84,24 +95,33 @@ npm install -g @google/gemini-cli@nightly
|
|
|
84
95
|
|
|
85
96
|
### Automation & Integration
|
|
86
97
|
|
|
87
|
-
- Automate operational tasks like querying pull requests or handling complex
|
|
88
|
-
|
|
98
|
+
- Automate operational tasks like querying pull requests or handling complex
|
|
99
|
+
rebases
|
|
100
|
+
- Use MCP servers to connect new capabilities, including
|
|
101
|
+
[media generation with Imagen, Veo or Lyria](https://github.com/GoogleCloudPlatform/vertex-ai-creative-studio/tree/main/experiments/mcp-genmedia)
|
|
89
102
|
- Run non-interactively in scripts for workflow automation
|
|
90
103
|
|
|
91
104
|
### Advanced Capabilities
|
|
92
105
|
|
|
93
|
-
- Ground your queries with built-in
|
|
106
|
+
- Ground your queries with built-in
|
|
107
|
+
[Google Search](https://ai.google.dev/gemini-api/docs/grounding) for real-time
|
|
108
|
+
information
|
|
94
109
|
- Conversation checkpointing to save and resume complex sessions
|
|
95
110
|
- Custom context files (GEMINI.md) to tailor behavior for your projects
|
|
96
111
|
|
|
97
112
|
### GitHub Integration
|
|
98
113
|
|
|
99
|
-
Integrate Gemini CLI directly into your GitHub workflows with
|
|
114
|
+
Integrate Gemini CLI directly into your GitHub workflows with
|
|
115
|
+
[**Gemini CLI GitHub Action**](https://github.com/google-github-actions/run-gemini-cli):
|
|
100
116
|
|
|
101
|
-
- **Pull Request Reviews**: Automated code review with contextual feedback and
|
|
102
|
-
|
|
103
|
-
- **
|
|
104
|
-
|
|
117
|
+
- **Pull Request Reviews**: Automated code review with contextual feedback and
|
|
118
|
+
suggestions
|
|
119
|
+
- **Issue Triage**: Automated labeling and prioritization of GitHub issues based
|
|
120
|
+
on content analysis
|
|
121
|
+
- **On-demand Assistance**: Mention `@gemini-cli` in issues and pull requests
|
|
122
|
+
for help with debugging, explanations, or task delegation
|
|
123
|
+
- **Custom Workflows**: Build automated, scheduled and on-demand workflows
|
|
124
|
+
tailored to your team's needs
|
|
105
125
|
|
|
106
126
|
## 🔐 Authentication Options
|
|
107
127
|
|
|
@@ -109,20 +129,17 @@ Choose the authentication method that best fits your needs:
|
|
|
109
129
|
|
|
110
130
|
### Option 1: Login with Google (OAuth login using your Google Account)
|
|
111
131
|
|
|
112
|
-
**✨ Best for:**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- Anyone who has a Gemini Code Assist license.
|
|
117
|
-
|
|
118
|
-
_See [quota limits and terms of service](https://cloud.google.com/gemini/docs/quotas) for details._
|
|
132
|
+
**✨ Best for:** Individual developers as well as anyone who has a Gemini Code
|
|
133
|
+
Assist License. (see
|
|
134
|
+
[quota limits and terms of service](https://cloud.google.com/gemini/docs/quotas)
|
|
135
|
+
for details)
|
|
119
136
|
|
|
120
137
|
**Benefits:**
|
|
121
138
|
|
|
122
|
-
- **Free tier
|
|
123
|
-
- **Gemini 2.5 Pro
|
|
139
|
+
- **Free tier**: 60 requests/min and 1,000 requests/day
|
|
140
|
+
- **Gemini 2.5 Pro** with 1M token context window
|
|
124
141
|
- **No API key management** - just sign in with your Google account
|
|
125
|
-
- **Automatic updates** to
|
|
142
|
+
- **Automatic updates** to latest models
|
|
126
143
|
|
|
127
144
|
#### Start Gemini CLI, then choose _Login with Google_ and follow the browser authentication flow when prompted
|
|
128
145
|
|
|
@@ -134,7 +151,7 @@ gemini
|
|
|
134
151
|
|
|
135
152
|
```bash
|
|
136
153
|
# Set your Google Cloud Project
|
|
137
|
-
export GOOGLE_CLOUD_PROJECT="
|
|
154
|
+
export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"
|
|
138
155
|
gemini
|
|
139
156
|
```
|
|
140
157
|
|
|
@@ -171,7 +188,8 @@ export GOOGLE_GENAI_USE_VERTEXAI=true
|
|
|
171
188
|
gemini
|
|
172
189
|
```
|
|
173
190
|
|
|
174
|
-
For Google Workspace accounts and other authentication methods, see the
|
|
191
|
+
For Google Workspace accounts and other authentication methods, see the
|
|
192
|
+
[authentication guide](./docs/get-started/authentication.md).
|
|
175
193
|
|
|
176
194
|
## 🚀 Getting Started
|
|
177
195
|
|
|
@@ -233,17 +251,26 @@ gemini
|
|
|
233
251
|
|
|
234
252
|
### Getting Started
|
|
235
253
|
|
|
236
|
-
- [**Quickstart Guide**](./docs/
|
|
237
|
-
|
|
238
|
-
- [**
|
|
239
|
-
|
|
254
|
+
- [**Quickstart Guide**](./docs/get-started/index.md) - Get up and running
|
|
255
|
+
quickly.
|
|
256
|
+
- [**Authentication Setup**](./docs/get-started/authentication.md) - Detailed
|
|
257
|
+
auth configuration.
|
|
258
|
+
- [**Configuration Guide**](./docs/get-started/configuration.md) - Settings and
|
|
259
|
+
customization.
|
|
260
|
+
- [**Keyboard Shortcuts**](./docs/cli/keyboard-shortcuts.md) - Productivity
|
|
261
|
+
tips.
|
|
240
262
|
|
|
241
263
|
### Core Features
|
|
242
264
|
|
|
243
|
-
- [**Commands Reference**](./docs/cli/commands.md) - All slash commands
|
|
244
|
-
|
|
245
|
-
- [**
|
|
246
|
-
|
|
265
|
+
- [**Commands Reference**](./docs/cli/commands.md) - All slash commands
|
|
266
|
+
(`/help`, `/chat`, etc).
|
|
267
|
+
- [**Custom Commands**](./docs/cli/custom-commands.md) - Create your own
|
|
268
|
+
reusable commands.
|
|
269
|
+
- [**Context Files (GEMINI.md)**](./docs/cli/gemini-md.md) - Provide persistent
|
|
270
|
+
context to Gemini CLI.
|
|
271
|
+
- [**Checkpointing**](./docs/cli/checkpointing.md) - Save and resume
|
|
272
|
+
conversations.
|
|
273
|
+
- [**Token Caching**](./docs/cli/token-caching.md) - Optimize token usage.
|
|
247
274
|
|
|
248
275
|
### Tools & Extensions
|
|
249
276
|
|
|
@@ -251,35 +278,37 @@ gemini
|
|
|
251
278
|
- [File System Operations](./docs/tools/file-system.md)
|
|
252
279
|
- [Shell Commands](./docs/tools/shell.md)
|
|
253
280
|
- [Web Fetch & Search](./docs/tools/web-fetch.md)
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
- [**Custom Extensions**](./docs/
|
|
281
|
+
- [**MCP Server Integration**](./docs/tools/mcp-server.md) - Extend with custom
|
|
282
|
+
tools.
|
|
283
|
+
- [**Custom Extensions**](./docs/extensions/index.md) - Build and share your own
|
|
284
|
+
commands.
|
|
257
285
|
|
|
258
286
|
### Advanced Topics
|
|
259
287
|
|
|
260
|
-
- [**
|
|
261
|
-
|
|
262
|
-
- [**
|
|
263
|
-
- [**
|
|
264
|
-
- [**
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
- [**
|
|
271
|
-
- [
|
|
272
|
-
- [**Environment Variables**](./docs/cli/configuration.md#environment-variables)
|
|
288
|
+
- [**Headless Mode (Scripting)**](./docs/cli/headless.md) - Use Gemini CLI in
|
|
289
|
+
automated workflows.
|
|
290
|
+
- [**Architecture Overview**](./docs/architecture.md) - How Gemini CLI works.
|
|
291
|
+
- [**IDE Integration**](./docs/ide-integration/index.md) - VS Code companion.
|
|
292
|
+
- [**Sandboxing & Security**](./docs/cli/sandbox.md) - Safe execution
|
|
293
|
+
environments.
|
|
294
|
+
- [**Trusted Folders**](./docs/cli/trusted-folders.md) - Control execution
|
|
295
|
+
policies by folder.
|
|
296
|
+
- [**Enterprise Guide**](./docs/cli/enterprise.md) - Deploy and manage in a
|
|
297
|
+
corporate environment.
|
|
298
|
+
- [**Telemetry & Monitoring**](./docs/cli/telemetry.md) - Usage tracking.
|
|
299
|
+
- [**Tools API Development**](./docs/core/tools-api.md) - Create custom tools.
|
|
273
300
|
|
|
274
301
|
### Troubleshooting & Support
|
|
275
302
|
|
|
276
|
-
- [**Troubleshooting Guide**](./docs/troubleshooting.md) - Common issues and
|
|
277
|
-
|
|
278
|
-
-
|
|
303
|
+
- [**Troubleshooting Guide**](./docs/troubleshooting.md) - Common issues and
|
|
304
|
+
solutions.
|
|
305
|
+
- [**FAQ**](./docs/faq.md) - Frequently asked questions.
|
|
306
|
+
- Use `/bug` command to report issues directly from the CLI.
|
|
279
307
|
|
|
280
308
|
### Using MCP Servers
|
|
281
309
|
|
|
282
|
-
Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with
|
|
310
|
+
Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with
|
|
311
|
+
custom tools:
|
|
283
312
|
|
|
284
313
|
```text
|
|
285
314
|
> @github List my open pull requests
|
|
@@ -287,31 +316,39 @@ Configure MCP servers in `~/.gemini/settings.json` to extend Gemini CLI with cus
|
|
|
287
316
|
> @database Run a query to find inactive users
|
|
288
317
|
```
|
|
289
318
|
|
|
290
|
-
See the [MCP Server Integration guide](./docs/tools/mcp-server.md) for setup
|
|
319
|
+
See the [MCP Server Integration guide](./docs/tools/mcp-server.md) for setup
|
|
320
|
+
instructions.
|
|
291
321
|
|
|
292
322
|
## 🤝 Contributing
|
|
293
323
|
|
|
294
|
-
We welcome contributions! Gemini CLI is fully open source (Apache 2.0), and we
|
|
324
|
+
We welcome contributions! Gemini CLI is fully open source (Apache 2.0), and we
|
|
325
|
+
encourage the community to:
|
|
295
326
|
|
|
296
|
-
- Report bugs and suggest features
|
|
297
|
-
- Improve documentation
|
|
298
|
-
- Submit code improvements
|
|
299
|
-
- Share your MCP servers and extensions
|
|
327
|
+
- Report bugs and suggest features.
|
|
328
|
+
- Improve documentation.
|
|
329
|
+
- Submit code improvements.
|
|
330
|
+
- Share your MCP servers and extensions.
|
|
300
331
|
|
|
301
|
-
See our [Contributing Guide](./CONTRIBUTING.md) for development setup, coding
|
|
332
|
+
See our [Contributing Guide](./CONTRIBUTING.md) for development setup, coding
|
|
333
|
+
standards, and how to submit pull requests.
|
|
302
334
|
|
|
303
|
-
Check our [Official Roadmap](https://github.com/orgs/google-gemini/projects/11
|
|
335
|
+
Check our [Official Roadmap](https://github.com/orgs/google-gemini/projects/11)
|
|
336
|
+
for planned features and priorities.
|
|
304
337
|
|
|
305
338
|
## 📖 Resources
|
|
306
339
|
|
|
307
|
-
- **[Official Roadmap](./ROADMAP.md)** - See what's coming next
|
|
308
|
-
- **[
|
|
309
|
-
- **[
|
|
310
|
-
|
|
340
|
+
- **[Official Roadmap](./ROADMAP.md)** - See what's coming next.
|
|
341
|
+
- **[Changelog](./docs/changelogs/index.md)** - See recent notable updates.
|
|
342
|
+
- **[NPM Package](https://www.npmjs.com/package/@google/gemini-cli)** - Package
|
|
343
|
+
registry.
|
|
344
|
+
- **[GitHub Issues](https://github.com/google-gemini/gemini-cli/issues)** -
|
|
345
|
+
Report bugs or request features.
|
|
346
|
+
- **[Security Advisories](https://github.com/google-gemini/gemini-cli/security/advisories)** -
|
|
347
|
+
Security updates.
|
|
311
348
|
|
|
312
349
|
### Uninstall
|
|
313
350
|
|
|
314
|
-
See the [Uninstall Guide](docs/
|
|
351
|
+
See the [Uninstall Guide](docs/cli/uninstall.md) for removal instructions.
|
|
315
352
|
|
|
316
353
|
## 📄 Legal
|
|
317
354
|
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google/gemini-cli",
|
|
3
|
-
"version": "0.10.0-nightly.
|
|
3
|
+
"version": "0.10.0-nightly.20251009.cd354aeb",
|
|
4
4
|
"description": "Gemini CLI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"dist"
|
|
26
26
|
],
|
|
27
27
|
"config": {
|
|
28
|
-
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.10.0-nightly.
|
|
28
|
+
"sandboxImageUri": "us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.10.0-nightly.20251009.cd354aeb"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@google/gemini-cli-core": "file:../core",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"ink-gradient": "^3.0.0",
|
|
46
46
|
"ink-spinner": "^5.0.0",
|
|
47
47
|
"lowlight": "^3.3.0",
|
|
48
|
+
"mnemonist": "^0.40.3",
|
|
48
49
|
"open": "^10.1.2",
|
|
49
50
|
"react": "^19.1.0",
|
|
50
51
|
"read-package-up": "^11.0.0",
|
|
@@ -53,7 +54,9 @@
|
|
|
53
54
|
"string-width": "^7.1.0",
|
|
54
55
|
"strip-ansi": "^7.1.0",
|
|
55
56
|
"strip-json-comments": "^3.1.1",
|
|
57
|
+
"tar": "^7.5.1",
|
|
56
58
|
"undici": "^7.10.0",
|
|
59
|
+
"extract-zip": "^2.0.1",
|
|
57
60
|
"update-notifier": "^7.3.1",
|
|
58
61
|
"wrap-ansi": "9.0.2",
|
|
59
62
|
"yargs": "^17.7.2",
|
|
@@ -63,6 +66,7 @@
|
|
|
63
66
|
"@babel/runtime": "^7.27.6",
|
|
64
67
|
"@google/gemini-cli-test-utils": "file:../test-utils",
|
|
65
68
|
"@testing-library/react": "^16.3.0",
|
|
69
|
+
"@types/archiver": "^6.0.3",
|
|
66
70
|
"@types/command-exists": "^1.2.3",
|
|
67
71
|
"@types/diff": "^7.0.2",
|
|
68
72
|
"@types/dotenv": "^6.1.1",
|
|
@@ -71,7 +75,9 @@
|
|
|
71
75
|
"@types/react-dom": "^19.1.6",
|
|
72
76
|
"@types/semver": "^7.7.0",
|
|
73
77
|
"@types/shell-quote": "^1.7.5",
|
|
78
|
+
"@types/tar": "^6.1.13",
|
|
74
79
|
"@types/yargs": "^17.0.32",
|
|
80
|
+
"archiver": "^7.0.1",
|
|
75
81
|
"ink-testing-library": "^4.0.0",
|
|
76
82
|
"jsdom": "^26.1.0",
|
|
77
83
|
"pretty-format": "^30.0.2",
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
# Ink Library Screen Reader Guidance
|
|
2
2
|
|
|
3
|
-
When building custom components, it's important to keep accessibility in mind.
|
|
3
|
+
When building custom components, it's important to keep accessibility in mind.
|
|
4
|
+
While Ink provides the building blocks, ensuring your components are accessible
|
|
5
|
+
will make your CLIs usable by a wider audience.
|
|
4
6
|
|
|
5
7
|
## General Principles
|
|
6
8
|
|
|
7
|
-
Provide screen reader-friendly output: Use the useIsScreenReaderEnabled hook to
|
|
8
|
-
|
|
9
|
+
Provide screen reader-friendly output: Use the useIsScreenReaderEnabled hook to
|
|
10
|
+
detect if a screen reader is active. You can then render a more descriptive
|
|
11
|
+
output for screen reader users. Leverage ARIA props: For components that have a
|
|
12
|
+
specific role (e.g., a checkbox or a button), use the aria-role, aria-state, and
|
|
13
|
+
aria-label props on <Box> and <Text> to provide semantic meaning to screen
|
|
14
|
+
readers.
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import type { CommandModule } from 'yargs';
|
|
7
7
|
interface InstallArgs {
|
|
8
|
-
source
|
|
9
|
-
path?: string;
|
|
8
|
+
source: string;
|
|
10
9
|
ref?: string;
|
|
11
10
|
autoUpdate?: boolean;
|
|
11
|
+
allowPreRelease?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare function handleInstall(args: InstallArgs): Promise<void>;
|
|
14
14
|
export declare const installCommand: CommandModule;
|
|
@@ -5,36 +5,37 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { installExtension, requestConsentNonInteractive, } from '../../config/extension.js';
|
|
7
7
|
import { getErrorMessage } from '../../utils/errors.js';
|
|
8
|
+
import { stat } from 'node:fs/promises';
|
|
8
9
|
export async function handleInstall(args) {
|
|
9
10
|
try {
|
|
10
11
|
let installMetadata;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
source.startsWith('sso://')) {
|
|
17
|
-
installMetadata = {
|
|
18
|
-
source,
|
|
19
|
-
type: 'git',
|
|
20
|
-
ref: args.ref,
|
|
21
|
-
autoUpdate: args.autoUpdate,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
throw new Error(`The source "${source}" is not a valid URL format.`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
else if (args.path) {
|
|
12
|
+
const { source } = args;
|
|
13
|
+
if (source.startsWith('http://') ||
|
|
14
|
+
source.startsWith('https://') ||
|
|
15
|
+
source.startsWith('git@') ||
|
|
16
|
+
source.startsWith('sso://')) {
|
|
29
17
|
installMetadata = {
|
|
30
|
-
source
|
|
31
|
-
type: '
|
|
18
|
+
source,
|
|
19
|
+
type: 'git',
|
|
20
|
+
ref: args.ref,
|
|
32
21
|
autoUpdate: args.autoUpdate,
|
|
22
|
+
allowPreRelease: args.allowPreRelease,
|
|
33
23
|
};
|
|
34
24
|
}
|
|
35
25
|
else {
|
|
36
|
-
|
|
37
|
-
|
|
26
|
+
if (args.ref || args.autoUpdate) {
|
|
27
|
+
throw new Error('--ref and --auto-update are not applicable for local extensions.');
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
await stat(source);
|
|
31
|
+
installMetadata = {
|
|
32
|
+
source,
|
|
33
|
+
type: 'local',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
throw new Error('Install source not found.');
|
|
38
|
+
}
|
|
38
39
|
}
|
|
39
40
|
const name = await installExtension(installMetadata, requestConsentNonInteractive);
|
|
40
41
|
console.log(`Extension "${name}" installed successfully and enabled.`);
|
|
@@ -45,16 +46,13 @@ export async function handleInstall(args) {
|
|
|
45
46
|
}
|
|
46
47
|
}
|
|
47
48
|
export const installCommand = {
|
|
48
|
-
command: 'install
|
|
49
|
+
command: 'install <source> [--auto-update] [--pre-release]',
|
|
49
50
|
describe: 'Installs an extension from a git repository URL or a local path.',
|
|
50
51
|
builder: (yargs) => yargs
|
|
51
52
|
.positional('source', {
|
|
52
|
-
describe: 'The github URL of the extension to install.',
|
|
53
|
-
type: 'string',
|
|
54
|
-
})
|
|
55
|
-
.option('path', {
|
|
56
|
-
describe: 'Path to a local extension directory.',
|
|
53
|
+
describe: 'The github URL or local path of the extension to install.',
|
|
57
54
|
type: 'string',
|
|
55
|
+
demandOption: true,
|
|
58
56
|
})
|
|
59
57
|
.option('ref', {
|
|
60
58
|
describe: 'The git ref to install from.',
|
|
@@ -64,21 +62,22 @@ export const installCommand = {
|
|
|
64
62
|
describe: 'Enable auto-update for this extension.',
|
|
65
63
|
type: 'boolean',
|
|
66
64
|
})
|
|
67
|
-
.
|
|
68
|
-
.
|
|
69
|
-
|
|
65
|
+
.option('pre-release', {
|
|
66
|
+
describe: 'Enable pre-release versions for this extension.',
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
})
|
|
70
69
|
.check((argv) => {
|
|
71
|
-
if (!argv.source
|
|
72
|
-
throw new Error('
|
|
70
|
+
if (!argv.source) {
|
|
71
|
+
throw new Error('The source argument must be provided.');
|
|
73
72
|
}
|
|
74
73
|
return true;
|
|
75
74
|
}),
|
|
76
75
|
handler: async (argv) => {
|
|
77
76
|
await handleInstall({
|
|
78
77
|
source: argv['source'],
|
|
79
|
-
path: argv['path'],
|
|
80
78
|
ref: argv['ref'],
|
|
81
79
|
autoUpdate: argv['auto-update'],
|
|
80
|
+
allowPreRelease: argv['pre-release'],
|
|
82
81
|
});
|
|
83
82
|
},
|
|
84
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../../src/commands/extensions/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../../src/commands/extensions/install.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AASxC,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAiB;IACnD,IAAI,CAAC;QACH,IAAI,eAAyC,CAAC;QAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QACxB,IACE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC;YAC5B,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;YAC7B,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC;YACzB,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAC3B,CAAC;YACD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D,MAAM,CAAC,aAAa,EAAE;QACrB,QAAQ,EAAE,wCAAwC;QAClD,IAAI,EAAE,SAAS;KAChB,CAAC;SACD,MAAM,CAAC,aAAa,EAAE;QACrB,QAAQ,EAAE,iDAAiD;QAC3D,IAAI,EAAE,SAAS;KAChB,CAAC;SACD,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE;QACd,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IACN,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QACtB,MAAM,aAAa,CAAC;YAClB,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAW;YAChC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAuB;YACtC,UAAU,EAAE,IAAI,CAAC,aAAa,CAAwB;YACtD,eAAe,EAAE,IAAI,CAAC,aAAa,CAAwB;SAC5D,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
|
|
@@ -8,6 +8,7 @@ import { handleInstall, installCommand } from './install.js';
|
|
|
8
8
|
import yargs from 'yargs';
|
|
9
9
|
const mockInstallExtension = vi.hoisted(() => vi.fn());
|
|
10
10
|
const mockRequestConsentNonInteractive = vi.hoisted(() => vi.fn());
|
|
11
|
+
const mockStat = vi.hoisted(() => vi.fn());
|
|
11
12
|
vi.mock('../../config/extension.js', () => ({
|
|
12
13
|
installExtension: mockInstallExtension,
|
|
13
14
|
requestConsentNonInteractive: mockRequestConsentNonInteractive,
|
|
@@ -15,24 +16,16 @@ vi.mock('../../config/extension.js', () => ({
|
|
|
15
16
|
vi.mock('../../utils/errors.js', () => ({
|
|
16
17
|
getErrorMessage: vi.fn((error) => error.message),
|
|
17
18
|
}));
|
|
19
|
+
vi.mock('node:fs/promises', () => ({
|
|
20
|
+
stat: mockStat,
|
|
21
|
+
default: {
|
|
22
|
+
stat: mockStat,
|
|
23
|
+
},
|
|
24
|
+
}));
|
|
18
25
|
describe('extensions install command', () => {
|
|
19
26
|
it('should fail if no source is provided', () => {
|
|
20
27
|
const validationParser = yargs([]).command(installCommand).fail(false);
|
|
21
|
-
expect(() => validationParser.parse('install')).toThrow('
|
|
22
|
-
});
|
|
23
|
-
it('should fail if both git source and local path are provided', () => {
|
|
24
|
-
const validationParser = yargs([])
|
|
25
|
-
.command(installCommand)
|
|
26
|
-
.fail(false)
|
|
27
|
-
.locale('en');
|
|
28
|
-
expect(() => validationParser.parse('install some-url --path /some/path')).toThrow('Arguments source and path are mutually exclusive');
|
|
29
|
-
});
|
|
30
|
-
it('should fail if both auto update and local path are provided', () => {
|
|
31
|
-
const validationParser = yargs([])
|
|
32
|
-
.command(installCommand)
|
|
33
|
-
.fail(false)
|
|
34
|
-
.locale('en');
|
|
35
|
-
expect(() => validationParser.parse('install some-url --path /some/path --auto-update')).toThrow('Arguments path and auto-update are mutually exclusive');
|
|
28
|
+
expect(() => validationParser.parse('install')).toThrow('Not enough non-option arguments: got 0, need at least 1');
|
|
36
29
|
});
|
|
37
30
|
});
|
|
38
31
|
describe('handleInstall', () => {
|
|
@@ -49,6 +42,7 @@ describe('handleInstall', () => {
|
|
|
49
42
|
afterEach(() => {
|
|
50
43
|
mockInstallExtension.mockClear();
|
|
51
44
|
mockRequestConsentNonInteractive.mockClear();
|
|
45
|
+
mockStat.mockClear();
|
|
52
46
|
vi.resetAllMocks();
|
|
53
47
|
});
|
|
54
48
|
it('should install an extension from a http source', async () => {
|
|
@@ -73,10 +67,11 @@ describe('handleInstall', () => {
|
|
|
73
67
|
expect(consoleLogSpy).toHaveBeenCalledWith('Extension "git-extension" installed successfully and enabled.');
|
|
74
68
|
});
|
|
75
69
|
it('throws an error from an unknown source', async () => {
|
|
70
|
+
mockStat.mockRejectedValue(new Error('ENOENT: no such file or directory'));
|
|
76
71
|
await handleInstall({
|
|
77
72
|
source: 'test://google.com',
|
|
78
73
|
});
|
|
79
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith('
|
|
74
|
+
expect(consoleErrorSpy).toHaveBeenCalledWith('Install source not found.');
|
|
80
75
|
expect(processSpy).toHaveBeenCalledWith(1);
|
|
81
76
|
});
|
|
82
77
|
it('should install an extension from a sso source', async () => {
|
|
@@ -88,16 +83,12 @@ describe('handleInstall', () => {
|
|
|
88
83
|
});
|
|
89
84
|
it('should install an extension from a local path', async () => {
|
|
90
85
|
mockInstallExtension.mockResolvedValue('local-extension');
|
|
86
|
+
mockStat.mockResolvedValue({});
|
|
91
87
|
await handleInstall({
|
|
92
|
-
|
|
88
|
+
source: '/some/path',
|
|
93
89
|
});
|
|
94
90
|
expect(consoleLogSpy).toHaveBeenCalledWith('Extension "local-extension" installed successfully and enabled.');
|
|
95
91
|
});
|
|
96
|
-
it('should throw an error if no source or path is provided', async () => {
|
|
97
|
-
await handleInstall({});
|
|
98
|
-
expect(consoleErrorSpy).toHaveBeenCalledWith('Either --source or --path must be provided.');
|
|
99
|
-
expect(processSpy).toHaveBeenCalledWith(1);
|
|
100
|
-
});
|
|
101
92
|
it('should throw an error if install extension fails', async () => {
|
|
102
93
|
mockInstallExtension.mockRejectedValue(new Error('Install extension failed'));
|
|
103
94
|
await handleInstall({ source: 'git@some-url' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.test.js","sourceRoot":"","sources":["../../../../src/commands/extensions/install.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAqB,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,oBAAoB,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AACvD,MAAM,gCAAgC,GAAG,EAAE,CAAC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