@google/gemini-cli-core 0.30.0-preview.6 → 0.31.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 (687) hide show
  1. package/README.md +1 -1
  2. package/dist/docs/CONTRIBUTING.md +6 -7
  3. package/dist/docs/changelogs/index.md +22 -2
  4. package/dist/docs/changelogs/latest.md +359 -293
  5. package/dist/docs/changelogs/preview.md +300 -349
  6. package/dist/docs/cli/cli-reference.md +23 -23
  7. package/dist/docs/cli/enterprise.md +7 -7
  8. package/dist/docs/cli/gemini-md.md +1 -1
  9. package/dist/docs/cli/model.md +1 -1
  10. package/dist/docs/cli/plan-mode.md +180 -80
  11. package/dist/docs/cli/sandbox.md +3 -3
  12. package/dist/docs/cli/settings.md +59 -51
  13. package/dist/docs/cli/telemetry.md +4 -1
  14. package/dist/docs/cli/themes.md +3 -3
  15. package/dist/docs/cli/trusted-folders.md +31 -0
  16. package/dist/docs/cli/tutorials/memory-management.md +2 -2
  17. package/dist/docs/cli/tutorials/session-management.md +1 -1
  18. package/dist/docs/core/index.md +7 -7
  19. package/dist/docs/core/subagents.md +155 -39
  20. package/dist/docs/extensions/reference.md +38 -14
  21. package/dist/docs/get-started/authentication.md +4 -4
  22. package/dist/docs/get-started/examples.md +2 -2
  23. package/dist/docs/get-started/gemini-3.md +17 -3
  24. package/dist/docs/get-started/index.md +11 -2
  25. package/dist/docs/hooks/best-practices.md +1 -1
  26. package/dist/docs/hooks/reference.md +8 -0
  27. package/dist/docs/ide-integration/index.md +14 -0
  28. package/dist/docs/index.md +62 -67
  29. package/dist/docs/redirects.json +19 -0
  30. package/dist/docs/{cli → reference}/commands.md +67 -11
  31. package/dist/docs/{get-started → reference}/configuration.md +93 -24
  32. package/dist/docs/{cli → reference}/keyboard-shortcuts.md +3 -3
  33. package/dist/docs/{core → reference}/policy-engine.md +63 -27
  34. package/dist/docs/{faq.md → resources/faq.md} +1 -1
  35. package/dist/docs/{quota-and-pricing.md → resources/quota-and-pricing.md} +12 -5
  36. package/dist/docs/{tos-privacy.md → resources/tos-privacy.md} +2 -2
  37. package/dist/docs/{troubleshooting.md → resources/troubleshooting.md} +1 -1
  38. package/dist/docs/sidebar.json +203 -166
  39. package/dist/docs/tools/file-system.md +7 -4
  40. package/dist/docs/tools/index.md +5 -2
  41. package/dist/docs/tools/internal-docs.md +5 -5
  42. package/dist/docs/tools/mcp-server.md +62 -2
  43. package/dist/docs/tools/planning.md +2 -0
  44. package/dist/docs/tools/shell.md +3 -3
  45. package/dist/src/agents/a2a-client-manager.test.js +1 -2
  46. package/dist/src/agents/a2a-client-manager.test.js.map +1 -1
  47. package/dist/src/agents/a2aUtils.d.ts +1 -5
  48. package/dist/src/agents/a2aUtils.js +1 -1
  49. package/dist/src/agents/a2aUtils.js.map +1 -1
  50. package/dist/src/agents/acknowledgedAgents.js +1 -0
  51. package/dist/src/agents/acknowledgedAgents.js.map +1 -1
  52. package/dist/src/agents/agent-scheduler.js +1 -0
  53. package/dist/src/agents/agent-scheduler.js.map +1 -1
  54. package/dist/src/agents/agentLoader.d.ts +0 -1
  55. package/dist/src/agents/agentLoader.js +22 -21
  56. package/dist/src/agents/agentLoader.js.map +1 -1
  57. package/dist/src/agents/agentLoader.test.js +1 -5
  58. package/dist/src/agents/agentLoader.test.js.map +1 -1
  59. package/dist/src/agents/auth-provider/api-key-provider.d.ts +30 -0
  60. package/dist/src/agents/auth-provider/api-key-provider.js +66 -0
  61. package/dist/src/agents/auth-provider/api-key-provider.js.map +1 -0
  62. package/dist/src/agents/auth-provider/api-key-provider.test.d.ts +6 -0
  63. package/dist/src/agents/auth-provider/api-key-provider.test.js +130 -0
  64. package/dist/src/agents/auth-provider/api-key-provider.test.js.map +1 -0
  65. package/dist/src/agents/auth-provider/base-provider.d.ts +2 -2
  66. package/dist/src/agents/auth-provider/base-provider.js.map +1 -1
  67. package/dist/src/agents/auth-provider/factory.js +6 -3
  68. package/dist/src/agents/auth-provider/factory.js.map +1 -1
  69. package/dist/src/agents/auth-provider/factory.test.js +12 -0
  70. package/dist/src/agents/auth-provider/factory.test.js.map +1 -1
  71. package/dist/src/agents/auth-provider/types.d.ts +2 -4
  72. package/dist/src/agents/browser/analyzeScreenshot.d.ts +35 -0
  73. package/dist/src/agents/browser/analyzeScreenshot.js +183 -0
  74. package/dist/src/agents/browser/analyzeScreenshot.js.map +1 -0
  75. package/dist/src/agents/browser/analyzeScreenshot.test.d.ts +6 -0
  76. package/dist/src/agents/browser/analyzeScreenshot.test.js +161 -0
  77. package/dist/src/agents/browser/analyzeScreenshot.test.js.map +1 -0
  78. package/dist/src/agents/browser/browserAgentDefinition.d.ts +50 -0
  79. package/dist/src/agents/browser/browserAgentDefinition.js +141 -0
  80. package/dist/src/agents/browser/browserAgentDefinition.js.map +1 -0
  81. package/dist/src/agents/browser/browserAgentFactory.d.ts +42 -0
  82. package/dist/src/agents/browser/browserAgentFactory.js +107 -0
  83. package/dist/src/agents/browser/browserAgentFactory.js.map +1 -0
  84. package/dist/src/agents/browser/browserAgentFactory.test.d.ts +6 -0
  85. package/dist/src/agents/browser/browserAgentFactory.test.js +186 -0
  86. package/dist/src/agents/browser/browserAgentFactory.test.js.map +1 -0
  87. package/dist/src/agents/browser/browserAgentInvocation.d.ts +44 -0
  88. package/dist/src/agents/browser/browserAgentInvocation.js +109 -0
  89. package/dist/src/agents/browser/browserAgentInvocation.js.map +1 -0
  90. package/dist/src/agents/browser/browserAgentInvocation.test.d.ts +6 -0
  91. package/dist/src/agents/browser/browserAgentInvocation.test.js +87 -0
  92. package/dist/src/agents/browser/browserAgentInvocation.test.js.map +1 -0
  93. package/dist/src/agents/browser/browserManager.d.ts +110 -0
  94. package/dist/src/agents/browser/browserManager.js +323 -0
  95. package/dist/src/agents/browser/browserManager.js.map +1 -0
  96. package/dist/src/agents/browser/browserManager.test.d.ts +6 -0
  97. package/dist/src/agents/browser/browserManager.test.js +314 -0
  98. package/dist/src/agents/browser/browserManager.test.js.map +1 -0
  99. package/dist/src/agents/browser/mcpToolWrapper.d.ts +45 -0
  100. package/dist/src/agents/browser/mcpToolWrapper.js +356 -0
  101. package/dist/src/agents/browser/mcpToolWrapper.js.map +1 -0
  102. package/dist/src/agents/browser/mcpToolWrapper.test.d.ts +6 -0
  103. package/dist/src/agents/browser/mcpToolWrapper.test.js +126 -0
  104. package/dist/src/agents/browser/mcpToolWrapper.test.js.map +1 -0
  105. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.d.ts +6 -0
  106. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js +57 -0
  107. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js.map +1 -0
  108. package/dist/src/agents/browser/modelAvailability.d.ts +23 -0
  109. package/dist/src/agents/browser/modelAvailability.js +23 -0
  110. package/dist/src/agents/browser/modelAvailability.js.map +1 -0
  111. package/dist/src/agents/local-executor.js +73 -31
  112. package/dist/src/agents/local-executor.js.map +1 -1
  113. package/dist/src/agents/local-executor.test.js +157 -4
  114. package/dist/src/agents/local-executor.test.js.map +1 -1
  115. package/dist/src/agents/local-invocation.test.js.map +1 -1
  116. package/dist/src/agents/registry.js +8 -0
  117. package/dist/src/agents/registry.js.map +1 -1
  118. package/dist/src/agents/registry.test.js.map +1 -1
  119. package/dist/src/agents/remote-invocation.d.ts +2 -1
  120. package/dist/src/agents/remote-invocation.js +3 -3
  121. package/dist/src/agents/remote-invocation.js.map +1 -1
  122. package/dist/src/agents/subagent-tool-wrapper.js +6 -0
  123. package/dist/src/agents/subagent-tool-wrapper.js.map +1 -1
  124. package/dist/src/agents/subagent-tool.d.ts +3 -0
  125. package/dist/src/agents/subagent-tool.js +62 -3
  126. package/dist/src/agents/subagent-tool.js.map +1 -1
  127. package/dist/src/agents/subagent-tool.test.js +143 -0
  128. package/dist/src/agents/subagent-tool.test.js.map +1 -1
  129. package/dist/src/availability/fallbackIntegration.test.js +4 -1
  130. package/dist/src/availability/fallbackIntegration.test.js.map +1 -1
  131. package/dist/src/availability/policyHelpers.js +3 -1
  132. package/dist/src/availability/policyHelpers.js.map +1 -1
  133. package/dist/src/availability/policyHelpers.test.js +51 -5
  134. package/dist/src/availability/policyHelpers.test.js.map +1 -1
  135. package/dist/src/code_assist/admin/admin_controls.js +1 -0
  136. package/dist/src/code_assist/admin/admin_controls.js.map +1 -1
  137. package/dist/src/code_assist/converter.js +8 -2
  138. package/dist/src/code_assist/converter.js.map +1 -1
  139. package/dist/src/code_assist/converter.test.js.map +1 -1
  140. package/dist/src/code_assist/experiments/experiments.js +1 -1
  141. package/dist/src/code_assist/experiments/experiments.js.map +1 -1
  142. package/dist/src/code_assist/oauth-credential-storage.js +1 -1
  143. package/dist/src/code_assist/oauth-credential-storage.js.map +1 -1
  144. package/dist/src/code_assist/oauth-credential-storage.test.js +5 -0
  145. package/dist/src/code_assist/oauth-credential-storage.test.js.map +1 -1
  146. package/dist/src/code_assist/oauth2.js +11 -8
  147. package/dist/src/code_assist/oauth2.js.map +1 -1
  148. package/dist/src/code_assist/oauth2.test.js +55 -0
  149. package/dist/src/code_assist/oauth2.test.js.map +1 -1
  150. package/dist/src/code_assist/server.js +22 -13
  151. package/dist/src/code_assist/server.js.map +1 -1
  152. package/dist/src/code_assist/server.test.js +26 -0
  153. package/dist/src/code_assist/server.test.js.map +1 -1
  154. package/dist/src/code_assist/telemetry.js +16 -3
  155. package/dist/src/code_assist/telemetry.js.map +1 -1
  156. package/dist/src/code_assist/telemetry.test.js +10 -0
  157. package/dist/src/code_assist/telemetry.test.js.map +1 -1
  158. package/dist/src/code_assist/types.d.ts +13 -12
  159. package/dist/src/code_assist/types.js.map +1 -1
  160. package/dist/src/config/config.d.ts +83 -8
  161. package/dist/src/config/config.js +127 -23
  162. package/dist/src/config/config.js.map +1 -1
  163. package/dist/src/config/config.test.js +285 -10
  164. package/dist/src/config/config.test.js.map +1 -1
  165. package/dist/src/config/projectRegistry.js +1 -0
  166. package/dist/src/config/projectRegistry.js.map +1 -1
  167. package/dist/src/config/storage.d.ts +17 -1
  168. package/dist/src/config/storage.js +82 -2
  169. package/dist/src/config/storage.js.map +1 -1
  170. package/dist/src/config/storage.test.js +149 -2
  171. package/dist/src/config/storage.test.js.map +1 -1
  172. package/dist/src/config/userHintService.d.ts +46 -0
  173. package/dist/src/config/userHintService.js +81 -0
  174. package/dist/src/config/userHintService.js.map +1 -0
  175. package/dist/src/config/userHintService.test.d.ts +6 -0
  176. package/dist/src/config/userHintService.test.js +62 -0
  177. package/dist/src/config/userHintService.test.js.map +1 -0
  178. package/dist/src/confirmation-bus/message-bus.js +15 -3
  179. package/dist/src/confirmation-bus/message-bus.js.map +1 -1
  180. package/dist/src/confirmation-bus/message-bus.test.js +15 -0
  181. package/dist/src/confirmation-bus/message-bus.test.js.map +1 -1
  182. package/dist/src/confirmation-bus/types.d.ts +7 -0
  183. package/dist/src/confirmation-bus/types.js.map +1 -1
  184. package/dist/src/core/baseLlmClient.d.ts +2 -3
  185. package/dist/src/core/baseLlmClient.js +7 -5
  186. package/dist/src/core/baseLlmClient.js.map +1 -1
  187. package/dist/src/core/baseLlmClient.test.js +45 -20
  188. package/dist/src/core/baseLlmClient.test.js.map +1 -1
  189. package/dist/src/core/client.js +18 -7
  190. package/dist/src/core/client.js.map +1 -1
  191. package/dist/src/core/coreToolHookTriggers.d.ts +2 -3
  192. package/dist/src/core/coreToolHookTriggers.js +8 -3
  193. package/dist/src/core/coreToolHookTriggers.js.map +1 -1
  194. package/dist/src/core/coreToolScheduler.js +2 -1
  195. package/dist/src/core/coreToolScheduler.js.map +1 -1
  196. package/dist/src/core/coreToolScheduler.test.js +10 -3
  197. package/dist/src/core/coreToolScheduler.test.js.map +1 -1
  198. package/dist/src/core/fakeContentGenerator.js +2 -0
  199. package/dist/src/core/fakeContentGenerator.js.map +1 -1
  200. package/dist/src/core/geminiChat.d.ts +1 -1
  201. package/dist/src/core/geminiChat.js +5 -5
  202. package/dist/src/core/geminiChat.js.map +1 -1
  203. package/dist/src/core/geminiChat.test.js +1 -0
  204. package/dist/src/core/geminiChat.test.js.map +1 -1
  205. package/dist/src/core/geminiChat_network_retry.test.js +1 -0
  206. package/dist/src/core/geminiChat_network_retry.test.js.map +1 -1
  207. package/dist/src/core/logger.js +2 -0
  208. package/dist/src/core/logger.js.map +1 -1
  209. package/dist/src/core/loggingContentGenerator.d.ts +14 -2
  210. package/dist/src/core/loggingContentGenerator.js +98 -4
  211. package/dist/src/core/loggingContentGenerator.js.map +1 -1
  212. package/dist/src/core/loggingContentGenerator.test.js +275 -1
  213. package/dist/src/core/loggingContentGenerator.test.js.map +1 -1
  214. package/dist/src/core/prompts.test.js +55 -27
  215. package/dist/src/core/prompts.test.js.map +1 -1
  216. package/dist/src/core/recordingContentGenerator.test.js +5 -0
  217. package/dist/src/core/recordingContentGenerator.test.js.map +1 -1
  218. package/dist/src/core/turn.d.ts +4 -2
  219. package/dist/src/core/turn.js +2 -0
  220. package/dist/src/core/turn.js.map +1 -1
  221. package/dist/src/core/turn.test.js +4 -1
  222. package/dist/src/core/turn.test.js.map +1 -1
  223. package/dist/src/generated/git-commit.d.ts +2 -2
  224. package/dist/src/generated/git-commit.js +2 -2
  225. package/dist/src/hooks/hookAggregator.d.ts +1 -2
  226. package/dist/src/hooks/hookAggregator.js +1 -2
  227. package/dist/src/hooks/hookAggregator.js.map +1 -1
  228. package/dist/src/hooks/hookEventHandler.d.ts +2 -2
  229. package/dist/src/hooks/hookEventHandler.js +13 -4
  230. package/dist/src/hooks/hookEventHandler.js.map +1 -1
  231. package/dist/src/hooks/hookEventHandler.test.js +1 -2
  232. package/dist/src/hooks/hookEventHandler.test.js.map +1 -1
  233. package/dist/src/hooks/hookPlanner.d.ts +1 -2
  234. package/dist/src/hooks/hookPlanner.js.map +1 -1
  235. package/dist/src/hooks/hookRegistry.d.ts +8 -0
  236. package/dist/src/hooks/hookRegistry.js +31 -3
  237. package/dist/src/hooks/hookRegistry.js.map +1 -1
  238. package/dist/src/hooks/hookRegistry.test.js.map +1 -1
  239. package/dist/src/hooks/hookRunner.d.ts +5 -2
  240. package/dist/src/hooks/hookRunner.js +52 -2
  241. package/dist/src/hooks/hookRunner.js.map +1 -1
  242. package/dist/src/hooks/hookRunner.test.js.map +1 -1
  243. package/dist/src/hooks/hookSystem.d.ts +11 -3
  244. package/dist/src/hooks/hookSystem.js +10 -4
  245. package/dist/src/hooks/hookSystem.js.map +1 -1
  246. package/dist/src/hooks/hookSystem.test.js +1 -0
  247. package/dist/src/hooks/hookSystem.test.js.map +1 -1
  248. package/dist/src/hooks/runtimeHooks.test.d.ts +6 -0
  249. package/dist/src/hooks/runtimeHooks.test.js +100 -0
  250. package/dist/src/hooks/runtimeHooks.test.js.map +1 -0
  251. package/dist/src/hooks/trustedHooks.js +6 -1
  252. package/dist/src/hooks/trustedHooks.js.map +1 -1
  253. package/dist/src/hooks/trustedHooks.test.js +17 -9
  254. package/dist/src/hooks/trustedHooks.test.js.map +1 -1
  255. package/dist/src/hooks/types.d.ts +49 -8
  256. package/dist/src/hooks/types.js +20 -1
  257. package/dist/src/hooks/types.js.map +1 -1
  258. package/dist/src/ide/detect-ide.d.ts +0 -1
  259. package/dist/src/ide/detect-ide.js +1 -1
  260. package/dist/src/ide/detect-ide.js.map +1 -1
  261. package/dist/src/ide/ide-client.js +3 -2
  262. package/dist/src/ide/ide-client.js.map +1 -1
  263. package/dist/src/ide/ide-connection-utils.js +90 -14
  264. package/dist/src/ide/ide-connection-utils.js.map +1 -1
  265. package/dist/src/ide/ide-connection-utils.test.js +78 -0
  266. package/dist/src/ide/ide-connection-utils.test.js.map +1 -1
  267. package/dist/src/ide/ide-installer.test.js +1 -2
  268. package/dist/src/ide/ide-installer.test.js.map +1 -1
  269. package/dist/src/ide/process-utils.d.ts +7 -0
  270. package/dist/src/ide/process-utils.js +20 -0
  271. package/dist/src/ide/process-utils.js.map +1 -1
  272. package/dist/src/ide/process-utils.test.js +30 -0
  273. package/dist/src/ide/process-utils.test.js.map +1 -1
  274. package/dist/src/index.d.ts +6 -1
  275. package/dist/src/index.js +6 -1
  276. package/dist/src/index.js.map +1 -1
  277. package/dist/src/mcp/oauth-provider.d.ts +1 -1
  278. package/dist/src/mcp/oauth-provider.js +8 -7
  279. package/dist/src/mcp/oauth-provider.js.map +1 -1
  280. package/dist/src/mcp/oauth-provider.test.js +34 -2
  281. package/dist/src/mcp/oauth-provider.test.js.map +1 -1
  282. package/dist/src/mcp/oauth-utils.js +2 -0
  283. package/dist/src/mcp/oauth-utils.js.map +1 -1
  284. package/dist/src/mcp/oauth-utils.test.js +12 -0
  285. package/dist/src/mcp/oauth-utils.test.js.map +1 -1
  286. package/dist/src/mcp/token-storage/file-token-storage.js +4 -1
  287. package/dist/src/mcp/token-storage/file-token-storage.js.map +1 -1
  288. package/dist/src/mcp/token-storage/file-token-storage.test.js +40 -2
  289. package/dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -1
  290. package/dist/src/mcp/token-storage/keychain-token-storage.js +2 -0
  291. package/dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -1
  292. package/dist/src/policy/config.d.ts +18 -9
  293. package/dist/src/policy/config.js +75 -54
  294. package/dist/src/policy/config.js.map +1 -1
  295. package/dist/src/policy/config.test.js +26 -26
  296. package/dist/src/policy/integrity.d.ts +45 -0
  297. package/dist/src/policy/integrity.js +121 -0
  298. package/dist/src/policy/integrity.js.map +1 -0
  299. package/dist/src/policy/integrity.test.d.ts +6 -0
  300. package/dist/src/policy/integrity.test.js +132 -0
  301. package/dist/src/policy/integrity.test.js.map +1 -0
  302. package/dist/src/policy/persistence.test.js +29 -19
  303. package/dist/src/policy/persistence.test.js.map +1 -1
  304. package/dist/src/policy/policies/conseca.toml +6 -0
  305. package/dist/src/policy/policies/plan.toml +28 -12
  306. package/dist/src/policy/policies/read-only.toml +11 -10
  307. package/dist/src/policy/policies/write.toml +11 -10
  308. package/dist/src/policy/policies/yolo.toml +11 -10
  309. package/dist/src/policy/policy-engine.d.ts +16 -3
  310. package/dist/src/policy/policy-engine.js +154 -29
  311. package/dist/src/policy/policy-engine.js.map +1 -1
  312. package/dist/src/policy/policy-engine.test.js +480 -9
  313. package/dist/src/policy/policy-engine.test.js.map +1 -1
  314. package/dist/src/policy/policy-updater.test.js +11 -6
  315. package/dist/src/policy/policy-updater.test.js.map +1 -1
  316. package/dist/src/policy/toml-loader.d.ts +13 -2
  317. package/dist/src/policy/toml-loader.js +55 -34
  318. package/dist/src/policy/toml-loader.js.map +1 -1
  319. package/dist/src/policy/toml-loader.test.js +115 -7
  320. package/dist/src/policy/toml-loader.test.js.map +1 -1
  321. package/dist/src/policy/types.d.ts +18 -1
  322. package/dist/src/policy/types.js +1 -0
  323. package/dist/src/policy/types.js.map +1 -1
  324. package/dist/src/policy/workspace-policy.test.d.ts +6 -0
  325. package/dist/src/policy/workspace-policy.test.js +231 -0
  326. package/dist/src/policy/workspace-policy.test.js.map +1 -0
  327. package/dist/src/prompts/promptProvider.js +11 -13
  328. package/dist/src/prompts/promptProvider.js.map +1 -1
  329. package/dist/src/prompts/promptProvider.test.js +64 -3
  330. package/dist/src/prompts/promptProvider.test.js.map +1 -1
  331. package/dist/src/prompts/snippets.js +41 -10
  332. package/dist/src/prompts/snippets.js.map +1 -1
  333. package/dist/src/prompts/snippets.legacy.js +1 -0
  334. package/dist/src/prompts/snippets.legacy.js.map +1 -1
  335. package/dist/src/routing/modelRouterService.js +3 -1
  336. package/dist/src/routing/modelRouterService.js.map +1 -1
  337. package/dist/src/routing/modelRouterService.test.js +12 -6
  338. package/dist/src/routing/modelRouterService.test.js.map +1 -1
  339. package/dist/src/routing/strategies/approvalModeStrategy.d.ts +18 -0
  340. package/dist/src/routing/strategies/approvalModeStrategy.js +58 -0
  341. package/dist/src/routing/strategies/approvalModeStrategy.js.map +1 -0
  342. package/dist/src/routing/strategies/approvalModeStrategy.test.d.ts +6 -0
  343. package/dist/src/routing/strategies/approvalModeStrategy.test.js +110 -0
  344. package/dist/src/routing/strategies/approvalModeStrategy.test.js.map +1 -0
  345. package/dist/src/safety/checker-runner.js +1 -0
  346. package/dist/src/safety/checker-runner.js.map +1 -1
  347. package/dist/src/safety/conseca/conseca.d.ts +31 -0
  348. package/dist/src/safety/conseca/conseca.js +105 -0
  349. package/dist/src/safety/conseca/conseca.js.map +1 -0
  350. package/dist/src/safety/conseca/conseca.test.d.ts +6 -0
  351. package/dist/src/safety/conseca/conseca.test.js +226 -0
  352. package/dist/src/safety/conseca/conseca.test.js.map +1 -0
  353. package/dist/src/safety/conseca/integration.test.d.ts +6 -0
  354. package/dist/src/safety/conseca/integration.test.js +19 -0
  355. package/dist/src/safety/conseca/integration.test.js.map +1 -0
  356. package/dist/src/safety/conseca/policy-enforcer.d.ts +13 -0
  357. package/dist/src/safety/conseca/policy-enforcer.js +135 -0
  358. package/dist/src/safety/conseca/policy-enforcer.js.map +1 -0
  359. package/dist/src/safety/conseca/policy-enforcer.test.d.ts +6 -0
  360. package/dist/src/safety/conseca/policy-enforcer.test.js +141 -0
  361. package/dist/src/safety/conseca/policy-enforcer.test.js.map +1 -0
  362. package/dist/src/safety/conseca/policy-generator.d.ts +15 -0
  363. package/dist/src/safety/conseca/policy-generator.js +144 -0
  364. package/dist/src/safety/conseca/policy-generator.js.map +1 -0
  365. package/dist/src/safety/conseca/policy-generator.test.d.ts +6 -0
  366. package/dist/src/safety/conseca/policy-generator.test.js +84 -0
  367. package/dist/src/safety/conseca/policy-generator.test.js.map +1 -0
  368. package/dist/src/safety/conseca/types.d.ts +15 -0
  369. package/dist/src/safety/conseca/types.js +7 -0
  370. package/dist/src/safety/conseca/types.js.map +1 -0
  371. package/dist/src/safety/context-builder.d.ts +3 -3
  372. package/dist/src/safety/context-builder.js +60 -4
  373. package/dist/src/safety/context-builder.js.map +1 -1
  374. package/dist/src/safety/context-builder.test.js +98 -18
  375. package/dist/src/safety/context-builder.test.js.map +1 -1
  376. package/dist/src/safety/protocol.d.ts +4 -0
  377. package/dist/src/safety/registry.d.ts +2 -1
  378. package/dist/src/safety/registry.js +14 -4
  379. package/dist/src/safety/registry.js.map +1 -1
  380. package/dist/src/safety/registry.test.js +5 -2
  381. package/dist/src/safety/registry.test.js.map +1 -1
  382. package/dist/src/scheduler/confirmation.d.ts +0 -13
  383. package/dist/src/scheduler/confirmation.js +1 -1
  384. package/dist/src/scheduler/confirmation.js.map +1 -1
  385. package/dist/src/scheduler/policy.js +6 -2
  386. package/dist/src/scheduler/policy.js.map +1 -1
  387. package/dist/src/scheduler/policy.test.js +4 -3
  388. package/dist/src/scheduler/policy.test.js.map +1 -1
  389. package/dist/src/scheduler/scheduler.d.ts +3 -1
  390. package/dist/src/scheduler/scheduler.js +148 -28
  391. package/dist/src/scheduler/scheduler.js.map +1 -1
  392. package/dist/src/scheduler/scheduler.test.js +341 -242
  393. package/dist/src/scheduler/scheduler.test.js.map +1 -1
  394. package/dist/src/scheduler/scheduler_parallel.test.d.ts +6 -0
  395. package/dist/src/scheduler/scheduler_parallel.test.js +309 -0
  396. package/dist/src/scheduler/scheduler_parallel.test.js.map +1 -0
  397. package/dist/src/scheduler/state-manager.d.ts +8 -0
  398. package/dist/src/scheduler/state-manager.js +30 -2
  399. package/dist/src/scheduler/state-manager.js.map +1 -1
  400. package/dist/src/scheduler/state-manager.test.js +61 -0
  401. package/dist/src/scheduler/state-manager.test.js.map +1 -1
  402. package/dist/src/scheduler/tool-executor.js +15 -7
  403. package/dist/src/scheduler/tool-executor.js.map +1 -1
  404. package/dist/src/scheduler/tool-executor.test.js +1 -1
  405. package/dist/src/scheduler/tool-executor.test.js.map +1 -1
  406. package/dist/src/scheduler/types.d.ts +23 -0
  407. package/dist/src/services/FolderTrustDiscoveryService.d.ts +32 -0
  408. package/dist/src/services/FolderTrustDiscoveryService.js +167 -0
  409. package/dist/src/services/FolderTrustDiscoveryService.js.map +1 -0
  410. package/dist/src/services/FolderTrustDiscoveryService.test.d.ts +6 -0
  411. package/dist/src/services/FolderTrustDiscoveryService.test.js +118 -0
  412. package/dist/src/services/FolderTrustDiscoveryService.test.js.map +1 -0
  413. package/dist/src/services/chatCompressionService.d.ts +0 -14
  414. package/dist/src/services/chatCompressionService.js +29 -7
  415. package/dist/src/services/chatCompressionService.js.map +1 -1
  416. package/dist/src/services/chatCompressionService.test.js +3 -1
  417. package/dist/src/services/chatCompressionService.test.js.map +1 -1
  418. package/dist/src/services/chatRecordingService.d.ts +7 -1
  419. package/dist/src/services/chatRecordingService.js +12 -1
  420. package/dist/src/services/chatRecordingService.js.map +1 -1
  421. package/dist/src/services/chatRecordingService.test.js +34 -0
  422. package/dist/src/services/chatRecordingService.test.js.map +1 -1
  423. package/dist/src/services/loopDetectionService.js +1 -2
  424. package/dist/src/services/loopDetectionService.js.map +1 -1
  425. package/dist/src/services/sessionSummaryUtils.js +3 -0
  426. package/dist/src/services/sessionSummaryUtils.js.map +1 -1
  427. package/dist/src/services/shellExecutionService.js +6 -0
  428. package/dist/src/services/shellExecutionService.js.map +1 -1
  429. package/dist/src/skills/skillLoader.js +2 -2
  430. package/dist/src/skills/skillLoader.js.map +1 -1
  431. package/dist/src/telemetry/clearcut-logger/clearcut-logger.d.ts +3 -1
  432. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js +35 -4
  433. package/dist/src/telemetry/clearcut-logger/clearcut-logger.js.map +1 -1
  434. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.d.ts +0 -1
  435. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js +19 -5
  436. package/dist/src/telemetry/clearcut-logger/clearcut-logger.test.js.map +1 -1
  437. package/dist/src/telemetry/clearcut-logger/event-metadata-key.d.ts +14 -1
  438. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js +29 -1
  439. package/dist/src/telemetry/clearcut-logger/event-metadata-key.js.map +1 -1
  440. package/dist/src/telemetry/conseca-logger.d.ts +9 -0
  441. package/dist/src/telemetry/conseca-logger.js +91 -0
  442. package/dist/src/telemetry/conseca-logger.js.map +1 -0
  443. package/dist/src/telemetry/conseca-logger.test.d.ts +6 -0
  444. package/dist/src/telemetry/conseca-logger.test.js +89 -0
  445. package/dist/src/telemetry/conseca-logger.test.js.map +1 -0
  446. package/dist/src/telemetry/gcp-exporters.js +1 -2
  447. package/dist/src/telemetry/gcp-exporters.js.map +1 -1
  448. package/dist/src/telemetry/index.d.ts +2 -1
  449. package/dist/src/telemetry/index.js +2 -1
  450. package/dist/src/telemetry/index.js.map +1 -1
  451. package/dist/src/telemetry/integration.test.circular.js +3 -0
  452. package/dist/src/telemetry/integration.test.circular.js.map +1 -1
  453. package/dist/src/telemetry/loggers.d.ts +1 -2
  454. package/dist/src/telemetry/loggers.js +3 -13
  455. package/dist/src/telemetry/loggers.js.map +1 -1
  456. package/dist/src/telemetry/loggers.test.circular.js +3 -0
  457. package/dist/src/telemetry/loggers.test.circular.js.map +1 -1
  458. package/dist/src/telemetry/loggers.test.js +6 -5
  459. package/dist/src/telemetry/loggers.test.js.map +1 -1
  460. package/dist/src/telemetry/metrics.d.ts +1 -3
  461. package/dist/src/telemetry/metrics.js +3 -2
  462. package/dist/src/telemetry/metrics.js.map +1 -1
  463. package/dist/src/telemetry/metrics.test.js +7 -3
  464. package/dist/src/telemetry/metrics.test.js.map +1 -1
  465. package/dist/src/telemetry/sanitize.test.js +19 -18
  466. package/dist/src/telemetry/sanitize.test.js.map +1 -1
  467. package/dist/src/telemetry/semantic.d.ts +7 -9
  468. package/dist/src/telemetry/semantic.js +8 -8
  469. package/dist/src/telemetry/semantic.js.map +1 -1
  470. package/dist/src/telemetry/types.d.ts +42 -4
  471. package/dist/src/telemetry/types.js +87 -2
  472. package/dist/src/telemetry/types.js.map +1 -1
  473. package/dist/src/telemetry/uiTelemetry.d.ts +1 -2
  474. package/dist/src/telemetry/uiTelemetry.js.map +1 -1
  475. package/dist/src/telemetry/uiTelemetry.test.js +1 -2
  476. package/dist/src/telemetry/uiTelemetry.test.js.map +1 -1
  477. package/dist/src/tools/ask-user.test.js +1 -19
  478. package/dist/src/tools/ask-user.test.js.map +1 -1
  479. package/dist/src/tools/confirmation-policy.test.js +14 -17
  480. package/dist/src/tools/confirmation-policy.test.js.map +1 -1
  481. package/dist/src/tools/definitions/dynamic-declaration-helpers.js +1 -1
  482. package/dist/src/tools/definitions/dynamic-declaration-helpers.js.map +1 -1
  483. package/dist/src/tools/definitions/model-family-sets/default-legacy.js +14 -16
  484. package/dist/src/tools/definitions/model-family-sets/default-legacy.js.map +1 -1
  485. package/dist/src/tools/definitions/model-family-sets/gemini-3.js +24 -59
  486. package/dist/src/tools/definitions/model-family-sets/gemini-3.js.map +1 -1
  487. package/dist/src/tools/diff-utils.d.ts +9 -0
  488. package/dist/src/tools/diff-utils.js +66 -0
  489. package/dist/src/tools/diff-utils.js.map +1 -0
  490. package/dist/src/tools/diff-utils.test.d.ts +6 -0
  491. package/dist/src/tools/diff-utils.test.js +53 -0
  492. package/dist/src/tools/diff-utils.test.js.map +1 -0
  493. package/dist/src/tools/edit.d.ts +9 -4
  494. package/dist/src/tools/edit.js +203 -34
  495. package/dist/src/tools/edit.js.map +1 -1
  496. package/dist/src/tools/edit.test.js +225 -10
  497. package/dist/src/tools/edit.test.js.map +1 -1
  498. package/dist/src/tools/enter-plan-mode.js +1 -1
  499. package/dist/src/tools/enter-plan-mode.js.map +1 -1
  500. package/dist/src/tools/enter-plan-mode.test.js +1 -1
  501. package/dist/src/tools/enter-plan-mode.test.js.map +1 -1
  502. package/dist/src/tools/exit-plan-mode.js +10 -24
  503. package/dist/src/tools/exit-plan-mode.js.map +1 -1
  504. package/dist/src/tools/exit-plan-mode.test.js +1 -1
  505. package/dist/src/tools/exit-plan-mode.test.js.map +1 -1
  506. package/dist/src/tools/grep-utils.d.ts +49 -0
  507. package/dist/src/tools/grep-utils.js +139 -0
  508. package/dist/src/tools/grep-utils.js.map +1 -0
  509. package/dist/src/tools/grep.js +4 -44
  510. package/dist/src/tools/grep.js.map +1 -1
  511. package/dist/src/tools/grep.test.js +21 -2
  512. package/dist/src/tools/grep.test.js.map +1 -1
  513. package/dist/src/tools/ls.js +6 -1
  514. package/dist/src/tools/ls.js.map +1 -1
  515. package/dist/src/tools/ls.test.js +2 -2
  516. package/dist/src/tools/ls.test.js.map +1 -1
  517. package/dist/src/tools/mcp-client-manager.js +16 -18
  518. package/dist/src/tools/mcp-client-manager.js.map +1 -1
  519. package/dist/src/tools/mcp-client-manager.test.js +51 -0
  520. package/dist/src/tools/mcp-client-manager.test.js.map +1 -1
  521. package/dist/src/tools/mcp-client.d.ts +22 -1
  522. package/dist/src/tools/mcp-client.js +95 -36
  523. package/dist/src/tools/mcp-client.js.map +1 -1
  524. package/dist/src/tools/mcp-client.test.js +148 -20
  525. package/dist/src/tools/mcp-client.test.js.map +1 -1
  526. package/dist/src/tools/mcp-tool.d.ts +15 -5
  527. package/dist/src/tools/mcp-tool.js +36 -8
  528. package/dist/src/tools/mcp-tool.js.map +1 -1
  529. package/dist/src/tools/memoryTool.js +1 -1
  530. package/dist/src/tools/memoryTool.js.map +1 -1
  531. package/dist/src/tools/memoryTool.test.js +5 -0
  532. package/dist/src/tools/memoryTool.test.js.map +1 -1
  533. package/dist/src/tools/omissionPlaceholderDetector.d.ts +15 -0
  534. package/dist/src/tools/omissionPlaceholderDetector.js +90 -0
  535. package/dist/src/tools/omissionPlaceholderDetector.js.map +1 -0
  536. package/dist/src/tools/omissionPlaceholderDetector.test.d.ts +6 -0
  537. package/dist/src/tools/omissionPlaceholderDetector.test.js +49 -0
  538. package/dist/src/tools/omissionPlaceholderDetector.test.js.map +1 -0
  539. package/dist/src/tools/read-file.d.ts +4 -4
  540. package/dist/src/tools/read-file.js +17 -10
  541. package/dist/src/tools/read-file.js.map +1 -1
  542. package/dist/src/tools/read-file.test.js +20 -10
  543. package/dist/src/tools/read-file.test.js.map +1 -1
  544. package/dist/src/tools/ripGrep.js +49 -46
  545. package/dist/src/tools/ripGrep.js.map +1 -1
  546. package/dist/src/tools/ripGrep.test.js +52 -37
  547. package/dist/src/tools/ripGrep.test.js.map +1 -1
  548. package/dist/src/tools/shell.d.ts +2 -2
  549. package/dist/src/tools/shell.js +2 -2
  550. package/dist/src/tools/shell.js.map +1 -1
  551. package/dist/src/tools/shell.test.js +1 -2
  552. package/dist/src/tools/shell.test.js.map +1 -1
  553. package/dist/src/tools/tool-names.d.ts +0 -6
  554. package/dist/src/tools/tool-names.js +0 -15
  555. package/dist/src/tools/tool-names.js.map +1 -1
  556. package/dist/src/tools/tool-registry.d.ts +1 -0
  557. package/dist/src/tools/tool-registry.js +33 -6
  558. package/dist/src/tools/tool-registry.js.map +1 -1
  559. package/dist/src/tools/tool-registry.test.js +47 -0
  560. package/dist/src/tools/tool-registry.test.js.map +1 -1
  561. package/dist/src/tools/tools.d.ts +21 -1
  562. package/dist/src/tools/tools.js +19 -3
  563. package/dist/src/tools/tools.js.map +1 -1
  564. package/dist/src/tools/tools.test.js +24 -0
  565. package/dist/src/tools/tools.test.js.map +1 -1
  566. package/dist/src/tools/web-fetch.d.ts +9 -1
  567. package/dist/src/tools/web-fetch.js +273 -34
  568. package/dist/src/tools/web-fetch.js.map +1 -1
  569. package/dist/src/tools/web-fetch.test.js +303 -30
  570. package/dist/src/tools/web-fetch.test.js.map +1 -1
  571. package/dist/src/tools/write-file.js +14 -10
  572. package/dist/src/tools/write-file.js.map +1 -1
  573. package/dist/src/tools/write-file.test.js +75 -0
  574. package/dist/src/tools/write-file.test.js.map +1 -1
  575. package/dist/src/tools/write-todos.d.ts +2 -2
  576. package/dist/src/tools/write-todos.js +1 -1
  577. package/dist/src/tools/write-todos.js.map +1 -1
  578. package/dist/src/tools/xcode-mcp-fix-transport.js +4 -1
  579. package/dist/src/tools/xcode-mcp-fix-transport.js.map +1 -1
  580. package/dist/src/utils/approvalModeUtils.d.ts +14 -0
  581. package/dist/src/utils/approvalModeUtils.js +35 -0
  582. package/dist/src/utils/approvalModeUtils.js.map +1 -0
  583. package/dist/src/utils/approvalModeUtils.test.d.ts +6 -0
  584. package/dist/src/utils/approvalModeUtils.test.js +36 -0
  585. package/dist/src/utils/approvalModeUtils.test.js.map +1 -0
  586. package/dist/src/utils/authConsent.d.ts +1 -1
  587. package/dist/src/utils/authConsent.js +10 -8
  588. package/dist/src/utils/authConsent.js.map +1 -1
  589. package/dist/src/utils/authConsent.test.js +89 -44
  590. package/dist/src/utils/authConsent.test.js.map +1 -1
  591. package/dist/src/utils/compatibility.d.ts +41 -0
  592. package/dist/src/utils/compatibility.js +112 -0
  593. package/dist/src/utils/compatibility.js.map +1 -0
  594. package/dist/src/utils/compatibility.test.d.ts +6 -0
  595. package/dist/src/utils/compatibility.test.js +233 -0
  596. package/dist/src/utils/compatibility.test.js.map +1 -0
  597. package/dist/src/utils/editCorrector.js +22 -29
  598. package/dist/src/utils/editCorrector.js.map +1 -1
  599. package/dist/src/utils/editCorrector.test.js.map +1 -1
  600. package/dist/src/utils/envExpansion.d.ts +18 -0
  601. package/dist/src/utils/envExpansion.js +46 -0
  602. package/dist/src/utils/envExpansion.js.map +1 -0
  603. package/dist/src/utils/envExpansion.test.d.ts +6 -0
  604. package/dist/src/utils/envExpansion.test.js +110 -0
  605. package/dist/src/utils/envExpansion.test.js.map +1 -0
  606. package/dist/src/utils/errors.d.ts +1 -0
  607. package/dist/src/utils/errors.js +55 -10
  608. package/dist/src/utils/errors.js.map +1 -1
  609. package/dist/src/utils/errors.test.js +27 -1
  610. package/dist/src/utils/errors.test.js.map +1 -1
  611. package/dist/src/utils/events.d.ts +17 -0
  612. package/dist/src/utils/events.js +12 -0
  613. package/dist/src/utils/events.js.map +1 -1
  614. package/dist/src/utils/events.test.d.ts +1 -1
  615. package/dist/src/utils/events.test.js +50 -3
  616. package/dist/src/utils/events.test.js.map +1 -1
  617. package/dist/src/utils/fastAckHelper.js +2 -1
  618. package/dist/src/utils/fastAckHelper.js.map +1 -1
  619. package/dist/src/utils/fetch.d.ts +1 -1
  620. package/dist/src/utils/fetch.js +15 -2
  621. package/dist/src/utils/fetch.js.map +1 -1
  622. package/dist/src/utils/fileDiffUtils.d.ts +2 -2
  623. package/dist/src/utils/fileDiffUtils.js +1 -2
  624. package/dist/src/utils/fileDiffUtils.js.map +1 -1
  625. package/dist/src/utils/fileUtils.d.ts +5 -3
  626. package/dist/src/utils/fileUtils.js +25 -16
  627. package/dist/src/utils/fileUtils.js.map +1 -1
  628. package/dist/src/utils/fileUtils.test.js +14 -13
  629. package/dist/src/utils/fileUtils.test.js.map +1 -1
  630. package/dist/src/utils/filesearch/fileSearch.js +4 -1
  631. package/dist/src/utils/filesearch/fileSearch.js.map +1 -1
  632. package/dist/src/utils/getFolderStructure.test.js +4 -5
  633. package/dist/src/utils/getFolderStructure.test.js.map +1 -1
  634. package/dist/src/utils/getPty.js +4 -0
  635. package/dist/src/utils/getPty.js.map +1 -1
  636. package/dist/src/utils/googleErrors.js +29 -5
  637. package/dist/src/utils/googleErrors.js.map +1 -1
  638. package/dist/src/utils/googleQuotaErrors.js +10 -0
  639. package/dist/src/utils/googleQuotaErrors.js.map +1 -1
  640. package/dist/src/utils/googleQuotaErrors.test.js +16 -1
  641. package/dist/src/utils/googleQuotaErrors.test.js.map +1 -1
  642. package/dist/src/utils/memoryDiscovery.js +2 -0
  643. package/dist/src/utils/memoryDiscovery.js.map +1 -1
  644. package/dist/src/utils/memoryDiscovery.test.js +1 -2
  645. package/dist/src/utils/memoryDiscovery.test.js.map +1 -1
  646. package/dist/src/utils/retry.d.ts +1 -1
  647. package/dist/src/utils/retry.js +9 -4
  648. package/dist/src/utils/retry.js.map +1 -1
  649. package/dist/src/utils/retry.test.js +15 -12
  650. package/dist/src/utils/retry.test.js.map +1 -1
  651. package/dist/src/utils/safeJsonStringify.js +3 -0
  652. package/dist/src/utils/safeJsonStringify.js.map +1 -1
  653. package/dist/src/utils/schemaValidator.js +5 -3
  654. package/dist/src/utils/schemaValidator.js.map +1 -1
  655. package/dist/src/utils/session.d.ts +1 -0
  656. package/dist/src/utils/session.js +3 -0
  657. package/dist/src/utils/session.js.map +1 -1
  658. package/dist/src/utils/sessionUtils.d.ts +14 -0
  659. package/dist/src/utils/sessionUtils.js +113 -0
  660. package/dist/src/utils/sessionUtils.js.map +1 -0
  661. package/dist/src/utils/sessionUtils.test.d.ts +1 -0
  662. package/dist/src/utils/sessionUtils.test.js +137 -0
  663. package/dist/src/utils/sessionUtils.test.js.map +1 -0
  664. package/dist/src/utils/shell-utils.js +1 -0
  665. package/dist/src/utils/shell-utils.js.map +1 -1
  666. package/dist/src/utils/stdio.js +6 -0
  667. package/dist/src/utils/stdio.js.map +1 -1
  668. package/dist/src/utils/textUtils.d.ts +9 -0
  669. package/dist/src/utils/textUtils.js +15 -0
  670. package/dist/src/utils/textUtils.js.map +1 -1
  671. package/dist/src/utils/textUtils.test.js +42 -1
  672. package/dist/src/utils/textUtils.test.js.map +1 -1
  673. package/dist/src/utils/toolCallContext.d.ts +0 -5
  674. package/dist/src/utils/toolCallContext.js +1 -1
  675. package/dist/src/utils/toolCallContext.js.map +1 -1
  676. package/dist/src/utils/userAccountManager.js +3 -0
  677. package/dist/src/utils/userAccountManager.js.map +1 -1
  678. package/dist/tsconfig.tsbuildinfo +1 -1
  679. package/package.json +6 -3
  680. package/dist/docs/architecture.md +0 -80
  681. package/dist/docs/cli/index.md +0 -123
  682. package/dist/docs/core/concepts.md +0 -137
  683. package/dist/docs/get-started/configuration-v1.md +0 -882
  684. package/dist/google-gemini-cli-core-0.30.0-preview.5.tgz +0 -0
  685. /package/dist/docs/{core → reference}/memport.md +0 -0
  686. /package/dist/docs/{core → reference}/tools-api.md +0 -0
  687. /package/dist/docs/{cli → resources}/uninstall.md +0 -0
@@ -1,882 +0,0 @@
1
- # Gemini CLI configuration
2
-
3
- **Note on deprecated configuration format**
4
-
5
- This document describes the legacy v1 format for the `settings.json` file. This
6
- format is now deprecated.
7
-
8
- - The new format will be supported in the stable release starting
9
- **[09/10/25]**.
10
- - Automatic migration from the old format to the new format will begin on
11
- **[09/17/25]**.
12
-
13
- For details on the new, recommended format, please see the
14
- [current Configuration documentation](./configuration.md).
15
-
16
- Gemini CLI offers several ways to configure its behavior, including environment
17
- variables, command-line arguments, and settings files. This document outlines
18
- the different configuration methods and available settings.
19
-
20
- ## Configuration layers
21
-
22
- Configuration is applied in the following order of precedence (lower numbers are
23
- overridden by higher numbers):
24
-
25
- 1. **Default values:** Hardcoded defaults within the application.
26
- 2. **System defaults file:** System-wide default settings that can be
27
- overridden by other settings files.
28
- 3. **User settings file:** Global settings for the current user.
29
- 4. **Project settings file:** Project-specific settings.
30
- 5. **System settings file:** System-wide settings that override all other
31
- settings files.
32
- 6. **Environment variables:** System-wide or session-specific variables,
33
- potentially loaded from `.env` files.
34
- 7. **Command-line arguments:** Values passed when launching the CLI.
35
-
36
- ## Settings files
37
-
38
- Gemini CLI uses JSON settings files for persistent configuration. There are four
39
- locations for these files:
40
-
41
- - **System defaults file:**
42
- - **Location:** `/etc/gemini-cli/system-defaults.json` (Linux),
43
- `C:\ProgramData\gemini-cli\system-defaults.json` (Windows) or
44
- `/Library/Application Support/GeminiCli/system-defaults.json` (macOS). The
45
- path can be overridden using the `GEMINI_CLI_SYSTEM_DEFAULTS_PATH`
46
- environment variable.
47
- - **Scope:** Provides a base layer of system-wide default settings. These
48
- settings have the lowest precedence and are intended to be overridden by
49
- user, project, or system override settings.
50
- - **User settings file:**
51
- - **Location:** `~/.gemini/settings.json` (where `~` is your home directory).
52
- - **Scope:** Applies to all Gemini CLI sessions for the current user. User
53
- settings override system defaults.
54
- - **Project settings file:**
55
- - **Location:** `.gemini/settings.json` within your project's root directory.
56
- - **Scope:** Applies only when running Gemini CLI from that specific project.
57
- Project settings override user settings and system defaults.
58
- - **System settings file:**
59
- - **Location:** `/etc/gemini-cli/settings.json` (Linux),
60
- `C:\ProgramData\gemini-cli\settings.json` (Windows) or
61
- `/Library/Application Support/GeminiCli/settings.json` (macOS). The path can
62
- be overridden using the `GEMINI_CLI_SYSTEM_SETTINGS_PATH` environment
63
- variable.
64
- - **Scope:** Applies to all Gemini CLI sessions on the system, for all users.
65
- System settings act as overrides, taking precedence over all other settings
66
- files. May be useful for system administrators at enterprises to have
67
- controls over users' Gemini CLI setups.
68
-
69
- **Note on environment variables in settings:** String values within your
70
- `settings.json` files can reference environment variables using either
71
- `$VAR_NAME` or `${VAR_NAME}` syntax. These variables will be automatically
72
- resolved when the settings are loaded. For example, if you have an environment
73
- variable `MY_API_TOKEN`, you could use it in `settings.json` like this:
74
- `"apiKey": "$MY_API_TOKEN"`.
75
-
76
- > **Note for Enterprise Users:** For guidance on deploying and managing Gemini
77
- > CLI in a corporate environment, please see the
78
- > [Enterprise Configuration](../cli/enterprise.md) documentation.
79
-
80
- ### The `.gemini` directory in your project
81
-
82
- In addition to a project settings file, a project's `.gemini` directory can
83
- contain other project-specific files related to Gemini CLI's operation, such as:
84
-
85
- - [Custom sandbox profiles](#sandboxing) (e.g.,
86
- `.gemini/sandbox-macos-custom.sb`, `.gemini/sandbox.Dockerfile`).
87
-
88
- ### Available settings in `settings.json`:
89
-
90
- - **`contextFileName`** (string or array of strings):
91
- - **Description:** Specifies the filename for context files (e.g.,
92
- `GEMINI.md`, `AGENTS.md`). Can be a single filename or a list of accepted
93
- filenames.
94
- - **Default:** `GEMINI.md`
95
- - **Example:** `"contextFileName": "AGENTS.md"`
96
-
97
- - **`bugCommand`** (object):
98
- - **Description:** Overrides the default URL for the `/bug` command.
99
- - **Default:**
100
- `"urlTemplate": "https://github.com/google-gemini/gemini-cli/issues/new?template=bug_report.yml&title={title}&info={info}"`
101
- - **Properties:**
102
- - **`urlTemplate`** (string): A URL that can contain `{title}` and `{info}`
103
- placeholders.
104
- - **Example:**
105
- ```json
106
- "bugCommand": {
107
- "urlTemplate": "https://bug.example.com/new?title={title}&info={info}"
108
- }
109
- ```
110
-
111
- - **`fileFiltering`** (object):
112
- - **Description:** Controls git-aware file filtering behavior for @ commands
113
- and file discovery tools.
114
- - **Default:** `"respectGitIgnore": true, "enableRecursiveFileSearch": true`
115
- - **Properties:**
116
- - **`respectGitIgnore`** (boolean): Whether to respect .gitignore patterns
117
- when discovering files. When set to `true`, git-ignored files (like
118
- `node_modules/`, `dist/`, `.env`) are automatically excluded from @
119
- commands and file listing operations.
120
- - **`enableRecursiveFileSearch`** (boolean): Whether to enable searching
121
- recursively for filenames under the current tree when completing @
122
- prefixes in the prompt.
123
- - **`disableFuzzySearch`** (boolean): When `true`, disables the fuzzy search
124
- capabilities when searching for files, which can improve performance on
125
- projects with a large number of files.
126
- - **Example:**
127
- ```json
128
- "fileFiltering": {
129
- "respectGitIgnore": true,
130
- "enableRecursiveFileSearch": false,
131
- "disableFuzzySearch": true
132
- }
133
- ```
134
-
135
- ### Troubleshooting file search performance
136
-
137
- If you are experiencing performance issues with file searching (e.g., with `@`
138
- completions), especially in projects with a very large number of files, here are
139
- a few things you can try in order of recommendation:
140
-
141
- 1. **Use `.geminiignore`:** Create a `.geminiignore` file in your project root
142
- to exclude directories that contain a large number of files that you don't
143
- need to reference (e.g., build artifacts, logs, `node_modules`). Reducing
144
- the total number of files crawled is the most effective way to improve
145
- performance.
146
-
147
- 2. **Disable fuzzy search:** If ignoring files is not enough, you can disable
148
- fuzzy search by setting `disableFuzzySearch` to `true` in your
149
- `settings.json` file. This will use a simpler, non-fuzzy matching algorithm,
150
- which can be faster.
151
-
152
- 3. **Disable recursive file search:** As a last resort, you can disable
153
- recursive file search entirely by setting `enableRecursiveFileSearch` to
154
- `false`. This will be the fastest option as it avoids a recursive crawl of
155
- your project. However, it means you will need to type the full path to files
156
- when using `@` completions.
157
-
158
- - **`coreTools`** (array of strings):
159
- - **Description:** Allows you to specify a list of core tool names that should
160
- be made available to the model. This can be used to restrict the set of
161
- built-in tools. See [Built-in Tools](../core/tools-api.md#built-in-tools)
162
- for a list of core tools. You can also specify command-specific restrictions
163
- for tools that support it, like the `ShellTool`. For example,
164
- `"coreTools": ["ShellTool(ls -l)"]` will only allow the `ls -l` command to
165
- be executed.
166
- - **Default:** All tools available for use by the Gemini model.
167
- - **Example:** `"coreTools": ["ReadFileTool", "GlobTool", "ShellTool(ls)"]`.
168
-
169
- - **`allowedTools`** (array of strings) [DEPRECATED]:
170
- - **Default:** `undefined`
171
- - **Description:** A list of tool names that will bypass the confirmation
172
- dialog. This is useful for tools that you trust and use frequently. The
173
- match semantics are the same as `coreTools`. **Deprecated**: Use the
174
- [Policy Engine](../core/policy-engine.md) instead.
175
- - **Example:** `"allowedTools": ["ShellTool(git status)"]`.
176
-
177
- - **`excludeTools`** (array of strings) [DEPRECATED]:
178
- - **Description:** Allows you to specify a list of core tool names that should
179
- be excluded from the model. A tool listed in both `excludeTools` and
180
- `coreTools` is excluded. You can also specify command-specific restrictions
181
- for tools that support it, like the `ShellTool`. For example,
182
- `"excludeTools": ["ShellTool(rm -rf)"]` will block the `rm -rf` command.
183
- **Deprecated**: Use the [Policy Engine](../core/policy-engine.md) instead.
184
- - **Default**: No tools excluded.
185
- - **Example:** `"excludeTools": ["run_shell_command", "findFiles"]`.
186
- - **Security Note:** Command-specific restrictions in `excludeTools` for
187
- `run_shell_command` are based on simple string matching and can be easily
188
- bypassed. This feature is **not a security mechanism** and should not be
189
- relied upon to safely execute untrusted code. It is recommended to use
190
- `coreTools` to explicitly select commands that can be executed.
191
-
192
- - **`allowMCPServers`** (array of strings):
193
- - **Description:** Allows you to specify a list of MCP server names that
194
- should be made available to the model. This can be used to restrict the set
195
- of MCP servers to connect to. Note that this will be ignored if
196
- `--allowed-mcp-server-names` is set.
197
- - **Default:** All MCP servers are available for use by the Gemini model.
198
- - **Example:** `"allowMCPServers": ["myPythonServer"]`.
199
- - **Security note:** This uses simple string matching on MCP server names,
200
- which can be modified. If you're a system administrator looking to prevent
201
- users from bypassing this, consider configuring the `mcpServers` at the
202
- system settings level such that the user will not be able to configure any
203
- MCP servers of their own. This should not be used as an airtight security
204
- mechanism.
205
-
206
- - **`excludeMCPServers`** (array of strings):
207
- - **Description:** Allows you to specify a list of MCP server names that
208
- should be excluded from the model. A server listed in both
209
- `excludeMCPServers` and `allowMCPServers` is excluded. Note that this will
210
- be ignored if `--allowed-mcp-server-names` is set.
211
- - **Default**: No MCP servers excluded.
212
- - **Example:** `"excludeMCPServers": ["myNodeServer"]`.
213
- - **Security note:** This uses simple string matching on MCP server names,
214
- which can be modified. If you're a system administrator looking to prevent
215
- users from bypassing this, consider configuring the `mcpServers` at the
216
- system settings level such that the user will not be able to configure any
217
- MCP servers of their own. This should not be used as an airtight security
218
- mechanism.
219
-
220
- - **`theme`** (string):
221
- - **Description:** Sets the visual [theme](../cli/themes.md) for Gemini CLI.
222
- - **Default:** `"Default"`
223
- - **Example:** `"theme": "GitHub"`
224
-
225
- - **`vimMode`** (boolean):
226
- - **Description:** Enables or disables vim mode for input editing. When
227
- enabled, the input area supports vim-style navigation and editing commands
228
- with NORMAL and INSERT modes. The vim mode status is displayed in the footer
229
- and persists between sessions.
230
- - **Default:** `false`
231
- - **Example:** `"vimMode": true`
232
-
233
- - **`sandbox`** (boolean or string):
234
- - **Description:** Controls whether and how to use sandboxing for tool
235
- execution. If set to `true`, Gemini CLI uses a pre-built
236
- `gemini-cli-sandbox` Docker image. For more information, see
237
- [Sandboxing](#sandboxing).
238
- - **Default:** `false`
239
- - **Example:** `"sandbox": "docker"`
240
-
241
- - **`toolDiscoveryCommand`** (string):
242
- - **Description:** Defines a custom shell command for discovering tools from
243
- your project. The shell command must return on `stdout` a JSON array of
244
- [function declarations](https://ai.google.dev/gemini-api/docs/function-calling#function-declarations).
245
- Tool wrappers are optional.
246
- - **Default:** Empty
247
- - **Example:** `"toolDiscoveryCommand": "bin/get_tools"`
248
-
249
- - **`toolCallCommand`** (string):
250
- - **Description:** Defines a custom shell command for calling a specific tool
251
- that was discovered using `toolDiscoveryCommand`. The shell command must
252
- meet the following criteria:
253
- - It must take function `name` (exactly as in
254
- [function declaration](https://ai.google.dev/gemini-api/docs/function-calling#function-declarations))
255
- as first command line argument.
256
- - It must read function arguments as JSON on `stdin`, analogous to
257
- [`functionCall.args`](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#functioncall).
258
- - It must return function output as JSON on `stdout`, analogous to
259
- [`functionResponse.response.content`](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#functionresponse).
260
- - **Default:** Empty
261
- - **Example:** `"toolCallCommand": "bin/call_tool"`
262
-
263
- - **`mcpServers`** (object):
264
- - **Description:** Configures connections to one or more Model-Context
265
- Protocol (MCP) servers for discovering and using custom tools. Gemini CLI
266
- attempts to connect to each configured MCP server to discover available
267
- tools. If multiple MCP servers expose a tool with the same name, the tool
268
- names will be prefixed with the server alias you defined in the
269
- configuration (e.g., `serverAlias__actualToolName`) to avoid conflicts. Note
270
- that the system might strip certain schema properties from MCP tool
271
- definitions for compatibility. At least one of `command`, `url`, or
272
- `httpUrl` must be provided. If multiple are specified, the order of
273
- precedence is `httpUrl`, then `url`, then `command`.
274
- - **Default:** Empty
275
- - **Properties:**
276
- - **`<SERVER_NAME>`** (object): The server parameters for the named server.
277
- - `command` (string, optional): The command to execute to start the MCP
278
- server via standard I/O.
279
- - `args` (array of strings, optional): Arguments to pass to the command.
280
- - `env` (object, optional): Environment variables to set for the server
281
- process.
282
- - `cwd` (string, optional): The working directory in which to start the
283
- server.
284
- - `url` (string, optional): The URL of an MCP server that uses Server-Sent
285
- Events (SSE) for communication.
286
- - `httpUrl` (string, optional): The URL of an MCP server that uses
287
- streamable HTTP for communication.
288
- - `headers` (object, optional): A map of HTTP headers to send with
289
- requests to `url` or `httpUrl`.
290
- - `timeout` (number, optional): Timeout in milliseconds for requests to
291
- this MCP server.
292
- - `trust` (boolean, optional): Trust this server and bypass all tool call
293
- confirmations.
294
- - `description` (string, optional): A brief description of the server,
295
- which may be used for display purposes.
296
- - `includeTools` (array of strings, optional): List of tool names to
297
- include from this MCP server. When specified, only the tools listed here
298
- will be available from this server (allowlist behavior). If not
299
- specified, all tools from the server are enabled by default.
300
- - `excludeTools` (array of strings, optional): List of tool names to
301
- exclude from this MCP server. Tools listed here will not be available to
302
- the model, even if they are exposed by the server. **Note:**
303
- `excludeTools` takes precedence over `includeTools` - if a tool is in
304
- both lists, it will be excluded.
305
- - **Example:**
306
- ```json
307
- "mcpServers": {
308
- "myPythonServer": {
309
- "command": "python",
310
- "args": ["mcp_server.py", "--port", "8080"],
311
- "cwd": "./mcp_tools/python",
312
- "timeout": 5000,
313
- "includeTools": ["safe_tool", "file_reader"],
314
- },
315
- "myNodeServer": {
316
- "command": "node",
317
- "args": ["mcp_server.js"],
318
- "cwd": "./mcp_tools/node",
319
- "excludeTools": ["dangerous_tool", "file_deleter"]
320
- },
321
- "myDockerServer": {
322
- "command": "docker",
323
- "args": ["run", "-i", "--rm", "-e", "API_KEY", "ghcr.io/foo/bar"],
324
- "env": {
325
- "API_KEY": "$MY_API_TOKEN"
326
- }
327
- },
328
- "mySseServer": {
329
- "url": "http://localhost:8081/events",
330
- "headers": {
331
- "Authorization": "Bearer $MY_SSE_TOKEN"
332
- },
333
- "description": "An example SSE-based MCP server."
334
- },
335
- "myStreamableHttpServer": {
336
- "httpUrl": "http://localhost:8082/stream",
337
- "headers": {
338
- "X-API-Key": "$MY_HTTP_API_KEY"
339
- },
340
- "description": "An example Streamable HTTP-based MCP server."
341
- }
342
- }
343
- ```
344
-
345
- - **`checkpointing`** (object):
346
- - **Description:** Configures the checkpointing feature, which allows you to
347
- save and restore conversation and file states. See the
348
- [Checkpointing documentation](../cli/checkpointing.md) for more details.
349
- - **Default:** `{"enabled": false}`
350
- - **Properties:**
351
- - **`enabled`** (boolean): When `true`, the `/restore` command is available.
352
-
353
- - **`preferredEditor`** (string):
354
- - **Description:** Specifies the preferred editor to use for viewing diffs.
355
- - **Default:** `vscode`
356
- - **Example:** `"preferredEditor": "vscode"`
357
-
358
- - **`telemetry`** (object)
359
- - **Description:** Configures logging and metrics collection for Gemini CLI.
360
- For more information, see [Telemetry](../cli/telemetry.md).
361
- - **Default:**
362
- `{"enabled": false, "target": "local", "otlpEndpoint": "http://localhost:4317", "logPrompts": true}`
363
- - **Properties:**
364
- - **`enabled`** (boolean): Whether or not telemetry is enabled.
365
- - **`target`** (string): The destination for collected telemetry. Supported
366
- values are `local` and `gcp`.
367
- - **`otlpEndpoint`** (string): The endpoint for the OTLP Exporter.
368
- - **`logPrompts`** (boolean): Whether or not to include the content of user
369
- prompts in the logs.
370
- - **Example:**
371
- ```json
372
- "telemetry": {
373
- "enabled": true,
374
- "target": "local",
375
- "otlpEndpoint": "http://localhost:16686",
376
- "logPrompts": false
377
- }
378
- ```
379
- - **`usageStatisticsEnabled`** (boolean):
380
- - **Description:** Enables or disables the collection of usage statistics. See
381
- [Usage Statistics](#usage-statistics) for more information.
382
- - **Default:** `true`
383
- - **Example:**
384
- ```json
385
- "usageStatisticsEnabled": false
386
- ```
387
-
388
- - **`hideTips`** (boolean):
389
- - **Description:** Enables or disables helpful tips in the CLI interface.
390
- - **Default:** `false`
391
- - **Example:**
392
-
393
- ```json
394
- "hideTips": true
395
- ```
396
-
397
- - **`hideBanner`** (boolean):
398
- - **Description:** Enables or disables the startup banner (ASCII art logo) in
399
- the CLI interface.
400
- - **Default:** `false`
401
- - **Example:**
402
-
403
- ```json
404
- "hideBanner": true
405
- ```
406
-
407
- - **`maxSessionTurns`** (number):
408
- - **Description:** Sets the maximum number of turns for a session. If the
409
- session exceeds this limit, the CLI will stop processing and start a new
410
- chat.
411
- - **Default:** `-1` (unlimited)
412
- - **Example:**
413
- ```json
414
- "maxSessionTurns": 10
415
- ```
416
-
417
- - **`summarizeToolOutput`** (object):
418
- - **Description:** Enables or disables the summarization of tool output. You
419
- can specify the token budget for the summarization using the `tokenBudget`
420
- setting.
421
- - Note: Currently only the `run_shell_command` tool is supported.
422
- - **Default:** `{}` (Disabled by default)
423
- - **Example:**
424
- ```json
425
- "summarizeToolOutput": {
426
- "run_shell_command": {
427
- "tokenBudget": 2000
428
- }
429
- }
430
- ```
431
-
432
- - **`excludedProjectEnvVars`** (array of strings):
433
- - **Description:** Specifies environment variables that should be excluded
434
- from being loaded from project `.env` files. This prevents project-specific
435
- environment variables (like `DEBUG=true`) from interfering with gemini-cli
436
- behavior. Variables from `.gemini/.env` files are never excluded.
437
- - **Default:** `["DEBUG", "DEBUG_MODE"]`
438
- - **Example:**
439
- ```json
440
- "excludedProjectEnvVars": ["DEBUG", "DEBUG_MODE", "NODE_ENV"]
441
- ```
442
-
443
- - **`includeDirectories`** (array of strings):
444
- - **Description:** Specifies an array of additional absolute or relative paths
445
- to include in the workspace context. Missing directories will be skipped
446
- with a warning by default. Paths can use `~` to refer to the user's home
447
- directory. This setting can be combined with the `--include-directories`
448
- command-line flag.
449
- - **Default:** `[]`
450
- - **Example:**
451
- ```json
452
- "includeDirectories": [
453
- "/path/to/another/project",
454
- "../shared-library",
455
- "~/common-utils"
456
- ]
457
- ```
458
-
459
- - **`loadMemoryFromIncludeDirectories`** (boolean):
460
- - **Description:** Controls the behavior of the `/memory refresh` command. If
461
- set to `true`, `GEMINI.md` files should be loaded from all directories that
462
- are added. If set to `false`, `GEMINI.md` should only be loaded from the
463
- current directory.
464
- - **Default:** `false`
465
- - **Example:**
466
- ```json
467
- "loadMemoryFromIncludeDirectories": true
468
- ```
469
-
470
- - **`showLineNumbers`** (boolean):
471
- - **Description:** Controls whether line numbers are displayed in code blocks
472
- in the CLI output.
473
- - **Default:** `true`
474
- - **Example:**
475
- ```json
476
- "showLineNumbers": false
477
- ```
478
-
479
- - **`accessibility`** (object):
480
- - **Description:** Configures accessibility features for the CLI.
481
- - **Properties:**
482
- - **`screenReader`** (boolean): Enables screen reader mode, which adjusts
483
- the TUI for better compatibility with screen readers. This can also be
484
- enabled with the `--screen-reader` command-line flag, which will take
485
- precedence over the setting.
486
- - **`disableLoadingPhrases`** (boolean): Disables the display of loading
487
- phrases during operations.
488
- - **Default:** `{"screenReader": false, "disableLoadingPhrases": false}`
489
- - **Example:**
490
- ```json
491
- "accessibility": {
492
- "screenReader": true,
493
- "disableLoadingPhrases": true
494
- }
495
- ```
496
-
497
- ### Example `settings.json`:
498
-
499
- ```json
500
- {
501
- "theme": "GitHub",
502
- "sandbox": "docker",
503
- "toolDiscoveryCommand": "bin/get_tools",
504
- "toolCallCommand": "bin/call_tool",
505
- "mcpServers": {
506
- "mainServer": {
507
- "command": "bin/mcp_server.py"
508
- },
509
- "anotherServer": {
510
- "command": "node",
511
- "args": ["mcp_server.js", "--verbose"]
512
- }
513
- },
514
- "telemetry": {
515
- "enabled": true,
516
- "target": "local",
517
- "otlpEndpoint": "http://localhost:4317",
518
- "logPrompts": true
519
- },
520
- "usageStatisticsEnabled": true,
521
- "hideTips": false,
522
- "hideBanner": false,
523
- "maxSessionTurns": 10,
524
- "summarizeToolOutput": {
525
- "run_shell_command": {
526
- "tokenBudget": 100
527
- }
528
- },
529
- "excludedProjectEnvVars": ["DEBUG", "DEBUG_MODE", "NODE_ENV"],
530
- "includeDirectories": ["path/to/dir1", "~/path/to/dir2", "../path/to/dir3"],
531
- "loadMemoryFromIncludeDirectories": true
532
- }
533
- ```
534
-
535
- ## Shell history
536
-
537
- The CLI keeps a history of shell commands you run. To avoid conflicts between
538
- different projects, this history is stored in a project-specific directory
539
- within your user's home folder.
540
-
541
- - **Location:** `~/.gemini/tmp/<project_hash>/shell_history`
542
- - `<project_hash>` is a unique identifier generated from your project's root
543
- path.
544
- - The history is stored in a file named `shell_history`.
545
-
546
- ## Environment variables and `.env` files
547
-
548
- Environment variables are a common way to configure applications, especially for
549
- sensitive information like API keys or for settings that might change between
550
- environments. For authentication setup, see the
551
- [Authentication documentation](./authentication.md) which covers all available
552
- authentication methods.
553
-
554
- The CLI automatically loads environment variables from an `.env` file. The
555
- loading order is:
556
-
557
- 1. `.env` file in the current working directory.
558
- 2. If not found, it searches upwards in parent directories until it finds an
559
- `.env` file or reaches the project root (identified by a `.git` folder) or
560
- the home directory.
561
- 3. If still not found, it looks for `~/.env` (in the user's home directory).
562
-
563
- **Environment variable exclusion:** Some environment variables (like `DEBUG` and
564
- `DEBUG_MODE`) are automatically excluded from being loaded from project `.env`
565
- files to prevent interference with gemini-cli behavior. Variables from
566
- `.gemini/.env` files are never excluded. You can customize this behavior using
567
- the `excludedProjectEnvVars` setting in your `settings.json` file.
568
-
569
- - **`GEMINI_API_KEY`**:
570
- - Your API key for the Gemini API.
571
- - One of several available [authentication methods](./authentication.md).
572
- - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env`
573
- file.
574
- - **`GEMINI_MODEL`**:
575
- - Specifies the default Gemini model to use.
576
- - Overrides the hardcoded default
577
- - Example: `export GEMINI_MODEL="gemini-2.5-flash"`
578
- - **`GOOGLE_API_KEY`**:
579
- - Your Google Cloud API key.
580
- - Required for using Vertex AI in express mode.
581
- - Ensure you have the necessary permissions.
582
- - Example: `export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"`.
583
- - **`GOOGLE_CLOUD_PROJECT`**:
584
- - Your Google Cloud Project ID.
585
- - Required for using Code Assist or Vertex AI.
586
- - If using Vertex AI, ensure you have the necessary permissions in this
587
- project.
588
- - **Cloud Shell note:** When running in a Cloud Shell environment, this
589
- variable defaults to a special project allocated for Cloud Shell users. If
590
- you have `GOOGLE_CLOUD_PROJECT` set in your global environment in Cloud
591
- Shell, it will be overridden by this default. To use a different project in
592
- Cloud Shell, you must define `GOOGLE_CLOUD_PROJECT` in a `.env` file.
593
- - Example: `export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.
594
- - **`GOOGLE_APPLICATION_CREDENTIALS`** (string):
595
- - **Description:** The path to your Google Application Credentials JSON file.
596
- - **Example:**
597
- `export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json"`
598
- - **`OTLP_GOOGLE_CLOUD_PROJECT`**:
599
- - Your Google Cloud Project ID for Telemetry in Google Cloud
600
- - Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`.
601
- - **`GOOGLE_CLOUD_LOCATION`**:
602
- - Your Google Cloud Project Location (e.g., us-central1).
603
- - Required for using Vertex AI in non express mode.
604
- - Example: `export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"`.
605
- - **`GEMINI_SANDBOX`**:
606
- - Alternative to the `sandbox` setting in `settings.json`.
607
- - Accepts `true`, `false`, `docker`, `podman`, or a custom command string.
608
- - **`HTTP_PROXY` / `HTTPS_PROXY`**:
609
- - Specifies the proxy server to use for outgoing HTTP/HTTPS requests.
610
- - Example: `export HTTPS_PROXY="http://proxy.example.com:8080"`
611
- - **`SEATBELT_PROFILE`** (macOS specific):
612
- - Switches the Seatbelt (`sandbox-exec`) profile on macOS.
613
- - `permissive-open`: (Default) Restricts writes to the project folder (and a
614
- few other folders, see
615
- `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other
616
- operations.
617
- - `strict`: Uses a strict profile that declines operations by default.
618
- - `<profile_name>`: Uses a custom profile. To define a custom profile, create
619
- a file named `sandbox-macos-<profile_name>.sb` in your project's `.gemini/`
620
- directory (e.g., `my-project/.gemini/sandbox-macos-custom.sb`).
621
- - **`DEBUG` or `DEBUG_MODE`** (often used by underlying libraries or the CLI
622
- itself):
623
- - Set to `true` or `1` to enable verbose debug logging, which can be helpful
624
- for troubleshooting.
625
- - **Note:** These variables are automatically excluded from project `.env`
626
- files by default to prevent interference with gemini-cli behavior. Use
627
- `.gemini/.env` files if you need to set these for gemini-cli specifically.
628
- - **`NO_COLOR`**:
629
- - Set to any value to disable all color output in the CLI.
630
- - **`CLI_TITLE`**:
631
- - Set to a string to customize the title of the CLI.
632
- - **`CODE_ASSIST_ENDPOINT`**:
633
- - Specifies the endpoint for the code assist server.
634
- - This is useful for development and testing.
635
-
636
- ## Command-line arguments
637
-
638
- Arguments passed directly when running the CLI can override other configurations
639
- for that specific session.
640
-
641
- - **`--model <model_name>`** (**`-m <model_name>`**):
642
- - Specifies the Gemini model to use for this session.
643
- - Example: `npm start -- --model gemini-1.5-pro-latest`
644
- - **`--prompt <your_prompt>`** (**`-p <your_prompt>`**):
645
- - Used to pass a prompt directly to the command. This invokes Gemini CLI in a
646
- non-interactive mode.
647
- - **`--prompt-interactive <your_prompt>`** (**`-i <your_prompt>`**):
648
- - Starts an interactive session with the provided prompt as the initial input.
649
- - The prompt is processed within the interactive session, not before it.
650
- - Cannot be used when piping input from stdin.
651
- - Example: `gemini -i "explain this code"`
652
- - **`--sandbox`** (**`-s`**):
653
- - Enables sandbox mode for this session.
654
- - **`--sandbox-image`**:
655
- - Sets the sandbox image URI.
656
- - **`--debug`** (**`-d`**):
657
- - Enables debug mode for this session, providing more verbose output.
658
-
659
- - **`--help`** (or **`-h`**):
660
- - Displays help information about command-line arguments.
661
- - **`--show-memory-usage`**:
662
- - Displays the current memory usage.
663
- - **`--yolo`**:
664
- - Enables YOLO mode, which automatically approves all tool calls.
665
- - **`--approval-mode <mode>`**:
666
- - Sets the approval mode for tool calls. Available modes:
667
- - `default`: Prompt for approval on each tool call (default behavior)
668
- - `auto_edit`: Automatically approve edit tools (replace, write_file) while
669
- prompting for others
670
- - `yolo`: Automatically approve all tool calls (equivalent to `--yolo`)
671
- - Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of
672
- `--yolo` for the new unified approach.
673
- - Example: `gemini --approval-mode auto_edit`
674
- - **`--allowed-tools <tool1,tool2,...>`**:
675
- - A comma-separated list of tool names that will bypass the confirmation
676
- dialog.
677
- - Example: `gemini --allowed-tools "ShellTool(git status)"`
678
- - **`--telemetry`**:
679
- - Enables [telemetry](../cli/telemetry.md).
680
- - **`--telemetry-target`**:
681
- - Sets the telemetry target. See [telemetry](../cli/telemetry.md) for more
682
- information.
683
- - **`--telemetry-otlp-endpoint`**:
684
- - Sets the OTLP endpoint for telemetry. See [telemetry](../cli/telemetry.md)
685
- for more information.
686
- - **`--telemetry-otlp-protocol`**:
687
- - Sets the OTLP protocol for telemetry (`grpc` or `http`). Defaults to `grpc`.
688
- See [telemetry](../cli/telemetry.md) for more information.
689
- - **`--telemetry-log-prompts`**:
690
- - Enables logging of prompts for telemetry. See
691
- [telemetry](../cli/telemetry.md) for more information.
692
- - **`--extensions <extension_name ...>`** (**`-e <extension_name ...>`**):
693
- - Specifies a list of extensions to use for the session. If not provided, all
694
- available extensions are used.
695
- - Use the special term `gemini -e none` to disable all extensions.
696
- - Example: `gemini -e my-extension -e my-other-extension`
697
- - **`--list-extensions`** (**`-l`**):
698
- - Lists all available extensions and exits.
699
- - **`--include-directories <dir1,dir2,...>`**:
700
- - Includes additional directories in the workspace for multi-directory
701
- support.
702
- - Can be specified multiple times or as comma-separated values.
703
- - 5 directories can be added at maximum.
704
- - Example: `--include-directories /path/to/project1,/path/to/project2` or
705
- `--include-directories /path/to/project1 --include-directories /path/to/project2`
706
- - **`--screen-reader`**:
707
- - Enables screen reader mode for accessibility.
708
- - **`--version`**:
709
- - Displays the version of the CLI.
710
-
711
- ## Context files (hierarchical instructional context)
712
-
713
- While not strictly configuration for the CLI's _behavior_, context files
714
- (defaulting to `GEMINI.md` but configurable via the `contextFileName` setting)
715
- are crucial for configuring the _instructional context_ (also referred to as
716
- "memory") provided to the Gemini model. This powerful feature allows you to give
717
- project-specific instructions, coding style guides, or any relevant background
718
- information to the AI, making its responses more tailored and accurate to your
719
- needs. The CLI includes UI elements, such as an indicator in the footer showing
720
- the number of loaded context files, to keep you informed about the active
721
- context.
722
-
723
- - **Purpose:** These Markdown files contain instructions, guidelines, or context
724
- that you want the Gemini model to be aware of during your interactions. The
725
- system is designed to manage this instructional context hierarchically.
726
-
727
- ### Example context file content (e.g., `GEMINI.md`)
728
-
729
- Here's a conceptual example of what a context file at the root of a TypeScript
730
- project might contain:
731
-
732
- ```markdown
733
- # Project: My Awesome TypeScript Library
734
-
735
- ## General Instructions:
736
-
737
- - When generating new TypeScript code, please follow the existing coding style.
738
- - Ensure all new functions and classes have JSDoc comments.
739
- - Prefer functional programming paradigms where appropriate.
740
- - All code should be compatible with TypeScript 5.0 and Node.js 20+.
741
-
742
- ## Coding Style:
743
-
744
- - Use 2 spaces for indentation.
745
- - Interface names should be prefixed with `I` (e.g., `IUserService`).
746
- - Private class members should be prefixed with an underscore (`_`).
747
- - Always use strict equality (`===` and `!==`).
748
-
749
- ## Specific Component: `src/api/client.ts`
750
-
751
- - This file handles all outbound API requests.
752
- - When adding new API call functions, ensure they include robust error handling
753
- and logging.
754
- - Use the existing `fetchWithRetry` utility for all GET requests.
755
-
756
- ## Regarding Dependencies:
757
-
758
- - Avoid introducing new external dependencies unless absolutely necessary.
759
- - If a new dependency is required, please state the reason.
760
- ```
761
-
762
- This example demonstrates how you can provide general project context, specific
763
- coding conventions, and even notes about particular files or components. The
764
- more relevant and precise your context files are, the better the AI can assist
765
- you. Project-specific context files are highly encouraged to establish
766
- conventions and context.
767
-
768
- - **Hierarchical loading and precedence:** The CLI implements a sophisticated
769
- hierarchical memory system by loading context files (e.g., `GEMINI.md`) from
770
- several locations. Content from files lower in this list (more specific)
771
- typically overrides or supplements content from files higher up (more
772
- general). The exact concatenation order and final context can be inspected
773
- using the `/memory show` command. The typical loading order is:
774
- 1. **Global context file:**
775
- - Location: `~/.gemini/<contextFileName>` (e.g., `~/.gemini/GEMINI.md` in
776
- your user home directory).
777
- - Scope: Provides default instructions for all your projects.
778
- 2. **Project root and ancestors context files:**
779
- - Location: The CLI searches for the configured context file in the
780
- current working directory and then in each parent directory up to either
781
- the project root (identified by a `.git` folder) or your home directory.
782
- - Scope: Provides context relevant to the entire project or a significant
783
- portion of it.
784
- 3. **Sub-directory context files (contextual/local):**
785
- - Location: The CLI also scans for the configured context file in
786
- subdirectories _below_ the current working directory (respecting common
787
- ignore patterns like `node_modules`, `.git`, etc.). The breadth of this
788
- search is limited to 200 directories by default, but can be configured
789
- with a `memoryDiscoveryMaxDirs` field in your `settings.json` file.
790
- - Scope: Allows for highly specific instructions relevant to a particular
791
- component, module, or subsection of your project.
792
- - **Concatenation and UI indication:** The contents of all found context files
793
- are concatenated (with separators indicating their origin and path) and
794
- provided as part of the system prompt to the Gemini model. The CLI footer
795
- displays the count of loaded context files, giving you a quick visual cue
796
- about the active instructional context.
797
- - **Importing content:** You can modularize your context files by importing
798
- other Markdown files using the `@path/to/file.md` syntax. For more details,
799
- see the [Memory Import Processor documentation](../core/memport.md).
800
- - **Commands for memory management:**
801
- - Use `/memory refresh` to force a re-scan and reload of all context files
802
- from all configured locations. This updates the AI's instructional context.
803
- - Use `/memory show` to display the combined instructional context currently
804
- loaded, allowing you to verify the hierarchy and content being used by the
805
- AI.
806
- - See the [Commands documentation](../cli/commands.md#memory) for full details
807
- on the `/memory` command and its sub-commands (`show` and `refresh`).
808
-
809
- By understanding and utilizing these configuration layers and the hierarchical
810
- nature of context files, you can effectively manage the AI's memory and tailor
811
- the Gemini CLI's responses to your specific needs and projects.
812
-
813
- ## Sandboxing
814
-
815
- The Gemini CLI can execute potentially unsafe operations (like shell commands
816
- and file modifications) within a sandboxed environment to protect your system.
817
-
818
- Sandboxing is disabled by default, but you can enable it in a few ways:
819
-
820
- - Using `--sandbox` or `-s` flag.
821
- - Setting `GEMINI_SANDBOX` environment variable.
822
- - Sandbox is enabled when using `--yolo` or `--approval-mode=yolo` by default.
823
-
824
- By default, it uses a pre-built `gemini-cli-sandbox` Docker image.
825
-
826
- For project-specific sandboxing needs, you can create a custom Dockerfile at
827
- `.gemini/sandbox.Dockerfile` in your project's root directory. This Dockerfile
828
- can be based on the base sandbox image:
829
-
830
- ```dockerfile
831
- FROM gemini-cli-sandbox
832
-
833
- # Add your custom dependencies or configurations here
834
- # For example:
835
- # RUN apt-get update && apt-get install -y some-package
836
- # COPY ./my-config /app/my-config
837
- ```
838
-
839
- When `.gemini/sandbox.Dockerfile` exists, you can use `BUILD_SANDBOX`
840
- environment variable when running Gemini CLI to automatically build the custom
841
- sandbox image:
842
-
843
- ```bash
844
- BUILD_SANDBOX=1 gemini -s
845
- ```
846
-
847
- ## Usage statistics
848
-
849
- To help us improve the Gemini CLI, we collect anonymized usage statistics. This
850
- data helps us understand how the CLI is used, identify common issues, and
851
- prioritize new features.
852
-
853
- **What we collect:**
854
-
855
- - **Tool calls:** We log the names of the tools that are called, whether they
856
- succeed or fail, and how long they take to execute. We do not collect the
857
- arguments passed to the tools or any data returned by them.
858
- - **API requests:** We log the Gemini model used for each request, the duration
859
- of the request, and whether it was successful. We do not collect the content
860
- of the prompts or responses.
861
- - **Session information:** We collect information about the configuration of the
862
- CLI, such as the enabled tools and the approval mode.
863
-
864
- **What we DON'T collect:**
865
-
866
- - **Personally identifiable information (PII):** We do not collect any personal
867
- information, such as your name, email address, or API keys.
868
- - **Prompt and response content:** We do not log the content of your prompts or
869
- the responses from the Gemini model.
870
- - **File content:** We do not log the content of any files that are read or
871
- written by the CLI.
872
-
873
- **How to opt out:**
874
-
875
- You can opt out of usage statistics collection at any time by setting the
876
- `usageStatisticsEnabled` property to `false` in your `settings.json` file:
877
-
878
- ```json
879
- {
880
- "usageStatisticsEnabled": false
881
- }
882
- ```