@bastani/atomic 0.10.9 → 0.10.10-alpha.2

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 (406) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/README.md +226 -163
  3. package/dist/_shared/dist-KOELCESV.js +2 -2
  4. package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
  5. package/dist/_shared/lib-4PES5P4V.js +2 -2
  6. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +27 -12
  7. package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js.map +1 -1
  8. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +47 -7
  9. package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js.map +1 -1
  10. package/dist/_shared/mode-shared-2QJSCUM6.js +48 -19
  11. package/dist/_shared/mode-shared-2QJSCUM6.js.map +1 -1
  12. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js → p1a-prewarm-XIU57JHF.js} +5 -5
  13. package/dist/_shared/{p1a-prewarm-UQY3X2UK.js.map → p1a-prewarm-XIU57JHF.js.map} +1 -1
  14. package/dist/_shared/p2-shell-main-B2WIALFD.js +30 -25
  15. package/dist/_shared/p2-shell-main-B2WIALFD.js.map +1 -1
  16. package/dist/_shared/runtime-O4KCSG4C.js +5 -5
  17. package/dist/_shared/{sdk-OSBEPR3Q.js → sdk-RRLVN7ER.js} +15 -9
  18. package/dist/_shared/sdk-RRLVN7ER.js.map +1 -0
  19. package/dist/_shared/session-data-AHTU7IS6.js +2 -2
  20. package/dist/_shared/session-manager-list-2BLEEZVG.js +1 -1
  21. package/dist/_shared/settings-startup-8-DNZ2RIHM.js +4 -1
  22. package/dist/_shared/settings-startup-8-DNZ2RIHM.js.map +1 -1
  23. package/dist/_shared/{startup-0-0-TYUFUOJZ.js → startup-0-0-4VG2G44V.js} +427 -33
  24. package/dist/_shared/startup-0-0-4VG2G44V.js.map +1 -0
  25. package/dist/_shared/{startup-0-1-W2G2UY7R.js → startup-0-1-XTIL65D4.js} +18 -11
  26. package/dist/_shared/startup-0-1-XTIL65D4.js.map +1 -0
  27. package/dist/_shared/{startup-0-2-UXBUEOXW.js → startup-0-2-27OWFHV6.js} +150 -62
  28. package/dist/_shared/startup-0-2-27OWFHV6.js.map +1 -0
  29. package/dist/_shared/startup-0-3-T4DVFYWX.js +15 -25
  30. package/dist/_shared/startup-0-3-T4DVFYWX.js.map +1 -1
  31. package/dist/_shared/{startup-0-4-HN5EB4K7.js → startup-0-4-ZMJV547D.js} +81 -12
  32. package/dist/_shared/startup-0-4-ZMJV547D.js.map +1 -0
  33. package/dist/_shared/startup-0-5-FD2P735I.js +90 -50
  34. package/dist/_shared/startup-0-5-FD2P735I.js.map +1 -1
  35. package/dist/_shared/startup-10-0-TDQNBDDL.js +5 -5
  36. package/dist/_shared/startup-12-0-55AAXBJZ.js +13 -7
  37. package/dist/_shared/startup-12-0-55AAXBJZ.js.map +1 -1
  38. package/dist/_shared/startup-14-0-MLX36RBG.js +4 -4
  39. package/dist/_shared/startup-15-0-YUKGAC63.js +4 -4
  40. package/dist/_shared/startup-15-1-4S7FLMNG.js +88 -28
  41. package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
  42. package/dist/_shared/startup-8-0-34CBHPZH.js +5 -5
  43. package/dist/_shared/startup-8-1-4KANEHRA.js +61 -17
  44. package/dist/_shared/startup-8-1-4KANEHRA.js.map +1 -1
  45. package/dist/_shared/storage-command-7MGXLJGZ.js +4 -4
  46. package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
  47. package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
  48. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  49. package/dist/builtin/intercom/README.md +87 -116
  50. package/dist/builtin/intercom/broker/broker.bundle.mjs +3 -3
  51. package/dist/builtin/intercom/broker/presence-handler.ts +1 -1
  52. package/dist/builtin/intercom/group.ts +7 -3
  53. package/dist/builtin/intercom/index.bundle.mjs +1 -1
  54. package/dist/builtin/intercom/package.json +1 -1
  55. package/dist/builtin/mcp/README.md +61 -27
  56. package/dist/builtin/mcp/index.bundle.mjs +1 -1
  57. package/dist/builtin/mcp/package.json +1 -1
  58. package/dist/builtin/subagents/CHANGELOG.md +8 -0
  59. package/dist/builtin/subagents/README.md +74 -141
  60. package/dist/builtin/subagents/package.json +1 -1
  61. package/dist/builtin/subagents/src/extension/index.bundle.mjs +213 -74
  62. package/dist/builtin/web-access/CHANGELOG.md +9 -0
  63. package/dist/builtin/web-access/README.md +61 -88
  64. package/dist/builtin/web-access/index.bundle.mjs +387 -351
  65. package/dist/builtin/web-access/package.json +1 -1
  66. package/dist/cli/args.js +2 -2
  67. package/dist/cli/auth-cli.code.js +4 -4
  68. package/dist/cli/auth-cli.impl.js +3 -3
  69. package/dist/cli/auth-cli.js +3 -3
  70. package/dist/cli/blueprint-command.code.js +2 -2
  71. package/dist/cli/blueprint-command.impl.js +3 -3
  72. package/dist/cli/blueprint-command.js +3 -3
  73. package/dist/cli/intercom-command.code.js +3 -3
  74. package/dist/cli/intercom-command.impl.js +3 -3
  75. package/dist/cli/intercom-command.js +3 -3
  76. package/dist/cli/list-models.code.js +3 -3
  77. package/dist/cli/list-models.impl.js +3 -3
  78. package/dist/cli/list-models.js +3 -3
  79. package/dist/cli/session-picker.code.js +2 -2
  80. package/dist/cli/session-picker.impl.js +3 -3
  81. package/dist/cli/session-picker.js +3 -3
  82. package/dist/cli/startup-ui.code.js +2 -2
  83. package/dist/cli/startup-ui.impl.js +3 -3
  84. package/dist/cli/startup-ui.js +3 -3
  85. package/dist/cli/storage-command.impl.js +3 -3
  86. package/dist/cli/storage-command.js +3 -3
  87. package/dist/cli/storage-search-session.code.js +2 -2
  88. package/dist/cli/storage-search-session.impl.js +3 -3
  89. package/dist/cli/storage-search-session.js +3 -3
  90. package/dist/cli/team-command.code.js +2 -2
  91. package/dist/cli/team-command.impl.js +3 -3
  92. package/dist/cli/team-command.js +3 -3
  93. package/dist/cli.js +2 -2
  94. package/dist/core/agent-session-methods.d.ts +4 -1
  95. package/dist/core/agent-session-methods.js.map +1 -1
  96. package/dist/core/agent-session.d.ts +3 -0
  97. package/dist/core/compaction/compactor.d.ts +20 -14
  98. package/dist/core/compaction/errors.d.ts +120 -0
  99. package/dist/core/compaction/index.d.ts +1 -0
  100. package/dist/core/compaction/model-resolver.d.ts +2 -2
  101. package/dist/core/debug.impl.js +3 -3
  102. package/dist/core/debug.js +3 -3
  103. package/dist/core/export-html/card-projection.impl.js +3 -3
  104. package/dist/core/export-html/card-projection.js +3 -3
  105. package/dist/core/export-html/index.code.js +2 -2
  106. package/dist/core/export-html/index.impl.js +3 -3
  107. package/dist/core/export-html/index.js +3 -3
  108. package/dist/core/export-html/json-spans.impl.js +3 -3
  109. package/dist/core/export-html/json-spans.js +3 -3
  110. package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
  111. package/dist/core/export-html/oversized-render-inputs.js +3 -3
  112. package/dist/core/export-html/tool-renderer.code.js +1 -1
  113. package/dist/core/export-html/tool-renderer.impl.js +3 -3
  114. package/dist/core/export-html/tool-renderer.js +3 -3
  115. package/dist/core/extensions/api-types.d.ts +1 -1
  116. package/dist/core/extensions/api-types.js.map +1 -1
  117. package/dist/core/extensions/index.d.ts +1 -1
  118. package/dist/core/extensions/jiti-loader.impl.js +3 -3
  119. package/dist/core/extensions/jiti-loader.js +3 -3
  120. package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
  121. package/dist/core/extensions/jiti-static-loader.js +3 -3
  122. package/dist/core/extensions/loader-host-modules.code.js +1 -1
  123. package/dist/core/extensions/loader-host-modules.impl.js +3 -3
  124. package/dist/core/extensions/loader-host-modules.js +3 -3
  125. package/dist/core/extensions/loader-virtual-modules.js +1 -1
  126. package/dist/core/extensions/provider-types.d.ts +18 -6
  127. package/dist/core/extensions/provider-types.js.map +1 -1
  128. package/dist/core/extensions/runner-context.js +1 -1
  129. package/dist/core/intercom-broker-control-host.code.js +1 -1
  130. package/dist/core/intercom-broker-control-host.impl.js +3 -3
  131. package/dist/core/intercom-broker-control-host.js +3 -3
  132. package/dist/core/intercom-broker-control.code.js +3 -3
  133. package/dist/core/intercom-broker-control.impl.js +3 -3
  134. package/dist/core/intercom-broker-control.js +3 -3
  135. package/dist/core/model-config.d.ts +40 -0
  136. package/dist/core/model-registry.js +1 -1
  137. package/dist/core/model-resolver-scope.d.ts +4 -4
  138. package/dist/core/model-runtime.d.ts +1 -1
  139. package/dist/core/package-manager-storage-adapters.impl.js +3 -3
  140. package/dist/core/package-manager-storage-adapters.js +3 -3
  141. package/dist/core/provider-composer-internal.d.ts +11 -2
  142. package/dist/core/sdk.code.js +3 -3
  143. package/dist/core/sdk.impl.js +3 -3
  144. package/dist/core/sdk.js +3 -3
  145. package/dist/core/session-manager-core.js +5 -5
  146. package/dist/core/session-manager-list.impl.js +3 -3
  147. package/dist/core/session-manager-list.js +3 -3
  148. package/dist/core/session-manager.code.js +1 -1
  149. package/dist/core/session-manager.impl.js +3 -3
  150. package/dist/core/session-manager.js +3 -3
  151. package/dist/core/session-storage.impl.js +3 -3
  152. package/dist/core/session-storage.js +3 -3
  153. package/dist/core/settings-manager-basic-accessors.d.ts +6 -2
  154. package/dist/core/storage/index.js +2 -2
  155. package/dist/core/storage/node-sqlite-thread.js +2 -2
  156. package/dist/core/storage/node-sqlite.js +2 -2
  157. package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
  158. package/dist/core/storage/offline-snapshot-file.js +3 -3
  159. package/dist/core/storage/provider.js +2 -2
  160. package/dist/core/storage/selection.js +2 -2
  161. package/dist/core/storage/session/branch-fork-source.code.js +2 -2
  162. package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
  163. package/dist/core/storage/session/branch-fork-source.js +3 -3
  164. package/dist/core/storage/session/card-view.impl.js +3 -3
  165. package/dist/core/storage/session/card-view.js +3 -3
  166. package/dist/core/storage/session/child-reader.code.js +3 -3
  167. package/dist/core/storage/session/child-reader.impl.js +3 -3
  168. package/dist/core/storage/session/child-reader.js +3 -3
  169. package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
  170. package/dist/core/storage/session/chunked-resume-projection.js +3 -3
  171. package/dist/core/storage/session/expanded-child-details.code.js +2 -2
  172. package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
  173. package/dist/core/storage/session/expanded-child-details.js +3 -3
  174. package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
  175. package/dist/core/storage/session/fork-row-bytes.js +3 -3
  176. package/dist/core/storage/session/fork-row-index.impl.js +3 -3
  177. package/dist/core/storage/session/fork-row-index.js +3 -3
  178. package/dist/core/storage/session/fork-staging.code.js +2 -2
  179. package/dist/core/storage/session/fork-staging.impl.js +3 -3
  180. package/dist/core/storage/session/fork-staging.js +3 -3
  181. package/dist/core/storage/session/fork-window.code.js +3 -3
  182. package/dist/core/storage/session/fork-window.impl.js +3 -3
  183. package/dist/core/storage/session/fork-window.js +3 -3
  184. package/dist/core/storage/session/history-pages.impl.js +3 -3
  185. package/dist/core/storage/session/history-pages.js +3 -3
  186. package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
  187. package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
  188. package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
  189. package/dist/core/storage/session/jsonl-session-store.js +3 -3
  190. package/dist/core/storage/session/memory-session-store.impl.js +3 -3
  191. package/dist/core/storage/session/memory-session-store.js +3 -3
  192. package/dist/core/storage/session/pinned-branch-resume.code.js +3 -3
  193. package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
  194. package/dist/core/storage/session/pinned-branch-resume.js +3 -3
  195. package/dist/core/storage/session/released-history-files.code.js +3 -3
  196. package/dist/core/storage/session/released-history-files.impl.js +3 -3
  197. package/dist/core/storage/session/released-history-files.js +3 -3
  198. package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
  199. package/dist/core/storage/session/resident-fork-rows.js +3 -3
  200. package/dist/core/storage/session/session-resume.impl.js +3 -3
  201. package/dist/core/storage/session/session-resume.js +3 -3
  202. package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
  203. package/dist/core/storage/session/snapshot-cut.js +3 -3
  204. package/dist/core/storage/session/snapshot-history.code.js +3 -3
  205. package/dist/core/storage/session/snapshot-history.impl.js +3 -3
  206. package/dist/core/storage/session/snapshot-history.js +3 -3
  207. package/dist/core/storage/session/sql-session-store.code.js +1 -1
  208. package/dist/core/storage/session/sql-session-store.impl.js +3 -3
  209. package/dist/core/storage/session/sql-session-store.js +3 -3
  210. package/dist/core/storage/session/tree-outline.impl.js +3 -3
  211. package/dist/core/storage/session/tree-outline.js +3 -3
  212. package/dist/core/storage/session/tree-presentation.impl.js +3 -3
  213. package/dist/core/storage/session/tree-presentation.js +3 -3
  214. package/dist/core/storage/storage-status.impl.js +3 -3
  215. package/dist/core/storage/storage-status.js +3 -3
  216. package/dist/core/storage/team.impl.js +3 -3
  217. package/dist/core/storage/team.js +3 -3
  218. package/dist/core/structured-output/index.code.js +1 -1
  219. package/dist/core/structured-output/index.impl.js +3 -3
  220. package/dist/core/structured-output/index.js +3 -3
  221. package/dist/core/tasks/task-completion-entry.impl.js +3 -3
  222. package/dist/core/tasks/task-completion-entry.js +3 -3
  223. package/dist/core/tasks/task-file-history.code.js +3 -3
  224. package/dist/core/tasks/task-file-history.impl.js +3 -3
  225. package/dist/core/tasks/task-file-history.js +3 -3
  226. package/dist/core/tasks/task-reference-archive.code.js +4 -4
  227. package/dist/core/tasks/task-reference-archive.js +3 -3
  228. package/dist/core/tasks/task-reference-identity.code.js +1 -1
  229. package/dist/core/tasks/task-reference-identity.js +3 -3
  230. package/dist/core/tasks/task-reference-stream.impl.js +3 -3
  231. package/dist/core/tasks/task-reference-stream.js +3 -3
  232. package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
  233. package/dist/core/tasks/task-unsaved-answer.js +3 -3
  234. package/dist/core/tasks/task-view-source.impl.js +3 -3
  235. package/dist/core/tasks/task-view-source.js +3 -3
  236. package/dist/core/tools/read-url.code.js +2 -2
  237. package/dist/core/tools/read-url.impl.js +3 -3
  238. package/dist/core/tools/read-url.js +3 -3
  239. package/dist/core/worktree-snapshot/blob-store.js +2 -2
  240. package/dist/core/worktree-snapshot/errors.code.js +3 -3
  241. package/dist/core/worktree-snapshot/errors.impl.js +3 -3
  242. package/dist/core/worktree-snapshot/errors.js +3 -3
  243. package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
  244. package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
  245. package/dist/extensions/codemode/execute.code.js +1 -1
  246. package/dist/extensions/codemode/execute.impl.js +3 -3
  247. package/dist/extensions/codemode/execute.js +3 -3
  248. package/dist/extensions/codemode/renderer.code.js +2 -2
  249. package/dist/extensions/codemode/renderer.impl.js +3 -3
  250. package/dist/extensions/codemode/renderer.js +3 -3
  251. package/dist/extensions/mcp/cli.code.js +2 -2
  252. package/dist/extensions/mcp/cli.impl.js +3 -3
  253. package/dist/extensions/mcp/cli.js +3 -3
  254. package/dist/extensions/mcp/cli.lazy.code.js +2 -2
  255. package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
  256. package/dist/extensions/mcp/cli.lazy.js +3 -3
  257. package/dist/extensions/mcp/runtime.code.js +1 -1
  258. package/dist/extensions/mcp/runtime.impl.js +3 -3
  259. package/dist/extensions/mcp/runtime.js +3 -3
  260. package/dist/index-extensions.d.ts +1 -1
  261. package/dist/index.d.ts +8 -1
  262. package/dist/index.js +7 -7
  263. package/dist/main-first-time-setup.code.js +2 -2
  264. package/dist/main-first-time-setup.impl.js +3 -3
  265. package/dist/main-first-time-setup.js +3 -3
  266. package/dist/modes/interactive/components/settings-selector-types.d.ts +1 -0
  267. package/dist/modes/interactive/components/settings-selector-types.js.map +1 -1
  268. package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
  269. package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
  270. package/dist/modes/interactive/components/stored-tree-view.js +3 -3
  271. package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
  272. package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
  273. package/dist/modes/interactive/theme/color-utils.d.ts +5 -5
  274. package/dist/modes/interactive/theme/theme-loading.d.ts +1 -0
  275. package/dist/modes/interactive-engine/engine-prewarm.js +1 -1
  276. package/dist/modes/interactive-engine/remote-model-catalog.d.ts +1 -0
  277. package/dist/modes/print-mode.js +1 -1
  278. package/dist/modes/rpc/rpc-client-api.d.ts +6 -0
  279. package/dist/modes/rpc/rpc-types.d.ts +29 -2
  280. package/dist/package-manager-cli.code.js +5 -5
  281. package/dist/package-manager-cli.impl.js +3 -3
  282. package/dist/package-manager-cli.js +3 -3
  283. package/dist/rpc-entry.js +1 -1
  284. package/dist/startup-files.json +1 -1
  285. package/dist/startup-stages/5.js +1 -1
  286. package/dist/startup-stages/7.js +1 -1
  287. package/dist/startup-stages/8.js +1 -2
  288. package/dist/startup-stages/9.js +2 -1
  289. package/dist/utils/native-module.d.ts +44 -0
  290. package/dist/utils/startup-database-spare.code.js +3 -3
  291. package/dist/utils/startup-database-spare.impl.js +3 -3
  292. package/dist/utils/startup-database-spare.js +3 -3
  293. package/dist/utils/tools-manager.code.js +1 -1
  294. package/dist/utils/tools-manager.impl.js +3 -3
  295. package/dist/utils/tools-manager.js +3 -3
  296. package/docs/background-tasks.md +238 -243
  297. package/docs/build.md +21 -15
  298. package/docs/changelog.mdx +1 -1
  299. package/docs/codemode.md +68 -51
  300. package/docs/compaction/reference.md +65 -26
  301. package/docs/compaction.md +118 -66
  302. package/docs/computer-use.md +179 -146
  303. package/docs/containerization.md +87 -33
  304. package/docs/custom-provider/api-reference.md +152 -13
  305. package/docs/custom-provider/oauth.md +45 -28
  306. package/docs/custom-provider/override.md +14 -7
  307. package/docs/custom-provider/registration.md +77 -67
  308. package/docs/custom-provider/streaming.md +42 -19
  309. package/docs/custom-provider.md +26 -62
  310. package/docs/development.md +81 -42
  311. package/docs/docs.json +54 -38
  312. package/docs/environment-variables.md +92 -64
  313. package/docs/extensions/api-reference.md +326 -735
  314. package/docs/extensions/authoring.md +186 -269
  315. package/docs/extensions/events.md +308 -375
  316. package/docs/extensions/examples.md +122 -74
  317. package/docs/extensions/ui.md +217 -197
  318. package/docs/extensions.md +189 -259
  319. package/docs/getting-started/authentication.md +27 -14
  320. package/docs/getting-started/first-session.md +25 -26
  321. package/docs/getting-started/installation.md +62 -84
  322. package/docs/getting-started/project-instructions.md +39 -14
  323. package/docs/guides/configuration.md +62 -20
  324. package/docs/guides/intercom.md +20 -12
  325. package/docs/guides/non-interactive.md +31 -16
  326. package/docs/guides/orchestration.md +17 -9
  327. package/docs/guides/resume-on-any-machine.md +63 -52
  328. package/docs/guides/subagents.md +26 -14
  329. package/docs/guides/team-setup.md +49 -27
  330. package/docs/guides.md +30 -23
  331. package/docs/herdr.md +22 -17
  332. package/docs/index.md +24 -17
  333. package/docs/intercom/operations.md +90 -66
  334. package/docs/intercom/reference.md +219 -192
  335. package/docs/intercom.md +111 -92
  336. package/docs/json.md +73 -71
  337. package/docs/keybindings.md +74 -48
  338. package/docs/libraries/agent-core.md +52 -9
  339. package/docs/libraries/ai.md +90 -63
  340. package/docs/libraries/codemode.md +31 -8
  341. package/docs/libraries/schema.md +12 -9
  342. package/docs/libraries/storage-libsql.md +92 -0
  343. package/docs/libraries/storage-postgres.md +119 -0
  344. package/docs/libraries/telemetry.md +42 -9
  345. package/docs/libraries/tui.md +74 -94
  346. package/docs/libraries.md +25 -8
  347. package/docs/llama-cpp.md +38 -33
  348. package/docs/mcp-servers.md +140 -88
  349. package/docs/models/reference.md +53 -36
  350. package/docs/models-configuration.md +19 -13
  351. package/docs/models.md +102 -87
  352. package/docs/orchestration/migrating-workflows.md +22 -20
  353. package/docs/orchestration/patterns.md +36 -21
  354. package/docs/orchestration.md +24 -21
  355. package/docs/packages/authoring.md +29 -18
  356. package/docs/packages/reference.md +77 -16
  357. package/docs/packages.md +34 -34
  358. package/docs/programmatic.md +28 -21
  359. package/docs/prompt-templates.md +65 -41
  360. package/docs/providers/reference.md +36 -20
  361. package/docs/providers.md +78 -76
  362. package/docs/quickstart.md +42 -54
  363. package/docs/reference/cli.md +256 -254
  364. package/docs/reference.md +30 -23
  365. package/docs/rpc/examples.md +121 -17
  366. package/docs/rpc/extension-ui.md +86 -63
  367. package/docs/rpc/protocol.md +817 -358
  368. package/docs/rpc.md +78 -152
  369. package/docs/sdk/reference.md +309 -73
  370. package/docs/sdk/storage.md +614 -0
  371. package/docs/sdk/structured-decisions.md +168 -65
  372. package/docs/sdk/web-server.md +80 -46
  373. package/docs/sdk.md +168 -215
  374. package/docs/security.md +117 -44
  375. package/docs/session-format.md +127 -76
  376. package/docs/sessions.md +155 -113
  377. package/docs/settings.md +293 -205
  378. package/docs/shell-aliases.md +15 -6
  379. package/docs/skills/authoring.md +17 -9
  380. package/docs/skills/reference.md +23 -21
  381. package/docs/skills.md +148 -97
  382. package/docs/storage.md +172 -260
  383. package/docs/subagents/authoring.md +148 -15
  384. package/docs/subagents/reference.md +105 -29
  385. package/docs/subagents.md +247 -250
  386. package/docs/terminal-setup.md +97 -69
  387. package/docs/termux.md +51 -85
  388. package/docs/themes/reference.md +51 -37
  389. package/docs/themes.md +52 -55
  390. package/docs/tmux.md +38 -21
  391. package/docs/tools.md +209 -147
  392. package/docs/tui/reference.md +64 -32
  393. package/docs/tui.md +38 -66
  394. package/docs/usage.md +94 -86
  395. package/docs/verification.md +25 -25
  396. package/docs/web-access.md +106 -54
  397. package/docs/windows.md +55 -57
  398. package/docs/worktree-snapshots.md +82 -74
  399. package/examples/sdk/11-sessions.ts +4 -4
  400. package/package.json +8 -8
  401. package/schemas/models.schema.json +58 -7
  402. package/dist/_shared/sdk-OSBEPR3Q.js.map +0 -1
  403. package/dist/_shared/startup-0-0-TYUFUOJZ.js.map +0 -1
  404. package/dist/_shared/startup-0-1-W2G2UY7R.js.map +0 -1
  405. package/dist/_shared/startup-0-2-UXBUEOXW.js.map +0 -1
  406. package/dist/_shared/startup-0-4-HN5EB4K7.js.map +0 -1
@@ -1,53 +1,248 @@
1
1
  ---
2
- title: CLI reference
3
- description: Every Atomic command, flag, argument, and environment variable.
2
+ title: "CLI reference"
3
+ sidebarTitle: "CLI"
4
+ description: "Commands, flags, model-matching rules, file arguments, subcommands, and exit codes for the atomic CLI."
4
5
  ---
5
6
 
6
- # CLI reference
7
-
8
7
  ```bash
9
8
  atomic [options] [@files...] [messages...]
10
9
  ```
11
10
 
12
- Use `--` to end option parsing when positional prompt text begins with `-`, `--`, or `@`. Every argument after the terminator is treated as literal message text rather than an option or file argument:
11
+ ## Option parsing rules
12
+
13
+ - **Space-separated values:** Built-in CLI options require space-separated values (`--model gpt-4o`). Passing `--flag=value` (such as `--model=gpt-4o` or `--mode=json`) is not supported for built-in flags and fails with `Error: Unknown option`. Only extension-registered flags, `atomic auth print-bearer-token --min-expiry=...`, and `atomic blueprint cache-key --format=...` accept `=`.
14
+ - **End-of-options terminator (`--`):** Use `--` when positional prompt text begins with `-`, `--`, or `@`. Every argument after `--` is treated as literal message text rather than an option or `@file` argument:
13
15
 
14
16
  ```bash
15
17
  atomic --print -- "- leading-dash prompt"
16
18
  ```
17
19
 
18
- ## Package commands
20
+ - **Unknown flags and validation:** Unknown `--flags` are passed to loaded extensions; if no extension registers them, startup fails with `Error: Unknown option: --<name>`. Invalid `--mode` values or invalid CLI storage flags print `Error: ...` and exit `1`. Invalid `--thinking` values print a warning and continue with the default thinking level.
21
+
22
+ ## Modes
23
+
24
+ | Flag | Description |
25
+ | --- | --- |
26
+ | *(default)* | Interactive mode (fullscreen TUI) when both stdin and stdout are a TTY |
27
+ | `-p`, `--print` | Print response and exit (see [Non-interactive mode](/guides/non-interactive)) |
28
+ | `--mode text\|json\|rpc` | Choose output or protocol mode (`json` streams JSON lines, see [JSON mode](/json); `rpc` runs stdin/stdout RPC, see [RPC mode](/rpc)). For TypeScript hosts, use the [SDK](/sdk) |
29
+ | `--export <in> [out]` | Export a session to HTML (defaults to `<stem>.html` next to `<in>`), print `Exported to: <path>`, and exit `0` |
30
+
31
+ **`--mode text` vs. automatic print mode:** Passing `--mode text` alone in an interactive terminal still launches interactive mode; it selects plain-text output for print mode (or overrides an earlier `--mode json`). Conversely, if stdin or stdout is not a TTY (such as piping into `atomic` or redirecting `atomic > out.txt`), Atomic automatically switches to print mode even without `-p`. Both print mode and `--mode json` automatically exclude `ask_user_question`.
32
+
33
+ **Multiple prompts and piped stdin:** Passing multiple positional prompts (for example `atomic -p "step 1" "step 2"`) runs them sequentially in one session; plain-text print mode prints only the final prompt's answer to stdout, while `--mode json` streams every turn. In print mode, Atomic reads piped stdin and separates it from CLI prompt text with a newline:
19
34
 
20
35
  ```bash
21
- atomic install <source> [-l] # Install package, -l for project-local
22
- atomic remove <source> [-l] # Remove package
23
- atomic uninstall <source> [-l] # Alias for remove
24
- atomic update [source|self|atomic] # Update Atomic only, or one package source
25
- atomic update --all # Update Atomic and packages; reconcile pinned git refs
26
- atomic update --extensions # Update packages only; reconcile pinned git refs
27
- atomic update --models # Force-refresh authenticated provider model catalogs
28
- atomic update --self # Update Atomic only
29
- atomic update --force # Reinstall Atomic even if the current version is latest
30
- atomic update --extension <src> # Update one package
31
- atomic list # List installed packages
32
- atomic config [-l] # Open resource TUI (-l starts in project settings)
36
+ cat README.md | atomic -p "Summarize this text"
33
37
  ```
34
38
 
35
- These commands manage Atomic packages, and `atomic update` updates the Atomic CLI installation. To uninstall Atomic itself, see [Installation](/getting-started/installation#uninstall).
39
+ Once piped input starts arriving, Atomic waits until EOF. If a pipe sends nothing within 2 seconds, a run with a prompt argument or `@file` starts without stdin and warns if bytes arrive later. A run with no prompt argument keeps waiting and notes that on stderr. Set `ATOMIC_STDIN_TIMEOUT_MS` to adjust the wait, or `0` to always wait for piped EOF.
36
40
 
37
- `atomic config` and project package commands accept `--approve` or `--no-approve` to trust or ignore project-local settings for one command. `atomic update` never prompts for project trust.
41
+ **Structured-output termination:** When a print-mode turn calls an opt-in terminating structured-output tool (such as `final_decision`), Atomic exits immediately after that tool result without another assistant turn and writes the JSON payload to stdout. Non-terminating tool results are not printed as the final response. See [Structured decisions](/sdk/structured-decisions).
38
42
 
39
- After updating the Atomic CLI, `atomic update` runs the new version's [`atomic intercom upgrade`](#storage-and-intercom-commands) when `atomic` on `PATH` reports the installed version and lists that command. Otherwise it prints a note and leaves the broker alone. A failed broker upgrade prints a warning and keeps exit code `0`.
43
+ **Fullscreen interactive options:** Interactive sessions run fullscreen with a scrolling transcript above the docked editor and status area. Adjust **Fullscreen wheel scroll lines** in `/settings` (or `fullscreenWheelScrollLines`: `"auto"` or `1` to `100`). Text selection copies automatically unless `fullscreenCopyOnSelect` is `false`. `Ctrl+X` does not copy; followed by `Ctrl+K` it stops all background work (see [Keybindings](/keybindings#navigation)), and `/scoped-models` uses it to clear selections. On exit, `fullscreenExitOutput: "transcript"` prints the final transcript and resume hint, while `"resume-hint"` restores the previous screen and prints only the hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
44
+
45
+ ## Model options
46
+
47
+ Configure provider logins and API keys in [Model providers](/providers), or add custom models and overrides in [Configure custom models](/models).
48
+
49
+ | Option | Description |
50
+ | --- | --- |
51
+ | `--provider <name>` | Provider to search for `--model`, such as `anthropic`, `openai`, or `google`; requires `--model` |
52
+ | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
53
+ | `--api-key <key>` | API key overriding environment variables. Does not disambiguate providers that share a model |
54
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`; model capability mapping still governs availability |
55
+ | `--models <patterns>` | Comma-separated patterns for scoped model cycling (`Ctrl+P`) and initial model scope |
56
+ | `--fallback-models <models>` | Comma-separated fallback models tried in order after retryable failures; replaces [`fallbackModels`](/settings#fallbackmodels) for this run |
57
+ | `--no-fallback` | Never fall back to another model in this run; cannot be combined with `--fallback-models` |
58
+ | `--list-models [search]` | List available models and exit |
59
+
60
+ ### How `--model`, `--models`, and `--fallback-models` match models
61
+
62
+ These three flags use different matching and credential rules:
63
+
64
+ | Behavior | `--model` | `--models` | `--fallback-models` |
65
+ | --- | --- | --- | --- |
66
+ | Glob wildcards (`*`, `?`, `[`) | No (characters are literal) | Yes (case-insensitive against `provider/id` and bare `id`) | No (characters are literal) |
67
+ | Exact and fuzzy substring match | Yes (case-insensitive) | Yes (case-insensitive, after exact and glob) | Yes (case-insensitive) |
68
+ | Searches unauthenticated models | Yes (so `--api-key` works) | No (authenticated models only) | No (authenticated models only) |
69
+ | `:<thinking>` suffix | Strict, case-insensitive (invalid suffix fails) | Lenient on fuzzy matches, case-insensitive (invalid suffix warns and uses default) | Strict, case-insensitive (invalid suffix warns and skips entry) |
70
+ | Ambiguous bare model ID | Prefers an authenticated provider (unless `--api-key` is passed); asks for `--provider` if still ambiguous | Adds every matching authenticated provider | Prefers the active or default provider; warns if still ambiguous |
71
+ | Unknown model on a known provider | Synthesizes a custom model from that provider's defaults with a warning | Warns and skips the pattern | Warns and skips the entry |
72
+
73
+ Key details for each flag:
74
+
75
+ - **`--model <pattern>`:** Checks exact `provider/id` or raw `id` before substring matching on model `id` and display `name` (preferring non-dated aliases over `-YYYYMMDD` snapshots, then lexicographically newest). Full text is matched before splitting `:<thinking>` so model IDs containing colons (such as `qwen/qwen3-coder:exacto`) resolve intact. If `--provider <p>` or `<p>/<id>` names a known provider whose catalog omits `<id>`, Atomic warns and runs with a synthesized custom model inheriting that provider's defaults (enabling reasoning when a non-`off` `:<thinking>` suffix is given). Explicit `--thinking` always overrides a `:<thinking>` suffix.
76
+ - **`--models <patterns>`:** Evaluates each comma-separated pattern in order: exact literal match, then glob match (`*`, `?`, `[`), then fuzzy substring match. Duplicate matches keep the first pattern's thinking level. On a new session without `--model`, Atomic starts on your saved default model if it is inside the scope, otherwise on the first scoped model. For how model scoping also affects `/model`, `/scoped-models`, and subagents, see [`enabledModels`](/settings#enabledmodels).
77
+ - **`--fallback-models <models>`:** Accepts `provider/model[:thinking]`, bare IDs, or fuzzy matches, and requires configured credentials for each entry.
78
+
79
+ **Fallback precedence and stderr output:** A model selected with `--model` runs strictly as named and falls back only to `--fallback-models`, ignoring global and project `fallbackModels` settings. In interactive mode this holds for the whole process, even after `/model`, `Ctrl+P`, `/new`, or `/resume`. Start Atomic without `--model` to use settings fallbacks. Child subagents running on the main session's model inherit the same fallback chain.
80
+
81
+ In print mode, all fallback notices go to **stderr** (keeping stdout clean for scripts): `Model fallback: <model> failed, continuing on <fallback>: <reason>` when switching, and `Model: ran on <fallback>, not the requested <model>.` after a fallback answer finishes. Failed runs write `Model <model> failed: <reason>` to stderr.
82
+
83
+ ## Session options
84
+
85
+ | Option | Description |
86
+ | --- | --- |
87
+ | `-c`, `--continue` | Continue the most recent session for the current directory |
88
+ | `-r`, `--resume` | Browse and select a session |
89
+ | `--session <id\|prefix>` | Open by exact ID or unique 8-hex UUID prefix in its working directory. If it matches only another directory, Atomic offers to fork it here. Exits `75` if another live process holds the session open ([When the session is already open](/guides/resume-on-any-machine#when-the-session-is-already-open)) |
90
+ | `--import <file>` | Import an exported JSONL session into session storage |
91
+ | `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
92
+ | `--fork <id\|prefix>` | Fork an exact ID or unique 8-hex UUID prefix into a new session in the current directory |
93
+ | `--session-dir <dir>` | Select JSONL session storage and lookup directory |
94
+ | `--session-store <path>` | Select a SQLite session database; relative paths resolve from the working directory |
95
+ | `--session-prefix <prefix>` | Use a non-default table prefix with `--session-store` |
96
+ | `--name <name>`, `-n <name>` | Set the session display name (rejects empty or whitespace-only values) |
97
+ | `--no-session` | Run without saving a resumable session |
98
+ | `--storage <json>` | Select shared storage for this process in the JSON form of the `storage` setting; never saved. See [Selecting storage per process](/storage#selecting-storage-per-process) |
99
+ | `--storage-file <path>` | Read the `--storage` selection from a JSON file |
40
100
 
41
- A session that runs while an update replaces Atomic keeps the code it already loaded and reads remaining modules from disk on demand. If an updated module cannot load beside the running session, Atomic reports `atomic was updated to <version> while this session was running; restart it to keep using <feature>.` Restart the session (for example with `atomic --resume`) to use that feature again.
101
+ **Conflict and validation rules:**
42
102
 
43
- Two additional rules apply after an in-place update:
103
+ - `--import` cannot combine with `--session`, `--fork`, `--session-id`, `--continue`, or `--resume` (it can combine with `--no-session` or `--session-dir`).
104
+ - `--fork` cannot combine with `--session`, `--continue`, `--resume`, or `--no-session`.
105
+ - `--session-id` cannot combine with `--session`, `--continue`, or `--resume`. IDs must start and end with an ASCII letter or digit and contain only ASCII letters, digits, `.`, `_`, or `-`.
106
+ - `--session-store` cannot combine with `--session-dir` or `--no-session`.
107
+ - `--session-prefix` requires `--session-store`.
108
+ - `--storage` cannot combine with `--storage-file`, and neither accepts `{ "dir": "..." }`.
109
+ - `--storage` and `--storage-file` cannot combine with a non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` (startup fails with `StorageConfigError` and `conflicting-overrides`; unset the variable or pass an explicit session flag). See [Storage and team variables](/environment-variables#storage-and-team-variables).
110
+ - Invalid CLI storage flags exit cleanly with `Error: ...` and exit code `1`.
44
111
 
45
- - On `/reload`, updated built-in extension bundles load on Windows and under Bun (other platforms keep the bundles loaded at startup). If the running host lacks an export a reloaded built-in extension needs, Atomic fails the load cleanly with `atomic was updated to <version> while this session was running; restart it to keep using the <name> extension.`.
46
- - Document conversion (`markit-ai`) and other third-party libraries bundled into Atomic's own files are no longer installed as separate dependencies. A session started on an earlier release before an in-place update may need to restart if its code loads one of those removed packages on demand (such as the first PDF, Office, or EPUB read from 0.10.3).
112
+ See [Choosing a store](/sessions#choosing-a-store) for full precedence and conflict details.
113
+
114
+ ## Tool options
115
+
116
+ | Option | Description |
117
+ | --- | --- |
118
+ | `--tools <list>`, `-t <list>` | Allowlist tool names or `*` patterns, or modify defaults with only `+name`/`-name` entries; an allowlist keeps MCP tools unless an entry starts with `mcp__` |
119
+ | `--exclude-tools <list>`, `-xt <list>` | Exclude tool names or `*` patterns, including MCP tools and Intercom |
120
+ | `--no-builtin-tools`, `-nbt` | Disable built-in coding tools while keeping extension and custom tools enabled |
121
+ | `--no-tools`, `-nt` | Disable every tool, including Intercom, even when `--tools` is passed |
47
122
 
48
- Errors in your own extensions, such as a missing dependency, are reported as they are. Sessions started on Atomic 0.10.2 or earlier lack these restart notices, so restart them after any in-place update.
123
+ Default built-in coding tools: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, `codemode`, plus `powershell` on native Windows when a PowerShell executable is available. `ls` remains available but is off by default.
49
124
 
50
- `atomic update --models` refreshes configured providers without updating packages. Built-in catalogs from models.dev do not refresh your provider login. Account-specific catalogs still need valid credentials; if an OAuth refresh fails, the command warns with `atomic auth login <provider>` and continues refreshing other catalogs. Other failures, such as a network error, exit nonzero.
125
+ **Pattern matching rules:** Pattern matching in `--tools` and `--exclude-tools` is **case-sensitive** and supports **only `*` wildcards** (`?` and `[...]` are literal). Modifier entries (`+name`/`-name`) accept exact names only (no `*`) and cannot mix with plain allowlist entries; use `--exclude-tools` for pattern exclusions.
126
+
127
+ `defaultTools` selects initial coding tools without narrowing extension or custom tools. `--tools` sets an explicit allowlist, and `--exclude-tools` subtracts from it. `--no-builtin-tools` suppresses coding defaults when no allowlist is given. Bundled Intercom stays loaded with `--no-extensions`, but its tool follows allowlists, exclusions, and `--no-tools` like other extension tools.
128
+
129
+ To remove [codemode](/tools#codemode) or add [tool search](/tools#tool_search) alongside defaults, pass `atomic --tools -codemode,+tool_search` for one run or set `"defaultTools": ["-codemode", "+tool_search"]`. On `/reload`, CLI modifiers still apply on top of the reloaded `defaultTools` setting. Modifiers do not narrow extension tools or filter MCP exposure, and `--no-tools` disables every tool.
130
+
131
+ ### MCP tools
132
+
133
+ `--tools read,codemode` keeps non-hidden MCP tools with `codemode` or `deferred` exposure callable from codemode scripts. MCP tools unmatched by the allowlist are not declared directly, regardless of exposure. Unmatched direct-exposure tools stay registered but inactive. Only an enabled `tool_search` can load unmatched non-direct tools.
134
+
135
+ An entry starting with `mcp__` filters MCP tools too. For example, `atomic --tools read,codemode,'mcp__docs__*'` keeps only tools from the `docs` server. MCP resource tools count as MCP tools, and exclusions apply to both server and resource tools. Use `--no-mcp` to disable built-in MCP connections and resources.
136
+
137
+ ## Project trust options
138
+
139
+ | Option | Description |
140
+ | --- | --- |
141
+ | `--approve`, `-a` | Trust project-local files and resources for this run |
142
+ | `--no-approve`, `-na` | Ignore project-local files and resources for this run |
143
+
144
+ Project trust gates `.atomic` and legacy `.pi` project resources, project package settings, project-local context files, and `.agents` resources discovered from the project tree. Manage saved trust decisions with `/trust`; see [Security](/security).
145
+
146
+ ## Resource options
147
+
148
+ | Option | Description |
149
+ | --- | --- |
150
+ | `-e`, `--extension <source>` | Load an extension from a path, npm, or git; repeatable |
151
+ | `--no-extensions`, `-ne` | Disable optional extension discovery; mandatory bundled Intercom remains loaded |
152
+ | `--no-mcp` | Disable built-in MCP support for this run, even when explicitly enabled; replacement extensions are unaffected |
153
+ | `--skill <path>` | Load a skill; repeatable |
154
+ | `--no-skills`, `-ns` | Disable skill discovery |
155
+ | `--prompt-template <path>` | Load a prompt template; repeatable |
156
+ | `--no-prompt-templates`, `-np` | Disable prompt template discovery |
157
+ | `--theme <path>` | Load a theme; repeatable |
158
+ | `--no-themes` | Disable theme discovery |
159
+ | `--no-context-files`, `-nc` | Disable context-file discovery and loading |
160
+
161
+ Combine `--no-*` with explicit flags to load only what you specify, ignoring settings:
162
+
163
+ ```bash
164
+ atomic --no-extensions -e ./my-extension.ts
165
+ ```
166
+
167
+ ## Other options
168
+
169
+ | Option | Description |
170
+ | --- | --- |
171
+ | `--system-prompt <text\|path>` | Replace the default prompt with literal text or the contents of an existing file (context files and skills still append; overrides `SYSTEM.md`) |
172
+ | `--append-system-prompt <text\|path>` | Append literal text or file contents to the system prompt; repeatable. Replaces any discovered `APPEND_SYSTEM.md` file |
173
+ | `--use-theme <name[/name]>` | Set the interactive theme for this run without saving it; see [Themes](/themes#initial-theme) |
174
+ | `--offline` | Disable automatic network activity, including update checks, package updates, telemetry, and model catalog refreshes |
175
+ | `--debug` | Turn on [debug mode](/development#debugging) for this run, the same as `ATOMIC_DEBUG=1` |
176
+ | `--verbose` | Force verbose startup |
177
+ | `-h`, `--help` | Show help |
178
+ | `-v`, `--version` | Show version |
179
+
180
+ ## File arguments
181
+
182
+ Prefix files with `@` to include them in the initial message:
183
+
184
+ ```bash
185
+ atomic @prompt.md "Answer this"
186
+ atomic -p @screenshot.png "What's in this image?"
187
+ atomic @code.ts @test.ts "Review these files"
188
+ ```
189
+
190
+ `@file` paths expand `~`, resolve relative to the current working directory, skip empty (0-byte) files silently, and exit `1` if missing or unreadable. UTF-8 text files (BOM stripped) are wrapped in `<file name="/abs/path">...</file>` blocks, and supported image files are attached as images. `@file` arguments are not allowed in `--mode rpc` (exits `1`).
191
+
192
+ ## Examples
193
+
194
+ ```bash
195
+ # Interactive with initial prompt
196
+ atomic "List all .ts files in src/"
197
+
198
+ # Non-interactive print mode
199
+ atomic -p "Summarize this codebase"
200
+
201
+ # Non-interactive with piped stdin
202
+ cat README.md | atomic -p "Summarize this text"
203
+
204
+ # Different model with explicit provider
205
+ atomic --provider openai --model gpt-4o "Help me refactor"
206
+
207
+ # Model with provider prefix
208
+ atomic --model openai/gpt-4o "Help me refactor"
209
+
210
+ # Model with thinking level shorthand (case-insensitive)
211
+ atomic --model sonnet:high "Solve this complex problem"
212
+
213
+ # Limit model cycling with globs
214
+ atomic --models "claude-*,gpt-4o"
215
+
216
+ # Read-only mode
217
+ atomic --tools read,search,find,ls -p "Review the code"
218
+ ```
219
+
220
+ ## Package commands
221
+
222
+ ```bash
223
+ atomic install <source> [-l] # Install package, -l for project-local
224
+ atomic remove <source> [-l] # Remove package
225
+ atomic uninstall <source> [-l] # Alias for remove
226
+ atomic update [source|self|atomic|pi] # Update Atomic only, or one package source
227
+ atomic update --all # Update Atomic and packages; reconcile pinned git refs
228
+ atomic update --extensions # Update packages only; reconcile pinned git refs
229
+ atomic update --models # Force-refresh authenticated provider model catalogs (15s timeout)
230
+ atomic update --self # Update Atomic only
231
+ atomic update --force # Reinstall Atomic even if the current version is latest
232
+ atomic update --extension <src> # Update one package
233
+ atomic list # List installed packages
234
+ atomic config [-l] [-a|-na] # Open resource TUI (-l starts in project settings)
235
+ ```
236
+
237
+ These commands manage Atomic packages, and `atomic update` updates the Atomic CLI installation. Passing both `--self` and `--extensions` behaves like `--all`. To uninstall Atomic itself, see [Uninstall](/getting-started/installation#uninstall).
238
+
239
+ `atomic config` and project package commands accept `--approve` (`-a`) or `--no-approve` (`-na`) to trust or ignore project-local settings for one command. `atomic update` never prompts for project trust.
240
+
241
+ After updating the Atomic CLI, `atomic update` runs the new version's [`atomic intercom upgrade`](#storage-and-intercom-commands) when `atomic` on `PATH` reports the installed version and lists that command. Otherwise it prints a note and leaves the broker alone. A failed broker upgrade prints a warning and keeps exit code `0`.
242
+
243
+ If you upgrade Atomic in place while a session is running and see a restart notice, restart that session (for example with `atomic -r`) so updated modules and built-in extensions load cleanly. Errors in your own extensions are reported as usual.
244
+
245
+ `atomic update --models` refreshes configured provider catalogs (with a 15-second total timeout) without updating packages. Built-in catalogs from models.dev do not refresh your provider login. Account-specific catalogs still need valid credentials; if an OAuth refresh fails, the command warns with `atomic auth login <provider>` and continues refreshing other catalogs. Other failures, such as a network error, exit nonzero.
51
246
 
52
247
  See [Atomic packages](/packages) for package sources and security notes.
53
248
 
@@ -55,13 +250,13 @@ See [Atomic packages](/packages) for package sources and security notes.
55
250
 
56
251
  If a wrapper or another package manager provides Atomic, set `ATOMIC_SELF_UPDATE_COMMAND` so `atomic update` runs its update command:
57
252
 
58
- ```sh
253
+ ```bash
59
254
  export ATOMIC_SELF_UPDATE_COMMAND="mise use -g npm:{packageName}@{version}"
60
255
  ```
61
256
 
62
257
  `atomic update` runs this command only when a newer release exists, replacing `{packageName}`, `{version}`, and `{installSpec}` (`{packageName}@{version}`) with that release. It bypasses install-method detection, so it works for installs Atomic cannot update itself.
63
258
 
64
- The environment value is split on spaces; `PI_SELF_UPDATE_COMMAND` works as a legacy alias. For arguments that contain spaces, set the global `selfUpdateCommand` argv array in `~/.atomic/agent/settings.json` instead (for example `["nix", "profile", "upgrade", "atomic"]`). Project settings are ignored for this key.
259
+ The environment value is split on spaces; `PI_SELF_UPDATE_COMMAND` works as a legacy alias. For arguments that contain spaces, set the global `selfUpdateCommand` array in `~/.atomic/agent/settings.json` instead (for example `["nix", "profile", "upgrade", "atomic"]`). Project settings are ignored for this key.
65
260
 
66
261
  After the command finishes, Atomic checks the version on disk or from `atomic --version` on `PATH`. A wrapper that installs each version into a new directory still reports success. A command that exits `0` without installing the new version prints a warning instead.
67
262
 
@@ -75,18 +270,20 @@ atomic auth print-api-key --model <model> [--provider <p>]
75
270
  atomic auth print-bearer-token --model <model> [--provider <p>] [--min-expiry <dur>]
76
271
  ```
77
272
 
78
- `atomic auth login <provider>` signs in to a provider in an interactive terminal and exits without starting a session. It opens the browser for account sign-in like `/login <provider>`, or prints instructions for another sign-in method when available. Providers without account sign-in prompt for an API key.
273
+ `atomic auth login <provider>` signs in to a provider in an interactive terminal and exits without starting a session. It opens the browser for account sign-in like `/login <provider>`, or prints instructions for another sign-in method when available. Providers without account sign-in prompt for an API key. See [Subscriptions](/providers#subscriptions) and [Credential resolution order](/providers/reference#resolution-order).
274
+
275
+ `atomic auth login` does not load extensions. For extension-registered providers (including bundled [`llama.cpp`](/llama-cpp)), sign in inside an interactive session with `/login <provider>`.
79
276
 
80
- `<provider>` accepts a provider ID or display name such as `openai` or `OpenAI`. An ambiguous name (such as a `models.json` provider sharing a built-in display name) is rejected with the matching IDs; an exact provider ID always matches that provider. After sign-in, Atomic refreshes that provider's model catalog. If the refresh fails, times out after 15 seconds, or is interrupted with Ctrl+C, the login stays saved and refreshes on the next start.
277
+ `<provider>` accepts a provider ID or display name such as `openai` or `OpenAI`. An ambiguous name (such as a `models.json` provider sharing a built-in display name) is rejected with the matching IDs; an exact provider ID always matches that provider. After sign-in, Atomic refreshes that provider's model catalog. If the refresh fails, times out after 15 seconds, or is interrupted with `Ctrl+C`, the login stays saved and refreshes on the next start.
81
278
 
82
279
  | Option | Description |
83
- |---|---|
280
+ | --- | --- |
84
281
  | `--api-key` | Save an API key instead of signing in with an account; input is not echoed |
85
282
  | `--no-browser` | Skip opening a browser and use another sign-in method such as a device code, for example over SSH. Prompts if several methods exist. Cannot be combined with `--api-key` |
86
283
 
87
284
  `atomic auth logout <provider>` removes credentials saved by `atomic auth login` or `/login` while leaving environment variables and `models.json` unchanged. For built-in or `models.json` providers, it exits `0` even when nothing is stored. Extensions are not loaded; remove an extension provider's credentials by its provider ID (once none remain stored, that ID exits `1` as an unknown provider).
88
285
 
89
- `atomic auth check` verifies the effective credential for a provider or model before starting a session. Pass at least one of `--provider` or `--model`. It prints `ready`, `not_ready`, or `invalid` to stdout and exits `0`, `1`, or `2`. `--json` adds the resolved provider, credential kind, and any failure reason. By default, checks never print credential material.
286
+ `atomic auth check` verifies the effective credential for a provider or model before starting a session (see [Verify readiness before a session](/providers#verify-readiness-before-a-session)). Pass at least one of `--provider` or `--model`. It prints `ready`, `not_ready`, or `invalid` to stdout and exits `0`, `1`, or `2`. `--json` adds the resolved provider, credential kind, and any failure reason. By default, checks never print credential material.
90
287
 
91
288
  `--credentials` opts in to credential export from `atomic auth check`. It requires `--provider` or an exact `--model` target. A fuzzy model match on a ready provider returns `invalid` (exit `2`) instead of exporting a credential you did not name; on a non-ready provider it stays `not_ready` (exit `1`).
92
289
 
@@ -98,14 +295,14 @@ The credential print commands emit one configured credential for an external cli
98
295
 
99
296
  `--model` is required for both `print-*` commands. Pass `--provider` when several configured providers offer the same model. The two `print-*` subcommands accept only `--provider` and `--model` (plus `--min-expiry` for `print-bearer-token`). Any other flag, including `--export`, `--session-dir`, and `--print`, is a usage error rather than an ignored flag.
100
297
 
101
- Passing `--help` or `-h` to `atomic auth` or to any `auth` subcommand (`login`, `logout`, `print-api-key`, `print-bearer-token`, or `check`), before a `--` terminator and not as the value of a value-taking flag, prints auth help to stderr and exits `0`. Bare `atomic auth` and `atomic auth help` do the same. Any unknown subcommand exits `1` and lists all five valid commands. Help never writes to stdout, so raw credential export stdout is always a credential or empty.
298
+ Passing `--help` or `-h` to `atomic auth` or any `auth` subcommand (`login`, `logout`, `print-api-key`, `print-bearer-token`, or `check`), before a `--` terminator and not as the value of a value-taking flag, prints auth help to stderr and exits `0`. Bare `atomic auth` and `atomic auth help` do the same. Any unknown subcommand exits `1` and lists all five valid commands. Help never writes to stdout, so raw credential export stdout is always a credential or empty.
102
299
 
103
300
  `print-bearer-token` works only on OAuth providers and `print-api-key` only on API-key providers; requesting the wrong kind fails instead of falling back. A bearer token with less than `--min-expiry` remaining (default `30m`, accepting `ms`, `s`, `m`, or `h`) is refreshed first. Both `--min-expiry 30m` and `--min-expiry=30m` work. Passing `--min-expiry` to `print-api-key` is a usage error, even after `--`. A failed refresh leaves your stored credential untouched.
104
301
 
105
- Credential-export exits (`print-api-key`, `print-bearer-token`, and the `--credentials` write itself):
302
+ Credential-export exits (`print-api-key`, `print-bearer-token`, and `--credentials` writes):
106
303
 
107
304
  | Exit | Meaning |
108
- |------|---------|
305
+ | --- | --- |
109
306
  | `0` | Credential written to stdout, one trailing newline |
110
307
  | `1` | Usage error |
111
308
  | `2` | No credential configured for that model or provider |
@@ -113,14 +310,14 @@ Credential-export exits (`print-api-key`, `print-bearer-token`, and the `--crede
113
310
  | `4` | That credential kind is unsupported for the provider |
114
311
  | `5` | OAuth refresh failed; the stored credential is unchanged |
115
312
  | `6` | The provider cannot mint a token that lives as long as `--min-expiry` |
116
- | `7` | The provider's OAuth credential could not be used; no guarantee is made about stored state |
313
+ | `7` | The provider's OAuth credential could not be used; stored state is not guaranteed unchanged |
117
314
  | `8` | The credential could not be written; nothing was emitted |
118
315
  | `9` | Only part of the credential was written; discard the output |
119
316
 
120
317
  Auth-check exits:
121
318
 
122
319
  | Exit | `atomic auth check` |
123
- |------|---------------------|
320
+ | --- | --- |
124
321
  | `0` | `ready` |
125
322
  | `1` | `not_ready`, including a fuzzy `--model` with `--credentials` when its resolved provider is not ready |
126
323
  | `2` | `invalid`, including check usage errors (unknown option, neither `--provider` nor `--model`, or a fuzzy `--model` with `--credentials` when its resolved provider is otherwise ready) |
@@ -147,7 +344,7 @@ atomic mcp logout <server> [-l]
147
344
  Configure and check MCP servers and sign in to OAuth servers without starting a session. These commands read `~/.atomic/agent/mcp.json` and, in trusted projects, `.atomic/mcp.json`, without loading extensions.
148
345
 
149
346
  | Command | Description |
150
- |---|---|
347
+ | --- | --- |
151
348
  | `add <server>` | Add or replace a server entry in `mcp.json` |
152
349
  | `remove <server>` | Remove a server entry from `mcp.json` |
153
350
  | `list` | Connect to enabled servers and print state, tools, and errors (exits `1` on config or connection failure) |
@@ -155,7 +352,7 @@ Configure and check MCP servers and sign in to OAuth servers without starting a
155
352
  | `logout <server>` | Delete stored OAuth credentials for the server |
156
353
 
157
354
  | Option | Commands | Description |
158
- |---|---|---|
355
+ | --- | --- | --- |
159
356
  | `-l`, `--local` | `add`, `remove`, `login`, `logout` | Target `.atomic/mcp.json` in the current project instead of `~/.atomic/agent/mcp.json` |
160
357
  | `--url <url>` | `add` | Streamable HTTP server URL (instead of a stdio command) |
161
358
  | `--env <KEY=VALUE>` | `add` | Environment variable for a stdio server; repeatable |
@@ -184,7 +381,7 @@ atomic storage move-snapshot-chunks <sqlite-file> [--prefix <prefix>]
184
381
  atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]
185
382
  atomic storage export <dir> [--sessions] [--limit <n>] [--since <time>] [--storage <json> | --storage-file <path>]
186
383
  atomic storage import <dir> [--sessions] [--storage <json> | --storage-file <path>]
187
- atomic team join <url> [--token-file <path>] [--prefix <prefix>] # Share Intercom; sessions stay local
384
+ atomic team join <url> [--token-file <path>] [--prefix <prefix>] # Share Intercom (libSQL/Turso); sessions stay local
188
385
  atomic team status [--json] # Profile in effect plus the storage report
189
386
  atomic team leave # Remove what team join wrote
190
387
  atomic intercom status # This machine's Intercom broker and multi-node state
@@ -194,24 +391,24 @@ atomic intercom upgrade # Replace a
194
391
 
195
392
  `atomic storage status` reports the selected storage for sessions and Intercom, where each selection came from (environment variable, project settings, global settings, or default), any outranked selections, whether each adapter loads, and whether each database answers `SELECT 1`. It also shows the running Intercom broker, its multi-node routing state, and peer brokers live in the shared database. It modifies nothing and exits `1` if a selection is invalid, an adapter fails to load, or a database does not answer.
196
393
 
197
- `atomic storage join` verifies the credential and connection with `@bastani/atomic-storage-libsql` (for libSQL or Turso) or `@bastani/atomic-storage-postgres` (for `postgres://` or `postgresql://`), writes only the global `storage` setting, and reports any environment variables or settings that override it. It creates no tables and prints the install command if the adapter package is missing.
394
+ `atomic storage join` verifies the credential and connection (`SELECT 1` with a 15-second timeout) using `@bastani/atomic-storage-libsql` (for libSQL or Turso) or `@bastani/atomic-storage-postgres` (for `postgres://` or `postgresql://`), writes only the global `storage` setting, and reports any environment variables or settings that override it. It creates no tables and prints the install command if the adapter package is missing.
198
395
 
199
396
  - For libSQL, `--token-file` is required except for absolute `file:` URLs. Atomic copies the trimmed token into a new `storage-token.<id>` file (mode `600`) in the agent directory without overwriting earlier token files. Relative `file:` URLs and URLs carrying embedded credentials or `authToken` parameters are rejected.
200
397
  - For PostgreSQL, pass exactly one of `--password-file` (copied to a mode `600` `storage-token.<id>` file), `--token-file` (referenced in place and re-read on every new connection), or `--auth azure|aws|gcp`. Passwords in the URL are rejected, and settings store only file references.
201
398
 
202
- `atomic team join` runs the same validation and token handling as `atomic storage join`, writes global `storage` (the team database) and `sessions.storage` (local default store) together, restarts the Intercom broker, and prints the profile and storage status. Nothing is written if validation fails.
399
+ `atomic team join` supports **libSQL and Turso** databases (`--token-file` and `--prefix`; PostgreSQL `--password-file` and `--auth` options are only for `atomic storage join`). It runs the same validation and token handling, writes global `storage` (the team database) and `sessions.storage` (local default store) together, restarts the Intercom broker, and prints the profile and storage status. Nothing is written if validation fails.
203
400
 
204
401
  `atomic team status` adds the active profile (`individual`, `team`, `ci`, or `custom`) and project Intercom group. `atomic team leave` reverts only what `team join` wrote, deletes its token file unless another setting references it, and restarts the broker. See [Team and CI setup](/guides/team-setup).
205
402
 
206
- `atomic storage migrate` creates or upgrades session and Intercom tables in the selected shared database (or `--db`). Run it as the database owner after joining or upgrading Atomic so runtime-only roles do not need DDL privileges.
403
+ `atomic storage migrate` creates or upgrades session and Intercom tables in the selected shared database (or `--db`). Run it as the database owner after joining or upgrading Atomic so runtime-only roles do not need schema-creation privileges (DDL).
207
404
 
208
405
  `atomic storage move-snapshot-chunks <sqlite-file> [--prefix <prefix>]` migrates the snapshot chunk table in a closed local SQLite file using exclusive access, checkpointing after each batch so the write-ahead log does not need space for the entire copy.
209
406
 
210
407
  `atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]` searches entries of a stored session in a local SQLite database by regex pattern, optionally resuming pagination from `cursor`. See [Recalling earlier work](/sessions#recalling-earlier-work).
211
408
 
212
- `atomic storage export` writes sessions to `<dir>/sessions/<sessionId>.jsonl` (format 4, read by `atomic --import`). Each file is replaced whole; identical files are skipped and no files are deleted. `--limit <n>` exports at most `n` most recently modified sessions, and `--since <time>` filters by modification date or timestamp.
409
+ `atomic storage export` writes sessions to `<dir>/sessions/<sessionId>.jsonl` (compatible with `atomic --import`). Each file is replaced whole; identical files are skipped and no files are deleted. `--limit <n>` exports at most `n` most recently modified sessions, and `--since <time>` filters by modification date or timestamp. Exporting a shared libSQL or PostgreSQL database requires `--storage` or `--storage-file` explicitly.
213
410
 
214
- `atomic storage import` validates every file in `<dir>/sessions` before writing, then adds new sessions and newer entries for existing sessions while ignoring other directories. Partial failures list what was and was not written so you can rerun safely. Both `export` and `import` accept `--sessions`, plus `--storage <json>` or `--storage-file <path>` to target a specific store (required when exporting or importing a shared database).
411
+ `atomic storage import` validates every file in `<dir>/sessions` before writing, then adds new sessions and newer entries for existing sessions while ignoring other directories. Partial failures list what was and was not written so you can rerun safely. Both `export` and `import` accept `--sessions`, plus `--storage <json>` or `--storage-file <path>` to target a specific store.
215
412
 
216
413
  `atomic intercom restart` stops the running broker, waits for it to exit, and waits for a reconnecting session to start a new broker (printing its status). Without connected sessions, the next session that uses Intercom starts one.
217
414
 
@@ -223,227 +420,32 @@ See [Joining a machine to a shared database](/storage#joining-a-machine-to-a-sha
223
420
 
224
421
  ```bash
225
422
  atomic blueprint cache-key [dir] [--format text|json|github-output] # Cache keys and paths for a runner's cache action
226
- atomic blueprint prebuild [dir] [--park] [--approve] # Build the repository ahead of time
423
+ atomic blueprint prebuild [dir] [--park] [--approve|-a] # Build the repository ahead of time
227
424
  ```
228
425
 
229
- Top-level `atomic --help` lists both `atomic blueprint cache-key` and `atomic blueprint prebuild`.
230
-
231
426
  `atomic blueprint cache-key` prints cache entries for the repository at `dir` (default: current directory). It reports `stores` (lockfile-detected package stores for npm, pnpm, Yarn, Bun, Cargo, uv, pip, Poetry, Go, Gradle, and Maven, plus [`resume.cache`](/settings#resume) store paths), `build` (`resume.cache` build paths and seed manifest), `git` (Atomic's Git object store), and `atomic` (extension transpile cache).
232
427
 
233
- Each entry includes a key, restore prefix, and paths. `--format github-output` outputs `<name>-key`, `<name>-restore-prefix`, and `<name>-paths` lines for `$GITHUB_OUTPUT`. Paths that might hold credentials are omitted with a stderr warning. See [Caches for runners](/guides/resume-on-any-machine#caches-for-runners).
234
-
235
- `atomic blueprint prebuild` restores the committed `HEAD` of `dir` into a new restored worktree, runs its `initialize` and `maintenance` blueprints, and leaves the worktree idle for the next resume to claim. `--park` moves `"build"` paths from `resume.cache` into the seed directory saved by the `build` cache entry.
236
-
237
- Because `prebuild` executes project code, the project must be trusted or `--approve` must be passed. It prints restore and step timings on stderr and exits `1` if the project is untrusted, the checkout has no remote or has uncommitted changes to tracked files, or a step fails (keeping earlier worktrees and seeds). See [Caches for runners](/guides/resume-on-any-machine#caches-for-runners) and [Prebuilt worktrees](/guides/resume-on-any-machine#prebuilt-worktrees).
238
-
239
- ## Modes
240
-
241
- | Flag | Description |
242
- |------|-------------|
243
- | default | Interactive mode (fullscreen TUI) |
244
- | `-p`, `--print` | Print response and exit |
245
- | `--mode json` | Output all events as JSON lines; see [JSON mode](/json) |
246
- | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](/rpc) |
247
- | `--export <in> [out]` | Export a session to HTML |
248
-
249
- Interactive sessions run fullscreen with a scrolling transcript above the docked editor and status area. Scrolling, scrollbar dragging, and text selection remain available outside overlays.
250
-
251
- Adjust **Fullscreen wheel scroll lines** in `/settings`, or set `fullscreenWheelScrollLines` to `"auto"` or a number from 1 to 100. This applies to the main transcript, fullscreen tool views, and `/tasks` transcripts.
252
-
253
- Text selection copies automatically unless `fullscreenCopyOnSelect` is `false`. Ctrl+X does not copy: followed by Ctrl+K it stops all background work (see [Keybindings](/keybindings#navigation)), and the scoped-model selector uses it to clear selections. `/copy` copies the last assistant message.
254
-
255
- On exit, `fullscreenExitOutput: "transcript"` prints the final transcript and resume hint. `"resume-hint"` restores the previous screen and prints only the hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
256
-
257
- In print mode, Atomic reads piped stdin and merges it into the initial prompt:
258
-
259
- ```bash
260
- cat README.md | atomic -p "Summarize this text"
261
- ```
262
-
263
- Once piped input starts arriving, Atomic waits until EOF. If a pipe sends nothing at all within 2 seconds, a run with a prompt argument or `@file` starts without stdin and warns if bytes arrive later. A run with no prompt argument keeps waiting and notes that on stderr. Set `ATOMIC_STDIN_TIMEOUT_MS` to adjust the wait, or `0` to always wait for piped EOF.
264
-
265
- When a print-mode turn finishes by calling an opt-in terminating structured-output tool created with `createStructuredOutputTool` (such as `final_decision`), Atomic exits after that tool result without an extra assistant turn. Print-mode stdout holds the terminating JSON payload, while SDK callers also receive it through their capture sink, tool `details`, or configured file sink. Non-terminating tool results are not printed as the final response.
266
-
267
- ## Model options
268
-
269
- | Option | Description |
270
- |--------|-------------|
271
- | `--provider <name>` | Provider to search for `--model`, such as `anthropic`, `openai`, or `google`; requires `--model` |
272
- | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>`. If several providers match, Atomic prefers the one with credentials; otherwise it asks for `--provider` |
273
- | `--api-key <key>` | API key, overriding environment variables. Does not disambiguate providers that share a model |
274
- | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`; model capability mapping still governs availability |
275
- | `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling. A model offered by several providers is added for each, with a warning |
276
- | `--fallback-models <models>` | Comma-separated `provider/model[:thinking]` IDs this run may fall back to in order after a failure that [`fallbackModels`](/settings#fallbackmodels) handles. Replaces that setting for this run |
277
- | `--no-fallback` | Never fall back to another model in this run. Cannot be combined with `--fallback-models` |
278
- | `--list-models [search]` | List available models |
279
-
280
- A model selected with `--model` runs strictly as named and falls back only to `--fallback-models`, ignoring global and project `fallbackModels` settings. In interactive mode this holds for the whole process, even after `/model`, Ctrl+P, `/new`, or `/resume`. Start Atomic without `--model` to use settings fallbacks.
281
-
282
- Child sessions running on the main session's model inherit the same fallback chain. In print mode, fallbacks print `Model fallback: <model> failed, continuing on <fallback>: <reason>` to stderr, and answers from a fallback end with `Model: ran on <fallback>, not the requested <model>.`. Failed runs print `Model <model> failed: <reason>`.
283
-
284
- ## Session options
285
-
286
- | Option | Description |
287
- |--------|-------------|
288
- | `-c`, `--continue` | Continue the most recent session for the current directory |
289
- | `-r`, `--resume` | Browse and select a session |
290
- | `--session <id\|prefix>` | Use an exact ID or unique 8-hex UUID prefix in its working directory. If it matches only another directory, Atomic offers to fork it here. Exits `75` if another live process holds the session open ([When the session is already open](/guides/resume-on-any-machine#when-the-session-is-already-open)) |
291
- | `--import <file>` | Import a format-4 JSONL export into session storage |
292
- | `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
293
- | `--fork <id\|prefix>` | Fork an exact ID or unique 8-hex UUID prefix into a new session in the current directory |
294
- | `--session-dir <dir>` | Select JSONL session storage and lookup directory |
295
- | `--session-store <path>` | Select a SQLite session database; relative paths resolve from the working directory |
296
- | `--session-prefix <prefix>` | Use a non-default table prefix with `--session-store` |
297
- | `--name <name>`, `-n <name>` | Set the session display name |
298
- | `--no-session` | No resumable session; [released history may use disk](/sessions) |
299
- | `--storage <json>` | Select shared storage for this process in the JSON form of the `storage` setting; never saved. See [Selecting storage per process](/storage#selecting-storage-per-process) |
300
- | `--storage-file <path>` | Read the `--storage` selection from a JSON file; cannot be combined with `--storage` |
301
-
302
- See [Choosing a store](/sessions#choosing-a-store) for precedence, prefix rules, and conflicts.
303
-
304
- ## Tool options
305
-
306
- | Option | Description |
307
- |--------|-------------|
308
- | `--tools <list>`, `-t <list>` | Allowlist tool names or `*` patterns, or modify defaults with only `+name`/`-name` entries; an allowlist keeps MCP tools unless an entry starts with `mcp__` |
309
- | `--exclude-tools <list>`, `-xt <list>` | Exclude tool names or `*` patterns, including MCP tools and Intercom |
310
- | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension and custom tools enabled |
311
- | `--no-tools`, `-nt` | Disable every tool, including Intercom, even with `--tools` |
312
-
313
- Default built-in tools: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, `codemode`, plus `powershell` on native Windows when a PowerShell executable is available. `atomic --help` lists `kill` and `codemode` alongside the other built-in tools. `ls` remains available but is off by default.
314
-
315
- `defaultTools` selects initial coding tools without narrowing extension or custom tools. `--tools` sets an explicit allowlist, and `--exclude-tools` subtracts from it. `--no-builtin-tools` suppresses coding defaults when no allowlist is given. Bundled Intercom stays loaded with `--no-extensions`, but its tool follows allowlists, exclusions, and `--no-tools` like other extension tools.
316
-
317
- To remove [codemode](/tools#codemode) or add [tool search](/tools#tool_search) alongside defaults, pass `atomic --tools -codemode,+tool_search` for one run or set `"defaultTools": ["-codemode", "+tool_search"]`. `atomic --tools +codemode,-write` keeps the other defaults and disables `write`.
318
-
319
- Modifier entries take exact names (not `*` patterns) and cannot be mixed with plain allowlist entries; use `--exclude-tools` for pattern exclusions. On `/reload`, CLI modifiers still apply to the reloaded `defaultTools` setting. Modifiers do not narrow extension tools or filter MCP exposure, and `--no-tools` disables every tool.
320
-
321
- ### MCP tools
322
-
323
- `--tools read,codemode` keeps non-hidden MCP tools with `codemode` or `deferred` exposure callable from codemode scripts. MCP tools unmatched by the allowlist are not declared directly, regardless of exposure. Unmatched direct-exposure tools stay registered but inactive. Only an enabled `tool_search` can load unmatched non-direct tools.
324
-
325
- An entry starting with `mcp__` filters MCP tools too. For example, `atomic --tools read,codemode,'mcp__docs__*'` keeps only tools from the `docs` server. MCP resource tools count as MCP tools, and exclusions apply to both server and resource tools. Use `--no-mcp` to disable built-in MCP connections and resources.
326
-
327
- ## Project trust options
328
-
329
- | Option | Description |
330
- |--------|-------------|
331
- | `--approve`, `-a` | Trust project-local files and resources for this run |
332
- | `--no-approve`, `-na` | Ignore project-local files and resources for this run |
333
-
334
- Project trust gates `.atomic` and legacy `.pi` project resources, project package settings, project-local context files, and `.agents` resources discovered from the project tree. Manage saved trust decisions with `/trust`; see [Security](/security).
428
+ Each entry includes a key, restore prefix, and paths. `--format github-output` (or `--format=github-output`) outputs `<name>-key`, `<name>-restore-prefix`, and `<name>-paths` lines for `$GITHUB_OUTPUT`. Paths that might hold credentials are omitted with a stderr warning. See [Caches for runners](/guides/resume-on-any-machine#caches-for-runners).
335
429
 
336
- ## Resource options
430
+ `atomic blueprint prebuild` restores the committed `HEAD` of `dir` (only committed files; untracked or ignored files such as `.env` are not copied) into a new restored worktree, runs its `initialize` and `maintenance` blueprints, and leaves the worktree idle for the next resume to claim. `--park` moves `"build"` paths from `resume.cache` into the seed directory saved by the `build` cache entry.
337
431
 
338
- | Option | Description |
339
- |--------|-------------|
340
- | `-e`, `--extension <source>` | Load an extension from a path, npm, or git; repeatable |
341
- | `--no-extensions`, `-ne` | Disable optional extension discovery; mandatory bundled Intercom remains loaded |
342
- | `--no-mcp` | Disable built-in MCP support for this run, even when explicitly enabled; replacement extensions are unaffected |
343
- | `--skill <path>` | Load a skill; repeatable |
344
- | `--no-skills`, `-ns` | Disable skill discovery |
345
- | `--prompt-template <path>` | Load a prompt template; repeatable |
346
- | `--no-prompt-templates`, `-np` | Disable prompt template discovery |
347
- | `--theme <path>` | Load a theme; repeatable |
348
- | `--no-themes` | Disable theme discovery |
349
- | `--no-context-files`, `-nc` | Disable context-file discovery and loading |
350
-
351
- Combine `--no-*` with explicit flags to load only what you specify, ignoring settings:
352
-
353
- ```bash
354
- atomic --no-extensions -e ./my-extension.ts
355
- ```
356
-
357
- ## Other options
358
-
359
- | Option | Description |
360
- |--------|-------------|
361
- | `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
362
- | `--append-system-prompt <text>` | Append text or file contents to the system prompt; repeatable |
363
- | `--use-theme <name[/name]>` | Set the interactive theme for this run without saving it; see [Themes](/themes#initial-theme) |
364
- | `--offline` | Disable automatic network activity, including update checks, package updates, telemetry, and model catalog refreshes |
365
- | `--debug` | Turn on [debug mode](/development#debugging) for this run, the same as `ATOMIC_DEBUG=1` |
366
- | `--verbose` | Force verbose startup |
367
- | `-h`, `--help` | Show help |
368
- | `-v`, `--version` | Show version |
369
-
370
- ## File arguments
432
+ Because `prebuild` executes project code, the project must be trusted or `--approve` (`-a`) must be passed. It prints restore and step timings on stderr, exits `2` on usage errors, and exits `1` if the project is untrusted, the checkout has no remote or has uncommitted changes to tracked files, or a step fails (keeping earlier worktrees and seeds). See [Caches for runners](/guides/resume-on-any-machine#caches-for-runners) and [Prebuilt worktrees](/guides/resume-on-any-machine#prebuilt-worktrees).
371
433
 
372
- Prefix files with `@` to include them in the message:
373
-
374
- ```bash
375
- atomic @prompt.md "Answer this"
376
- atomic -p @screenshot.png "What's in this image?"
377
- atomic @code.ts @test.ts "Review these files"
378
- ```
379
-
380
- ## Examples
381
-
382
- ```bash
383
- # Interactive with initial prompt
384
- atomic "List all .ts files in src/"
385
-
386
- # Non-interactive
387
- atomic -p "Summarize this codebase"
388
-
389
- # Non-interactive with piped stdin
390
- cat README.md | atomic -p "Summarize this text"
391
-
392
- # Different model
393
- atomic --provider openai --model gpt-4o "Help me refactor"
394
-
395
- # Model with provider prefix
396
- atomic --model openai/gpt-4o "Help me refactor"
397
-
398
- # Model with thinking level shorthand
399
- atomic --model sonnet:high "Solve this complex problem"
434
+ ## Environment variables
400
435
 
401
- # Limit model cycling
402
- atomic --models "claude-*,gpt-4o"
436
+ See [Environment variables](/environment-variables) for the complete registry, exact boolean parsing rules, legacy `PI_*` aliases, color controls, and diagnostic knobs. Key CLI variables:
403
437
 
404
- # Read-only mode
405
- atomic --tools read,search,find,ls -p "Review the code"
406
- ```
438
+ - **Config & storage:** `ATOMIC_CODING_AGENT_DIR`, `ATOMIC_CODING_AGENT_SESSION_DIR`, `ATOMIC_STORAGE`, `ATOMIC_SESSIONS_STORAGE`, `ATOMIC_PROFILE` + `ATOMIC_TEAM_*` ([Team and CI setup](/guides/team-setup#ci-and-swarms)), `ATOMIC_PACKAGE_DIR`.
439
+ - **Network & updates:** `ATOMIC_OFFLINE`, `ATOMIC_SKIP_VERSION_CHECK`, `ATOMIC_SELF_UPDATE_COMMAND` ([Custom update command](#custom-update-command)), `ATOMIC_TELEMETRY`, `ATOMIC_CACHE_RETENTION` ([Prompt-cache retention](/environment-variables#prompt-cache-retention)).
440
+ - **Interactive & shell:** `NO_COLOR`, `FORCE_COLOR`, `ATOMIC_REDUCED_MOTION`, `ATOMIC_DEBUG`, `ATOMIC_NO_PTY`, `ATOMIC_STDIN_TIMEOUT_MS`, `VISUAL` / `EDITOR`, `AI_AGENT` (set to `atomic` on Atomic and its child processes).
407
441
 
408
- ## Environment variables
442
+ Every `bash` and `powershell` tool call receives an execution-time snapshot of the active session (captured when the command runs, so resumed sessions, subagents, and model changes stay accurate). See [Background tasks](/background-tasks#choose-how-long-to-wait) for observation wait limits.
409
443
 
410
- See [Environment variables](/environment-variables) for the complete registry of Atomic variables, legacy `PI_*` aliases, provider keys, and diagnostic variables. The table below lists the main CLI and runtime variables:
411
-
412
- | Variable | Description |
413
- |----------|-------------|
414
- | `AI_AGENT` | Set to `atomic` by the CLI, RPC, and compiled binary entry points and in every Atomic-owned child process so tools can identify Atomic processes |
415
- | `ATOMIC_CODING_AGENT_DIR` | Override config directory; default is `~/.atomic/agent`. Bundled Intercom files live under its `intercom/` subdirectory |
416
- | `ATOMIC_CODING_AGENT_SESSION_DIR` | Select JSONL session directory; overridden by `--session-dir` |
417
- | `ATOMIC_STORAGE` | Shared storage selection JSON for sessions and Intercom; `--storage` takes precedence |
418
- | `ATOMIC_SESSIONS_STORAGE` | Session-only storage selection JSON; cannot be combined with `ATOMIC_CODING_AGENT_SESSION_DIR` |
419
- | `ATOMIC_PROFILE` | `ci`: use the team database from `ATOMIC_TEAM_*` for sessions and Intercom without settings ([Team and CI setup](/guides/team-setup#ci-and-swarms)) |
420
- | `ATOMIC_TEAM_URL`, `ATOMIC_TEAM_TOKEN`, `ATOMIC_TEAM_TOKEN_FILE`, `ATOMIC_TEAM_PREFIX` | Team database connection settings for `ATOMIC_PROFILE=ci` (`ATOMIC_TEAM_TOKEN` and `ATOMIC_TEAM_TOKEN_FILE` cannot be combined) |
421
- | `ATOMIC_PACKAGE_DIR` | Override package directory, useful for Nix or Guix store paths |
422
- | `ATOMIC_SELF_UPDATE_COMMAND` | Command `atomic update` runs to update Atomic itself (`{packageName}`, `{version}`, `{installSpec}`). See [Custom update command](#custom-update-command) |
423
- | `ATOMIC_SHARE_VIEWER_URL` | Base URL for `/share` links; default `https://bastani.ai/session/` |
424
- | `ATOMIC_REDUCED_MOTION` | Set to `1` to skip startup animation and keep the working `∀` static while elapsed time still updates |
425
- | `ATOMIC_OFFLINE` | Disable automatic network activity, including update checks, package updates, telemetry, and model catalog refreshes |
426
- | `ATOMIC_DEBUG` | Set to `1` to turn on [debug mode](/development#debugging), the same as `--debug` |
427
- | `ATOMIC_SKIP_VERSION_CHECK` | Skip the startup version update check |
428
- | `ATOMIC_STDIN_TIMEOUT_MS` | Milliseconds a print-mode run waits for piped stdin before starting with a prompt argument; default `2000`, max `2147483647`, `0` waits until EOF |
429
- | `ATOMIC_TELEMETRY` | Override version-adoption pings: `1`/`true`/`yes` or `0`/`false`/`no` (does not disable update checks) |
430
- | `NODE_COMPILE_CACHE` | Override Node's persistent compile cache directory (enabled automatically on Node 22.8+; set `NODE_DISABLE_COMPILE_CACHE=1` to opt out) |
431
- | `ATOMIC_CACHE_RETENTION` | Prompt-cache retention: `long` (default), `short`, or `none`, subject to provider and model support. See [Prompt-cache retention](/environment-variables#prompt-cache-retention) |
432
- | `ATOMIC_OAUTH_CALLBACK_HOST` | Bind host for the local OAuth callback server during `/login`; default `127.0.0.1` |
433
- | `ATOMIC_NO_PTY` | Set to `1` to disable PTY allocation for `bash` and `powershell` tools |
434
- | `VISUAL`, `EDITOR` | External editor for Ctrl+G |
435
-
436
- Every bash execution receives one execution-time snapshot of the active session. Foreground/background observation controls how long the caller waits, not the command's execution timeout. Omitted `wait` uses the owner's policy, normally yielding after 10 seconds; explicit background observation requires a supported task owner. Without one, foreground execution waits until completion. See [Background tasks](/background-tasks#choose-how-long-to-wait).
437
-
438
- | Atomic variable | Exact compatibility alias | Value |
439
- |-----------------|---------------------------|-------|
444
+ | Atomic variable | Legacy alias | Value |
445
+ | --- | --- | --- |
440
446
  | `ATOMIC_SESSION_ID` | `PI_SESSION_ID` | Active session ID |
441
447
  | `ATOMIC_PROVIDER` | `PI_PROVIDER` | Active model provider; omitted when no model is selected |
442
448
  | `ATOMIC_MODEL` | `PI_MODEL` | Active model ID; omitted when no model is selected |
443
449
  | `ATOMIC_REASONING_LEVEL` | `PI_REASONING_LEVEL` | Active reasoning level |
444
450
 
445
- The snapshot is taken when the command executes, not when the tool is created, so resumed sessions, isolated sessions, model changes, and concurrent sessions never reuse stale metadata. Atomic preserves all unrelated inherited and caller-supplied environment variables.
446
-
447
- Before overlaying the eight current snapshot values above, Atomic clears those eight names plus the two retired session-file variables (ten reserved names in total; see [Bash and PowerShell session environment](/environment-variables#bash-and-powershell-session-environment) for the retired names). Factory-created bash tools expose the same metadata by default and accept `exposeSessionEnvironment: false` to omit it.
448
-
449
- Many app-specific `ATOMIC_*` variables also accept legacy `PI_*` aliases, while storage, team, and newer Atomic-only variables such as `ATOMIC_REDUCED_MOTION` do not; see [Environment variables](/environment-variables) for the exact alias of each variable. Intercom's default broker starter works across Node installs, Bun checkouts, and standalone binaries without needing `npx`, `tsx`, or `bun` on `PATH`.
451
+ Atomic clears those eight names plus the two retired session-file names before setting the current snapshot; see [Bash and PowerShell session environment](/environment-variables#bash-and-powershell-session-environment).