@google/gemini-cli-core 0.22.0-preview.3 → 0.23.0-preview.0

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.
Files changed (342) hide show
  1. package/dist/docs/CONTRIBUTING.md +546 -0
  2. package/dist/docs/architecture.md +80 -0
  3. package/dist/docs/assets/connected_devtools.png +0 -0
  4. package/dist/docs/assets/gemini-screenshot.png +0 -0
  5. package/dist/docs/assets/release_patch.png +0 -0
  6. package/dist/docs/assets/theme-ansi-light.png +0 -0
  7. package/dist/docs/assets/theme-ansi.png +0 -0
  8. package/dist/docs/assets/theme-atom-one.png +0 -0
  9. package/dist/docs/assets/theme-ayu-light.png +0 -0
  10. package/dist/docs/assets/theme-ayu.png +0 -0
  11. package/dist/docs/assets/theme-custom.png +0 -0
  12. package/dist/docs/assets/theme-default-light.png +0 -0
  13. package/dist/docs/assets/theme-default.png +0 -0
  14. package/dist/docs/assets/theme-dracula.png +0 -0
  15. package/dist/docs/assets/theme-github-light.png +0 -0
  16. package/dist/docs/assets/theme-github.png +0 -0
  17. package/dist/docs/assets/theme-google-light.png +0 -0
  18. package/dist/docs/assets/theme-xcode-light.png +0 -0
  19. package/dist/docs/changelogs/index.md +592 -0
  20. package/dist/docs/changelogs/latest.md +225 -0
  21. package/dist/docs/changelogs/preview.md +129 -0
  22. package/dist/docs/changelogs/releases.md +896 -0
  23. package/dist/docs/cli/authentication.md +3 -0
  24. package/dist/docs/cli/checkpointing.md +94 -0
  25. package/dist/docs/cli/commands.md +354 -0
  26. package/dist/docs/cli/configuration.md +780 -0
  27. package/dist/docs/cli/custom-commands.md +315 -0
  28. package/dist/docs/cli/enterprise.md +565 -0
  29. package/dist/docs/cli/gemini-ignore.md +71 -0
  30. package/dist/docs/cli/gemini-md.md +108 -0
  31. package/dist/docs/cli/generation-settings.md +210 -0
  32. package/dist/docs/cli/headless.md +388 -0
  33. package/dist/docs/cli/index.md +63 -0
  34. package/dist/docs/cli/keyboard-shortcuts.md +143 -0
  35. package/dist/docs/cli/model-routing.md +37 -0
  36. package/dist/docs/cli/model.md +62 -0
  37. package/dist/docs/cli/sandbox.md +171 -0
  38. package/dist/docs/cli/session-management.md +158 -0
  39. package/dist/docs/cli/settings.md +112 -0
  40. package/dist/docs/cli/system-prompt.md +93 -0
  41. package/dist/docs/cli/telemetry.md +791 -0
  42. package/dist/docs/cli/themes.md +237 -0
  43. package/dist/docs/cli/token-caching.md +20 -0
  44. package/dist/docs/cli/trusted-folders.md +95 -0
  45. package/dist/docs/cli/tutorials.md +83 -0
  46. package/dist/docs/cli/uninstall.md +47 -0
  47. package/dist/docs/core/index.md +101 -0
  48. package/dist/docs/core/memport.md +244 -0
  49. package/dist/docs/core/policy-engine.md +267 -0
  50. package/dist/docs/core/tools-api.md +131 -0
  51. package/dist/docs/examples/proxy-script.md +83 -0
  52. package/dist/docs/extensions/extension-releasing.md +183 -0
  53. package/dist/docs/extensions/getting-started-extensions.md +245 -0
  54. package/dist/docs/extensions/index.md +293 -0
  55. package/dist/docs/faq.md +154 -0
  56. package/dist/docs/get-started/authentication.md +321 -0
  57. package/dist/docs/get-started/configuration-v1.md +888 -0
  58. package/dist/docs/get-started/configuration.md +1444 -0
  59. package/dist/docs/get-started/deployment.md +143 -0
  60. package/dist/docs/get-started/examples.md +219 -0
  61. package/dist/docs/get-started/gemini-3.md +116 -0
  62. package/dist/docs/get-started/index.md +71 -0
  63. package/dist/docs/get-started/installation.md +141 -0
  64. package/dist/docs/hooks/best-practices.md +806 -0
  65. package/dist/docs/hooks/index.md +665 -0
  66. package/dist/docs/hooks/reference.md +168 -0
  67. package/dist/docs/hooks/writing-hooks.md +1026 -0
  68. package/dist/docs/ide-integration/ide-companion-spec.md +267 -0
  69. package/dist/docs/ide-integration/index.md +202 -0
  70. package/dist/docs/index.md +147 -0
  71. package/dist/docs/integration-tests.md +211 -0
  72. package/dist/docs/issue-and-pr-automation.md +134 -0
  73. package/dist/docs/local-development.md +128 -0
  74. package/dist/docs/mermaid/context.mmd +103 -0
  75. package/dist/docs/mermaid/render-path.mmd +64 -0
  76. package/dist/docs/npm.md +62 -0
  77. package/dist/docs/quota-and-pricing.md +158 -0
  78. package/dist/docs/release-confidence.md +164 -0
  79. package/dist/docs/releases.md +540 -0
  80. package/dist/docs/sidebar.json +297 -0
  81. package/dist/docs/tools/file-system.md +217 -0
  82. package/dist/docs/tools/index.md +95 -0
  83. package/dist/docs/tools/mcp-server.md +1044 -0
  84. package/dist/docs/tools/memory.md +54 -0
  85. package/dist/docs/tools/shell.md +260 -0
  86. package/dist/docs/tools/todos.md +57 -0
  87. package/dist/docs/tools/web-fetch.md +59 -0
  88. package/dist/docs/tools/web-search.md +42 -0
  89. package/dist/docs/tos-privacy.md +96 -0
  90. package/dist/docs/troubleshooting.md +158 -0
  91. package/dist/src/agents/codebase-investigator.d.ts +2 -2
  92. package/dist/src/agents/codebase-investigator.js +4 -3
  93. package/dist/src/agents/codebase-investigator.js.map +1 -1
  94. package/dist/src/agents/delegate-to-agent-tool.js +8 -4
  95. package/dist/src/agents/delegate-to-agent-tool.js.map +1 -1
  96. package/dist/src/agents/delegate-to-agent-tool.test.js +6 -4
  97. package/dist/src/agents/delegate-to-agent-tool.test.js.map +1 -1
  98. package/dist/src/agents/introspection-agent.d.ts +23 -0
  99. package/dist/src/agents/introspection-agent.js +72 -0
  100. package/dist/src/agents/introspection-agent.js.map +1 -0
  101. package/dist/src/agents/introspection-agent.test.js +47 -0
  102. package/dist/src/agents/introspection-agent.test.js.map +1 -0
  103. package/dist/src/agents/{executor.d.ts → local-executor.d.ts} +5 -11
  104. package/dist/src/agents/{executor.js → local-executor.js} +79 -53
  105. package/dist/src/agents/local-executor.js.map +1 -0
  106. package/dist/src/agents/{executor.test.js → local-executor.test.js} +64 -45
  107. package/dist/src/agents/local-executor.test.js.map +1 -0
  108. package/dist/src/agents/{invocation.d.ts → local-invocation.d.ts} +5 -6
  109. package/dist/src/agents/{invocation.js → local-invocation.js} +8 -9
  110. package/dist/src/agents/local-invocation.js.map +1 -0
  111. package/dist/src/agents/local-invocation.test.d.ts +6 -0
  112. package/dist/src/agents/{invocation.test.js → local-invocation.test.js} +18 -17
  113. package/dist/src/agents/local-invocation.test.js.map +1 -0
  114. package/dist/src/agents/registry.d.ts +1 -0
  115. package/dist/src/agents/registry.js +68 -20
  116. package/dist/src/agents/registry.js.map +1 -1
  117. package/dist/src/agents/registry.test.js +113 -1
  118. package/dist/src/agents/registry.test.js.map +1 -1
  119. package/dist/src/agents/remote-invocation.d.ts +21 -0
  120. package/dist/src/agents/remote-invocation.js +31 -0
  121. package/dist/src/agents/remote-invocation.js.map +1 -0
  122. package/dist/src/agents/remote-invocation.test.d.ts +6 -0
  123. package/dist/src/agents/remote-invocation.test.js +35 -0
  124. package/dist/src/agents/remote-invocation.test.js.map +1 -0
  125. package/dist/src/agents/subagent-tool-wrapper.js +7 -3
  126. package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
  127. package/dist/src/agents/subagent-tool-wrapper.test.js +10 -9
  128. package/dist/src/agents/subagent-tool-wrapper.test.js.map +1 -1
  129. package/dist/src/agents/toml-loader.d.ts +65 -0
  130. package/dist/src/agents/toml-loader.js +176 -0
  131. package/dist/src/agents/toml-loader.js.map +1 -0
  132. package/dist/src/agents/toml-loader.test.d.ts +6 -0
  133. package/dist/src/agents/toml-loader.test.js +190 -0
  134. package/dist/src/agents/toml-loader.test.js.map +1 -0
  135. package/dist/src/agents/types.d.ts +12 -4
  136. package/dist/src/availability/modelAvailabilityService.d.ts +2 -1
  137. package/dist/src/availability/policyHelpers.d.ts +4 -3
  138. package/dist/src/availability/policyHelpers.js +13 -20
  139. package/dist/src/availability/policyHelpers.js.map +1 -1
  140. package/dist/src/availability/policyHelpers.test.js +28 -18
  141. package/dist/src/availability/policyHelpers.test.js.map +1 -1
  142. package/dist/src/code_assist/oauth2.js +1 -1
  143. package/dist/src/code_assist/oauth2.js.map +1 -1
  144. package/dist/src/code_assist/oauth2.test.js +6 -8
  145. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  146. package/dist/src/code_assist/server.d.ts +4 -1
  147. package/dist/src/code_assist/server.js +50 -7
  148. package/dist/src/code_assist/server.js.map +1 -1
  149. package/dist/src/code_assist/server.test.js +177 -27
  150. package/dist/src/code_assist/server.test.js.map +1 -1
  151. package/dist/src/code_assist/telemetry.d.ts +14 -0
  152. package/dist/src/code_assist/telemetry.js +156 -0
  153. package/dist/src/code_assist/telemetry.js.map +1 -0
  154. package/dist/src/code_assist/telemetry.test.d.ts +6 -0
  155. package/dist/src/code_assist/telemetry.test.js +300 -0
  156. package/dist/src/code_assist/telemetry.test.js.map +1 -0
  157. package/dist/src/code_assist/types.d.ts +52 -1
  158. package/dist/src/code_assist/types.js +21 -0
  159. package/dist/src/code_assist/types.js.map +1 -1
  160. package/dist/src/config/config.d.ts +10 -13
  161. package/dist/src/config/config.js +32 -32
  162. package/dist/src/config/config.js.map +1 -1
  163. package/dist/src/config/config.test.js +72 -19
  164. package/dist/src/config/config.test.js.map +1 -1
  165. package/dist/src/config/flashFallback.test.js +0 -37
  166. package/dist/src/config/flashFallback.test.js.map +1 -1
  167. package/dist/src/config/storage.d.ts +2 -0
  168. package/dist/src/config/storage.js +6 -0
  169. package/dist/src/config/storage.js.map +1 -1
  170. package/dist/src/config/storage.test.js +8 -0
  171. package/dist/src/config/storage.test.js.map +1 -1
  172. package/dist/src/core/baseLlmClient.js +44 -43
  173. package/dist/src/core/baseLlmClient.js.map +1 -1
  174. package/dist/src/core/baseLlmClient.test.js +12 -19
  175. package/dist/src/core/baseLlmClient.test.js.map +1 -1
  176. package/dist/src/core/client.js +23 -35
  177. package/dist/src/core/client.js.map +1 -1
  178. package/dist/src/core/client.test.js +32 -65
  179. package/dist/src/core/client.test.js.map +1 -1
  180. package/dist/src/core/clientHookTriggers.js +2 -2
  181. package/dist/src/core/clientHookTriggers.js.map +1 -1
  182. package/dist/src/core/contentGenerator.test.js +0 -6
  183. package/dist/src/core/contentGenerator.test.js.map +1 -1
  184. package/dist/src/core/coreToolHookTriggers.js +3 -3
  185. package/dist/src/core/coreToolHookTriggers.js.map +1 -1
  186. package/dist/src/core/geminiChat.js +21 -71
  187. package/dist/src/core/geminiChat.js.map +1 -1
  188. package/dist/src/core/geminiChat.test.js +16 -92
  189. package/dist/src/core/geminiChat.test.js.map +1 -1
  190. package/dist/src/core/geminiChatHookTriggers.js +3 -3
  191. package/dist/src/core/geminiChatHookTriggers.js.map +1 -1
  192. package/dist/src/core/geminiChat_network_retry.test.js +4 -6
  193. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
  194. package/dist/src/core/prompts.test.js +0 -2
  195. package/dist/src/core/prompts.test.js.map +1 -1
  196. package/dist/src/core/sessionHookTriggers.js +3 -3
  197. package/dist/src/core/sessionHookTriggers.js.map +1 -1
  198. package/dist/src/core/turn.d.ts +1 -0
  199. package/dist/src/core/turn.js +4 -12
  200. package/dist/src/core/turn.js.map +1 -1
  201. package/dist/src/core/turn.test.js +0 -5
  202. package/dist/src/core/turn.test.js.map +1 -1
  203. package/dist/src/fallback/handler.test.js +0 -21
  204. package/dist/src/fallback/handler.test.js.map +1 -1
  205. package/dist/src/generated/git-commit.d.ts +2 -2
  206. package/dist/src/generated/git-commit.js +2 -2
  207. package/dist/src/hooks/hookEventHandler.js +10 -4
  208. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  209. package/dist/src/hooks/hookEventHandler.test.js +47 -0
  210. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  211. package/dist/src/hooks/hookPlanner.js +3 -1
  212. package/dist/src/hooks/hookPlanner.js.map +1 -1
  213. package/dist/src/hooks/hookPlanner.test.js +61 -0
  214. package/dist/src/hooks/hookPlanner.test.js.map +1 -1
  215. package/dist/src/hooks/hookRegistry.d.ts +1 -1
  216. package/dist/src/hooks/hookRegistry.js +2 -2
  217. package/dist/src/hooks/hookRegistry.js.map +1 -1
  218. package/dist/src/hooks/hookRegistry.test.js +73 -0
  219. package/dist/src/hooks/hookRegistry.test.js.map +1 -1
  220. package/dist/src/hooks/hookRunner.js +14 -10
  221. package/dist/src/hooks/hookRunner.js.map +1 -1
  222. package/dist/src/hooks/hookRunner.test.js +81 -33
  223. package/dist/src/hooks/hookRunner.test.js.map +1 -1
  224. package/dist/src/hooks/types.d.ts +2 -0
  225. package/dist/src/hooks/types.js.map +1 -1
  226. package/dist/src/index.d.ts +2 -0
  227. package/dist/src/index.js +2 -0
  228. package/dist/src/index.js.map +1 -1
  229. package/dist/src/mcp/oauth-provider.js +6 -2
  230. package/dist/src/mcp/oauth-provider.js.map +1 -1
  231. package/dist/src/mcp/oauth-provider.test.js +4 -1
  232. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  233. package/dist/src/mcp/oauth-utils.d.ts +8 -1
  234. package/dist/src/mcp/oauth-utils.js +30 -1
  235. package/dist/src/mcp/oauth-utils.js.map +1 -1
  236. package/dist/src/mcp/oauth-utils.test.js +42 -0
  237. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  238. package/dist/src/routing/strategies/fallbackStrategy.js +0 -3
  239. package/dist/src/routing/strategies/fallbackStrategy.js.map +1 -1
  240. package/dist/src/routing/strategies/fallbackStrategy.test.js +0 -6
  241. package/dist/src/routing/strategies/fallbackStrategy.test.js.map +1 -1
  242. package/dist/src/services/contextManager.d.ts +5 -11
  243. package/dist/src/services/contextManager.js +20 -17
  244. package/dist/src/services/contextManager.js.map +1 -1
  245. package/dist/src/services/contextManager.test.js +40 -41
  246. package/dist/src/services/contextManager.test.js.map +1 -1
  247. package/dist/src/services/loopDetectionService.js +2 -1
  248. package/dist/src/services/loopDetectionService.js.map +1 -1
  249. package/dist/src/services/loopDetectionService.test.js +14 -8
  250. package/dist/src/services/loopDetectionService.test.js.map +1 -1
  251. package/dist/src/services/modelConfig.integration.test.js +1 -1
  252. package/dist/src/services/modelConfig.integration.test.js.map +1 -1
  253. package/dist/src/services/shellExecutionService.js +18 -2
  254. package/dist/src/services/shellExecutionService.js.map +1 -1
  255. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +4 -2
  256. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +25 -0
  257. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  258. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +32 -1
  259. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  260. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +5 -1
  261. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +12 -1
  262. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  263. package/dist/src/telemetry/loggers.js +1 -0
  264. package/dist/src/telemetry/loggers.js.map +1 -1
  265. package/dist/src/telemetry/loggers.test.js +37 -2
  266. package/dist/src/telemetry/loggers.test.js.map +1 -1
  267. package/dist/src/telemetry/sdk.js +2 -2
  268. package/dist/src/telemetry/sdk.js.map +1 -1
  269. package/dist/src/tools/confirmation-policy.test.d.ts +6 -0
  270. package/dist/src/tools/confirmation-policy.test.js +152 -0
  271. package/dist/src/tools/confirmation-policy.test.js.map +1 -0
  272. package/dist/src/tools/edit.js +5 -1
  273. package/dist/src/tools/edit.js.map +1 -1
  274. package/dist/src/tools/get-internal-docs.d.ts +27 -0
  275. package/dist/src/tools/get-internal-docs.js +129 -0
  276. package/dist/src/tools/get-internal-docs.js.map +1 -0
  277. package/dist/src/tools/get-internal-docs.test.d.ts +6 -0
  278. package/dist/src/tools/get-internal-docs.test.js +56 -0
  279. package/dist/src/tools/get-internal-docs.test.js.map +1 -0
  280. package/dist/src/tools/ripGrep.d.ts +1 -0
  281. package/dist/src/tools/ripGrep.js +16 -4
  282. package/dist/src/tools/ripGrep.js.map +1 -1
  283. package/dist/src/tools/ripGrep.test.js +55 -0
  284. package/dist/src/tools/ripGrep.test.js.map +1 -1
  285. package/dist/src/tools/smart-edit.js +5 -1
  286. package/dist/src/tools/smart-edit.js.map +1 -1
  287. package/dist/src/tools/tool-names.d.ts +14 -0
  288. package/dist/src/tools/tool-names.js +55 -0
  289. package/dist/src/tools/tool-names.js.map +1 -1
  290. package/dist/src/tools/tool-names.test.d.ts +6 -0
  291. package/dist/src/tools/tool-names.test.js +43 -0
  292. package/dist/src/tools/tool-names.test.js.map +1 -0
  293. package/dist/src/tools/tool-registry.d.ts +0 -1
  294. package/dist/src/tools/tool-registry.js +1 -1
  295. package/dist/src/tools/tool-registry.js.map +1 -1
  296. package/dist/src/tools/tool-registry.test.js +2 -1
  297. package/dist/src/tools/tool-registry.test.js.map +1 -1
  298. package/dist/src/tools/web-fetch.js +5 -1
  299. package/dist/src/tools/web-fetch.js.map +1 -1
  300. package/dist/src/tools/write-file.js +5 -1
  301. package/dist/src/tools/write-file.js.map +1 -1
  302. package/dist/src/utils/checkpointUtils.js +1 -1
  303. package/dist/src/utils/checkpointUtils.js.map +1 -1
  304. package/dist/src/utils/checkpointUtils.test.js +1 -1
  305. package/dist/src/utils/checkpointUtils.test.js.map +1 -1
  306. package/dist/src/utils/editCorrector.js +1 -1
  307. package/dist/src/utils/editCorrector.js.map +1 -1
  308. package/dist/src/utils/editCorrector.test.js +2 -2
  309. package/dist/src/utils/editCorrector.test.js.map +1 -1
  310. package/dist/src/utils/environmentContext.d.ts +1 -0
  311. package/dist/src/utils/environmentContext.js +4 -0
  312. package/dist/src/utils/environmentContext.js.map +1 -1
  313. package/dist/src/utils/environmentContext.test.js +2 -0
  314. package/dist/src/utils/environmentContext.test.js.map +1 -1
  315. package/dist/src/utils/events.d.ts +3 -18
  316. package/dist/src/utils/events.js +0 -9
  317. package/dist/src/utils/events.js.map +1 -1
  318. package/dist/src/utils/geminiIgnoreParser.d.ts +11 -0
  319. package/dist/src/utils/geminiIgnoreParser.js +20 -0
  320. package/dist/src/utils/geminiIgnoreParser.js.map +1 -1
  321. package/dist/src/utils/geminiIgnoreParser.test.js +48 -0
  322. package/dist/src/utils/geminiIgnoreParser.test.js.map +1 -1
  323. package/dist/src/utils/generateContentResponseUtilities.d.ts +1 -0
  324. package/dist/src/utils/generateContentResponseUtilities.js +10 -0
  325. package/dist/src/utils/generateContentResponseUtilities.js.map +1 -1
  326. package/dist/src/utils/generateContentResponseUtilities.test.js +59 -2
  327. package/dist/src/utils/generateContentResponseUtilities.test.js.map +1 -1
  328. package/dist/src/utils/memoryDiscovery.js +1 -1
  329. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  330. package/dist/src/utils/memoryDiscovery.test.js +3 -1
  331. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  332. package/dist/src/utils/shell-utils.js +25 -4
  333. package/dist/src/utils/shell-utils.js.map +1 -1
  334. package/dist/tsconfig.tsbuildinfo +1 -1
  335. package/package.json +1 -6
  336. package/dist/google-gemini-cli-core-0.22.0-preview.2.tgz +0 -0
  337. package/dist/src/agents/executor.js.map +0 -1
  338. package/dist/src/agents/executor.test.js.map +0 -1
  339. package/dist/src/agents/invocation.js.map +0 -1
  340. package/dist/src/agents/invocation.test.js.map +0 -1
  341. /package/dist/src/agents/{executor.test.d.ts → introspection-agent.test.d.ts} +0 -0
  342. /package/dist/src/agents/{invocation.test.d.ts → local-executor.test.d.ts} +0 -0
@@ -0,0 +1,293 @@
1
+ # Gemini CLI extensions
2
+
3
+ _This documentation is up-to-date with the v0.4.0 release._
4
+
5
+ Gemini CLI extensions package prompts, MCP servers, and custom commands into a
6
+ familiar and user-friendly format. With extensions, you can expand the
7
+ capabilities of Gemini CLI and share those capabilities with others. They are
8
+ designed to be easily installable and shareable.
9
+
10
+ To see examples of extensions, you can browse a gallery of
11
+ [Gemini CLI extensions](https://geminicli.com/extensions/browse/).
12
+
13
+ See [getting started docs](getting-started-extensions.md) for a guide on
14
+ creating your first extension.
15
+
16
+ See [releasing docs](extension-releasing.md) for an advanced guide on setting up
17
+ GitHub releases.
18
+
19
+ ## Extension management
20
+
21
+ We offer a suite of extension management tools using `gemini extensions`
22
+ commands.
23
+
24
+ Note that these commands are not supported from within the CLI, although you can
25
+ list installed extensions using the `/extensions list` subcommand.
26
+
27
+ Note that all of these commands will only be reflected in active CLI sessions on
28
+ restart.
29
+
30
+ ### Installing an extension
31
+
32
+ You can install an extension using `gemini extensions install` with either a
33
+ GitHub URL or a local path.
34
+
35
+ Note that we create a copy of the installed extension, so you will need to run
36
+ `gemini extensions update` to pull in changes from both locally-defined
37
+ extensions and those on GitHub.
38
+
39
+ NOTE: If you are installing an extension from GitHub, you'll need to have `git`
40
+ installed on your machine. See
41
+ [git installation instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
42
+ for help.
43
+
44
+ ```
45
+ gemini extensions install <source> [--ref <ref>] [--auto-update] [--pre-release] [--consent]
46
+ ```
47
+
48
+ - `<source>`: The github URL or local path of the extension to install.
49
+ - `--ref`: The git ref to install from.
50
+ - `--auto-update`: Enable auto-update for this extension.
51
+ - `--pre-release`: Enable pre-release versions for this extension.
52
+ - `--consent`: Acknowledge the security risks of installing an extension and
53
+ skip the confirmation prompt.
54
+
55
+ ### Uninstalling an extension
56
+
57
+ To uninstall one or more extensions, run
58
+ `gemini extensions uninstall <name...>`:
59
+
60
+ ```
61
+ gemini extensions uninstall gemini-cli-security gemini-cli-another-extension
62
+ ```
63
+
64
+ ### Disabling an extension
65
+
66
+ Extensions are, by default, enabled across all workspaces. You can disable an
67
+ extension entirely or for specific workspace.
68
+
69
+ ```
70
+ gemini extensions disable <name> [--scope <scope>]
71
+ ```
72
+
73
+ - `<name>`: The name of the extension to disable.
74
+ - `--scope`: The scope to disable the extension in (`user` or `workspace`).
75
+
76
+ ### Enabling an extension
77
+
78
+ You can enable extensions using `gemini extensions enable <name>`. You can also
79
+ enable an extension for a specific workspace using
80
+ `gemini extensions enable <name> --scope=workspace` from within that workspace.
81
+
82
+ ```
83
+ gemini extensions enable <name> [--scope <scope>]
84
+ ```
85
+
86
+ - `<name>`: The name of the extension to enable.
87
+ - `--scope`: The scope to enable the extension in (`user` or `workspace`).
88
+
89
+ ### Updating an extension
90
+
91
+ For extensions installed from a local path or a git repository, you can
92
+ explicitly update to the latest version (as reflected in the
93
+ `gemini-extension.json` `version` field) with `gemini extensions update <name>`.
94
+
95
+ You can update all extensions with:
96
+
97
+ ```
98
+ gemini extensions update --all
99
+ ```
100
+
101
+ ### Create a boilerplate extension
102
+
103
+ We offer several example extensions `context`, `custom-commands`,
104
+ `exclude-tools` and `mcp-server`. You can view these examples
105
+ [here](https://github.com/google-gemini/gemini-cli/tree/main/packages/cli/src/commands/extensions/examples).
106
+
107
+ To copy one of these examples into a development directory using the type of
108
+ your choosing, run:
109
+
110
+ ```
111
+ gemini extensions new <path> [template]
112
+ ```
113
+
114
+ - `<path>`: The path to create the extension in.
115
+ - `[template]`: The boilerplate template to use.
116
+
117
+ ### Link a local extension
118
+
119
+ The `gemini extensions link` command will create a symbolic link from the
120
+ extension installation directory to the development path.
121
+
122
+ This is useful so you don't have to run `gemini extensions update` every time
123
+ you make changes you'd like to test.
124
+
125
+ ```
126
+ gemini extensions link <path>
127
+ ```
128
+
129
+ - `<path>`: The path of the extension to link.
130
+
131
+ ## How it works
132
+
133
+ On startup, Gemini CLI looks for extensions in `<home>/.gemini/extensions`
134
+
135
+ Extensions exist as a directory that contains a `gemini-extension.json` file.
136
+ For example:
137
+
138
+ `<home>/.gemini/extensions/my-extension/gemini-extension.json`
139
+
140
+ ### `gemini-extension.json`
141
+
142
+ The `gemini-extension.json` file contains the configuration for the extension.
143
+ The file has the following structure:
144
+
145
+ ```json
146
+ {
147
+ "name": "my-extension",
148
+ "version": "1.0.0",
149
+ "mcpServers": {
150
+ "my-server": {
151
+ "command": "node my-server.js"
152
+ }
153
+ },
154
+ "contextFileName": "GEMINI.md",
155
+ "excludeTools": ["run_shell_command"]
156
+ }
157
+ ```
158
+
159
+ - `name`: The name of the extension. This is used to uniquely identify the
160
+ extension and for conflict resolution when extension commands have the same
161
+ name as user or project commands. The name should be lowercase or numbers and
162
+ use dashes instead of underscores or spaces. This is how users will refer to
163
+ your extension in the CLI. Note that we expect this name to match the
164
+ extension directory name.
165
+ - `version`: The version of the extension.
166
+ - `mcpServers`: A map of MCP servers to settings. The key is the name of the
167
+ server, and the value is the server configuration. These servers will be
168
+ loaded on startup just like MCP servers settingsd in a
169
+ [`settings.json` file](../get-started/configuration.md). If both an extension
170
+ and a `settings.json` file settings an MCP server with the same name, the
171
+ server defined in the `settings.json` file takes precedence.
172
+ - Note that all MCP server configuration options are supported except for
173
+ `trust`.
174
+ - `contextFileName`: The name of the file that contains the context for the
175
+ extension. This will be used to load the context from the extension directory.
176
+ If this property is not used but a `GEMINI.md` file is present in your
177
+ extension directory, then that file will be loaded.
178
+ - `excludeTools`: An array of tool names to exclude from the model. You can also
179
+ specify command-specific restrictions for tools that support it, like the
180
+ `run_shell_command` tool. For example,
181
+ `"excludeTools": ["run_shell_command(rm -rf)"]` will block the `rm -rf`
182
+ command. Note that this differs from the MCP server `excludeTools`
183
+ functionality, which can be listed in the MCP server config.
184
+
185
+ When Gemini CLI starts, it loads all the extensions and merges their
186
+ configurations. If there are any conflicts, the workspace configuration takes
187
+ precedence.
188
+
189
+ ### Settings
190
+
191
+ _Note: This is an experimental feature. We do not yet recommend extension
192
+ authors introduce settings as part of their core flows._
193
+
194
+ Extensions can define settings that the user will be prompted to provide upon
195
+ installation. This is useful for things like API keys, URLs, or other
196
+ configuration that the extension needs to function.
197
+
198
+ To define settings, add a `settings` array to your `gemini-extension.json` file.
199
+ Each object in the array should have the following properties:
200
+
201
+ - `name`: A user-friendly name for the setting.
202
+ - `description`: A description of the setting and what it's used for.
203
+ - `envVar`: The name of the environment variable that the setting will be stored
204
+ as.
205
+ - `sensitive`: Optional boolean. If true, obfuscates the input the user provides
206
+ and stores the secret in keychain storage. **Example**
207
+
208
+ ```json
209
+ {
210
+ "name": "my-api-extension",
211
+ "version": "1.0.0",
212
+ "settings": [
213
+ {
214
+ "name": "API Key",
215
+ "description": "Your API key for the service.",
216
+ "envVar": "MY_API_KEY"
217
+ }
218
+ ]
219
+ }
220
+ ```
221
+
222
+ When a user installs this extension, they will be prompted to enter their API
223
+ key. The value will be saved to a `.env` file in the extension's directory
224
+ (e.g., `<home>/.gemini/extensions/my-api-extension/.env`).
225
+
226
+ You can view a list of an extension's settings by running:
227
+
228
+ ```
229
+ gemini extensions settings list <extension name>
230
+ ```
231
+
232
+ and you can update a given setting using:
233
+
234
+ ```
235
+ gemini extensions settings set <extension name> <setting name> [--scope <scope>]
236
+ ```
237
+
238
+ - `--scope`: The scope to set the setting in (`user` or `workspace`). This is
239
+ optional and will default to `user`.
240
+
241
+ ### Custom commands
242
+
243
+ Extensions can provide [custom commands](../cli/custom-commands.md) by placing
244
+ TOML files in a `commands/` subdirectory within the extension directory. These
245
+ commands follow the same format as user and project custom commands and use
246
+ standard naming conventions.
247
+
248
+ **Example**
249
+
250
+ An extension named `gcp` with the following structure:
251
+
252
+ ```
253
+ .gemini/extensions/gcp/
254
+ ├── gemini-extension.json
255
+ └── commands/
256
+ ├── deploy.toml
257
+ └── gcs/
258
+ └── sync.toml
259
+ ```
260
+
261
+ Would provide these commands:
262
+
263
+ - `/deploy` - Shows as `[gcp] Custom command from deploy.toml` in help
264
+ - `/gcs:sync` - Shows as `[gcp] Custom command from sync.toml` in help
265
+
266
+ ### Conflict resolution
267
+
268
+ Extension commands have the lowest precedence. When a conflict occurs with user
269
+ or project commands:
270
+
271
+ 1. **No conflict**: Extension command uses its natural name (e.g., `/deploy`)
272
+ 2. **With conflict**: Extension command is renamed with the extension prefix
273
+ (e.g., `/gcp.deploy`)
274
+
275
+ For example, if both a user and the `gcp` extension define a `deploy` command:
276
+
277
+ - `/deploy` - Executes the user's deploy command
278
+ - `/gcp.deploy` - Executes the extension's deploy command (marked with `[gcp]`
279
+ tag)
280
+
281
+ ## Variables
282
+
283
+ Gemini CLI extensions allow variable substitution in `gemini-extension.json`.
284
+ This can be useful if e.g., you need the current directory to run an MCP server
285
+ using `"cwd": "${extensionPath}${/}run.ts"`.
286
+
287
+ **Supported variables:**
288
+
289
+ | variable | description |
290
+ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
291
+ | `${extensionPath}` | The fully-qualified path of the extension in the user's filesystem e.g., '/Users/username/.gemini/extensions/example-extension'. This will not unwrap symlinks. |
292
+ | `${workspacePath}` | The fully-qualified path of the current workspace. |
293
+ | `${/} or ${pathSeparator}` | The path separator (differs per OS). |
@@ -0,0 +1,154 @@
1
+ # Frequently asked questions (FAQ)
2
+
3
+ This page provides answers to common questions and solutions to frequent
4
+ problems encountered while using Gemini CLI.
5
+
6
+ ## General issues
7
+
8
+ ### Why am I getting an `API error: 429 - Resource exhausted`?
9
+
10
+ This error indicates that you have exceeded your API request limit. The Gemini
11
+ API has rate limits to prevent abuse and ensure fair usage.
12
+
13
+ To resolve this, you can:
14
+
15
+ - **Check your usage:** Review your API usage in the Google AI Studio or your
16
+ Google Cloud project dashboard.
17
+ - **Optimize your prompts:** If you are making many requests in a short period,
18
+ try to batch your prompts or introduce delays between requests.
19
+ - **Request a quota increase:** If you consistently need a higher limit, you can
20
+ request a quota increase from Google.
21
+
22
+ ### Why am I getting an `ERR_REQUIRE_ESM` error when running `npm run start`?
23
+
24
+ This error typically occurs in Node.js projects when there is a mismatch between
25
+ CommonJS and ES Modules.
26
+
27
+ This is often due to a misconfiguration in your `package.json` or
28
+ `tsconfig.json`. Ensure that:
29
+
30
+ 1. Your `package.json` has `"type": "module"`.
31
+ 2. Your `tsconfig.json` has `"module": "NodeNext"` or a compatible setting in
32
+ the `compilerOptions`.
33
+
34
+ If the problem persists, try deleting your `node_modules` directory and
35
+ `package-lock.json` file, and then run `npm install` again.
36
+
37
+ ### Why don't I see cached token counts in my stats output?
38
+
39
+ Cached token information is only displayed when cached tokens are being used.
40
+ This feature is available for API key users (Gemini API key or Google Cloud
41
+ Vertex AI) but not for OAuth users (such as Google Personal/Enterprise accounts
42
+ like Google Gmail or Google Workspace, respectively). This is because the Gemini
43
+ Code Assist API does not support cached content creation. You can still view
44
+ your total token usage using the `/stats` command in Gemini CLI.
45
+
46
+ ## Installation and updates
47
+
48
+ ### How do I update Gemini CLI to the latest version?
49
+
50
+ If you installed it globally via `npm`, update it using the command
51
+ `npm install -g @google/gemini-cli@latest`. If you compiled it from source, pull
52
+ the latest changes from the repository, and then rebuild using the command
53
+ `npm run build`.
54
+
55
+ ## Platform-specific issues
56
+
57
+ ### Why does the CLI crash on Windows when I run a command like `chmod +x`?
58
+
59
+ Commands like `chmod` are specific to Unix-like operating systems (Linux,
60
+ macOS). They are not available on Windows by default.
61
+
62
+ To resolve this, you can:
63
+
64
+ - **Use Windows-equivalent commands:** Instead of `chmod`, you can use `icacls`
65
+ to modify file permissions on Windows.
66
+ - **Use a compatibility layer:** Tools like Git Bash or Windows Subsystem for
67
+ Linux (WSL) provide a Unix-like environment on Windows where these commands
68
+ will work.
69
+
70
+ ## Configuration
71
+
72
+ ### How do I configure my `GOOGLE_CLOUD_PROJECT`?
73
+
74
+ You can configure your Google Cloud Project ID using an environment variable.
75
+
76
+ Set the `GOOGLE_CLOUD_PROJECT` environment variable in your shell:
77
+
78
+ ```bash
79
+ export GOOGLE_CLOUD_PROJECT="your-project-id"
80
+ ```
81
+
82
+ To make this setting permanent, add this line to your shell's startup file
83
+ (e.g., `~/.bashrc`, `~/.zshrc`).
84
+
85
+ ### What is the best way to store my API keys securely?
86
+
87
+ Exposing API keys in scripts or checking them into source control is a security
88
+ risk.
89
+
90
+ To store your API keys securely, you can:
91
+
92
+ - **Use a `.env` file:** Create a `.env` file in your project's `.gemini`
93
+ directory (`.gemini/.env`) and store your keys there. Gemini CLI will
94
+ automatically load these variables.
95
+ - **Use your system's keyring:** For the most secure storage, use your operating
96
+ system's secret management tool (like macOS Keychain, Windows Credential
97
+ Manager, or a secret manager on Linux). You can then have your scripts or
98
+ environment load the key from the secure storage at runtime.
99
+
100
+ ### Where are the Gemini CLI configuration and settings files stored?
101
+
102
+ The Gemini CLI configuration is stored in two `settings.json` files:
103
+
104
+ 1. In your home directory: `~/.gemini/settings.json`.
105
+ 2. In your project's root directory: `./.gemini/settings.json`.
106
+
107
+ Refer to [Gemini CLI Configuration](./get-started/configuration.md) for more
108
+ details.
109
+
110
+ ## Google AI Pro/Ultra and subscription FAQs
111
+
112
+ ### Where can I learn more about my Google AI Pro or Google AI Ultra subscription?
113
+
114
+ To learn more about your Google AI Pro or Google AI Ultra subscription, visit
115
+ **Manage subscription** in your [subscription settings](https://one.google.com).
116
+
117
+ ### How do I know if I have higher limits for Google AI Pro or Ultra?
118
+
119
+ If you're subscribed to Google AI Pro or Ultra, you automatically have higher
120
+ limits to Gemini Code Assist and Gemini CLI. These are shared across Gemini CLI
121
+ and agent mode in the IDE. You can confirm you have higher limits by checking if
122
+ you are still subscribed to Google AI Pro or Ultra in your
123
+ [subscription settings](https://one.google.com).
124
+
125
+ ### What is the privacy policy for using Gemini Code Assist or Gemini CLI if I've subscribed to Google AI Pro or Ultra?
126
+
127
+ To learn more about your privacy policy and terms of service governed by your
128
+ subscription, visit
129
+ [Gemini Code Assist: Terms of Service and Privacy Policies](https://developers.google.com/gemini-code-assist/resources/privacy-notices).
130
+
131
+ ### I've upgraded to Google AI Pro or Ultra but it still says I am hitting quota limits. Is this a bug?
132
+
133
+ The higher limits in your Google AI Pro or Ultra subscription are for Gemini 2.5
134
+ across both Gemini 2.5 Pro and Flash. They are shared quota across Gemini CLI
135
+ and agent mode in Gemini Code Assist IDE extensions. You can learn more about
136
+ quota limits for Gemini CLI, Gemini Code Assist and agent mode in Gemini Code
137
+ Assist at
138
+ [Quotas and limits](https://developers.google.com/gemini-code-assist/resources/quotas).
139
+
140
+ ### If I upgrade to higher limits for Gemini CLI and Gemini Code Assist by purchasing a Google AI Pro or Ultra subscription, will Gemini start using my data to improve its machine learning models?
141
+
142
+ Google does not use your data to improve Google's machine learning models if you
143
+ purchase a paid plan. Note: If you decide to remain on the free version of
144
+ Gemini Code Assist, Gemini Code Assist for individuals, you can also opt out of
145
+ using your data to improve Google's machine learning models. See the
146
+ [Gemini Code Assist for individuals privacy notice](https://developers.google.com/gemini-code-assist/resources/privacy-notice-gemini-code-assist-individuals)
147
+ for more information.
148
+
149
+ ## Not seeing your question?
150
+
151
+ Search the
152
+ [Gemini CLI Q&A discussions on GitHub](https://github.com/google-gemini/gemini-cli/discussions/categories/q-a)
153
+ or
154
+ [start a new discussion on GitHub](https://github.com/google-gemini/gemini-cli/discussions/new?category=q-a)