@anthropic-field/core 0.1.0

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