@office-ai/aioncli-core 0.30.0 → 0.30.1

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 (325) hide show
  1. package/dist/docs/assets/theme-ansi-dark.png +0 -0
  2. package/dist/docs/assets/theme-atom-one-dark.png +0 -0
  3. package/dist/docs/assets/theme-ayu-dark.png +0 -0
  4. package/dist/docs/assets/theme-default-dark.png +0 -0
  5. package/dist/docs/assets/theme-dracula-dark.png +0 -0
  6. package/dist/docs/assets/theme-github-dark.png +0 -0
  7. package/dist/docs/assets/theme-holiday-dark.png +0 -0
  8. package/dist/docs/assets/theme-shades-of-purple-dark.png +0 -0
  9. package/dist/docs/assets/theme-solarized-dark.png +0 -0
  10. package/dist/docs/assets/theme-solarized-light.png +0 -0
  11. package/dist/docs/cli/notifications.md +58 -0
  12. package/dist/docs/redirects.json +20 -0
  13. package/dist/docs/reference/commands.md +563 -0
  14. package/dist/docs/reference/configuration.md +1804 -0
  15. package/dist/docs/reference/keyboard-shortcuts.md +168 -0
  16. package/dist/docs/reference/memport.md +246 -0
  17. package/dist/docs/reference/policy-engine.md +386 -0
  18. package/dist/docs/reference/tools.md +106 -0
  19. package/dist/docs/resources/faq.md +175 -0
  20. package/dist/docs/resources/quota-and-pricing.md +199 -0
  21. package/dist/docs/resources/tos-privacy.md +102 -0
  22. package/dist/docs/resources/troubleshooting.md +176 -0
  23. package/dist/docs/resources/uninstall.md +56 -0
  24. package/dist/src/agents/a2a-errors.d.ts +65 -0
  25. package/dist/src/agents/a2a-errors.js +164 -0
  26. package/dist/src/agents/a2a-errors.js.map +1 -0
  27. package/dist/src/agents/a2a-errors.test.d.ts +6 -0
  28. package/dist/src/agents/a2a-errors.test.js +183 -0
  29. package/dist/src/agents/a2a-errors.test.js.map +1 -0
  30. package/dist/src/agents/auth-provider/api-key-provider.d.ts +30 -0
  31. package/dist/src/agents/auth-provider/api-key-provider.js +66 -0
  32. package/dist/src/agents/auth-provider/api-key-provider.js.map +1 -0
  33. package/dist/src/agents/auth-provider/api-key-provider.test.d.ts +6 -0
  34. package/dist/src/agents/auth-provider/api-key-provider.test.js +130 -0
  35. package/dist/src/agents/auth-provider/api-key-provider.test.js.map +1 -0
  36. package/dist/src/agents/auth-provider/http-provider.d.ts +28 -0
  37. package/dist/src/agents/auth-provider/http-provider.js +73 -0
  38. package/dist/src/agents/auth-provider/http-provider.js.map +1 -0
  39. package/dist/src/agents/auth-provider/http-provider.test.d.ts +6 -0
  40. package/dist/src/agents/auth-provider/http-provider.test.js +112 -0
  41. package/dist/src/agents/auth-provider/http-provider.test.js.map +1 -0
  42. package/dist/src/agents/auth-provider/oauth2-provider.d.ts +65 -0
  43. package/dist/src/agents/auth-provider/oauth2-provider.js +233 -0
  44. package/dist/src/agents/auth-provider/oauth2-provider.js.map +1 -0
  45. package/dist/src/agents/auth-provider/oauth2-provider.test.d.ts +6 -0
  46. package/dist/src/agents/auth-provider/oauth2-provider.test.js +490 -0
  47. package/dist/src/agents/auth-provider/oauth2-provider.test.js.map +1 -0
  48. package/dist/src/agents/browser/analyzeScreenshot.d.ts +35 -0
  49. package/dist/src/agents/browser/analyzeScreenshot.js +183 -0
  50. package/dist/src/agents/browser/analyzeScreenshot.js.map +1 -0
  51. package/dist/src/agents/browser/analyzeScreenshot.test.d.ts +6 -0
  52. package/dist/src/agents/browser/analyzeScreenshot.test.js +161 -0
  53. package/dist/src/agents/browser/analyzeScreenshot.test.js.map +1 -0
  54. package/dist/src/agents/browser/automationOverlay.d.ts +26 -0
  55. package/dist/src/agents/browser/automationOverlay.js +100 -0
  56. package/dist/src/agents/browser/automationOverlay.js.map +1 -0
  57. package/dist/src/agents/browser/browserAgentDefinition.d.ts +50 -0
  58. package/dist/src/agents/browser/browserAgentDefinition.js +141 -0
  59. package/dist/src/agents/browser/browserAgentDefinition.js.map +1 -0
  60. package/dist/src/agents/browser/browserAgentFactory.d.ts +42 -0
  61. package/dist/src/agents/browser/browserAgentFactory.js +116 -0
  62. package/dist/src/agents/browser/browserAgentFactory.js.map +1 -0
  63. package/dist/src/agents/browser/browserAgentFactory.test.d.ts +6 -0
  64. package/dist/src/agents/browser/browserAgentFactory.test.js +240 -0
  65. package/dist/src/agents/browser/browserAgentFactory.test.js.map +1 -0
  66. package/dist/src/agents/browser/browserAgentInvocation.d.ts +34 -0
  67. package/dist/src/agents/browser/browserAgentInvocation.js +386 -0
  68. package/dist/src/agents/browser/browserAgentInvocation.js.map +1 -0
  69. package/dist/src/agents/browser/browserAgentInvocation.test.d.ts +6 -0
  70. package/dist/src/agents/browser/browserAgentInvocation.test.js +382 -0
  71. package/dist/src/agents/browser/browserAgentInvocation.test.js.map +1 -0
  72. package/dist/src/agents/browser/browserManager.d.ts +115 -0
  73. package/dist/src/agents/browser/browserManager.js +370 -0
  74. package/dist/src/agents/browser/browserManager.js.map +1 -0
  75. package/dist/src/agents/browser/browserManager.test.d.ts +6 -0
  76. package/dist/src/agents/browser/browserManager.test.js +382 -0
  77. package/dist/src/agents/browser/browserManager.test.js.map +1 -0
  78. package/dist/src/agents/browser/mcpToolWrapper.d.ts +45 -0
  79. package/dist/src/agents/browser/mcpToolWrapper.js +358 -0
  80. package/dist/src/agents/browser/mcpToolWrapper.js.map +1 -0
  81. package/dist/src/agents/browser/mcpToolWrapper.test.d.ts +6 -0
  82. package/dist/src/agents/browser/mcpToolWrapper.test.js +126 -0
  83. package/dist/src/agents/browser/mcpToolWrapper.test.js.map +1 -0
  84. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.d.ts +6 -0
  85. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js +59 -0
  86. package/dist/src/agents/browser/mcpToolWrapperConfirmation.test.js.map +1 -0
  87. package/dist/src/agents/browser/modelAvailability.d.ts +23 -0
  88. package/dist/src/agents/browser/modelAvailability.js +23 -0
  89. package/dist/src/agents/browser/modelAvailability.js.map +1 -0
  90. package/dist/src/agents/cli-help-agent.d.ts +2 -2
  91. package/dist/src/billing/billing.d.ts +80 -0
  92. package/dist/src/billing/billing.js +128 -0
  93. package/dist/src/billing/billing.js.map +1 -0
  94. package/dist/src/billing/billing.test.d.ts +6 -0
  95. package/dist/src/billing/billing.test.js +182 -0
  96. package/dist/src/billing/billing.test.js.map +1 -0
  97. package/dist/src/billing/index.d.ts +6 -0
  98. package/dist/src/billing/index.js +7 -0
  99. package/dist/src/billing/index.js.map +1 -0
  100. package/dist/src/code_assist/oauth2.d.ts +1 -1
  101. package/dist/src/code_assist/types.d.ts +26 -26
  102. package/dist/src/config/agent-loop-context.d.ts +22 -0
  103. package/dist/src/config/agent-loop-context.js +7 -0
  104. package/dist/src/config/agent-loop-context.js.map +1 -0
  105. package/dist/src/config/trackerFeatureFlag.test.d.ts +6 -0
  106. package/dist/src/config/trackerFeatureFlag.test.js +43 -0
  107. package/dist/src/config/trackerFeatureFlag.test.js.map +1 -0
  108. package/dist/src/config/userHintService.d.ts +46 -0
  109. package/dist/src/config/userHintService.js +81 -0
  110. package/dist/src/config/userHintService.js.map +1 -0
  111. package/dist/src/config/userHintService.test.d.ts +6 -0
  112. package/dist/src/config/userHintService.test.js +62 -0
  113. package/dist/src/config/userHintService.test.js.map +1 -0
  114. package/dist/src/core/localLiteRtLmClient.d.ts +24 -0
  115. package/dist/src/core/localLiteRtLmClient.js +77 -0
  116. package/dist/src/core/localLiteRtLmClient.js.map +1 -0
  117. package/dist/src/core/localLiteRtLmClient.test.d.ts +6 -0
  118. package/dist/src/core/localLiteRtLmClient.test.js +87 -0
  119. package/dist/src/core/localLiteRtLmClient.test.js.map +1 -0
  120. package/dist/src/core/openaiContentGenerator.d.ts +1 -0
  121. package/dist/src/core/openaiContentGenerator.js +13 -13
  122. package/dist/src/core/openaiContentGenerator.js.map +1 -1
  123. package/dist/src/hooks/runtimeHooks.test.d.ts +6 -0
  124. package/dist/src/hooks/runtimeHooks.test.js +100 -0
  125. package/dist/src/hooks/runtimeHooks.test.js.map +1 -0
  126. package/dist/src/ide/types.d.ts +6 -6
  127. package/dist/src/mcp/mcp-oauth-provider.d.ts +43 -0
  128. package/dist/src/mcp/mcp-oauth-provider.js +67 -0
  129. package/dist/src/mcp/mcp-oauth-provider.js.map +1 -0
  130. package/dist/src/mcp/mcp-oauth-provider.test.d.ts +6 -0
  131. package/dist/src/mcp/mcp-oauth-provider.test.js +63 -0
  132. package/dist/src/mcp/mcp-oauth-provider.test.js.map +1 -0
  133. package/dist/src/policy/integrity.d.ts +45 -0
  134. package/dist/src/policy/integrity.js +121 -0
  135. package/dist/src/policy/integrity.js.map +1 -0
  136. package/dist/src/policy/integrity.test.d.ts +6 -0
  137. package/dist/src/policy/integrity.test.js +132 -0
  138. package/dist/src/policy/integrity.test.js.map +1 -0
  139. package/dist/src/policy/policies/conseca.toml +6 -0
  140. package/dist/src/policy/workspace-policy.test.js +231 -0
  141. package/dist/src/policy/workspace-policy.test.js.map +1 -0
  142. package/dist/src/routing/strategies/approvalModeStrategy.d.ts +18 -0
  143. package/dist/src/routing/strategies/approvalModeStrategy.js +59 -0
  144. package/dist/src/routing/strategies/approvalModeStrategy.js.map +1 -0
  145. package/dist/src/routing/strategies/approvalModeStrategy.test.d.ts +6 -0
  146. package/dist/src/routing/strategies/approvalModeStrategy.test.js +140 -0
  147. package/dist/src/routing/strategies/approvalModeStrategy.test.js.map +1 -0
  148. package/dist/src/routing/strategies/gemmaClassifierStrategy.d.ts +14 -0
  149. package/dist/src/routing/strategies/gemmaClassifierStrategy.js +182 -0
  150. package/dist/src/routing/strategies/gemmaClassifierStrategy.js.map +1 -0
  151. package/dist/src/routing/strategies/gemmaClassifierStrategy.test.d.ts +6 -0
  152. package/dist/src/routing/strategies/gemmaClassifierStrategy.test.js +218 -0
  153. package/dist/src/routing/strategies/gemmaClassifierStrategy.test.js.map +1 -0
  154. package/dist/src/safety/conseca/conseca.d.ts +31 -0
  155. package/dist/src/safety/conseca/conseca.js +105 -0
  156. package/dist/src/safety/conseca/conseca.js.map +1 -0
  157. package/dist/src/safety/conseca/conseca.test.js +226 -0
  158. package/dist/src/safety/conseca/conseca.test.js.map +1 -0
  159. package/dist/src/safety/conseca/integration.test.js +19 -0
  160. package/dist/src/safety/conseca/integration.test.js.map +1 -0
  161. package/dist/src/safety/conseca/policy-enforcer.d.ts +13 -0
  162. package/dist/src/safety/conseca/policy-enforcer.js +135 -0
  163. package/dist/src/safety/conseca/policy-enforcer.js.map +1 -0
  164. package/dist/src/safety/conseca/policy-enforcer.test.js +141 -0
  165. package/dist/src/safety/conseca/policy-enforcer.test.js.map +1 -0
  166. package/dist/src/safety/conseca/policy-generator.d.ts +15 -0
  167. package/dist/src/safety/conseca/policy-generator.js +144 -0
  168. package/dist/src/safety/conseca/policy-generator.js.map +1 -0
  169. package/dist/src/safety/conseca/policy-generator.test.d.ts +6 -0
  170. package/dist/src/safety/conseca/policy-generator.test.js +84 -0
  171. package/dist/src/safety/conseca/policy-generator.test.js.map +1 -0
  172. package/dist/src/safety/conseca/types.d.ts +15 -0
  173. package/dist/src/safety/conseca/types.js +7 -0
  174. package/dist/src/safety/conseca/types.js.map +1 -0
  175. package/dist/src/scheduler/scheduler_parallel.test.d.ts +6 -0
  176. package/dist/src/scheduler/scheduler_parallel.test.js +401 -0
  177. package/dist/src/scheduler/scheduler_parallel.test.js.map +1 -0
  178. package/dist/src/services/FolderTrustDiscoveryService.d.ts +32 -0
  179. package/dist/src/services/FolderTrustDiscoveryService.js +169 -0
  180. package/dist/src/services/FolderTrustDiscoveryService.js.map +1 -0
  181. package/dist/src/services/FolderTrustDiscoveryService.test.d.ts +6 -0
  182. package/dist/src/services/FolderTrustDiscoveryService.test.js +118 -0
  183. package/dist/src/services/FolderTrustDiscoveryService.test.js.map +1 -0
  184. package/dist/src/services/fileKeychain.d.ts +24 -0
  185. package/dist/src/services/fileKeychain.js +123 -0
  186. package/dist/src/services/fileKeychain.js.map +1 -0
  187. package/dist/src/services/keychainService.d.ts +51 -0
  188. package/dist/src/services/keychainService.js +133 -0
  189. package/dist/src/services/keychainService.js.map +1 -0
  190. package/dist/src/services/keychainService.test.d.ts +6 -0
  191. package/dist/src/services/keychainService.test.js +150 -0
  192. package/dist/src/services/keychainService.test.js.map +1 -0
  193. package/dist/src/services/keychainTypes.d.ts +41 -0
  194. package/dist/src/services/keychainTypes.js +18 -0
  195. package/dist/src/services/keychainTypes.js.map +1 -0
  196. package/dist/src/services/trackerService.d.ts +49 -0
  197. package/dist/src/services/trackerService.js +193 -0
  198. package/dist/src/services/trackerService.js.map +1 -0
  199. package/dist/src/services/trackerService.test.d.ts +6 -0
  200. package/dist/src/services/trackerService.test.js +117 -0
  201. package/dist/src/services/trackerService.test.js.map +1 -0
  202. package/dist/src/services/trackerTypes.d.ts +51 -0
  203. package/dist/src/services/trackerTypes.js +33 -0
  204. package/dist/src/services/trackerTypes.js.map +1 -0
  205. package/dist/src/telemetry/billingEvents.d.ts +75 -0
  206. package/dist/src/telemetry/billingEvents.js +181 -0
  207. package/dist/src/telemetry/billingEvents.js.map +1 -0
  208. package/dist/src/telemetry/billingEvents.test.d.ts +6 -0
  209. package/dist/src/telemetry/billingEvents.test.js +139 -0
  210. package/dist/src/telemetry/billingEvents.test.js.map +1 -0
  211. package/dist/src/telemetry/conseca-logger.d.ts +9 -0
  212. package/dist/src/telemetry/conseca-logger.js +91 -0
  213. package/dist/src/telemetry/conseca-logger.js.map +1 -0
  214. package/dist/src/telemetry/conseca-logger.test.d.ts +6 -0
  215. package/dist/src/telemetry/conseca-logger.test.js +90 -0
  216. package/dist/src/telemetry/conseca-logger.test.js.map +1 -0
  217. package/dist/src/telemetry/trace.test.d.ts +6 -0
  218. package/dist/src/telemetry/trace.test.js +116 -0
  219. package/dist/src/telemetry/trace.test.js.map +1 -0
  220. package/dist/src/tools/definitions/trackerTools.d.ts +12 -0
  221. package/dist/src/tools/definitions/trackerTools.js +146 -0
  222. package/dist/src/tools/definitions/trackerTools.js.map +1 -0
  223. package/dist/src/tools/diff-utils.d.ts +9 -0
  224. package/dist/src/tools/diff-utils.js +66 -0
  225. package/dist/src/tools/diff-utils.js.map +1 -0
  226. package/dist/src/tools/diff-utils.test.d.ts +6 -0
  227. package/dist/src/tools/diff-utils.test.js +53 -0
  228. package/dist/src/tools/diff-utils.test.js.map +1 -0
  229. package/dist/src/tools/grep-utils.d.ts +49 -0
  230. package/dist/src/tools/grep-utils.js +147 -0
  231. package/dist/src/tools/grep-utils.js.map +1 -0
  232. package/dist/src/tools/omissionPlaceholderDetector.d.ts +15 -0
  233. package/dist/src/tools/omissionPlaceholderDetector.js +90 -0
  234. package/dist/src/tools/omissionPlaceholderDetector.js.map +1 -0
  235. package/dist/src/tools/omissionPlaceholderDetector.test.d.ts +6 -0
  236. package/dist/src/tools/omissionPlaceholderDetector.test.js +49 -0
  237. package/dist/src/tools/omissionPlaceholderDetector.test.js.map +1 -0
  238. package/dist/src/tools/trackerTools.d.ts +122 -0
  239. package/dist/src/tools/trackerTools.js +365 -0
  240. package/dist/src/tools/trackerTools.js.map +1 -0
  241. package/dist/src/tools/trackerTools.test.d.ts +6 -0
  242. package/dist/src/tools/trackerTools.test.js +97 -0
  243. package/dist/src/tools/trackerTools.test.js.map +1 -0
  244. package/dist/src/utils/approvalModeUtils.d.ts +14 -0
  245. package/dist/src/utils/approvalModeUtils.js +35 -0
  246. package/dist/src/utils/approvalModeUtils.js.map +1 -0
  247. package/dist/src/utils/approvalModeUtils.test.d.ts +6 -0
  248. package/dist/src/utils/approvalModeUtils.test.js +36 -0
  249. package/dist/src/utils/approvalModeUtils.test.js.map +1 -0
  250. package/dist/src/utils/cache.d.ts +63 -0
  251. package/dist/src/utils/cache.js +103 -0
  252. package/dist/src/utils/cache.js.map +1 -0
  253. package/dist/src/utils/cache.test.d.ts +6 -0
  254. package/dist/src/utils/cache.test.js +158 -0
  255. package/dist/src/utils/cache.test.js.map +1 -0
  256. package/dist/src/utils/checkpointUtils.d.ts +2 -2
  257. package/dist/src/utils/compatibility.d.ts +41 -0
  258. package/dist/src/utils/compatibility.js +112 -0
  259. package/dist/src/utils/compatibility.js.map +1 -0
  260. package/dist/src/utils/compatibility.test.d.ts +6 -0
  261. package/dist/src/utils/compatibility.test.js +233 -0
  262. package/dist/src/utils/compatibility.test.js.map +1 -0
  263. package/dist/src/utils/envExpansion.d.ts +18 -0
  264. package/dist/src/utils/envExpansion.js +46 -0
  265. package/dist/src/utils/envExpansion.js.map +1 -0
  266. package/dist/src/utils/envExpansion.test.d.ts +6 -0
  267. package/dist/src/utils/envExpansion.test.js +110 -0
  268. package/dist/src/utils/envExpansion.test.js.map +1 -0
  269. package/dist/src/utils/errors_timeout.test.d.ts +6 -0
  270. package/dist/src/utils/errors_timeout.test.js +40 -0
  271. package/dist/src/utils/errors_timeout.test.js.map +1 -0
  272. package/dist/src/utils/fetch.test.d.ts +6 -0
  273. package/dist/src/utils/fetch.test.js +206 -0
  274. package/dist/src/utils/fetch.test.js.map +1 -0
  275. package/dist/src/utils/markdownUtils.d.ts +22 -0
  276. package/dist/src/utils/markdownUtils.js +126 -0
  277. package/dist/src/utils/markdownUtils.js.map +1 -0
  278. package/dist/src/utils/markdownUtils.test.d.ts +6 -0
  279. package/dist/src/utils/markdownUtils.test.js +107 -0
  280. package/dist/src/utils/markdownUtils.test.js.map +1 -0
  281. package/dist/src/utils/oauth-flow.d.ts +105 -0
  282. package/dist/src/utils/oauth-flow.js +370 -0
  283. package/dist/src/utils/oauth-flow.js.map +1 -0
  284. package/dist/src/utils/oauth-flow.test.d.ts +6 -0
  285. package/dist/src/utils/oauth-flow.test.js +360 -0
  286. package/dist/src/utils/oauth-flow.test.js.map +1 -0
  287. package/dist/src/utils/sessionUtils.d.ts +14 -0
  288. package/dist/src/utils/sessionUtils.js +122 -0
  289. package/dist/src/utils/sessionUtils.js.map +1 -0
  290. package/dist/src/utils/sessionUtils.test.d.ts +1 -0
  291. package/dist/src/utils/sessionUtils.test.js +171 -0
  292. package/dist/src/utils/sessionUtils.test.js.map +1 -0
  293. package/dist/src/voice/responseFormatter.d.ts +38 -0
  294. package/dist/src/voice/responseFormatter.js +130 -0
  295. package/dist/src/voice/responseFormatter.js.map +1 -0
  296. package/dist/src/voice/responseFormatter.test.d.ts +6 -0
  297. package/dist/src/voice/responseFormatter.test.js +214 -0
  298. package/dist/src/voice/responseFormatter.test.js.map +1 -0
  299. package/dist/tsconfig.tsbuildinfo +1 -1
  300. package/package.json +1 -1
  301. package/dist/docs/CONTRIBUTING.md +0 -555
  302. package/dist/src/agents/executor.d.ts +0 -114
  303. package/dist/src/agents/executor.js +0 -779
  304. package/dist/src/agents/executor.js.map +0 -1
  305. package/dist/src/agents/executor.test.js +0 -1362
  306. package/dist/src/agents/executor.test.js.map +0 -1
  307. package/dist/src/agents/invocation.d.ts +0 -46
  308. package/dist/src/agents/invocation.js +0 -102
  309. package/dist/src/agents/invocation.js.map +0 -1
  310. package/dist/src/agents/invocation.test.js +0 -215
  311. package/dist/src/agents/invocation.test.js.map +0 -1
  312. package/dist/src/core/subagent.d.ts +0 -236
  313. package/dist/src/core/subagent.js +0 -482
  314. package/dist/src/core/subagent.js.map +0 -1
  315. package/dist/src/core/subagent.test.js +0 -530
  316. package/dist/src/core/subagent.test.js.map +0 -1
  317. package/dist/src/tools/smart-edit.d.ts +0 -78
  318. package/dist/src/tools/smart-edit.js +0 -717
  319. package/dist/src/tools/smart-edit.js.map +0 -1
  320. package/dist/src/tools/smart-edit.test.js +0 -592
  321. package/dist/src/tools/smart-edit.test.js.map +0 -1
  322. /package/dist/src/{agents/executor.test.d.ts → policy/workspace-policy.test.d.ts} +0 -0
  323. /package/dist/src/{agents/invocation.test.d.ts → safety/conseca/conseca.test.d.ts} +0 -0
  324. /package/dist/src/{core/subagent.test.d.ts → safety/conseca/integration.test.d.ts} +0 -0
  325. /package/dist/src/{tools/smart-edit.test.d.ts → safety/conseca/policy-enforcer.test.d.ts} +0 -0
@@ -0,0 +1,1804 @@
1
+ # Gemini CLI configuration
2
+
3
+ Gemini CLI offers several ways to configure its behavior, including environment
4
+ variables, command-line arguments, and settings files. This document outlines
5
+ the different configuration methods and available settings.
6
+
7
+ ## Configuration layers
8
+
9
+ Configuration is applied in the following order of precedence (lower numbers are
10
+ overridden by higher numbers):
11
+
12
+ 1. **Default values:** Hardcoded defaults within the application.
13
+ 2. **System defaults file:** System-wide default settings that can be
14
+ overridden by other settings files.
15
+ 3. **User settings file:** Global settings for the current user.
16
+ 4. **Project settings file:** Project-specific settings.
17
+ 5. **System settings file:** System-wide settings that override all other
18
+ settings files.
19
+ 6. **Environment variables:** System-wide or session-specific variables,
20
+ potentially loaded from `.env` files.
21
+ 7. **Command-line arguments:** Values passed when launching the CLI.
22
+
23
+ ## Settings files
24
+
25
+ Gemini CLI uses JSON settings files for persistent configuration. There are four
26
+ locations for these files:
27
+
28
+ > **Tip:** JSON-aware editors can use autocomplete and validation by pointing to
29
+ > the generated schema at `schemas/settings.schema.json` in this repository.
30
+ > When working outside the repo, reference the hosted schema at
31
+ > `https://raw.githubusercontent.com/google-gemini/gemini-cli/main/schemas/settings.schema.json`.
32
+
33
+ - **System defaults file:**
34
+ - **Location:** `/etc/gemini-cli/system-defaults.json` (Linux),
35
+ `C:\ProgramData\gemini-cli\system-defaults.json` (Windows) or
36
+ `/Library/Application Support/GeminiCli/system-defaults.json` (macOS). The
37
+ path can be overridden using the `GEMINI_CLI_SYSTEM_DEFAULTS_PATH`
38
+ environment variable.
39
+ - **Scope:** Provides a base layer of system-wide default settings. These
40
+ settings have the lowest precedence and are intended to be overridden by
41
+ user, project, or system override settings.
42
+ - **User settings file:**
43
+ - **Location:** `~/.gemini/settings.json` (where `~` is your home directory).
44
+ - **Scope:** Applies to all Gemini CLI sessions for the current user. User
45
+ settings override system defaults.
46
+ - **Project settings file:**
47
+ - **Location:** `.gemini/settings.json` within your project's root directory.
48
+ - **Scope:** Applies only when running Gemini CLI from that specific project.
49
+ Project settings override user settings and system defaults.
50
+ - **System settings file:**
51
+ - **Location:** `/etc/gemini-cli/settings.json` (Linux),
52
+ `C:\ProgramData\gemini-cli\settings.json` (Windows) or
53
+ `/Library/Application Support/GeminiCli/settings.json` (macOS). The path can
54
+ be overridden using the `GEMINI_CLI_SYSTEM_SETTINGS_PATH` environment
55
+ variable.
56
+ - **Scope:** Applies to all Gemini CLI sessions on the system, for all users.
57
+ System settings act as overrides, taking precedence over all other settings
58
+ files. May be useful for system administrators at enterprises to have
59
+ controls over users' Gemini CLI setups.
60
+
61
+ **Note on environment variables in settings:** String values within your
62
+ `settings.json` and `gemini-extension.json` files can reference environment
63
+ variables using either `$VAR_NAME` or `${VAR_NAME}` syntax. These variables will
64
+ be automatically resolved when the settings are loaded. For example, if you have
65
+ an environment variable `MY_API_TOKEN`, you could use it in `settings.json` like
66
+ this: `"apiKey": "$MY_API_TOKEN"`. Additionally, each extension can have its own
67
+ `.env` file in its directory, which will be loaded automatically.
68
+
69
+ > **Note for Enterprise Users:** For guidance on deploying and managing Gemini
70
+ > CLI in a corporate environment, please see the
71
+ > [Enterprise Configuration](../cli/enterprise.md) documentation.
72
+
73
+ ### The `.gemini` directory in your project
74
+
75
+ In addition to a project settings file, a project's `.gemini` directory can
76
+ contain other project-specific files related to Gemini CLI's operation, such as:
77
+
78
+ - [Custom sandbox profiles](#sandboxing) (e.g.,
79
+ `.gemini/sandbox-macos-custom.sb`, `.gemini/sandbox.Dockerfile`).
80
+
81
+ ### Available settings in `settings.json`
82
+
83
+ Settings are organized into categories. All settings should be placed within
84
+ their corresponding top-level category object in your `settings.json` file.
85
+
86
+ <!-- SETTINGS-AUTOGEN:START -->
87
+
88
+ #### `policyPaths`
89
+
90
+ - **`policyPaths`** (array):
91
+ - **Description:** Additional policy files or directories to load.
92
+ - **Default:** `[]`
93
+ - **Requires restart:** Yes
94
+
95
+ #### `general`
96
+
97
+ - **`general.preferredEditor`** (string):
98
+ - **Description:** The preferred editor to open files in.
99
+ - **Default:** `undefined`
100
+
101
+ - **`general.vimMode`** (boolean):
102
+ - **Description:** Enable Vim keybindings
103
+ - **Default:** `false`
104
+
105
+ - **`general.defaultApprovalMode`** (enum):
106
+ - **Description:** The default approval mode for tool execution. 'default'
107
+ prompts for approval, 'auto_edit' auto-approves edit tools, and 'plan' is
108
+ read-only mode. 'yolo' is not supported yet.
109
+ - **Default:** `"default"`
110
+ - **Values:** `"default"`, `"auto_edit"`, `"plan"`
111
+
112
+ - **`general.devtools`** (boolean):
113
+ - **Description:** Enable DevTools inspector on launch.
114
+ - **Default:** `false`
115
+
116
+ - **`general.enableAutoUpdate`** (boolean):
117
+ - **Description:** Enable automatic updates.
118
+ - **Default:** `true`
119
+
120
+ - **`general.enableAutoUpdateNotification`** (boolean):
121
+ - **Description:** Enable update notification prompts.
122
+ - **Default:** `true`
123
+
124
+ - **`general.enableNotifications`** (boolean):
125
+ - **Description:** Enable run-event notifications for action-required prompts
126
+ and session completion. Currently macOS only.
127
+ - **Default:** `false`
128
+
129
+ - **`general.checkpointing.enabled`** (boolean):
130
+ - **Description:** Enable session checkpointing for recovery
131
+ - **Default:** `false`
132
+ - **Requires restart:** Yes
133
+
134
+ - **`general.plan.directory`** (string):
135
+ - **Description:** The directory where planning artifacts are stored. If not
136
+ specified, defaults to the system temporary directory.
137
+ - **Default:** `undefined`
138
+ - **Requires restart:** Yes
139
+
140
+ - **`general.plan.modelRouting`** (boolean):
141
+ - **Description:** Automatically switch between Pro and Flash models based on
142
+ Plan Mode status. Uses Pro for the planning phase and Flash for the
143
+ implementation phase.
144
+ - **Default:** `true`
145
+
146
+ - **`general.retryFetchErrors`** (boolean):
147
+ - **Description:** Retry on "exception TypeError: fetch failed sending
148
+ request" errors.
149
+ - **Default:** `false`
150
+
151
+ - **`general.maxAttempts`** (number):
152
+ - **Description:** Maximum number of attempts for requests to the main chat
153
+ model. Cannot exceed 10.
154
+ - **Default:** `10`
155
+
156
+ - **`general.debugKeystrokeLogging`** (boolean):
157
+ - **Description:** Enable debug logging of keystrokes to the console.
158
+ - **Default:** `false`
159
+
160
+ - **`general.sessionRetention.enabled`** (boolean):
161
+ - **Description:** Enable automatic session cleanup
162
+ - **Default:** `true`
163
+
164
+ - **`general.sessionRetention.maxAge`** (string):
165
+ - **Description:** Automatically delete chats older than this time period
166
+ (e.g., "30d", "7d", "24h", "1w")
167
+ - **Default:** `"30d"`
168
+
169
+ - **`general.sessionRetention.maxCount`** (number):
170
+ - **Description:** Alternative: Maximum number of sessions to keep (most
171
+ recent)
172
+ - **Default:** `undefined`
173
+
174
+ - **`general.sessionRetention.minRetention`** (string):
175
+ - **Description:** Minimum retention period (safety limit, defaults to "1d")
176
+ - **Default:** `"1d"`
177
+
178
+ #### `output`
179
+
180
+ - **`output.format`** (enum):
181
+ - **Description:** The format of the CLI output. Can be `text` or `json`.
182
+ - **Default:** `"text"`
183
+ - **Values:** `"text"`, `"json"`
184
+
185
+ #### `ui`
186
+
187
+ - **`ui.theme`** (string):
188
+ - **Description:** The color theme for the UI. See the CLI themes guide for
189
+ available options.
190
+ - **Default:** `undefined`
191
+
192
+ - **`ui.autoThemeSwitching`** (boolean):
193
+ - **Description:** Automatically switch between default light and dark themes
194
+ based on terminal background color.
195
+ - **Default:** `true`
196
+
197
+ - **`ui.terminalBackgroundPollingInterval`** (number):
198
+ - **Description:** Interval in seconds to poll the terminal background color.
199
+ - **Default:** `60`
200
+
201
+ - **`ui.customThemes`** (object):
202
+ - **Description:** Custom theme definitions.
203
+ - **Default:** `{}`
204
+
205
+ - **`ui.hideWindowTitle`** (boolean):
206
+ - **Description:** Hide the window title bar
207
+ - **Default:** `false`
208
+ - **Requires restart:** Yes
209
+
210
+ - **`ui.inlineThinkingMode`** (enum):
211
+ - **Description:** Display model thinking inline: off or full.
212
+ - **Default:** `"off"`
213
+ - **Values:** `"off"`, `"full"`
214
+
215
+ - **`ui.showStatusInTitle`** (boolean):
216
+ - **Description:** Show Gemini CLI model thoughts in the terminal window title
217
+ during the working phase
218
+ - **Default:** `false`
219
+
220
+ - **`ui.dynamicWindowTitle`** (boolean):
221
+ - **Description:** Update the terminal window title with current status icons
222
+ (Ready: ◇, Action Required: ✋, Working: ✦)
223
+ - **Default:** `true`
224
+
225
+ - **`ui.showHomeDirectoryWarning`** (boolean):
226
+ - **Description:** Show a warning when running Gemini CLI in the home
227
+ directory.
228
+ - **Default:** `true`
229
+ - **Requires restart:** Yes
230
+
231
+ - **`ui.showCompatibilityWarnings`** (boolean):
232
+ - **Description:** Show warnings about terminal or OS compatibility issues.
233
+ - **Default:** `true`
234
+ - **Requires restart:** Yes
235
+
236
+ - **`ui.hideTips`** (boolean):
237
+ - **Description:** Hide helpful tips in the UI
238
+ - **Default:** `false`
239
+
240
+ - **`ui.showShortcutsHint`** (boolean):
241
+ - **Description:** Show the "? for shortcuts" hint above the input.
242
+ - **Default:** `true`
243
+
244
+ - **`ui.hideBanner`** (boolean):
245
+ - **Description:** Hide the application banner
246
+ - **Default:** `false`
247
+
248
+ - **`ui.hideContextSummary`** (boolean):
249
+ - **Description:** Hide the context summary (GEMINI.md, MCP servers) above the
250
+ input.
251
+ - **Default:** `false`
252
+
253
+ - **`ui.footer.items`** (array):
254
+ - **Description:** List of item IDs to display in the footer. Rendered in
255
+ order
256
+ - **Default:** `undefined`
257
+
258
+ - **`ui.footer.showLabels`** (boolean):
259
+ - **Description:** Display a second line above the footer items with
260
+ descriptive headers (e.g., /model).
261
+ - **Default:** `true`
262
+
263
+ - **`ui.footer.hideCWD`** (boolean):
264
+ - **Description:** Hide the current working directory in the footer.
265
+ - **Default:** `false`
266
+
267
+ - **`ui.footer.hideSandboxStatus`** (boolean):
268
+ - **Description:** Hide the sandbox status indicator in the footer.
269
+ - **Default:** `false`
270
+
271
+ - **`ui.footer.hideModelInfo`** (boolean):
272
+ - **Description:** Hide the model name and context usage in the footer.
273
+ - **Default:** `false`
274
+
275
+ - **`ui.footer.hideContextPercentage`** (boolean):
276
+ - **Description:** Hides the context window usage percentage.
277
+ - **Default:** `true`
278
+
279
+ - **`ui.hideFooter`** (boolean):
280
+ - **Description:** Hide the footer from the UI
281
+ - **Default:** `false`
282
+
283
+ - **`ui.showMemoryUsage`** (boolean):
284
+ - **Description:** Display memory usage information in the UI
285
+ - **Default:** `false`
286
+
287
+ - **`ui.showLineNumbers`** (boolean):
288
+ - **Description:** Show line numbers in the chat.
289
+ - **Default:** `true`
290
+
291
+ - **`ui.showCitations`** (boolean):
292
+ - **Description:** Show citations for generated text in the chat.
293
+ - **Default:** `false`
294
+
295
+ - **`ui.showModelInfoInChat`** (boolean):
296
+ - **Description:** Show the model name in the chat for each model turn.
297
+ - **Default:** `false`
298
+
299
+ - **`ui.showUserIdentity`** (boolean):
300
+ - **Description:** Show the signed-in user's identity (e.g. email) in the UI.
301
+ - **Default:** `true`
302
+
303
+ - **`ui.useAlternateBuffer`** (boolean):
304
+ - **Description:** Use an alternate screen buffer for the UI, preserving shell
305
+ history.
306
+ - **Default:** `false`
307
+ - **Requires restart:** Yes
308
+
309
+ - **`ui.useBackgroundColor`** (boolean):
310
+ - **Description:** Whether to use background colors in the UI.
311
+ - **Default:** `true`
312
+
313
+ - **`ui.incrementalRendering`** (boolean):
314
+ - **Description:** Enable incremental rendering for the UI. This option will
315
+ reduce flickering but may cause rendering artifacts. Only supported when
316
+ useAlternateBuffer is enabled.
317
+ - **Default:** `true`
318
+ - **Requires restart:** Yes
319
+
320
+ - **`ui.showSpinner`** (boolean):
321
+ - **Description:** Show the spinner during operations.
322
+ - **Default:** `true`
323
+
324
+ - **`ui.loadingPhrases`** (enum):
325
+ - **Description:** What to show while the model is working: tips, witty
326
+ comments, both, or nothing.
327
+ - **Default:** `"tips"`
328
+ - **Values:** `"tips"`, `"witty"`, `"all"`, `"off"`
329
+
330
+ - **`ui.errorVerbosity`** (enum):
331
+ - **Description:** Controls whether recoverable errors are hidden (low) or
332
+ fully shown (full).
333
+ - **Default:** `"low"`
334
+ - **Values:** `"low"`, `"full"`
335
+
336
+ - **`ui.customWittyPhrases`** (array):
337
+ - **Description:** Custom witty phrases to display during loading. When
338
+ provided, the CLI cycles through these instead of the defaults.
339
+ - **Default:** `[]`
340
+
341
+ - **`ui.accessibility.enableLoadingPhrases`** (boolean):
342
+ - **Description:** @deprecated Use ui.loadingPhrases instead. Enable loading
343
+ phrases during operations.
344
+ - **Default:** `true`
345
+ - **Requires restart:** Yes
346
+
347
+ - **`ui.accessibility.screenReader`** (boolean):
348
+ - **Description:** Render output in plain-text to be more screen reader
349
+ accessible
350
+ - **Default:** `false`
351
+ - **Requires restart:** Yes
352
+
353
+ #### `ide`
354
+
355
+ - **`ide.enabled`** (boolean):
356
+ - **Description:** Enable IDE integration mode.
357
+ - **Default:** `false`
358
+ - **Requires restart:** Yes
359
+
360
+ - **`ide.hasSeenNudge`** (boolean):
361
+ - **Description:** Whether the user has seen the IDE integration nudge.
362
+ - **Default:** `false`
363
+
364
+ #### `privacy`
365
+
366
+ - **`privacy.usageStatisticsEnabled`** (boolean):
367
+ - **Description:** Enable collection of usage statistics
368
+ - **Default:** `true`
369
+ - **Requires restart:** Yes
370
+
371
+ #### `billing`
372
+
373
+ - **`billing.overageStrategy`** (enum):
374
+ - **Description:** How to handle quota exhaustion when AI credits are
375
+ available. 'ask' prompts each time, 'always' automatically uses credits,
376
+ 'never' disables credit usage.
377
+ - **Default:** `"ask"`
378
+ - **Values:** `"ask"`, `"always"`, `"never"`
379
+
380
+ #### `model`
381
+
382
+ - **`model.name`** (string):
383
+ - **Description:** The Gemini model to use for conversations.
384
+ - **Default:** `undefined`
385
+
386
+ - **`model.maxSessionTurns`** (number):
387
+ - **Description:** Maximum number of user/model/tool turns to keep in a
388
+ session. -1 means unlimited.
389
+ - **Default:** `-1`
390
+
391
+ - **`model.summarizeToolOutput`** (object):
392
+ - **Description:** Enables or disables summarization of tool output. Configure
393
+ per-tool token budgets (for example {"run_shell_command": {"tokenBudget":
394
+ 2000}}). Currently only the run_shell_command tool supports summarization.
395
+ - **Default:** `undefined`
396
+
397
+ - **`model.compressionThreshold`** (number):
398
+ - **Description:** The fraction of context usage at which to trigger context
399
+ compression (e.g. 0.2, 0.3).
400
+ - **Default:** `0.5`
401
+ - **Requires restart:** Yes
402
+
403
+ - **`model.disableLoopDetection`** (boolean):
404
+ - **Description:** Disable automatic detection and prevention of infinite
405
+ loops.
406
+ - **Default:** `false`
407
+ - **Requires restart:** Yes
408
+
409
+ - **`model.skipNextSpeakerCheck`** (boolean):
410
+ - **Description:** Skip the next speaker check.
411
+ - **Default:** `true`
412
+
413
+ #### `modelConfigs`
414
+
415
+ - **`modelConfigs.aliases`** (object):
416
+ - **Description:** Named presets for model configs. Can be used in place of a
417
+ model name and can inherit from other aliases using an `extends` property.
418
+ - **Default:**
419
+
420
+ ```json
421
+ {
422
+ "base": {
423
+ "modelConfig": {
424
+ "generateContentConfig": {
425
+ "temperature": 0,
426
+ "topP": 1
427
+ }
428
+ }
429
+ },
430
+ "chat-base": {
431
+ "extends": "base",
432
+ "modelConfig": {
433
+ "generateContentConfig": {
434
+ "thinkingConfig": {
435
+ "includeThoughts": true
436
+ },
437
+ "temperature": 1,
438
+ "topP": 0.95,
439
+ "topK": 64
440
+ }
441
+ }
442
+ },
443
+ "chat-base-2.5": {
444
+ "extends": "chat-base",
445
+ "modelConfig": {
446
+ "generateContentConfig": {
447
+ "thinkingConfig": {
448
+ "thinkingBudget": 8192
449
+ }
450
+ }
451
+ }
452
+ },
453
+ "chat-base-3": {
454
+ "extends": "chat-base",
455
+ "modelConfig": {
456
+ "generateContentConfig": {
457
+ "thinkingConfig": {
458
+ "thinkingLevel": "HIGH"
459
+ }
460
+ }
461
+ }
462
+ },
463
+ "gemini-3-pro-preview": {
464
+ "extends": "chat-base-3",
465
+ "modelConfig": {
466
+ "model": "gemini-3-pro-preview"
467
+ }
468
+ },
469
+ "gemini-3-flash-preview": {
470
+ "extends": "chat-base-3",
471
+ "modelConfig": {
472
+ "model": "gemini-3-flash-preview"
473
+ }
474
+ },
475
+ "gemini-2.5-pro": {
476
+ "extends": "chat-base-2.5",
477
+ "modelConfig": {
478
+ "model": "gemini-2.5-pro"
479
+ }
480
+ },
481
+ "gemini-2.5-flash": {
482
+ "extends": "chat-base-2.5",
483
+ "modelConfig": {
484
+ "model": "gemini-2.5-flash"
485
+ }
486
+ },
487
+ "gemini-2.5-flash-lite": {
488
+ "extends": "chat-base-2.5",
489
+ "modelConfig": {
490
+ "model": "gemini-2.5-flash-lite"
491
+ }
492
+ },
493
+ "gemini-2.5-flash-base": {
494
+ "extends": "base",
495
+ "modelConfig": {
496
+ "model": "gemini-2.5-flash"
497
+ }
498
+ },
499
+ "gemini-3-flash-base": {
500
+ "extends": "base",
501
+ "modelConfig": {
502
+ "model": "gemini-3-flash-preview"
503
+ }
504
+ },
505
+ "classifier": {
506
+ "extends": "base",
507
+ "modelConfig": {
508
+ "model": "gemini-2.5-flash-lite",
509
+ "generateContentConfig": {
510
+ "maxOutputTokens": 1024,
511
+ "thinkingConfig": {
512
+ "thinkingBudget": 512
513
+ }
514
+ }
515
+ }
516
+ },
517
+ "prompt-completion": {
518
+ "extends": "base",
519
+ "modelConfig": {
520
+ "model": "gemini-2.5-flash-lite",
521
+ "generateContentConfig": {
522
+ "temperature": 0.3,
523
+ "maxOutputTokens": 16000,
524
+ "thinkingConfig": {
525
+ "thinkingBudget": 0
526
+ }
527
+ }
528
+ }
529
+ },
530
+ "fast-ack-helper": {
531
+ "extends": "base",
532
+ "modelConfig": {
533
+ "model": "gemini-2.5-flash-lite",
534
+ "generateContentConfig": {
535
+ "temperature": 0.2,
536
+ "maxOutputTokens": 120,
537
+ "thinkingConfig": {
538
+ "thinkingBudget": 0
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "edit-corrector": {
544
+ "extends": "base",
545
+ "modelConfig": {
546
+ "model": "gemini-2.5-flash-lite",
547
+ "generateContentConfig": {
548
+ "thinkingConfig": {
549
+ "thinkingBudget": 0
550
+ }
551
+ }
552
+ }
553
+ },
554
+ "summarizer-default": {
555
+ "extends": "base",
556
+ "modelConfig": {
557
+ "model": "gemini-2.5-flash-lite",
558
+ "generateContentConfig": {
559
+ "maxOutputTokens": 2000
560
+ }
561
+ }
562
+ },
563
+ "summarizer-shell": {
564
+ "extends": "base",
565
+ "modelConfig": {
566
+ "model": "gemini-2.5-flash-lite",
567
+ "generateContentConfig": {
568
+ "maxOutputTokens": 2000
569
+ }
570
+ }
571
+ },
572
+ "web-search": {
573
+ "extends": "gemini-3-flash-base",
574
+ "modelConfig": {
575
+ "generateContentConfig": {
576
+ "tools": [
577
+ {
578
+ "googleSearch": {}
579
+ }
580
+ ]
581
+ }
582
+ }
583
+ },
584
+ "web-fetch": {
585
+ "extends": "gemini-3-flash-base",
586
+ "modelConfig": {
587
+ "generateContentConfig": {
588
+ "tools": [
589
+ {
590
+ "urlContext": {}
591
+ }
592
+ ]
593
+ }
594
+ }
595
+ },
596
+ "web-fetch-fallback": {
597
+ "extends": "gemini-3-flash-base",
598
+ "modelConfig": {}
599
+ },
600
+ "loop-detection": {
601
+ "extends": "gemini-3-flash-base",
602
+ "modelConfig": {}
603
+ },
604
+ "loop-detection-double-check": {
605
+ "extends": "base",
606
+ "modelConfig": {
607
+ "model": "gemini-3-pro-preview"
608
+ }
609
+ },
610
+ "llm-edit-fixer": {
611
+ "extends": "gemini-3-flash-base",
612
+ "modelConfig": {}
613
+ },
614
+ "next-speaker-checker": {
615
+ "extends": "gemini-3-flash-base",
616
+ "modelConfig": {}
617
+ },
618
+ "chat-compression-3-pro": {
619
+ "modelConfig": {
620
+ "model": "gemini-3-pro-preview"
621
+ }
622
+ },
623
+ "chat-compression-3-flash": {
624
+ "modelConfig": {
625
+ "model": "gemini-3-flash-preview"
626
+ }
627
+ },
628
+ "chat-compression-2.5-pro": {
629
+ "modelConfig": {
630
+ "model": "gemini-2.5-pro"
631
+ }
632
+ },
633
+ "chat-compression-2.5-flash": {
634
+ "modelConfig": {
635
+ "model": "gemini-2.5-flash"
636
+ }
637
+ },
638
+ "chat-compression-2.5-flash-lite": {
639
+ "modelConfig": {
640
+ "model": "gemini-2.5-flash-lite"
641
+ }
642
+ },
643
+ "chat-compression-default": {
644
+ "modelConfig": {
645
+ "model": "gemini-3-pro-preview"
646
+ }
647
+ }
648
+ }
649
+ ```
650
+
651
+ - **`modelConfigs.customAliases`** (object):
652
+ - **Description:** Custom named presets for model configs. These are merged
653
+ with (and override) the built-in aliases.
654
+ - **Default:** `{}`
655
+
656
+ - **`modelConfigs.customOverrides`** (array):
657
+ - **Description:** Custom model config overrides. These are merged with (and
658
+ added to) the built-in overrides.
659
+ - **Default:** `[]`
660
+
661
+ - **`modelConfigs.overrides`** (array):
662
+ - **Description:** Apply specific configuration overrides based on matches,
663
+ with a primary key of model (or alias). The most specific match will be
664
+ used.
665
+ - **Default:** `[]`
666
+
667
+ #### `agents`
668
+
669
+ - **`agents.overrides`** (object):
670
+ - **Description:** Override settings for specific agents, e.g. to disable the
671
+ agent, set a custom model config, or run config.
672
+ - **Default:** `{}`
673
+ - **Requires restart:** Yes
674
+
675
+ - **`agents.browser.sessionMode`** (enum):
676
+ - **Description:** Session mode: 'persistent', 'isolated', or 'existing'.
677
+ - **Default:** `"persistent"`
678
+ - **Values:** `"persistent"`, `"isolated"`, `"existing"`
679
+ - **Requires restart:** Yes
680
+
681
+ - **`agents.browser.headless`** (boolean):
682
+ - **Description:** Run browser in headless mode.
683
+ - **Default:** `false`
684
+ - **Requires restart:** Yes
685
+
686
+ - **`agents.browser.profilePath`** (string):
687
+ - **Description:** Path to browser profile directory for session persistence.
688
+ - **Default:** `undefined`
689
+ - **Requires restart:** Yes
690
+
691
+ - **`agents.browser.visualModel`** (string):
692
+ - **Description:** Model override for the visual agent.
693
+ - **Default:** `undefined`
694
+ - **Requires restart:** Yes
695
+
696
+ #### `context`
697
+
698
+ - **`context.fileName`** (string | string[]):
699
+ - **Description:** The name of the context file or files to load into memory.
700
+ Accepts either a single string or an array of strings.
701
+ - **Default:** `undefined`
702
+
703
+ - **`context.importFormat`** (string):
704
+ - **Description:** The format to use when importing memory.
705
+ - **Default:** `undefined`
706
+
707
+ - **`context.includeDirectoryTree`** (boolean):
708
+ - **Description:** Whether to include the directory tree of the current
709
+ working directory in the initial request to the model.
710
+ - **Default:** `true`
711
+
712
+ - **`context.discoveryMaxDirs`** (number):
713
+ - **Description:** Maximum number of directories to search for memory.
714
+ - **Default:** `200`
715
+
716
+ - **`context.includeDirectories`** (array):
717
+ - **Description:** Additional directories to include in the workspace context.
718
+ Missing directories will be skipped with a warning.
719
+ - **Default:** `[]`
720
+
721
+ - **`context.loadMemoryFromIncludeDirectories`** (boolean):
722
+ - **Description:** Controls how /memory reload loads GEMINI.md files. When
723
+ true, include directories are scanned; when false, only the current
724
+ directory is used.
725
+ - **Default:** `false`
726
+
727
+ - **`context.fileFiltering.respectGitIgnore`** (boolean):
728
+ - **Description:** Respect .gitignore files when searching.
729
+ - **Default:** `true`
730
+ - **Requires restart:** Yes
731
+
732
+ - **`context.fileFiltering.respectGeminiIgnore`** (boolean):
733
+ - **Description:** Respect .geminiignore files when searching.
734
+ - **Default:** `true`
735
+ - **Requires restart:** Yes
736
+
737
+ - **`context.fileFiltering.enableRecursiveFileSearch`** (boolean):
738
+ - **Description:** Enable recursive file search functionality when completing
739
+ @ references in the prompt.
740
+ - **Default:** `true`
741
+ - **Requires restart:** Yes
742
+
743
+ - **`context.fileFiltering.enableFuzzySearch`** (boolean):
744
+ - **Description:** Enable fuzzy search when searching for files.
745
+ - **Default:** `true`
746
+ - **Requires restart:** Yes
747
+
748
+ - **`context.fileFiltering.customIgnoreFilePaths`** (array):
749
+ - **Description:** Additional ignore file paths to respect. These files take
750
+ precedence over .geminiignore and .gitignore. Files earlier in the array
751
+ take precedence over files later in the array, e.g. the first file takes
752
+ precedence over the second one.
753
+ - **Default:** `[]`
754
+ - **Requires restart:** Yes
755
+
756
+ #### `tools`
757
+
758
+ - **`tools.sandbox`** (boolean | string):
759
+ - **Description:** Sandbox execution environment. Set to a boolean to enable
760
+ or disable the sandbox, provide a string path to a sandbox profile, or
761
+ specify an explicit sandbox command (e.g., "docker", "podman", "lxc").
762
+ - **Default:** `undefined`
763
+ - **Requires restart:** Yes
764
+
765
+ - **`tools.shell.enableInteractiveShell`** (boolean):
766
+ - **Description:** Use node-pty for an interactive shell experience. Fallback
767
+ to child_process still applies.
768
+ - **Default:** `true`
769
+ - **Requires restart:** Yes
770
+
771
+ - **`tools.shell.pager`** (string):
772
+ - **Description:** The pager command to use for shell output. Defaults to
773
+ `cat`.
774
+ - **Default:** `"cat"`
775
+
776
+ - **`tools.shell.showColor`** (boolean):
777
+ - **Description:** Show color in shell output.
778
+ - **Default:** `false`
779
+
780
+ - **`tools.shell.inactivityTimeout`** (number):
781
+ - **Description:** The maximum time in seconds allowed without output from the
782
+ shell command. Defaults to 5 minutes.
783
+ - **Default:** `300`
784
+
785
+ - **`tools.shell.enableShellOutputEfficiency`** (boolean):
786
+ - **Description:** Enable shell output efficiency optimizations for better
787
+ performance.
788
+ - **Default:** `true`
789
+
790
+ - **`tools.core`** (array):
791
+ - **Description:** Restrict the set of built-in tools with an allowlist. Match
792
+ semantics mirror tools.allowed; see the built-in tools documentation for
793
+ available names.
794
+ - **Default:** `undefined`
795
+ - **Requires restart:** Yes
796
+
797
+ - **`tools.allowed`** (array):
798
+ - **Description:** Tool names that bypass the confirmation dialog. Useful for
799
+ trusted commands (for example ["run_shell_command(git)",
800
+ "run_shell_command(npm test)"]). See shell tool command restrictions for
801
+ matching details.
802
+ - **Default:** `undefined`
803
+ - **Requires restart:** Yes
804
+
805
+ - **`tools.exclude`** (array):
806
+ - **Description:** Tool names to exclude from discovery.
807
+ - **Default:** `undefined`
808
+ - **Requires restart:** Yes
809
+
810
+ - **`tools.discoveryCommand`** (string):
811
+ - **Description:** Command to run for tool discovery.
812
+ - **Default:** `undefined`
813
+ - **Requires restart:** Yes
814
+
815
+ - **`tools.callCommand`** (string):
816
+ - **Description:** Defines a custom shell command for invoking discovered
817
+ tools. The command must take the tool name as the first argument, read JSON
818
+ arguments from stdin, and emit JSON results on stdout.
819
+ - **Default:** `undefined`
820
+ - **Requires restart:** Yes
821
+
822
+ - **`tools.useRipgrep`** (boolean):
823
+ - **Description:** Use ripgrep for file content search instead of the fallback
824
+ implementation. Provides faster search performance.
825
+ - **Default:** `true`
826
+
827
+ - **`tools.truncateToolOutputThreshold`** (number):
828
+ - **Description:** Maximum characters to show when truncating large tool
829
+ outputs. Set to 0 or negative to disable truncation.
830
+ - **Default:** `40000`
831
+ - **Requires restart:** Yes
832
+
833
+ - **`tools.disableLLMCorrection`** (boolean):
834
+ - **Description:** Disable LLM-based error correction for edit tools. When
835
+ enabled, tools will fail immediately if exact string matches are not found,
836
+ instead of attempting to self-correct.
837
+ - **Default:** `true`
838
+ - **Requires restart:** Yes
839
+
840
+ #### `mcp`
841
+
842
+ - **`mcp.serverCommand`** (string):
843
+ - **Description:** Command to start an MCP server.
844
+ - **Default:** `undefined`
845
+ - **Requires restart:** Yes
846
+
847
+ - **`mcp.allowed`** (array):
848
+ - **Description:** A list of MCP servers to allow.
849
+ - **Default:** `undefined`
850
+ - **Requires restart:** Yes
851
+
852
+ - **`mcp.excluded`** (array):
853
+ - **Description:** A list of MCP servers to exclude.
854
+ - **Default:** `undefined`
855
+ - **Requires restart:** Yes
856
+
857
+ #### `useWriteTodos`
858
+
859
+ - **`useWriteTodos`** (boolean):
860
+ - **Description:** Enable the write_todos tool.
861
+ - **Default:** `true`
862
+
863
+ #### `security`
864
+
865
+ - **`security.disableYoloMode`** (boolean):
866
+ - **Description:** Disable YOLO mode, even if enabled by a flag.
867
+ - **Default:** `false`
868
+ - **Requires restart:** Yes
869
+
870
+ - **`security.enablePermanentToolApproval`** (boolean):
871
+ - **Description:** Enable the "Allow for all future sessions" option in tool
872
+ confirmation dialogs.
873
+ - **Default:** `false`
874
+
875
+ - **`security.autoAddToPolicyByDefault`** (boolean):
876
+ - **Description:** When enabled, the "Allow for all future sessions" option
877
+ becomes the default choice for low-risk tools in trusted workspaces.
878
+ - **Default:** `false`
879
+
880
+ - **`security.blockGitExtensions`** (boolean):
881
+ - **Description:** Blocks installing and loading extensions from Git.
882
+ - **Default:** `false`
883
+ - **Requires restart:** Yes
884
+
885
+ - **`security.allowedExtensions`** (array):
886
+ - **Description:** List of Regex patterns for allowed extensions. If nonempty,
887
+ only extensions that match the patterns in this list are allowed. Overrides
888
+ the blockGitExtensions setting.
889
+ - **Default:** `[]`
890
+ - **Requires restart:** Yes
891
+
892
+ - **`security.folderTrust.enabled`** (boolean):
893
+ - **Description:** Setting to track whether Folder trust is enabled.
894
+ - **Default:** `true`
895
+ - **Requires restart:** Yes
896
+
897
+ - **`security.environmentVariableRedaction.allowed`** (array):
898
+ - **Description:** Environment variables to always allow (bypass redaction).
899
+ - **Default:** `[]`
900
+ - **Requires restart:** Yes
901
+
902
+ - **`security.environmentVariableRedaction.blocked`** (array):
903
+ - **Description:** Environment variables to always redact.
904
+ - **Default:** `[]`
905
+ - **Requires restart:** Yes
906
+
907
+ - **`security.environmentVariableRedaction.enabled`** (boolean):
908
+ - **Description:** Enable redaction of environment variables that may contain
909
+ secrets.
910
+ - **Default:** `false`
911
+ - **Requires restart:** Yes
912
+
913
+ - **`security.auth.selectedType`** (string):
914
+ - **Description:** The currently selected authentication type.
915
+ - **Default:** `undefined`
916
+ - **Requires restart:** Yes
917
+
918
+ - **`security.auth.enforcedType`** (string):
919
+ - **Description:** The required auth type. If this does not match the selected
920
+ auth type, the user will be prompted to re-authenticate.
921
+ - **Default:** `undefined`
922
+ - **Requires restart:** Yes
923
+
924
+ - **`security.auth.useExternal`** (boolean):
925
+ - **Description:** Whether to use an external authentication flow.
926
+ - **Default:** `undefined`
927
+ - **Requires restart:** Yes
928
+
929
+ - **`security.enableConseca`** (boolean):
930
+ - **Description:** Enable the context-aware security checker. This feature
931
+ uses an LLM to dynamically generate and enforce security policies for tool
932
+ use based on your prompt, providing an additional layer of protection
933
+ against unintended actions.
934
+ - **Default:** `false`
935
+ - **Requires restart:** Yes
936
+
937
+ #### `advanced`
938
+
939
+ - **`advanced.autoConfigureMemory`** (boolean):
940
+ - **Description:** Automatically configure Node.js memory limits
941
+ - **Default:** `false`
942
+ - **Requires restart:** Yes
943
+
944
+ - **`advanced.dnsResolutionOrder`** (string):
945
+ - **Description:** The DNS resolution order.
946
+ - **Default:** `undefined`
947
+ - **Requires restart:** Yes
948
+
949
+ - **`advanced.excludedEnvVars`** (array):
950
+ - **Description:** Environment variables to exclude from project context.
951
+ - **Default:**
952
+
953
+ ```json
954
+ ["DEBUG", "DEBUG_MODE"]
955
+ ```
956
+
957
+ - **`advanced.bugCommand`** (object):
958
+ - **Description:** Configuration for the bug report command.
959
+ - **Default:** `undefined`
960
+
961
+ #### `experimental`
962
+
963
+ - **`experimental.toolOutputMasking.enabled`** (boolean):
964
+ - **Description:** Enables tool output masking to save tokens.
965
+ - **Default:** `true`
966
+ - **Requires restart:** Yes
967
+
968
+ - **`experimental.toolOutputMasking.toolProtectionThreshold`** (number):
969
+ - **Description:** Minimum number of tokens to protect from masking (most
970
+ recent tool outputs).
971
+ - **Default:** `50000`
972
+ - **Requires restart:** Yes
973
+
974
+ - **`experimental.toolOutputMasking.minPrunableTokensThreshold`** (number):
975
+ - **Description:** Minimum prunable tokens required to trigger a masking pass.
976
+ - **Default:** `30000`
977
+ - **Requires restart:** Yes
978
+
979
+ - **`experimental.toolOutputMasking.protectLatestTurn`** (boolean):
980
+ - **Description:** Ensures the absolute latest turn is never masked,
981
+ regardless of token count.
982
+ - **Default:** `true`
983
+ - **Requires restart:** Yes
984
+
985
+ - **`experimental.enableAgents`** (boolean):
986
+ - **Description:** Enable local and remote subagents. Warning: Experimental
987
+ feature, uses YOLO mode for subagents
988
+ - **Default:** `false`
989
+ - **Requires restart:** Yes
990
+
991
+ - **`experimental.extensionManagement`** (boolean):
992
+ - **Description:** Enable extension management features.
993
+ - **Default:** `true`
994
+ - **Requires restart:** Yes
995
+
996
+ - **`experimental.extensionConfig`** (boolean):
997
+ - **Description:** Enable requesting and fetching of extension settings.
998
+ - **Default:** `true`
999
+ - **Requires restart:** Yes
1000
+
1001
+ - **`experimental.extensionRegistry`** (boolean):
1002
+ - **Description:** Enable extension registry explore UI.
1003
+ - **Default:** `false`
1004
+ - **Requires restart:** Yes
1005
+
1006
+ - **`experimental.extensionRegistryURI`** (string):
1007
+ - **Description:** The URI (web URL or local file path) of the extension
1008
+ registry.
1009
+ - **Default:** `"https://geminicli.com/extensions.json"`
1010
+ - **Requires restart:** Yes
1011
+
1012
+ - **`experimental.extensionReloading`** (boolean):
1013
+ - **Description:** Enables extension loading/unloading within the CLI session.
1014
+ - **Default:** `false`
1015
+ - **Requires restart:** Yes
1016
+
1017
+ - **`experimental.jitContext`** (boolean):
1018
+ - **Description:** Enable Just-In-Time (JIT) context loading.
1019
+ - **Default:** `false`
1020
+ - **Requires restart:** Yes
1021
+
1022
+ - **`experimental.useOSC52Paste`** (boolean):
1023
+ - **Description:** Use OSC 52 for pasting. This may be more robust than the
1024
+ default system when using remote terminal sessions (if your terminal is
1025
+ configured to allow it).
1026
+ - **Default:** `false`
1027
+
1028
+ - **`experimental.useOSC52Copy`** (boolean):
1029
+ - **Description:** Use OSC 52 for copying. This may be more robust than the
1030
+ default system when using remote terminal sessions (if your terminal is
1031
+ configured to allow it).
1032
+ - **Default:** `false`
1033
+
1034
+ - **`experimental.plan`** (boolean):
1035
+ - **Description:** Enable Plan Mode.
1036
+ - **Default:** `true`
1037
+ - **Requires restart:** Yes
1038
+
1039
+ - **`experimental.taskTracker`** (boolean):
1040
+ - **Description:** Enable task tracker tools.
1041
+ - **Default:** `false`
1042
+ - **Requires restart:** Yes
1043
+
1044
+ - **`experimental.modelSteering`** (boolean):
1045
+ - **Description:** Enable model steering (user hints) to guide the model
1046
+ during tool execution.
1047
+ - **Default:** `false`
1048
+
1049
+ - **`experimental.directWebFetch`** (boolean):
1050
+ - **Description:** Enable web fetch behavior that bypasses LLM summarization.
1051
+ - **Default:** `false`
1052
+ - **Requires restart:** Yes
1053
+
1054
+ - **`experimental.gemmaModelRouter.enabled`** (boolean):
1055
+ - **Description:** Enable the Gemma Model Router (experimental). Requires a
1056
+ local endpoint serving Gemma via the Gemini API using LiteRT-LM shim.
1057
+ - **Default:** `false`
1058
+ - **Requires restart:** Yes
1059
+
1060
+ - **`experimental.gemmaModelRouter.classifier.host`** (string):
1061
+ - **Description:** The host of the classifier.
1062
+ - **Default:** `"http://localhost:9379"`
1063
+ - **Requires restart:** Yes
1064
+
1065
+ - **`experimental.gemmaModelRouter.classifier.model`** (string):
1066
+ - **Description:** The model to use for the classifier. Only tested on
1067
+ `gemma3-1b-gpu-custom`.
1068
+ - **Default:** `"gemma3-1b-gpu-custom"`
1069
+ - **Requires restart:** Yes
1070
+
1071
+ #### `skills`
1072
+
1073
+ - **`skills.enabled`** (boolean):
1074
+ - **Description:** Enable Agent Skills.
1075
+ - **Default:** `true`
1076
+ - **Requires restart:** Yes
1077
+
1078
+ - **`skills.disabled`** (array):
1079
+ - **Description:** List of disabled skills.
1080
+ - **Default:** `[]`
1081
+ - **Requires restart:** Yes
1082
+
1083
+ #### `hooksConfig`
1084
+
1085
+ - **`hooksConfig.enabled`** (boolean):
1086
+ - **Description:** Canonical toggle for the hooks system. When disabled, no
1087
+ hooks will be executed.
1088
+ - **Default:** `true`
1089
+ - **Requires restart:** Yes
1090
+
1091
+ - **`hooksConfig.disabled`** (array):
1092
+ - **Description:** List of hook names (commands) that should be disabled.
1093
+ Hooks in this list will not execute even if configured.
1094
+ - **Default:** `[]`
1095
+
1096
+ - **`hooksConfig.notifications`** (boolean):
1097
+ - **Description:** Show visual indicators when hooks are executing.
1098
+ - **Default:** `true`
1099
+
1100
+ #### `hooks`
1101
+
1102
+ - **`hooks.BeforeTool`** (array):
1103
+ - **Description:** Hooks that execute before tool execution. Can intercept,
1104
+ validate, or modify tool calls.
1105
+ - **Default:** `[]`
1106
+
1107
+ - **`hooks.AfterTool`** (array):
1108
+ - **Description:** Hooks that execute after tool execution. Can process
1109
+ results, log outputs, or trigger follow-up actions.
1110
+ - **Default:** `[]`
1111
+
1112
+ - **`hooks.BeforeAgent`** (array):
1113
+ - **Description:** Hooks that execute before agent loop starts. Can set up
1114
+ context or initialize resources.
1115
+ - **Default:** `[]`
1116
+
1117
+ - **`hooks.AfterAgent`** (array):
1118
+ - **Description:** Hooks that execute after agent loop completes. Can perform
1119
+ cleanup or summarize results.
1120
+ - **Default:** `[]`
1121
+
1122
+ - **`hooks.Notification`** (array):
1123
+ - **Description:** Hooks that execute on notification events (errors,
1124
+ warnings, info). Can log or alert on specific conditions.
1125
+ - **Default:** `[]`
1126
+
1127
+ - **`hooks.SessionStart`** (array):
1128
+ - **Description:** Hooks that execute when a session starts. Can initialize
1129
+ session-specific resources or state.
1130
+ - **Default:** `[]`
1131
+
1132
+ - **`hooks.SessionEnd`** (array):
1133
+ - **Description:** Hooks that execute when a session ends. Can perform cleanup
1134
+ or persist session data.
1135
+ - **Default:** `[]`
1136
+
1137
+ - **`hooks.PreCompress`** (array):
1138
+ - **Description:** Hooks that execute before chat history compression. Can
1139
+ back up or analyze conversation before compression.
1140
+ - **Default:** `[]`
1141
+
1142
+ - **`hooks.BeforeModel`** (array):
1143
+ - **Description:** Hooks that execute before LLM requests. Can modify prompts,
1144
+ inject context, or control model parameters.
1145
+ - **Default:** `[]`
1146
+
1147
+ - **`hooks.AfterModel`** (array):
1148
+ - **Description:** Hooks that execute after LLM responses. Can process
1149
+ outputs, extract information, or log interactions.
1150
+ - **Default:** `[]`
1151
+
1152
+ - **`hooks.BeforeToolSelection`** (array):
1153
+ - **Description:** Hooks that execute before tool selection. Can filter or
1154
+ prioritize available tools dynamically.
1155
+ - **Default:** `[]`
1156
+
1157
+ #### `admin`
1158
+
1159
+ - **`admin.secureModeEnabled`** (boolean):
1160
+ - **Description:** If true, disallows yolo mode from being used.
1161
+ - **Default:** `false`
1162
+
1163
+ - **`admin.extensions.enabled`** (boolean):
1164
+ - **Description:** If false, disallows extensions from being installed or
1165
+ used.
1166
+ - **Default:** `true`
1167
+
1168
+ - **`admin.mcp.enabled`** (boolean):
1169
+ - **Description:** If false, disallows MCP servers from being used.
1170
+ - **Default:** `true`
1171
+
1172
+ - **`admin.mcp.config`** (object):
1173
+ - **Description:** Admin-configured MCP servers.
1174
+ - **Default:** `{}`
1175
+
1176
+ - **`admin.skills.enabled`** (boolean):
1177
+ - **Description:** If false, disallows agent skills from being used.
1178
+ - **Default:** `true`
1179
+ <!-- SETTINGS-AUTOGEN:END -->
1180
+
1181
+ #### `mcpServers`
1182
+
1183
+ Configures connections to one or more Model-Context Protocol (MCP) servers for
1184
+ discovering and using custom tools. Gemini CLI attempts to connect to each
1185
+ configured MCP server to discover available tools. Every discovered tool is
1186
+ prepended with the `mcp_` prefix and its server alias to form a fully qualified
1187
+ name (FQN) (e.g., `mcp_serverAlias_actualToolName`) to avoid conflicts. Note
1188
+ that the system might strip certain schema properties from MCP tool definitions
1189
+ for compatibility. At least one of `command`, `url`, or `httpUrl` must be
1190
+ provided. If multiple are specified, the order of precedence is `httpUrl`, then
1191
+ `url`, then `command`.
1192
+
1193
+ > **Warning:** Avoid using underscores (`_`) in your server aliases (e.g., use
1194
+ > `my-server` instead of `my_server`). The underlying policy engine parses Fully
1195
+ > Qualified Names (`mcp_server_tool`) using the first underscore after the
1196
+ > `mcp_` prefix. An underscore in your server alias will cause the parser to
1197
+ > misidentify the server name, which can cause security policies to fail
1198
+ > silently.
1199
+
1200
+ - **`mcpServers.<SERVER_NAME>`** (object): The server parameters for the named
1201
+ server.
1202
+ - `command` (string, optional): The command to execute to start the MCP server
1203
+ via standard I/O.
1204
+ - `args` (array of strings, optional): Arguments to pass to the command.
1205
+ - `env` (object, optional): Environment variables to set for the server
1206
+ process.
1207
+ - `cwd` (string, optional): The working directory in which to start the
1208
+ server.
1209
+ - `url` (string, optional): The URL of an MCP server that uses Server-Sent
1210
+ Events (SSE) for communication.
1211
+ - `httpUrl` (string, optional): The URL of an MCP server that uses streamable
1212
+ HTTP for communication.
1213
+ - `headers` (object, optional): A map of HTTP headers to send with requests to
1214
+ `url` or `httpUrl`.
1215
+ - `timeout` (number, optional): Timeout in milliseconds for requests to this
1216
+ MCP server.
1217
+ - `trust` (boolean, optional): Trust this server and bypass all tool call
1218
+ confirmations.
1219
+ - `description` (string, optional): A brief description of the server, which
1220
+ may be used for display purposes.
1221
+ - `includeTools` (array of strings, optional): List of tool names to include
1222
+ from this MCP server. When specified, only the tools listed here will be
1223
+ available from this server (allowlist behavior). If not specified, all tools
1224
+ from the server are enabled by default.
1225
+ - `excludeTools` (array of strings, optional): List of tool names to exclude
1226
+ from this MCP server. Tools listed here will not be available to the model,
1227
+ even if they are exposed by the server. **Note:** `excludeTools` takes
1228
+ precedence over `includeTools` - if a tool is in both lists, it will be
1229
+ excluded.
1230
+
1231
+ #### `telemetry`
1232
+
1233
+ Configures logging and metrics collection for Gemini CLI. For more information,
1234
+ see [Telemetry](../cli/telemetry.md).
1235
+
1236
+ - **Properties:**
1237
+ - **`enabled`** (boolean): Whether or not telemetry is enabled.
1238
+ - **`target`** (string): The destination for collected telemetry. Supported
1239
+ values are `local` and `gcp`.
1240
+ - **`otlpEndpoint`** (string): The endpoint for the OTLP Exporter.
1241
+ - **`otlpProtocol`** (string): The protocol for the OTLP Exporter (`grpc` or
1242
+ `http`).
1243
+ - **`logPrompts`** (boolean): Whether or not to include the content of user
1244
+ prompts in the logs.
1245
+ - **`outfile`** (string): The file to write telemetry to when `target` is
1246
+ `local`.
1247
+ - **`useCollector`** (boolean): Whether to use an external OTLP collector.
1248
+
1249
+ ### Example `settings.json`
1250
+
1251
+ Here is an example of a `settings.json` file with the nested structure, new as
1252
+ of v0.3.0:
1253
+
1254
+ ```json
1255
+ {
1256
+ "general": {
1257
+ "vimMode": true,
1258
+ "preferredEditor": "code",
1259
+ "sessionRetention": {
1260
+ "enabled": true,
1261
+ "maxAge": "30d",
1262
+ "maxCount": 100
1263
+ }
1264
+ },
1265
+ "ui": {
1266
+ "theme": "GitHub",
1267
+ "hideBanner": true,
1268
+ "hideTips": false,
1269
+ "customWittyPhrases": [
1270
+ "You forget a thousand things every day. Make sure this is one of ’em",
1271
+ "Connecting to AGI"
1272
+ ]
1273
+ },
1274
+ "tools": {
1275
+ "sandbox": "docker",
1276
+ "discoveryCommand": "bin/get_tools",
1277
+ "callCommand": "bin/call_tool",
1278
+ "exclude": ["write_file"]
1279
+ },
1280
+ "mcpServers": {
1281
+ "mainServer": {
1282
+ "command": "bin/mcp_server.py"
1283
+ },
1284
+ "anotherServer": {
1285
+ "command": "node",
1286
+ "args": ["mcp_server.js", "--verbose"]
1287
+ }
1288
+ },
1289
+ "telemetry": {
1290
+ "enabled": true,
1291
+ "target": "local",
1292
+ "otlpEndpoint": "http://localhost:4317",
1293
+ "logPrompts": true
1294
+ },
1295
+ "privacy": {
1296
+ "usageStatisticsEnabled": true
1297
+ },
1298
+ "model": {
1299
+ "name": "gemini-1.5-pro-latest",
1300
+ "maxSessionTurns": 10,
1301
+ "summarizeToolOutput": {
1302
+ "run_shell_command": {
1303
+ "tokenBudget": 100
1304
+ }
1305
+ }
1306
+ },
1307
+ "context": {
1308
+ "fileName": ["CONTEXT.md", "GEMINI.md"],
1309
+ "includeDirectories": ["path/to/dir1", "~/path/to/dir2", "../path/to/dir3"],
1310
+ "loadFromIncludeDirectories": true,
1311
+ "fileFiltering": {
1312
+ "respectGitIgnore": false
1313
+ }
1314
+ },
1315
+ "advanced": {
1316
+ "excludedEnvVars": ["DEBUG", "DEBUG_MODE", "NODE_ENV"]
1317
+ }
1318
+ }
1319
+ ```
1320
+
1321
+ ## Shell history
1322
+
1323
+ The CLI keeps a history of shell commands you run. To avoid conflicts between
1324
+ different projects, this history is stored in a project-specific directory
1325
+ within your user's home folder.
1326
+
1327
+ - **Location:** `~/.gemini/tmp/<project_hash>/shell_history`
1328
+ - `<project_hash>` is a unique identifier generated from your project's root
1329
+ path.
1330
+ - The history is stored in a file named `shell_history`.
1331
+
1332
+ ## Environment variables and `.env` files
1333
+
1334
+ Environment variables are a common way to configure applications, especially for
1335
+ sensitive information like API keys or for settings that might change between
1336
+ environments. For authentication setup, see the
1337
+ [Authentication documentation](../get-started/authentication.md) which covers
1338
+ all available authentication methods.
1339
+
1340
+ The CLI automatically loads environment variables from an `.env` file. The
1341
+ loading order is:
1342
+
1343
+ 1. `.env` file in the current working directory.
1344
+ 2. If not found, it searches upwards in parent directories until it finds an
1345
+ `.env` file or reaches the project root (identified by a `.git` folder) or
1346
+ the home directory.
1347
+ 3. If still not found, it looks for `~/.env` (in the user's home directory).
1348
+
1349
+ **Environment variable exclusion:** Some environment variables (like `DEBUG` and
1350
+ `DEBUG_MODE`) are automatically excluded from being loaded from project `.env`
1351
+ files to prevent interference with gemini-cli behavior. Variables from
1352
+ `.gemini/.env` files are never excluded. You can customize this behavior using
1353
+ the `advanced.excludedEnvVars` setting in your `settings.json` file.
1354
+
1355
+ - **`GEMINI_API_KEY`**:
1356
+ - Your API key for the Gemini API.
1357
+ - One of several available
1358
+ [authentication methods](../get-started/authentication.md).
1359
+ - Set this in your shell profile (e.g., `~/.bashrc`, `~/.zshrc`) or an `.env`
1360
+ file.
1361
+ - **`GEMINI_MODEL`**:
1362
+ - Specifies the default Gemini model to use.
1363
+ - Overrides the hardcoded default
1364
+ - Example: `export GEMINI_MODEL="gemini-3-flash-preview"` (Windows PowerShell:
1365
+ `$env:GEMINI_MODEL="gemini-3-flash-preview"`)
1366
+ - **`GEMINI_CLI_IDE_PID`**:
1367
+ - Manually specifies the PID of the IDE process to use for integration. This
1368
+ is useful when running Gemini CLI in a standalone terminal while still
1369
+ wanting to associate it with a specific IDE instance.
1370
+ - Overrides the automatic IDE detection logic.
1371
+ - **`GEMINI_CLI_HOME`**:
1372
+ - Specifies the root directory for Gemini CLI's user-level configuration and
1373
+ storage.
1374
+ - By default, this is the user's system home directory. The CLI will create a
1375
+ `.gemini` folder inside this directory.
1376
+ - Useful for shared compute environments or keeping CLI state isolated.
1377
+ - Example: `export GEMINI_CLI_HOME="/path/to/user/config"` (Windows
1378
+ PowerShell: `$env:GEMINI_CLI_HOME="C:\path\to\user\config"`)
1379
+ - **`GOOGLE_API_KEY`**:
1380
+ - Your Google Cloud API key.
1381
+ - Required for using Vertex AI in express mode.
1382
+ - Ensure you have the necessary permissions.
1383
+ - Example: `export GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"` (Windows PowerShell:
1384
+ `$env:GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"`).
1385
+ - **`GOOGLE_CLOUD_PROJECT`**:
1386
+ - Your Google Cloud Project ID.
1387
+ - Required for using Code Assist or Vertex AI.
1388
+ - If using Vertex AI, ensure you have the necessary permissions in this
1389
+ project.
1390
+ - **Cloud Shell note:** When running in a Cloud Shell environment, this
1391
+ variable defaults to a special project allocated for Cloud Shell users. If
1392
+ you have `GOOGLE_CLOUD_PROJECT` set in your global environment in Cloud
1393
+ Shell, it will be overridden by this default. To use a different project in
1394
+ Cloud Shell, you must define `GOOGLE_CLOUD_PROJECT` in a `.env` file.
1395
+ - Example: `export GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"` (Windows
1396
+ PowerShell: `$env:GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`).
1397
+ - **`GOOGLE_APPLICATION_CREDENTIALS`** (string):
1398
+ - **Description:** The path to your Google Application Credentials JSON file.
1399
+ - **Example:**
1400
+ `export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/credentials.json"`
1401
+ (Windows PowerShell:
1402
+ `$env:GOOGLE_APPLICATION_CREDENTIALS="C:\path\to\your\credentials.json"`)
1403
+ - **`GOOGLE_GENAI_API_VERSION`**:
1404
+ - Specifies the API version to use for Gemini API requests.
1405
+ - When set, overrides the default API version used by the SDK.
1406
+ - Example: `export GOOGLE_GENAI_API_VERSION="v1"` (Windows PowerShell:
1407
+ `$env:GOOGLE_GENAI_API_VERSION="v1"`)
1408
+ - **`OTLP_GOOGLE_CLOUD_PROJECT`**:
1409
+ - Your Google Cloud Project ID for Telemetry in Google Cloud
1410
+ - Example: `export OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"` (Windows
1411
+ PowerShell: `$env:OTLP_GOOGLE_CLOUD_PROJECT="YOUR_PROJECT_ID"`).
1412
+ - **`GEMINI_TELEMETRY_ENABLED`**:
1413
+ - Set to `true` or `1` to enable telemetry. Any other value is treated as
1414
+ disabling it.
1415
+ - Overrides the `telemetry.enabled` setting.
1416
+ - **`GEMINI_TELEMETRY_TARGET`**:
1417
+ - Sets the telemetry target (`local` or `gcp`).
1418
+ - Overrides the `telemetry.target` setting.
1419
+ - **`GEMINI_TELEMETRY_OTLP_ENDPOINT`**:
1420
+ - Sets the OTLP endpoint for telemetry.
1421
+ - Overrides the `telemetry.otlpEndpoint` setting.
1422
+ - **`GEMINI_TELEMETRY_OTLP_PROTOCOL`**:
1423
+ - Sets the OTLP protocol (`grpc` or `http`).
1424
+ - Overrides the `telemetry.otlpProtocol` setting.
1425
+ - **`GEMINI_TELEMETRY_LOG_PROMPTS`**:
1426
+ - Set to `true` or `1` to enable or disable logging of user prompts. Any other
1427
+ value is treated as disabling it.
1428
+ - Overrides the `telemetry.logPrompts` setting.
1429
+ - **`GEMINI_TELEMETRY_OUTFILE`**:
1430
+ - Sets the file path to write telemetry to when the target is `local`.
1431
+ - Overrides the `telemetry.outfile` setting.
1432
+ - **`GEMINI_TELEMETRY_USE_COLLECTOR`**:
1433
+ - Set to `true` or `1` to enable or disable using an external OTLP collector.
1434
+ Any other value is treated as disabling it.
1435
+ - Overrides the `telemetry.useCollector` setting.
1436
+ - **`GOOGLE_CLOUD_LOCATION`**:
1437
+ - Your Google Cloud Project Location (e.g., us-central1).
1438
+ - Required for using Vertex AI in non-express mode.
1439
+ - Example: `export GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"` (Windows
1440
+ PowerShell: `$env:GOOGLE_CLOUD_LOCATION="YOUR_PROJECT_LOCATION"`).
1441
+ - **`GEMINI_SANDBOX`**:
1442
+ - Alternative to the `sandbox` setting in `settings.json`.
1443
+ - Accepts `true`, `false`, `docker`, `podman`, or a custom command string.
1444
+ - **`GEMINI_SYSTEM_MD`**:
1445
+ - Replaces the built‑in system prompt with content from a Markdown file.
1446
+ - `true`/`1`: Use project default path `./.gemini/system.md`.
1447
+ - Any other string: Treat as a path (relative/absolute supported, `~`
1448
+ expands).
1449
+ - `false`/`0` or unset: Use the built‑in prompt. See
1450
+ [System Prompt Override](../cli/system-prompt.md).
1451
+ - **`GEMINI_WRITE_SYSTEM_MD`**:
1452
+ - Writes the current built‑in system prompt to a file for review.
1453
+ - `true`/`1`: Write to `./.gemini/system.md`. Otherwise treat the value as a
1454
+ path.
1455
+ - Run the CLI once with this set to generate the file.
1456
+ - **`SEATBELT_PROFILE`** (macOS specific):
1457
+ - Switches the Seatbelt (`sandbox-exec`) profile on macOS.
1458
+ - `permissive-open`: (Default) Restricts writes to the project folder (and a
1459
+ few other folders, see
1460
+ `packages/cli/src/utils/sandbox-macos-permissive-open.sb`) but allows other
1461
+ operations.
1462
+ - `restrictive-open`: Declines operations by default, allows network.
1463
+ - `strict-open`: Restricts both reads and writes to the working directory,
1464
+ allows network.
1465
+ - `strict-proxied`: Same as `strict-open` but routes network through proxy.
1466
+ - `<profile_name>`: Uses a custom profile. To define a custom profile, create
1467
+ a file named `sandbox-macos-<profile_name>.sb` in your project's `.gemini/`
1468
+ directory (e.g., `my-project/.gemini/sandbox-macos-custom.sb`).
1469
+ - **`DEBUG` or `DEBUG_MODE`** (often used by underlying libraries or the CLI
1470
+ itself):
1471
+ - Set to `true` or `1` to enable verbose debug logging, which can be helpful
1472
+ for troubleshooting.
1473
+ - **Note:** These variables are automatically excluded from project `.env`
1474
+ files by default to prevent interference with gemini-cli behavior. Use
1475
+ `.gemini/.env` files if you need to set these for gemini-cli specifically.
1476
+ - **`NO_COLOR`**:
1477
+ - Set to any value to disable all color output in the CLI.
1478
+ - **`CLI_TITLE`**:
1479
+ - Set to a string to customize the title of the CLI.
1480
+ - **`CODE_ASSIST_ENDPOINT`**:
1481
+ - Specifies the endpoint for the code assist server.
1482
+ - This is useful for development and testing.
1483
+
1484
+ ### Environment variable redaction
1485
+
1486
+ To prevent accidental leakage of sensitive information, Gemini CLI automatically
1487
+ redacts potential secrets from environment variables when executing tools (such
1488
+ as shell commands). This "best effort" redaction applies to variables inherited
1489
+ from the system or loaded from `.env` files.
1490
+
1491
+ **Default Redaction Rules:**
1492
+
1493
+ - **By Name:** Variables are redacted if their names contain sensitive terms
1494
+ like `TOKEN`, `SECRET`, `PASSWORD`, `KEY`, `AUTH`, `CREDENTIAL`, `PRIVATE`, or
1495
+ `CERT`.
1496
+ - **By Value:** Variables are redacted if their values match known secret
1497
+ patterns, such as:
1498
+ - Private keys (RSA, OpenSSH, PGP, etc.)
1499
+ - Certificates
1500
+ - URLs containing credentials
1501
+ - API keys and tokens (GitHub, Google, AWS, Stripe, Slack, etc.)
1502
+ - **Specific Blocklist:** Certain variables like `CLIENT_ID`, `DB_URI`,
1503
+ `DATABASE_URL`, and `CONNECTION_STRING` are always redacted by default.
1504
+
1505
+ **Allowlist (Never Redacted):**
1506
+
1507
+ - Common system variables (e.g., `PATH`, `HOME`, `USER`, `SHELL`, `TERM`,
1508
+ `LANG`).
1509
+ - Variables starting with `GEMINI_CLI_`.
1510
+ - GitHub Action specific variables.
1511
+
1512
+ **Configuration:**
1513
+
1514
+ You can customize this behavior in your `settings.json` file:
1515
+
1516
+ - **`security.allowedEnvironmentVariables`**: A list of variable names to
1517
+ _never_ redact, even if they match sensitive patterns.
1518
+ - **`security.blockedEnvironmentVariables`**: A list of variable names to
1519
+ _always_ redact, even if they don't match sensitive patterns.
1520
+
1521
+ ```json
1522
+ {
1523
+ "security": {
1524
+ "allowedEnvironmentVariables": ["MY_PUBLIC_KEY", "NOT_A_SECRET_TOKEN"],
1525
+ "blockedEnvironmentVariables": ["INTERNAL_IP_ADDRESS"]
1526
+ }
1527
+ }
1528
+ ```
1529
+
1530
+ ## Command-line arguments
1531
+
1532
+ Arguments passed directly when running the CLI can override other configurations
1533
+ for that specific session.
1534
+
1535
+ - **`--model <model_name>`** (**`-m <model_name>`**):
1536
+ - Specifies the Gemini model to use for this session.
1537
+ - Example: `npm start -- --model gemini-3-pro-preview`
1538
+ - **`--prompt <your_prompt>`** (**`-p <your_prompt>`**):
1539
+ - **Deprecated:** Use positional arguments instead.
1540
+ - Used to pass a prompt directly to the command. This invokes Gemini CLI in a
1541
+ non-interactive mode.
1542
+ - **`--prompt-interactive <your_prompt>`** (**`-i <your_prompt>`**):
1543
+ - Starts an interactive session with the provided prompt as the initial input.
1544
+ - The prompt is processed within the interactive session, not before it.
1545
+ - Cannot be used when piping input from stdin.
1546
+ - Example: `gemini -i "explain this code"`
1547
+ - **`--output-format <format>`**:
1548
+ - **Description:** Specifies the format of the CLI output for non-interactive
1549
+ mode.
1550
+ - **Values:**
1551
+ - `text`: (Default) The standard human-readable output.
1552
+ - `json`: A machine-readable JSON output.
1553
+ - `stream-json`: A streaming JSON output that emits real-time events.
1554
+ - **Note:** For structured output and scripting, use the
1555
+ `--output-format json` or `--output-format stream-json` flag.
1556
+ - **`--sandbox`** (**`-s`**):
1557
+ - Enables sandbox mode for this session.
1558
+ - **`--debug`** (**`-d`**):
1559
+ - Enables debug mode for this session, providing more verbose output. Open the
1560
+ debug console with F12 to see the additional logging.
1561
+
1562
+ - **`--help`** (or **`-h`**):
1563
+ - Displays help information about command-line arguments.
1564
+ - **`--yolo`**:
1565
+ - Enables YOLO mode, which automatically approves all tool calls.
1566
+ - **`--approval-mode <mode>`**:
1567
+ - Sets the approval mode for tool calls. Available modes:
1568
+ - `default`: Prompt for approval on each tool call (default behavior)
1569
+ - `auto_edit`: Automatically approve edit tools (replace, write_file) while
1570
+ prompting for others
1571
+ - `yolo`: Automatically approve all tool calls (equivalent to `--yolo`)
1572
+ - `plan`: Read-only mode for tool calls (requires experimental planning to
1573
+ be enabled).
1574
+ > **Note:** This mode is currently under development and not yet fully
1575
+ > functional.
1576
+ - Cannot be used together with `--yolo`. Use `--approval-mode=yolo` instead of
1577
+ `--yolo` for the new unified approach.
1578
+ - Example: `gemini --approval-mode auto_edit`
1579
+ - **`--allowed-tools <tool1,tool2,...>`**:
1580
+ - A comma-separated list of tool names that will bypass the confirmation
1581
+ dialog.
1582
+ - Example: `gemini --allowed-tools "ShellTool(git status)"`
1583
+ - **`--extensions <extension_name ...>`** (**`-e <extension_name ...>`**):
1584
+ - Specifies a list of extensions to use for the session. If not provided, all
1585
+ available extensions are used.
1586
+ - Use the special term `gemini -e none` to disable all extensions.
1587
+ - Example: `gemini -e my-extension -e my-other-extension`
1588
+ - **`--list-extensions`** (**`-l`**):
1589
+ - Lists all available extensions and exits.
1590
+ - **`--resume [session_id]`** (**`-r [session_id]`**):
1591
+ - Resume a previous chat session. Use "latest" for the most recent session,
1592
+ provide a session index number, or provide a full session UUID.
1593
+ - If no session_id is provided, defaults to "latest".
1594
+ - Example: `gemini --resume 5` or `gemini --resume latest` or
1595
+ `gemini --resume a1b2c3d4-e5f6-7890-abcd-ef1234567890` or `gemini --resume`
1596
+ - See [Session Management](../cli/session-management.md) for more details.
1597
+ - **`--list-sessions`**:
1598
+ - List all available chat sessions for the current project and exit.
1599
+ - Shows session indices, dates, message counts, and preview of first user
1600
+ message.
1601
+ - Example: `gemini --list-sessions`
1602
+ - **`--delete-session <identifier>`**:
1603
+ - Delete a specific chat session by its index number or full session UUID.
1604
+ - Use `--list-sessions` first to see available sessions, their indices, and
1605
+ UUIDs.
1606
+ - Example: `gemini --delete-session 3` or
1607
+ `gemini --delete-session a1b2c3d4-e5f6-7890-abcd-ef1234567890`
1608
+ - **`--include-directories <dir1,dir2,...>`**:
1609
+ - Includes additional directories in the workspace for multi-directory
1610
+ support.
1611
+ - Can be specified multiple times or as comma-separated values.
1612
+ - 5 directories can be added at maximum.
1613
+ - Example: `--include-directories /path/to/project1,/path/to/project2` or
1614
+ `--include-directories /path/to/project1 --include-directories /path/to/project2`
1615
+ - **`--screen-reader`**:
1616
+ - Enables screen reader mode, which adjusts the TUI for better compatibility
1617
+ with screen readers.
1618
+ - **`--version`**:
1619
+ - Displays the version of the CLI.
1620
+ - **`--experimental-acp`**:
1621
+ - Starts the agent in ACP mode.
1622
+ - **`--allowed-mcp-server-names`**:
1623
+ - Allowed MCP server names.
1624
+ - **`--fake-responses`**:
1625
+ - Path to a file with fake model responses for testing.
1626
+ - **`--record-responses`**:
1627
+ - Path to a file to record model responses for testing.
1628
+
1629
+ ## Context files (hierarchical instructional context)
1630
+
1631
+ While not strictly configuration for the CLI's _behavior_, context files
1632
+ (defaulting to `GEMINI.md` but configurable via the `context.fileName` setting)
1633
+ are crucial for configuring the _instructional context_ (also referred to as
1634
+ "memory") provided to the Gemini model. This powerful feature allows you to give
1635
+ project-specific instructions, coding style guides, or any relevant background
1636
+ information to the AI, making its responses more tailored and accurate to your
1637
+ needs. The CLI includes UI elements, such as an indicator in the footer showing
1638
+ the number of loaded context files, to keep you informed about the active
1639
+ context.
1640
+
1641
+ - **Purpose:** These Markdown files contain instructions, guidelines, or context
1642
+ that you want the Gemini model to be aware of during your interactions. The
1643
+ system is designed to manage this instructional context hierarchically.
1644
+
1645
+ ### Example context file content (e.g., `GEMINI.md`)
1646
+
1647
+ Here's a conceptual example of what a context file at the root of a TypeScript
1648
+ project might contain:
1649
+
1650
+ ```markdown
1651
+ # Project: My Awesome TypeScript Library
1652
+
1653
+ ## General Instructions:
1654
+
1655
+ - When generating new TypeScript code, please follow the existing coding style.
1656
+ - Ensure all new functions and classes have JSDoc comments.
1657
+ - Prefer functional programming paradigms where appropriate.
1658
+ - All code should be compatible with TypeScript 5.0 and Node.js 20+.
1659
+
1660
+ ## Coding Style:
1661
+
1662
+ - Use 2 spaces for indentation.
1663
+ - Interface names should be prefixed with `I` (e.g., `IUserService`).
1664
+ - Private class members should be prefixed with an underscore (`_`).
1665
+ - Always use strict equality (`===` and `!==`).
1666
+
1667
+ ## Specific Component: `src/api/client.ts`
1668
+
1669
+ - This file handles all outbound API requests.
1670
+ - When adding new API call functions, ensure they include robust error handling
1671
+ and logging.
1672
+ - Use the existing `fetchWithRetry` utility for all GET requests.
1673
+
1674
+ ## Regarding Dependencies:
1675
+
1676
+ - Avoid introducing new external dependencies unless absolutely necessary.
1677
+ - If a new dependency is required, please state the reason.
1678
+ ```
1679
+
1680
+ This example demonstrates how you can provide general project context, specific
1681
+ coding conventions, and even notes about particular files or components. The
1682
+ more relevant and precise your context files are, the better the AI can assist
1683
+ you. Project-specific context files are highly encouraged to establish
1684
+ conventions and context.
1685
+
1686
+ - **Hierarchical loading and precedence:** The CLI implements a sophisticated
1687
+ hierarchical memory system by loading context files (e.g., `GEMINI.md`) from
1688
+ several locations. Content from files lower in this list (more specific)
1689
+ typically overrides or supplements content from files higher up (more
1690
+ general). The exact concatenation order and final context can be inspected
1691
+ using the `/memory show` command. The typical loading order is:
1692
+ 1. **Global context file:**
1693
+ - Location: `~/.gemini/<configured-context-filename>` (e.g.,
1694
+ `~/.gemini/GEMINI.md` in your user home directory).
1695
+ - Scope: Provides default instructions for all your projects.
1696
+ 2. **Project root and ancestors context files:**
1697
+ - Location: The CLI searches for the configured context file in the
1698
+ current working directory and then in each parent directory up to either
1699
+ the project root (identified by a `.git` folder) or your home directory.
1700
+ - Scope: Provides context relevant to the entire project or a significant
1701
+ portion of it.
1702
+ 3. **Sub-directory context files (contextual/local):**
1703
+ - Location: The CLI also scans for the configured context file in
1704
+ subdirectories _below_ the current working directory (respecting common
1705
+ ignore patterns like `node_modules`, `.git`, etc.). The breadth of this
1706
+ search is limited to 200 directories by default, but can be configured
1707
+ with the `context.discoveryMaxDirs` setting in your `settings.json`
1708
+ file.
1709
+ - Scope: Allows for highly specific instructions relevant to a particular
1710
+ component, module, or subsection of your project.
1711
+ - **Concatenation and UI indication:** The contents of all found context files
1712
+ are concatenated (with separators indicating their origin and path) and
1713
+ provided as part of the system prompt to the Gemini model. The CLI footer
1714
+ displays the count of loaded context files, giving you a quick visual cue
1715
+ about the active instructional context.
1716
+ - **Importing content:** You can modularize your context files by importing
1717
+ other Markdown files using the `@path/to/file.md` syntax. For more details,
1718
+ see the [Memory Import Processor documentation](./memport.md).
1719
+ - **Commands for memory management:**
1720
+ - Use `/memory refresh` to force a re-scan and reload of all context files
1721
+ from all configured locations. This updates the AI's instructional context.
1722
+ - Use `/memory show` to display the combined instructional context currently
1723
+ loaded, allowing you to verify the hierarchy and content being used by the
1724
+ AI.
1725
+ - See the [Commands documentation](./commands.md#memory) for full details on
1726
+ the `/memory` command and its sub-commands (`show` and `reload`).
1727
+
1728
+ By understanding and utilizing these configuration layers and the hierarchical
1729
+ nature of context files, you can effectively manage the AI's memory and tailor
1730
+ the Gemini CLI's responses to your specific needs and projects.
1731
+
1732
+ ## Sandboxing
1733
+
1734
+ The Gemini CLI can execute potentially unsafe operations (like shell commands
1735
+ and file modifications) within a sandboxed environment to protect your system.
1736
+
1737
+ Sandboxing is disabled by default, but you can enable it in a few ways:
1738
+
1739
+ - Using `--sandbox` or `-s` flag.
1740
+ - Setting `GEMINI_SANDBOX` environment variable.
1741
+ - Sandbox is enabled when using `--yolo` or `--approval-mode=yolo` by default.
1742
+
1743
+ By default, it uses a pre-built `gemini-cli-sandbox` Docker image.
1744
+
1745
+ For project-specific sandboxing needs, you can create a custom Dockerfile at
1746
+ `.gemini/sandbox.Dockerfile` in your project's root directory. This Dockerfile
1747
+ can be based on the base sandbox image:
1748
+
1749
+ ```dockerfile
1750
+ FROM gemini-cli-sandbox
1751
+
1752
+ # Add your custom dependencies or configurations here
1753
+ # For example:
1754
+ # RUN apt-get update && apt-get install -y some-package
1755
+ # COPY ./my-config /app/my-config
1756
+ ```
1757
+
1758
+ When `.gemini/sandbox.Dockerfile` exists, you can use `BUILD_SANDBOX`
1759
+ environment variable when running Gemini CLI to automatically build the custom
1760
+ sandbox image:
1761
+
1762
+ ```bash
1763
+ BUILD_SANDBOX=1 gemini -s
1764
+ ```
1765
+
1766
+ ## Usage statistics
1767
+
1768
+ To help us improve the Gemini CLI, we collect anonymized usage statistics. This
1769
+ data helps us understand how the CLI is used, identify common issues, and
1770
+ prioritize new features.
1771
+
1772
+ **What we collect:**
1773
+
1774
+ - **Tool calls:** We log the names of the tools that are called, whether they
1775
+ succeed or fail, and how long they take to execute. We do not collect the
1776
+ arguments passed to the tools or any data returned by them.
1777
+ - **API requests:** We log the Gemini model used for each request, the duration
1778
+ of the request, and whether it was successful. We do not collect the content
1779
+ of the prompts or responses.
1780
+ - **Session information:** We collect information about the configuration of the
1781
+ CLI, such as the enabled tools and the approval mode.
1782
+
1783
+ **What we DON'T collect:**
1784
+
1785
+ - **Personally identifiable information (PII):** We do not collect any personal
1786
+ information, such as your name, email address, or API keys.
1787
+ - **Prompt and response content:** We do not log the content of your prompts or
1788
+ the responses from the Gemini model.
1789
+ - **File content:** We do not log the content of any files that are read or
1790
+ written by the CLI.
1791
+
1792
+ **How to opt out:**
1793
+
1794
+ You can opt out of usage statistics collection at any time by setting the
1795
+ `usageStatisticsEnabled` property to `false` under the `privacy` category in
1796
+ your `settings.json` file:
1797
+
1798
+ ```json
1799
+ {
1800
+ "privacy": {
1801
+ "usageStatisticsEnabled": false
1802
+ }
1803
+ }
1804
+ ```