@bastani/atomic 0.9.19-alpha.5 → 0.9.19-alpha.7

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 (209) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/README.md +2 -2
  3. package/dist/builtin/intercom/CHANGELOG.md +6 -0
  4. package/dist/builtin/intercom/broker/client.ts +19 -1
  5. package/dist/builtin/intercom/index.bundle.mjs +8 -1
  6. package/dist/builtin/intercom/package.json +1 -1
  7. package/dist/builtin/mcp/package.json +1 -1
  8. package/dist/builtin/subagents/CHANGELOG.md +6 -0
  9. package/dist/builtin/subagents/README.md +3 -1
  10. package/dist/builtin/subagents/agents/codebase-online-researcher.md +7 -7
  11. package/dist/builtin/subagents/package.json +1 -1
  12. package/dist/builtin/subagents/skills/subagent/SKILL.md +3 -1
  13. package/dist/builtin/subagents/src/extension/index.bundle.mjs +2 -1
  14. package/dist/builtin/web-access/CHANGELOG.md +13 -0
  15. package/dist/builtin/web-access/README.md +31 -24
  16. package/dist/builtin/web-access/index.bundle.mjs +16121 -80
  17. package/dist/builtin/web-access/package.json +2 -1
  18. package/dist/builtin/workflows/CHANGELOG.md +15 -0
  19. package/dist/builtin/workflows/README.md +1 -1
  20. package/dist/builtin/workflows/builtin/adversarial-verification.js +2 -2
  21. package/dist/builtin/workflows/builtin/{chunk-vhmnzdj9.js → chunk-1jth021m.js} +1 -1
  22. package/dist/builtin/workflows/builtin/{chunk-p8jjwfg6.js → chunk-2377r57g.js} +4 -2
  23. package/dist/builtin/workflows/builtin/{chunk-hbnwv56f.js → chunk-31j2gs7h.js} +2 -2
  24. package/dist/builtin/workflows/builtin/{chunk-n8zysf1t.js → chunk-ngkqkzej.js} +1 -1
  25. package/dist/builtin/workflows/builtin/{chunk-1nbq96fh.js → chunk-nkrafh9s.js} +1 -1
  26. package/dist/builtin/workflows/builtin/{chunk-1kx4aggw.js → chunk-wf741bv3.js} +2 -2
  27. package/dist/builtin/workflows/builtin/{chunk-t6x2d78s.js → chunk-z29qbehr.js} +1 -1
  28. package/dist/builtin/workflows/builtin/generate-and-filter.js +2 -2
  29. package/dist/builtin/workflows/builtin/goal.js +3 -3
  30. package/dist/builtin/workflows/builtin/index.js +7 -7
  31. package/dist/builtin/workflows/builtin/ralph.js +3 -3
  32. package/dist/builtin/workflows/builtin/tournament.js +2 -2
  33. package/dist/builtin/workflows/package.json +1 -1
  34. package/dist/builtin/workflows/src/extension/index.bundle.mjs +339 -31
  35. package/dist/builtin/workflows/src/index.js +67 -19
  36. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +2 -0
  37. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  38. package/dist/core/agent-session-tool-registry.js +10 -0
  39. package/dist/core/agent-session-tool-registry.js.map +1 -1
  40. package/dist/core/bash-executor.js.map +1 -1
  41. package/dist/core/tools/bash.d.ts +1 -1
  42. package/dist/core/tools/bash.d.ts.map +1 -1
  43. package/dist/core/tools/bash.js +3 -2
  44. package/dist/core/tools/bash.js.map +1 -1
  45. package/dist/core/tools/edit.d.ts +3 -0
  46. package/dist/core/tools/edit.d.ts.map +1 -1
  47. package/dist/core/tools/edit.js +91 -12
  48. package/dist/core/tools/edit.js.map +1 -1
  49. package/dist/core/tools/file-mutation-coordinator.d.ts +255 -0
  50. package/dist/core/tools/file-mutation-coordinator.d.ts.map +1 -0
  51. package/dist/core/tools/file-mutation-coordinator.js +300 -0
  52. package/dist/core/tools/file-mutation-coordinator.js.map +1 -0
  53. package/dist/core/tools/file-mutation-queue.d.ts +14 -1
  54. package/dist/core/tools/file-mutation-queue.d.ts.map +1 -1
  55. package/dist/core/tools/file-mutation-queue.js +15 -3
  56. package/dist/core/tools/file-mutation-queue.js.map +1 -1
  57. package/dist/core/tools/hashline.d.ts +9 -0
  58. package/dist/core/tools/hashline.d.ts.map +1 -1
  59. package/dist/core/tools/hashline.js +12 -1
  60. package/dist/core/tools/hashline.js.map +1 -1
  61. package/dist/core/tools/index.d.ts +9 -1
  62. package/dist/core/tools/index.d.ts.map +1 -1
  63. package/dist/core/tools/index.js +67 -12
  64. package/dist/core/tools/index.js.map +1 -1
  65. package/dist/core/tools/non-minting-snapshot-store.d.ts +49 -0
  66. package/dist/core/tools/non-minting-snapshot-store.d.ts.map +1 -0
  67. package/dist/core/tools/non-minting-snapshot-store.js +64 -0
  68. package/dist/core/tools/non-minting-snapshot-store.js.map +1 -0
  69. package/dist/core/tools/powershell.d.ts +2 -2
  70. package/dist/core/tools/powershell.d.ts.map +1 -1
  71. package/dist/core/tools/powershell.js +2 -5
  72. package/dist/core/tools/powershell.js.map +1 -1
  73. package/dist/core/tools/read-document-extract.js.map +1 -1
  74. package/dist/core/tools/render-utils.js.map +1 -1
  75. package/dist/core/tools/write.d.ts +30 -1
  76. package/dist/core/tools/write.d.ts.map +1 -1
  77. package/dist/core/tools/write.js +97 -8
  78. package/dist/core/tools/write.js.map +1 -1
  79. package/dist/index.d.ts +1 -1
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js.map +1 -1
  82. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  83. package/dist/modes/interactive/components/task-live-transcript.d.ts +1 -1
  84. package/dist/modes/interactive/components/task-live-transcript.d.ts.map +1 -1
  85. package/dist/modes/interactive/components/task-live-transcript.js +19 -11
  86. package/dist/modes/interactive/components/task-live-transcript.js.map +1 -1
  87. package/dist/modes/interactive/interactive-mode-base.d.ts +1 -0
  88. package/dist/modes/interactive/interactive-mode-base.d.ts.map +1 -1
  89. package/dist/modes/interactive/interactive-mode-base.js +3 -1
  90. package/dist/modes/interactive/interactive-mode-base.js.map +1 -1
  91. package/dist/modes/interactive/interactive-mode-surface.d.ts +1 -1
  92. package/dist/modes/interactive/interactive-mode-surface.d.ts.map +1 -1
  93. package/dist/modes/interactive/interactive-mode-surface.js.map +1 -1
  94. package/dist/modes/interactive/interactive-render-chat.js +28 -4
  95. package/dist/modes/interactive/interactive-render-chat.js.map +1 -1
  96. package/dist/modes/interactive/interactive-startup.d.ts.map +1 -1
  97. package/dist/modes/interactive/interactive-startup.js +3 -0
  98. package/dist/modes/interactive/interactive-startup.js.map +1 -1
  99. package/dist/modes/interactive-engine/activity-watchdog.d.ts +2 -2
  100. package/dist/modes/interactive-engine/activity-watchdog.d.ts.map +1 -1
  101. package/dist/modes/interactive-engine/activity-watchdog.js.map +1 -1
  102. package/dist/modes/interactive-engine/engine-diagnostic-view.d.ts +3 -1
  103. package/dist/modes/interactive-engine/engine-diagnostic-view.d.ts.map +1 -1
  104. package/dist/modes/interactive-engine/engine-diagnostic-view.js +11 -0
  105. package/dist/modes/interactive-engine/engine-diagnostic-view.js.map +1 -1
  106. package/dist/modes/interactive-engine/isolated-runtime.js +2 -1
  107. package/dist/modes/interactive-engine/isolated-runtime.js.map +1 -1
  108. package/dist/modes/rpc/rpc-client-process.d.ts +2 -0
  109. package/dist/modes/rpc/rpc-client-process.d.ts.map +1 -1
  110. package/dist/modes/rpc/rpc-client-process.js +23 -1
  111. package/dist/modes/rpc/rpc-client-process.js.map +1 -1
  112. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  113. package/dist/modes/rpc/rpc-client.js +20 -3
  114. package/dist/modes/rpc/rpc-client.js.map +1 -1
  115. package/dist/utils/markit.d.ts +2 -0
  116. package/dist/utils/markit.d.ts.map +1 -1
  117. package/dist/utils/markit.js +65 -5
  118. package/dist/utils/markit.js.map +1 -1
  119. package/docs/background-tasks.md +15 -11
  120. package/docs/build.md +51 -0
  121. package/docs/changelog.mdx +8 -8
  122. package/docs/compaction/reference.md +267 -0
  123. package/docs/compaction.md +36 -219
  124. package/docs/computer-use.md +35 -0
  125. package/docs/containerization.md +9 -5
  126. package/docs/custom-provider/api-reference.md +145 -0
  127. package/docs/custom-provider/oauth.md +131 -0
  128. package/docs/custom-provider/override.md +34 -0
  129. package/docs/custom-provider/registration.md +163 -0
  130. package/docs/custom-provider/streaming.md +214 -0
  131. package/docs/custom-provider.md +43 -607
  132. package/docs/development.md +87 -0
  133. package/docs/docs.json +199 -76
  134. package/docs/environment-variables.md +1 -1
  135. package/docs/extensions/api-reference.md +1001 -0
  136. package/docs/extensions/authoring.md +676 -0
  137. package/docs/extensions/events.md +793 -0
  138. package/docs/extensions/examples.md +94 -0
  139. package/docs/extensions/ui.md +470 -0
  140. package/docs/extensions.md +270 -2768
  141. package/docs/getting-started/authentication.md +55 -0
  142. package/docs/getting-started/first-session.md +172 -0
  143. package/docs/getting-started/installation.md +154 -0
  144. package/docs/getting-started/project-instructions.md +43 -0
  145. package/docs/guides/configuration.md +65 -0
  146. package/docs/guides/intercom.md +24 -0
  147. package/docs/guides/non-interactive.md +33 -0
  148. package/docs/guides/subagents.md +24 -0
  149. package/docs/guides/workflows.md +27 -0
  150. package/docs/guides.md +41 -0
  151. package/docs/index.md +13 -45
  152. package/docs/intercom/operations.md +178 -0
  153. package/docs/intercom/reference.md +146 -0
  154. package/docs/intercom.md +54 -259
  155. package/docs/json.md +17 -0
  156. package/docs/llama-cpp.md +5 -0
  157. package/docs/models/artificial-analysis-index.md +89 -0
  158. package/docs/models/evals.md +2 -2
  159. package/docs/models/model-selection.md +3 -3
  160. package/docs/models/pareto-efficiency.md +2 -2
  161. package/docs/models/reference.md +601 -0
  162. package/docs/models.md +45 -550
  163. package/docs/packages/authoring.md +88 -0
  164. package/docs/packages/reference.md +43 -0
  165. package/docs/packages.md +28 -107
  166. package/docs/programmatic.md +29 -0
  167. package/docs/prompt-templates.md +11 -0
  168. package/docs/providers/reference.md +23 -0
  169. package/docs/providers.md +10 -15
  170. package/docs/quickstart.md +44 -238
  171. package/docs/reference/cli.md +252 -0
  172. package/docs/reference.md +52 -0
  173. package/docs/rpc/examples.md +64 -0
  174. package/docs/rpc/extension-ui.md +198 -0
  175. package/docs/rpc/protocol.md +1341 -0
  176. package/docs/rpc.md +109 -1346
  177. package/docs/sdk/reference.md +1090 -0
  178. package/docs/sdk.md +56 -1002
  179. package/docs/session-format.md +2 -0
  180. package/docs/sessions.md +6 -10
  181. package/docs/settings.md +6 -45
  182. package/docs/skills/authoring.md +95 -0
  183. package/docs/skills/reference.md +60 -0
  184. package/docs/skills.md +20 -122
  185. package/docs/subagents/authoring.md +37 -0
  186. package/docs/subagents/reference.md +60 -0
  187. package/docs/subagents.md +42 -96
  188. package/docs/terminal-setup.md +1 -1
  189. package/docs/themes/reference.md +176 -0
  190. package/docs/themes.md +21 -135
  191. package/docs/tmux.md +5 -0
  192. package/docs/tools/edit.md +5 -0
  193. package/docs/tools.md +31 -0
  194. package/docs/tui/reference.md +343 -0
  195. package/docs/tui.md +23 -286
  196. package/docs/usage.md +26 -209
  197. package/docs/web-access.md +40 -0
  198. package/docs/windows.md +2 -1
  199. package/docs/workflows/api-reference.md +11 -4
  200. package/docs/workflows/authoring.md +4 -2
  201. package/docs/workflows/builtins.md +2 -2
  202. package/docs/workflows/operations.md +11 -7
  203. package/docs/workflows/reliable-design.md +21 -3
  204. package/docs/workflows/verification.md +8 -0
  205. package/examples/extensions/gondolin/index.ts +116 -148
  206. package/examples/extensions/gondolin/package.json +1 -1
  207. package/examples/extensions/ssh.ts +56 -34
  208. package/npm-shrinkwrap.json +33 -33
  209. package/package.json +4 -4
@@ -1,7 +1,20 @@
1
1
  # Quickstart
2
2
 
3
+ **Outcome:** Atomic is installed, authenticated, and has completed one useful task in your repository.
4
+
3
5
  This page gets you from install to a useful first Atomic session. Atomic is the loop engine for all engineering work: it runs reliable coding-agent loops with stages, tools, artifacts, verification, subagents, review gates, checkpoints, and human approvals.
4
6
 
7
+ It is the ordered onboarding hub: each step below links to a focused page that carries the full detail. Work through them in order.
8
+
9
+ ## Onboarding path
10
+
11
+ 1. **[Install Atomic](/getting-started/installation)** — package manager or self-contained release archive.
12
+ 2. **[Authenticate](/getting-started/authentication)** — subscription login or API key.
13
+ 3. **[Run your first session](/getting-started/first-session)** — start Atomic, run a task, invoke a built-in workflow, and steer the run.
14
+ 4. **[Add project instructions](/getting-started/project-instructions)** — teach Atomic your repository's conventions with `AGENTS.md`.
15
+
16
+ Then come back here for [common things to try](#common-things-to-try) and [next steps](#next-steps).
17
+
5
18
  ## Prerequisites
6
19
 
7
20
  - **Package install:** Node.js 22.19 or newer plus npm, pnpm, Yarn, or Bun. Use Bun 1.4.2+ for Bun installs or workflow-authoring examples.
@@ -10,306 +23,97 @@ This page gets you from install to a useful first Atomic session. Atomic is the
10
23
 
11
24
  ## Install
12
25
 
13
- ### Package managers
14
-
15
- Install with npm:
16
-
17
- ```bash
18
- npm install -g @bastani/atomic
19
- ```
20
-
21
- With pnpm:
22
-
23
- ```bash
24
- pnpm add -g @bastani/atomic
25
- ```
26
+ The install commands and every installer knob, default path, and platform note now live on the installation page.
26
27
 
27
- With Bun:
28
+ Moved to [Installation](/getting-started/installation#install).
28
29
 
29
- ```bash
30
- bun add -g @bastani/atomic
31
- ```
30
+ ### Package managers
32
31
 
33
- Atomic does not require package install scripts. Add `--ignore-scripts` if you want to disable dependency lifecycle scripts during a package install.
32
+ Moved to [Installation](/getting-started/installation#package-managers).
34
33
 
35
- Embedded PostgreSQL is available without install scripts or a first-run download on Linux x64/ARM64 (glibc and musl), macOS x64/ARM64, and Windows x64/ARM64. npm-compatible package managers select the matching `@bastani/atomic-natives` leaf containing the runtime; standalone archives carry a target-selected runtime and resolve its binaries directly from the extracted installation. Keep the complete archive directory, including `node_modules`, libraries and licenses. Older upstream optional packages may also remain in npm installations for compatibility, but the native leaf takes precedence. Windows ARM64 uses Windows x64 PostgreSQL under Windows 11's x64 emulation, not native PostgreSQL ARM64, and requires the Microsoft Visual C++ x64 v14 Redistributable. Windows 10 on ARM cannot run this x64 runtime; Windows ARM64 execution still needs hardware validation.
34
+ Full detail: package manager commands and the `--ignore-scripts` note.
36
35
 
37
36
  ### Release archive
38
37
 
39
- Alternatively, install the self-contained release archive, which needs no Node.js or package manager.
40
-
41
- On macOS or Linux:
42
-
43
- ```bash
44
- curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh
45
- ```
46
-
47
- On Windows PowerShell:
48
-
49
- ```powershell
50
- irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1 | iex
51
- ```
52
-
53
- The installer downloads only the matching GitHub Release archive and `SHA256SUMS`, verifies the checksum, and keeps the complete payload in a versioned directory.
54
-
55
- On macOS or Linux, the default paths are `~/.local/share/atomic` for versioned payloads and `~/.local/bin/atomic` for the launcher. The installer prints a paste-safe `export PATH=...` command if needed.
56
-
57
- On Windows, the defaults are `%LOCALAPPDATA%\atomic` for payloads and `%LOCALAPPDATA%\atomic\bin\atomic.cmd` for the launcher. The installer updates the User PATH and current process, then asks you to restart the terminal.
38
+ Moved to [Installation](/getting-started/installation#release-archive).
58
39
 
59
- The installer accepts these environment variables:
40
+ Full detail: version pinning, `ATOMIC_VERSION`, `ATOMIC_INSTALL_DIR`, `ATOMIC_BIN_DIR`, `GITHUB_TOKEN`/`GH_TOKEN`, default paths, and PATH guidance.
60
41
 
61
42
  #### ATOMIC_VERSION
62
43
 
63
- Pin an exact release tag instead of the latest release, or pass a flag that overrides it. On macOS or Linux:
64
-
65
- ```bash
66
- curl -fsSL https://raw.githubusercontent.com/bastani-inc/atomic/main/install.sh | sh -s -- --ref 0.9.11
67
- ```
68
-
69
- On Windows PowerShell:
70
-
71
- ```powershell
72
- & ([scriptblock]::Create((irm https://raw.githubusercontent.com/bastani-inc/atomic/main/install.ps1))) -Ref 0.9.11
73
- ```
74
-
75
- Pins use Atomic's `MAJOR.MINOR.PATCH` or `MAJOR.MINOR.PATCH-alpha.REVISION` release tag form and are honored literally: if GitHub answers with a different release tag, the installer stops before downloading anything rather than installing a version you did not ask for.
44
+ Moved to [Installation](/getting-started/installation#atomic_version).
76
45
 
77
46
  #### ATOMIC_INSTALL_DIR
78
47
 
79
- Override the install root that holds the versioned payloads (default `~/.local/share/atomic` on macOS/Linux, `%LOCALAPPDATA%\atomic` on Windows). On macOS/Linux, a relative value resolves against the physical directory where the installer starts and is used exactly as given, including any trailing whitespace or newline. The install root cannot equal or sit inside the launcher path (`ATOMIC_BIN_DIR/atomic`); impossible layouts fail before any download or filesystem change.
48
+ Moved to [Installation](/getting-started/installation#atomic_install_dir).
80
49
 
81
50
  #### ATOMIC_BIN_DIR
82
51
 
83
- Override the launcher directory (default `~/.local/bin` on macOS/Linux, `%LOCALAPPDATA%\atomic\bin` on Windows). Relative values resolve the same way as `ATOMIC_INSTALL_DIR`. It cannot sit inside the install root's `current` or `versions` directories, which the installer replaces on every install. A Unix value containing `:` cannot be one PATH entry, so the installer prints direct-run guidance instead of editing PATH.
52
+ Moved to [Installation](/getting-started/installation#atomic_bin_dir).
84
53
 
85
54
  #### GITHUB_TOKEN / GH_TOKEN
86
55
 
87
- Optional; raises GitHub API limits on shared networks. Curl and GNU Wget keep the token in a protected temporary file instead of process arguments. BusyBox Wget remains supported without a token, and with a token when the latest-release redirect avoids the API; if an authenticated API fallback is needed, install curl or GNU Wget rather than exposing the token.
56
+ Moved to [Installation](/getting-started/installation#github_token-/-gh_token).
88
57
 
89
58
  ### Which runtime runs your workflows
90
59
 
91
- How you install Atomic decides which runtime hosts it: a package-manager install runs under Node, while the standalone binaries are Bun-compiled and run under Bun. Authored workflows execute inside whichever host is active, so a workflow that reaches for a `Bun.*` global runs only under the standalone binary and fails with `Bun is not defined` under an npm install. Installing Bun separately does not change that — the npm install still runs on Node. Write workflow code against APIs both hosts provide, such as `node:child_process` and `node:fs`; see [Custom Workflow Authoring](/workflows/authoring) for the rule and worked examples.
60
+ Moved to [Installation](/getting-started/installation#which-runtime-runs-your-workflows).
92
61
 
93
62
  ### Alpine and musl Linux archives
94
63
 
95
- The shell installer detects Alpine and selects `atomic-linux-x64-musl.tar.gz` or `atomic-linux-arm64-musl.tar.gz`. Each archive includes its matching native search and PTY bindings plus payload-local `libgcc` and `libstdc++` runtimes, so stock Alpine needs no runtime package install.
96
-
97
- Two features work differently on musl:
98
-
99
- - **Clipboard:** the musl archives omit a clipboard native binding because `@mariozechner/clipboard` 0.3.9 publishes metadata-only musl stubs without a `.node` payload; Atomic uses Linux clipboard commands and OSC52 fallback instead.
100
- - **Durable workflows:** the archives omit the glibc-linked `@embedded-postgres/*` binary packages and instead carry a checksum-pinned Alpine/musl PostgreSQL 18.6 runtime, so durable workflows provision offline without external Postgres or Docker. If no durable backend can be provisioned at all, Atomic still uses a loud non-durable in-memory fallback.
101
-
102
- Then start Atomic in the project directory you want it to work on:
103
-
104
- ```bash
105
- cd /path/to/project
106
- atomic
107
- ```
64
+ Moved to [Installation](/getting-started/installation#alpine-and-musl-linux-archives).
108
65
 
109
66
  ## Uninstall
110
67
 
111
- On macOS or Linux, for a default archive install, remove `~/.local/share/atomic` and the `~/.local/bin/atomic` link.
112
-
113
- On Windows, remove `%LOCALAPPDATA%\atomic`. If you set `ATOMIC_BIN_DIR`, also remove `atomic.cmd` and the `atomic-current` junction from that directory, then remove the directory from your User PATH.
68
+ Moved to [Installation](/getting-started/installation#uninstall).
114
69
 
115
- For a package install, remove the global package with the same package manager. With npm:
116
-
117
- ```bash
118
- npm uninstall -g @bastani/atomic
119
- ```
120
-
121
- With pnpm:
122
-
123
- ```bash
124
- pnpm remove -g @bastani/atomic
125
- ```
126
-
127
- With Bun:
128
-
129
- ```bash
130
- bun remove -g @bastani/atomic
131
- ```
132
-
133
- These commands remove the CLI only. User configuration, auth, sessions, and packages remain under `~/.atomic/agent/` unless you delete that directory yourself.
70
+ Full detail: removing the install root, the launcher, and the PATH entry on every platform.
134
71
 
135
72
  ## Authenticate
136
73
 
137
- Atomic can use subscription providers through `/login`, or API-key providers through environment variables or the auth file.
138
-
139
- ### Option 1: subscription login
74
+ Moved to [Authentication](/getting-started/authentication#authenticate).
140
75
 
141
- Start Atomic and run:
76
+ Full detail: `/login` subscription providers and API-key environment variables.
142
77
 
143
- ```text
144
- /login
145
- ```
78
+ ### Option 1: subscription login
146
79
 
147
- Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
80
+ Moved to [Authentication](/getting-started/authentication#option-1-subscription-login).
148
81
 
149
82
  ### Option 2: API key
150
83
 
151
- Set an API key before launching Atomic:
152
-
153
- ```bash
154
- export ANTHROPIC_API_KEY=sk-ant-...
155
- atomic
156
- ```
157
-
158
- You can also run `/login` and select an API-key provider to store the key in `~/.atomic/agent/auth.json`.
159
-
160
- See [Providers](/providers) for all supported providers, environment variables, and cloud-provider setup.
84
+ Moved to [Authentication](/getting-started/authentication#option-2-api-key).
161
85
 
162
86
  ## First session
163
87
 
164
- On a fresh install with no prior Atomic startup state, Atomic shows a one-time first-run explanation after any What's New notes and directly above the input box describing Atomic as a verifiable coding agent runtime for building and running agent workflows you can feel confident in. Returning users with prior startup state are marked onboarded automatically and continue directly into the normal chat UI; stored credentials by themselves do not skip the first-run explanation. The composer is the normal Atomic input from the start: type a message, run `/login` first if no provider is connected, or launch a workflow command without a special onboarding transition.
165
-
166
- Once Atomic starts, default to a workflow for non-trivial work and for requests with inherent structure plus a verifiable objective. Implementation, build, debugging, bug fixes, migrations, features, scoped multi-file edits, validation/review work, and loop-shaped requests are workflow candidates; reserve direct chat for tiny deterministic low-risk answers or edits where tracking clearly adds more overhead than value.
167
-
168
- Workflow-first is not builtin-only or monolithic. Atomic can discover and run named builtin, project, user, and package workflows; author a rich custom TypeScript `workflow({...})` inline; and compositionally import reusable workflow definitions—including builtins from `@bastani/atomic/workflows/builtin`—into parent workflows with `ctx.workflow(...)`. Nested children can nest again within `maxDepth`, so custom graphs can combine proven research, implementation, design, verification, and approval workflows instead of copying them. They can also classify and branch, dynamically fan out and synthesize artifacts, run adversarial repair cycles, tournament-rank candidates, and loop until checks pass with explicit bounds.
88
+ Moved to [First session](/getting-started/first-session#first-session-2).
169
89
 
170
- Atomic turns repeatable engineering loops into executable stages with inspectable evidence instead of relying on a markdown checklist the model may or may not follow.
90
+ Full detail: starting Atomic, the built-in workflows, monitoring and steering a run, top skills, creating a workflow in natural language, and the default tools and prompts.
171
91
 
172
92
  ### Try the built-in workflows
173
93
 
174
- Atomic ships with nine workflows you can run immediately. Use `/workflow list` to see them and `/workflow inputs <name>` to inspect their inputs in your environment.
175
-
176
- | Workflow | When to use | Example |
177
- |---|---|---|
178
- | `classify-and-act` | Route requests through structured classification and low-confidence human fallback. | `/workflow classify-and-act prompt="Triage and handle this request"` |
179
- | `fan-out-and-synthesize` | Partition independent slices, including repository-focused research, and synthesize their artifact evidence. | `/workflow fan-out-and-synthesize prompt="Map payment retries by subsystem and synthesize cited findings"` |
180
- | `adversarial-verification` | Challenge a candidate with fresh verifiers and bounded repair. | `/workflow adversarial-verification task="Verify the migration patch"` |
181
- | `generate-and-filter` | Generate, dedupe, filter, optionally judge, and shortlist candidates. | `/workflow generate-and-filter prompt="Propose names for the new command"` |
182
- | `tournament` | Compare whole solutions through balanced pairwise judging. | `/workflow tournament prompt="Design the retry strategy"` |
183
- | `loop-until-done` | Iterate with a durable ledger until completion or bound exhaustion. | `/workflow loop-until-done prompt="Repair failures until the test suite passes"` |
184
- | `goal` | Autonomous work that needs a durable ledger, bounded sub-agent orchestration, receipts, and reviewer-gated completion. | `/workflow goal objective="Update the CLI docs, add one example, and validate the docs build"` |
185
- | `ralph` | Research-first autonomous work with prompt refinement, delegated implementation, and iterative multi-model review. | `/workflow ralph prompt="Implement specs/rate-limit.md and validate burst traffic"` |
186
- | `open-claude-design` | UI and design-system work with one generated preview, one live review session, and export. | `/workflow open-claude-design prompt="Refresh the settings page hierarchy as a page"` |
187
-
188
- <p align="center"><img src="images/workflow-list.png" alt="Workflow List" width="600" /></p>
189
-
190
- Inputs are bare `key=value` tokens. Values are JSON-parsed when possible, so `count=5`, `flag=true`, and `prompt="multi word value"` preserve useful types. If you call `/workflow <name>` without required inputs, the TUI opens an inline picker; pass `--no-picker` to skip it. Goal and Ralph support `git_worktree_dir` only when you explicitly want a reusable worktree, and skip PR creation unless you set `create_pr=true` for the post-approval final stage.
191
-
192
- You can also launch workflows with **natural language** — describe the task in chat and ask Atomic to run a matching installed workflow or author a task-specific one:
193
-
194
- ```text
195
- Fan out repository research by subsystem, save cited findings as artifacts, and synthesize the evidence.
196
- ```
197
-
198
- ```text
199
- Create a worker → fresh verifier → reducer workflow that updates the CLI docs, runs the docs build, and repairs evidence-backed findings until it passes or reaches a bounded stop.
200
- ```
201
-
202
- ```text
203
- Use goal to update the CLI docs, include one example, run the docs build, and finish only when reviewers approve the evidence.
204
- ```
205
-
206
- ```text
207
- Use ralph to research and implement specs/rate-limit.md, then review and repair it within three loops.
208
- ```
209
-
210
- Atomic chooses a complete execution shape, fills inputs from the request, and confirms before launch. Use Goal when a durable ledger and receipt-backed reviewer gate fit the task. Use Ralph when the job benefits from a research-first implementation/review loop. For exact domain contracts that either builtin does not cover, author a custom graph with deterministic checks and bounded repairs.
94
+ Moved to [First session](/getting-started/first-session#try-the-built-in-workflows).
211
95
 
212
96
  ### Monitor and steer a run
213
97
 
214
- Named workflow runs execute in the background. After launch you get the full run id; user-facing workflow surfaces show that complete UUID. You can still type the full id or a unique short prefix to inspect, connect, pause, quit, or resume a run. Ambiguous prefixes are reported rather than selecting a run arbitrarily.
215
-
216
- ```text
217
- /workflow status <run-id> # inspect one run's progress
218
- /workflow status # list this session's active and terminal runs
219
- /workflow connect <run-id> # see agents working; chat with or steer each stage (F2 also opens latest)
220
- /workflow attach <run-id> <stage> # chat with one stage
221
- /workflow pause <run-id> # pause resumably
222
- /workflow resume <run-id> "go" # send a steer message and resume
223
- /workflow quit <run-id> # pause gracefully and keep the run resumable
224
- ```
225
-
226
- The below-editor `BACKGROUND` panel uses two lines per card at 80 columns and wider: the status glyph and full id are on the first line, and the workflow name plus mode/progress/elapsed metadata are on the second. Below 80 columns it collapses to a count-only line. In chat surfaces, a full id wraps onto continuation lines at narrow widths instead of being cut, and the surrounding border remains intact.
227
-
228
- Human-in-the-loop prompts (`ctx.ui.input`, `confirm`, `select`, `editor`) surface in the graph viewer, not as chat modals — connect to the run to answer them.
229
-
230
- Atomic also posts main-chat lifecycle notices when a run completes, fails, or awaits input. If you answer a workflow prompt in the graph or attached stage chat, the main chat receives a display-only answer summary for audit; it does not wake the model, enter LLM context, or answer later prompts. See [Workflow Operations](/workflows/operations) for the full run-control reference.
98
+ Moved to [First session](/getting-started/first-session#monitor-and-steer-a-run).
231
99
 
232
100
  ### Top skills to invoke directly
233
101
 
234
- Skills are reusable expert instructions. Trigger one with `/skill:<name>` followed by a request:
235
-
236
- | Skill | When to use | Example |
237
- |---|---|---|
238
- | `research-codebase` | Scoped research that writes a grounded artifact for one subsystem or question. | `/skill:research-codebase how the rate limiter works in src/middleware/` |
239
- | `create-spec` | Turn research into an implementation-ready plan. | `/skill:create-spec from research/docs/2026-03-rate-limit.md` |
240
- | `prompt-engineer` | Write, evaluate, migrate, or troubleshoot GPT and Claude prompts using separate model guides. | `/skill:prompt-engineer Draft a sharper repo-research prompt for payment retries end to end.` |
241
- | `tdd` | Test-first feature or bug work. | `/skill:tdd` |
242
- | `impeccable` | Critique or refine web/native frontend and product UI; includes detector hooks, framework-aware live review, and mount-failure recovery. | `/skill:impeccable` |
243
- | `playwright-cli` | Drive a real browser for end-to-end UI checks, screenshots, and reviewable proof videos. | `/skill:playwright-cli` |
244
- | `qlty` | Lint, auto-format, and measure code quality — complexity, duplication, and code smells — through one CLI across the repository's languages. | `/skill:qlty check this branch before I hand it off` |
245
- | `liteparse` | Pull text, tables, or values out of PDF, DOCX, PPTX, XLSX, and image files locally. | `/skill:liteparse` |
246
- | `show-me` | Explain a topic visually with concise diagrams, code-shape sketches, or focused HTML artifacts. HumanLayer, MIT licensed. | `/skill:show-me` |
247
-
248
- Impeccable 4.1.1 resolves Live sessions to the selected app root, supports SvelteKit, Nuxt, TanStack Start, Astro, Next.js, Vite, and static HTML injection, and rejects absolute, traversing, or symlinked configured write targets. Its concept roll may contact `impeccable.style`; set `IMPECCABLE_NO_TELEMETRY=1` or `DO_NOT_TRACK=1` to disable the anonymous choice ping. The image fallback runs only with `OPENAI_API_KEY`, sends prompts and optional reference images to OpenAI, and spends that account's API credit. Generated image prompts are embedded in the image or a sidecar, so do not include secrets.
249
-
250
- Use `/skill:research-codebase` for a focused subsystem or question. For repository-wide research, use `fan-out-and-synthesize` with distinct repository partitions and an artifact synthesis barrier. Use Goal for ledger-backed bounded orchestration and Ralph for research-first delegated implementation with iterative review; task size alone does not select either workflow.
102
+ Moved to [First session](/getting-started/first-session#top-skills-to-invoke-directly).
251
103
 
252
104
  ### Create your own workflow in natural language
253
105
 
254
- Named workflows may be builtin, project, user, or package supplied. You do not have to hand-write TypeScript to add a new workflow. Describe what you want in plain chat and Atomic will design and write it for you using [Builtins and Dynamic Workflows](/workflows/builtins) and the [Custom Workflow Authoring](/workflows/authoring) reference as its source of truth:
255
-
256
- ```text
257
- Create a reusable Atomic workflow called review-changes. It takes one
258
- required text input `target` (a diff, PR, or review focus). Run two reviewers
259
- in parallel with fresh context — one for correctness and missing tests, one
260
- for edge cases and maintainability — then a synthesis stage that
261
- consolidates findings into blockers vs. suggestions and returns
262
- { consolidated_review, decision }.
263
- ```
264
-
265
- Atomic will:
266
-
267
- - ask clarifying questions if stage purpose, inputs, models, or handoffs are ambiguous,
268
- - write a `.atomic/workflows/<name>.ts` definition that uses `workflow({ ... })` and imports `Type` from `typebox`,
269
- - run `/workflow reload` so the generated workflow is rediscovered and can be launched with `/workflow <name>`,
270
- - then report the generated workflow folder so you can inspect the code it wrote, using `Custom workflow created. You can inspect its code at: <workflow-folder-path>` (for example, `.atomic/workflows/`); Atomic does this only for newly created custom workflows, never builtin or pre-existing workflows.
271
-
272
- The same plain-chat approach works for editing or hardening an existing workflow. For the full authoring reference, see [Custom Workflow Authoring](/workflows/authoring), including composition with user-defined workflows and all nine builtins from `@bastani/atomic/workflows/builtin`.
106
+ Moved to [First session](/getting-started/first-session#create-your-own-workflow-in-natural-language).
273
107
 
274
108
  ### Default tools and prompts
275
109
 
276
- If you'd rather start with a plain prompt, just type a request and press Enter:
277
-
278
- ```text
279
- Summarize this repository and tell me how to run its checks.
280
- ```
281
-
282
- By default, Atomic gives the model these tools:
283
-
284
- - `read` - read files
285
- - `bash` - run shell commands
286
- - `edit` - patch files
287
- - `write` - create or overwrite files
288
- - `find` - discover files by glob pattern
289
- - `search` - search file contents
290
- - `ask_user_question` - ask structured questions in the TUI
291
- - `todo` - manage file-based todos
292
-
293
- Normal coding sessions include file discovery and content search through `find` and `search` in addition to `read`, `bash`, `edit`, and `write`. Atomic runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
110
+ Moved to [First session](/getting-started/first-session#default-tools-and-prompts).
294
111
 
295
112
  ## Give Atomic project instructions
296
113
 
297
- Atomic loads context files at startup. Add an `AGENTS.md` file to tell it how to work in a project:
298
-
299
- ```markdown
300
- # Project Instructions
301
-
302
- - Run `bun run typecheck` after code changes.
303
- - Do not run production migrations locally.
304
- - Keep responses concise.
305
- ```
306
-
307
- Atomic loads:
308
-
309
- - `~/.atomic/agent/AGENTS.override.md`, `AGENTS.md`, or `CLAUDE.md` for global instructions (legacy `~/.pi/agent/` also works)
310
- - `AGENTS.override.md`, `AGENTS.md`, or `CLAUDE.md` from parent directories and the current directory
114
+ Moved to [Project instructions](/getting-started/project-instructions#give-atomic-project-instructions).
311
115
 
312
- An `AGENTS.override.md` file replaces the other context files in its directory. Restart Atomic, or run `/reload`, after changing context files.
116
+ Full detail: `AGENTS.md` discovery, precedence, and what to put in it.
313
117
 
314
118
  ## Common things to try
315
119
 
@@ -372,5 +176,7 @@ Use `--mode json` for JSON event output or `--mode rpc` for process integration.
372
176
  - [Settings](/settings) - global and project configuration.
373
177
  - [Keybindings](/keybindings) - shortcuts and customization.
374
178
  - [Atomic Packages](/packages) - install shared extensions, skills, prompts, and themes.
179
+ - [Security](/security) - project trust, what Atomic is allowed to touch, and how to report a vulnerability. Read this before you trust a project or install someone else's skills, extensions, or packages.
180
+ - [Containerization](/containerization) - run Atomic or its tools inside an isolated environment.
375
181
 
376
182
  Platform notes: [Windows](/windows), [Termux](/termux), [tmux](/tmux), [Terminal setup](/terminal-setup), [Shell aliases](/shell-aliases).
@@ -0,0 +1,252 @@
1
+ ---
2
+ title: CLI reference
3
+ description: Every Atomic command, flag, argument, and environment variable.
4
+ ---
5
+
6
+ # CLI reference
7
+
8
+ ```bash
9
+ atomic [options] [@files...] [messages...]
10
+ ```
11
+
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:
13
+
14
+ ```bash
15
+ atomic --print -- "- leading-dash prompt"
16
+ ```
17
+
18
+ ## Package Commands
19
+
20
+ ```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 --extension <src> # Update one package
30
+ atomic list # List installed packages
31
+ atomic config # Enable/disable package resources
32
+ ```
33
+
34
+ These commands manage Atomic packages and `atomic update` can update the Atomic CLI installation. To uninstall Atomic itself, see [Quickstart](/getting-started/installation#uninstall). `atomic config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command. `atomic update` never prompts for project trust.
35
+
36
+ See [Atomic Packages](/packages) for package sources and security notes.
37
+
38
+ ## Credential Commands
39
+
40
+ ```bash
41
+ atomic auth check [--provider <p>] [--model <model>] [--json] [--credentials] [--no-refresh]
42
+ atomic auth print-api-key --model <model> [--provider <p>]
43
+ atomic auth print-bearer-token --model <model> [--provider <p>] [--min-expiry <dur>]
44
+ ```
45
+
46
+ `atomic auth check` verifies the effective credential a provider or model would use before a session starts. It requires at least one of `--provider` or `--model`, prints `ready`, `not_ready`, or `invalid` to stdout, and exits `0`, `1`, or `2` for those states. `--json` adds the resolved provider when one is found, credential kind, and any reason. By default, a check never emits credential material.
47
+
48
+ `--credentials` is an explicit export opt-in. It requires `--provider` or an exact `--model` target; a fuzzy model match on an otherwise-ready provider is refused as `invalid` (exit `2`) rather than exporting a credential for a provider you did not name. If that provider is not ready, the check remains `not_ready` (exit `1`). On a ready check, plain stdout becomes the resolved credential alone and JSON adds it only in the `credentials` field. A non-ready raw export leaves stdout empty and reports its status on stderr; a JSON export returns the status object without a credential. Credential writes can also exit `8` (nothing written) or `9` (only a fragment written). Treat the stream like `print-api-key` or `print-bearer-token` output.
49
+
50
+ Checks refresh expired OAuth credentials by default, using Atomic's normal locked `auth.json` update path. Pass `--no-refresh` to read credentials without creating, locking, or mutating `auth.json`; this is useful when a probe must not change stored auth state. It still reads Atomic's primary and legacy credential paths and resolves configured API-key values, including `!command`, through the normal provider configuration. In this read-only mode, malformed `auth.json` is `invalid` (exit `2`) rather than an unavailable credential. An OAuth credential export requires at least 30 minutes of life: the normal path can refresh it, while `--no-refresh` refuses a shorter-lived token.
51
+
52
+ The credential commands print one configured credential for an external client — a proxy, a script, or another tool that needs the same key Atomic already holds. The credential goes to **stdout and nothing else**; warnings, provider selection, refresh notices, and help all go to stderr, so `KEY=$(atomic auth print-api-key --model gpt-5.5)` can never capture a diagnostic.
53
+
54
+ `--model` is required for the two `print-*` exports. An exporting auth check needs `--provider` or an exact `--model` target. When several configured providers offer a model, pass `--provider` to choose one. The two `print-*` subcommands accept only `--provider` and `--model`: any other flag — including `--export`, `--session-dir`, `--print`, and `--help` — is a usage error rather than a flag this path happens to ignore.
55
+
56
+ `atomic auth` on its own — and `atomic auth help`, `--help`, or `-h` — prints this usage on stderr and exits `0`. `atomic auth check --help` (or `-h`) does the same until a `--` terminator; after it, the flag is not help. Any other subcommand exits `1` and names all three valid commands. Help never uses stdout, so raw credential export stdout is a credential or empty; a JSON export writes an object that carries a credential only in its `credentials` field.
57
+
58
+ `print-bearer-token` works only on OAuth providers and `print-api-key` only on API-key providers; asking for the wrong kind is an error rather than a silent fallback. 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` are accepted. `--min-expiry` with `print-api-key` is a usage error — even after a `--` terminator — because an API key has no expiry. A failed refresh leaves your stored credential untouched.
59
+
60
+ Credential-export exits (`print-api-key`, `print-bearer-token`, and the `--credentials` write itself):
61
+
62
+ | Exit | Meaning |
63
+ |------|---------|
64
+ | `0` | Credential written to stdout, one trailing newline |
65
+ | `1` | Usage error |
66
+ | `2` | No credential configured for that model/provider |
67
+ | `3` | Several configured providers match — pass `--provider` |
68
+ | `4` | That credential kind is unsupported for the provider |
69
+ | `5` | OAuth refresh failed; the stored credential is unchanged |
70
+ | `6` | The provider cannot mint a token that lives as long as `--min-expiry` |
71
+ | `7` | The provider's OAuth credential could not be used — no claim is made about the stored credential |
72
+ | `8` | The credential could not be written; nothing was emitted |
73
+ | `9` | Only part of the credential was written; discard the output |
74
+
75
+ Auth-check exits:
76
+
77
+ | Exit | `atomic auth check` |
78
+ |------|---------------------|
79
+ | `0` | `ready` |
80
+ | `1` | `not_ready`, including a fuzzy `--model` with `--credentials` when its resolved provider is not ready |
81
+ | `2` | `invalid`, including check usage errors (unknown option, neither `--provider` nor `--model`, and a fuzzy `--model` with `--credentials` when its resolved provider is otherwise ready) |
82
+ | `8` | With `--credentials`, the credential could not be written; nothing was emitted |
83
+ | `9` | With `--credentials`, only part of the credential was written; discard the output |
84
+
85
+ Exit `5` is reported only for a refresh that itself failed, which happens before anything is persisted; that is the only exit that promises your stored credential is untouched. Any other OAuth failure exits `7` and makes no such promise.
86
+
87
+ For raw credential exports, stdout is empty on every non-zero exit but one. Once the credential reaches stdout the command has succeeded: if the stream then fails to drain — a reader that closed the pipe, for example — that is reported on stderr and the exit code stays `0`, because a non-zero exit here would contradict the bytes the caller already holds. The exception is exit `9`, which reports that only part of the credential was written before the stream failed; those bytes cannot be recalled, so stdout is not empty, and the output is a fragment to discard rather than a credential to use. `auth check --credentials --json` may instead write a credential-free JSON status object on a non-zero check result. See [Security](/security#credential-export) before wiring this into a script.
88
+
89
+ ## Modes
90
+
91
+ | Flag | Description |
92
+ |------|-------------|
93
+ | default | Interactive mode (fullscreen TUI) |
94
+ | `-p`, `--print` | Print response and exit |
95
+ | `--mode json` | Output all events as JSON lines; see [JSON mode](/json) |
96
+ | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](/rpc) |
97
+ | `--export <in> [out]` | Export a session to HTML |
98
+
99
+ Interactive sessions always use fullscreen: the transcript scrolls independently above a sticky dock containing the editor, status line, usage meter, extension widgets, and footer. Wheel and trackpad gestures go first to a focused workflow graph or stage chat overlay; events those overlays do not consume fall through to the alternate-screen viewport. Non-overlay focused components do not block pi-tui's mouse path, so transcript scrolling, scrollbar interaction, and drag selection still work. Selection copies automatically by default; disable `fullscreenCopyOnSelect` to highlight text without copying. Ctrl+X closes workflow tool detail to the graph, clears a scoped-model selection, returns stage chat to its graph, or returns a workflow graph to main chat. It does not copy. `/copy` always copies the last assistant message. The `fullscreenExitOutput` setting controls what exiting prints: `"transcript"` (the default) paints the final transcript plus a session resume hint on the main screen, while `"resume-hint"` restores the previous screen and prints only the resume hint. See [Settings](/settings) and [Terminal setup](/terminal-setup).
100
+
101
+ In print mode, Atomic also reads piped stdin and merges it into the initial prompt:
102
+
103
+ ```bash
104
+ cat README.md | atomic -p "Summarize this text"
105
+ ```
106
+
107
+ When a print-mode turn correctly finishes by calling an opt-in terminating structured-output tool created with `createStructuredOutputTool` (for example from an extension, SDK caller, or workflow item with a schema), Atomic ends after that tool result without an extra follow-up assistant turn. Print-mode stdout contains the terminating structured JSON payload, so `atomic -p` remains script-friendly while the same value is also available through the SDK `capture` sink, tool `details`, a configured file sink, or workflow `result.structured`. This also works for custom factory names such as `final_decision`. Non-terminating or unrelated tool results are not printed as the final response.
108
+
109
+ ## Model Options
110
+
111
+ | Option | Description |
112
+ |--------|-------------|
113
+ | `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
114
+ | `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
115
+ | `--api-key <key>` | API key, overriding environment variables |
116
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`; model capability mapping still governs availability |
117
+ | `--models <patterns>` | Comma-separated patterns for CTRL+P cycling |
118
+ | `--list-models [search]` | List available models |
119
+
120
+ ## Session Options
121
+
122
+ | Option | Description |
123
+ |--------|-------------|
124
+ | `-c`, `--continue` | Continue the most recent session |
125
+ | `-r`, `--resume` | Browse and select a session |
126
+ | `--session <path\|id>` | Use a specific session file or partial UUID |
127
+ | `--session-id <id>` | Use an exact project session ID; warn and create it when missing |
128
+ | `--fork <path\|id>` | Fork a session file or partial UUID into a new session |
129
+ | `--session-dir <dir>` | Custom session storage directory |
130
+ | `--name <name>`, `-n <name>` | Set the session display name |
131
+ | `--no-session` | Ephemeral mode; do not save |
132
+
133
+ ## Tool Options
134
+
135
+ | Option | Description |
136
+ |--------|-------------|
137
+ | `--tools <list>`, `-t <list>` | Allowlist specific built-in, extension, and custom tools; mandatory `intercom` remains available |
138
+ | `--exclude-tools <list>`, `-xt <list>` | Denylist specific built-in, extension, and custom tools; mandatory `intercom` cannot be excluded |
139
+ | `--no-builtin-tools`, `-nbt` | Disable built-in tools but keep extension/custom tools enabled |
140
+ | `--no-tools`, `-nt` | Disable every tool except mandatory `intercom` |
141
+
142
+ Default built-in tools: `read`, `bash`, `kill`, `edit`, `write`, `find`, `search`, `ask_user_question`, `todo`, plus `powershell` on native Windows when a PowerShell executable is available. `find.paths` accepts directories, files, or glob paths such as `*.ts` and honors `timeout`; `search` accepts `pattern`, optional `paths`, `i`, `gitignore`, and `skip` for regex content-search pagination. Use `--exclude-tools` to disable one or more non-mandatory tools while leaving the rest available, for example `atomic --exclude-tools ask_user_question`. The `defaultTools` setting selects which built-in tools a session starts with; `--tools` replaces that default with a strict allowlist over non-mandatory built-in, custom, and extension tools; `--no-builtin-tools` removes only built-ins; `--no-tools` removes every tool except ordinary bundled `intercom`. `ls` remains available as an SDK compatibility tool but is not enabled by default.
143
+
144
+ ## Project Trust Options
145
+
146
+ | Option | Description |
147
+ |--------|-------------|
148
+ | `--approve`, `-a` | Trust project-local files/resources for this run |
149
+ | `--no-approve`, `-na` | Ignore project-local files/resources for this run |
150
+
151
+ Project trust gates `.atomic`/legacy `.pi` project resources, project package settings, project-local context files, and `.agents/skills` discovered from the project tree. Saved trust decisions can be managed with `/trust`; see [Security](/security).
152
+
153
+ ## Resource Options
154
+
155
+ | Option | Description |
156
+ |--------|-------------|
157
+ | `-e`, `--extension <source>` | Load an extension from path, npm, or git; repeatable |
158
+ | `--no-extensions`, `-ne` | Disable optional extension discovery; mandatory bundled Intercom remains loaded |
159
+ | `--skill <path>` | Load a skill; repeatable |
160
+ | `--no-skills`, `-ns` | Disable skill discovery |
161
+ | `--prompt-template <path>` | Load a prompt template; repeatable |
162
+ | `--no-prompt-templates`, `-np` | Disable prompt template discovery |
163
+ | `--theme <path>` | Load a theme; repeatable |
164
+ | `--no-themes` | Disable theme discovery |
165
+ | `--no-context-files`, `-nc` | Disable context-file discovery and loading |
166
+
167
+ Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
168
+
169
+ ```bash
170
+ atomic --no-extensions -e ./my-extension.ts
171
+ ```
172
+
173
+ ## Other Options
174
+
175
+ | Option | Description |
176
+ |--------|-------------|
177
+ | `--system-prompt <text>` | Replace default prompt; context files and skills are still appended |
178
+ | `--append-system-prompt <text>` | Append to system prompt |
179
+ | `--use-theme <name[/name]>` | Set the interactive theme for this run without saving it; see [Themes](/themes#initial-theme) |
180
+ | `--offline` | Disable startup network operations, including update checks, package updates, and telemetry |
181
+ | `--verbose` | Force verbose startup |
182
+ | `-h`, `--help` | Show help |
183
+ | `-v`, `--version` | Show version |
184
+
185
+ ## File Arguments
186
+
187
+ Prefix files with `@` to include them in the message:
188
+
189
+ ```bash
190
+ atomic @prompt.md "Answer this"
191
+ atomic -p @screenshot.png "What's in this image?"
192
+ atomic @code.ts @test.ts "Review these files"
193
+ ```
194
+
195
+ ## Examples
196
+
197
+ ```bash
198
+ # Interactive with initial prompt
199
+ atomic "List all .ts files in src/"
200
+
201
+ # Non-interactive
202
+ atomic -p "Summarize this codebase"
203
+
204
+ # Non-interactive with piped stdin
205
+ cat README.md | atomic -p "Summarize this text"
206
+
207
+ # Different model
208
+ atomic --provider openai --model gpt-4o "Help me refactor"
209
+
210
+ # Model with provider prefix
211
+ atomic --model openai/gpt-4o "Help me refactor"
212
+
213
+ # Model with thinking level shorthand
214
+ atomic --model sonnet:high "Solve this complex problem"
215
+
216
+ # Limit model cycling
217
+ atomic --models "claude-*,gpt-4o"
218
+
219
+ # Read-only mode
220
+ atomic --tools read,search,find,ls -p "Review the code"
221
+ ```
222
+
223
+ ## Environment Variables
224
+
225
+ | Variable | Description |
226
+ |----------|-------------|
227
+ | `AI_AGENT` | Set to `atomic` by the CLI, RPC, and compiled binary entry points and in every Atomic-owned child-process environment so generic tooling can identify Atomic processes; child environments override caller-supplied values without mutating the caller's environment object |
228
+ | `ATOMIC_CODING_AGENT_DIR` | Override config directory; default is `~/.atomic/agent`. Bundled intercom runtime/config files live under its `intercom/` subdirectory |
229
+ | `ATOMIC_CODING_AGENT_SESSION_DIR` | Override session storage directory; overridden by `--session-dir` |
230
+ | `ATOMIC_PACKAGE_DIR` | Override package directory, useful for Nix/Guix store paths |
231
+ | `ATOMIC_REDUCED_MOTION` | Set to `1` to skip startup choreography and render the ordinary working identity as a static regular accent `∀` without a timer |
232
+ | `ATOMIC_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
233
+ | `ATOMIC_SKIP_VERSION_CHECK` | Skip the Atomic version update check at startup. This prevents the latest-version request |
234
+ | `ATOMIC_TELEMETRY` | Override install/update telemetry: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
235
+ | `NODE_COMPILE_CACHE` | Override the directory for Node's persistent compile cache, which Atomic enables automatically on Node >= 22.8 to speed up startup (most noticeable on Windows). Set `NODE_DISABLE_COMPILE_CACHE=1` to opt out |
236
+ | `PI_CACHE_RETENTION` | Provider/upstream-specific prompt-cache retention knob; set to `long` where supported |
237
+ | `ATOMIC_NO_PTY` | Set to `1` to disable PTY use for bash commands (`PI_NO_PTY` is a legacy alias) |
238
+ | `VISUAL`, `EDITOR` | External editor for CTRL+G |
239
+
240
+ 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).
241
+
242
+ | Atomic variable | Exact compatibility alias | Value |
243
+ |-----------------|---------------------------|-------|
244
+ | `ATOMIC_SESSION_ID` | `PI_SESSION_ID` | Active session ID |
245
+ | `ATOMIC_SESSION_FILE` | `PI_SESSION_FILE` | Active session JSONL path; omitted for unsaved sessions |
246
+ | `ATOMIC_PROVIDER` | `PI_PROVIDER` | Active model provider; omitted when no model is selected |
247
+ | `ATOMIC_MODEL` | `PI_MODEL` | Active model ID; omitted when no model is selected |
248
+ | `ATOMIC_REASONING_LEVEL` | `PI_REASONING_LEVEL` | Active reasoning level |
249
+
250
+ The snapshot is taken when the command executes, not when the tool is created, so resumed sessions, workflow stages, isolated sessions, model changes, and concurrent sessions cannot reuse stale metadata. Atomic preserves all unrelated inherited and caller-supplied environment variables; only the ten names above are cleared and overlaid. Factory-created bash tools expose the same metadata by default and can set `exposeSessionEnvironment: false` to omit it.
251
+
252
+ `PI_*` aliases are also supported for app-specific `ATOMIC_*` variables for legacy compatibility. For example, [Intercom](/intercom) honors `PI_CODING_AGENT_DIR` when `ATOMIC_CODING_AGENT_DIR` is unset and still reads legacy `~/.pi/agent/intercom/config.json` when the Atomic config is absent. `PI_CACHE_RETENTION` is not one of those aliases and has no `ATOMIC_*` equivalent. Use `PI_CACHE_RETENTION=long` when configuring prompt-cache retention for providers/upstreams that support long-lived caches. Intercom's default broker starter works across Node-based installs, Bun source checkouts, and standalone Atomic binaries without requiring `npx`, `tsx`, or `bun` to be present on `PATH`; custom broker commands remain explicit opt-in overrides.