@bastani/atomic 0.10.14-alpha.1 → 0.10.15-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/_shared/dist-KOELCESV.js +2 -2
- package/dist/_shared/fork-row-index-UAUAQRD5.js +2 -2
- package/dist/_shared/lib-4PES5P4V.js +2 -2
- package/dist/_shared/mode-interactive-sdk-7KXUFI2F.js +3 -3
- package/dist/_shared/mode-rpc-sdk-IOPGDYR4.js +3 -3
- package/dist/_shared/mode-shared-2QJSCUM6.js +3 -3
- package/dist/_shared/p1a-prewarm-XIU57JHF.js +3 -3
- package/dist/_shared/runtime-O4KCSG4C.js +2 -2
- package/dist/_shared/{sdk-B5LEWGGI.js → sdk-OHKMDJ74.js} +27 -5
- package/dist/_shared/{sdk-B5LEWGGI.js.map → sdk-OHKMDJ74.js.map} +1 -1
- package/dist/_shared/session-data-AHTU7IS6.js +2 -2
- package/dist/_shared/startup-0-0-Q3MWKUK4.js +2 -2
- package/dist/_shared/startup-0-1-M6OWAYHH.js +2 -2
- package/dist/_shared/{startup-0-2-5QHPCEON.js → startup-0-2-2HUMCPKX.js} +14 -16
- package/dist/_shared/startup-0-2-2HUMCPKX.js.map +1 -0
- package/dist/_shared/startup-0-3-4ZYBYQNM.js +3 -3
- package/dist/_shared/startup-0-4-ZMJV547D.js +3 -3
- package/dist/_shared/startup-0-5-YDW47QX6.js +3 -3
- package/dist/_shared/startup-10-0-TDQNBDDL.js +3 -3
- package/dist/_shared/startup-14-0-MLX36RBG.js +1 -1
- package/dist/_shared/startup-15-0-YUKGAC63.js +1 -1
- package/dist/_shared/startup-15-1-4S7FLMNG.js +6 -30
- package/dist/_shared/startup-15-1-4S7FLMNG.js.map +1 -1
- package/dist/_shared/startup-8-0-34CBHPZH.js +3 -3
- package/dist/_shared/startup-8-1-LZFXSD3Z.js +3 -3
- package/dist/_shared/storage-command-7MGXLJGZ.js +2 -2
- package/dist/_shared/storage-status-K7PX2RXA.js +3 -3
- package/dist/_shared/task-unsaved-answer-VJ2KTB4V.js +2 -2
- package/dist/_shared/tree-outline-MUEPK5B7.js +2 -2
- package/dist/builtin/intercom/index.bundle.mjs +1 -1
- package/dist/builtin/intercom/package.json +1 -1
- package/dist/builtin/mcp/index.bundle.mjs +1 -1
- package/dist/builtin/mcp/package.json +1 -1
- package/dist/builtin/subagents/package.json +1 -1
- package/dist/builtin/subagents/src/extension/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/index.bundle.mjs +1 -1
- package/dist/builtin/web-access/package.json +1 -1
- package/dist/cli/auth-cli.code.js +1 -1
- package/dist/cli/auth-cli.impl.js +3 -3
- package/dist/cli/auth-cli.js +3 -3
- package/dist/cli/blueprint-command.impl.js +3 -3
- package/dist/cli/blueprint-command.js +3 -3
- package/dist/cli/intercom-command.code.js +3 -3
- package/dist/cli/intercom-command.impl.js +3 -3
- package/dist/cli/intercom-command.js +3 -3
- package/dist/cli/list-models.impl.js +3 -3
- package/dist/cli/list-models.js +3 -3
- package/dist/cli/session-picker.code.js +1 -1
- package/dist/cli/session-picker.impl.js +3 -3
- package/dist/cli/session-picker.js +3 -3
- package/dist/cli/startup-ui.code.js +1 -1
- package/dist/cli/startup-ui.impl.js +3 -3
- package/dist/cli/startup-ui.js +3 -3
- package/dist/cli/storage-command.impl.js +3 -3
- package/dist/cli/storage-command.js +3 -3
- package/dist/cli/storage-search-session.code.js +1 -1
- package/dist/cli/storage-search-session.impl.js +3 -3
- package/dist/cli/storage-search-session.js +3 -3
- package/dist/cli/team-command.code.js +1 -1
- package/dist/cli/team-command.impl.js +3 -3
- package/dist/cli/team-command.js +3 -3
- package/dist/cli.js +2 -2
- package/dist/core/compaction/compactor.d.ts +0 -8
- package/dist/core/debug.impl.js +3 -3
- package/dist/core/debug.js +3 -3
- package/dist/core/export-html/card-projection.impl.js +3 -3
- package/dist/core/export-html/card-projection.js +3 -3
- package/dist/core/export-html/index.code.js +2 -2
- package/dist/core/export-html/index.impl.js +3 -3
- package/dist/core/export-html/index.js +3 -3
- package/dist/core/export-html/json-spans.impl.js +3 -3
- package/dist/core/export-html/json-spans.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.impl.js +3 -3
- package/dist/core/export-html/oversized-render-inputs.js +3 -3
- package/dist/core/export-html/tool-renderer.impl.js +3 -3
- package/dist/core/export-html/tool-renderer.js +3 -3
- package/dist/core/extensions/jiti-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-loader.js +3 -3
- package/dist/core/extensions/jiti-static-loader.impl.js +3 -3
- package/dist/core/extensions/jiti-static-loader.js +3 -3
- package/dist/core/extensions/loader-host-modules.impl.js +3 -3
- package/dist/core/extensions/loader-host-modules.js +3 -3
- package/dist/core/intercom-broker-control-host.code.js +1 -1
- package/dist/core/intercom-broker-control-host.impl.js +3 -3
- package/dist/core/intercom-broker-control-host.js +3 -3
- package/dist/core/intercom-broker-control.code.js +2 -2
- package/dist/core/intercom-broker-control.impl.js +3 -3
- package/dist/core/intercom-broker-control.js +3 -3
- package/dist/core/package-manager-storage-adapters.impl.js +3 -3
- package/dist/core/package-manager-storage-adapters.js +3 -3
- package/dist/core/sdk.code.js +1 -1
- package/dist/core/sdk.impl.js +3 -3
- package/dist/core/sdk.js +3 -3
- package/dist/core/session-manager-core.js +3 -3
- package/dist/core/session-manager-list.impl.js +3 -3
- package/dist/core/session-manager-list.js +3 -3
- package/dist/core/session-manager.impl.js +3 -3
- package/dist/core/session-manager.js +3 -3
- package/dist/core/session-storage.impl.js +3 -3
- package/dist/core/session-storage.js +3 -3
- package/dist/core/storage/index.js +2 -2
- package/dist/core/storage/node-sqlite-thread.js +2 -2
- package/dist/core/storage/node-sqlite.js +2 -2
- package/dist/core/storage/offline-snapshot-file.impl.js +3 -3
- package/dist/core/storage/offline-snapshot-file.js +3 -3
- package/dist/core/storage/provider.js +2 -2
- package/dist/core/storage/selection.js +2 -2
- package/dist/core/storage/session/branch-fork-source.code.js +2 -2
- package/dist/core/storage/session/branch-fork-source.impl.js +3 -3
- package/dist/core/storage/session/branch-fork-source.js +3 -3
- package/dist/core/storage/session/card-view.impl.js +3 -3
- package/dist/core/storage/session/card-view.js +3 -3
- package/dist/core/storage/session/child-reader.code.js +2 -2
- package/dist/core/storage/session/child-reader.impl.js +3 -3
- package/dist/core/storage/session/child-reader.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.impl.js +3 -3
- package/dist/core/storage/session/chunked-resume-projection.js +3 -3
- package/dist/core/storage/session/expanded-child-details.code.js +2 -2
- package/dist/core/storage/session/expanded-child-details.impl.js +3 -3
- package/dist/core/storage/session/expanded-child-details.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.impl.js +3 -3
- package/dist/core/storage/session/fork-row-bytes.js +3 -3
- package/dist/core/storage/session/fork-row-index.impl.js +3 -3
- package/dist/core/storage/session/fork-row-index.js +3 -3
- package/dist/core/storage/session/fork-staging.code.js +1 -1
- package/dist/core/storage/session/fork-staging.impl.js +3 -3
- package/dist/core/storage/session/fork-staging.js +3 -3
- package/dist/core/storage/session/fork-window.code.js +2 -2
- package/dist/core/storage/session/fork-window.impl.js +3 -3
- package/dist/core/storage/session/fork-window.js +3 -3
- package/dist/core/storage/session/history-pages.impl.js +3 -3
- package/dist/core/storage/session/history-pages.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.impl.js +3 -3
- package/dist/core/storage/session/jsonl-entry-projection.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.impl.js +3 -3
- package/dist/core/storage/session/jsonl-session-store.js +3 -3
- package/dist/core/storage/session/memory-session-store.impl.js +3 -3
- package/dist/core/storage/session/memory-session-store.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.code.js +2 -2
- package/dist/core/storage/session/pinned-branch-resume.impl.js +3 -3
- package/dist/core/storage/session/pinned-branch-resume.js +3 -3
- package/dist/core/storage/session/released-history-files.code.js +1 -1
- package/dist/core/storage/session/released-history-files.impl.js +3 -3
- package/dist/core/storage/session/released-history-files.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.impl.js +3 -3
- package/dist/core/storage/session/resident-fork-rows.js +3 -3
- package/dist/core/storage/session/session-resume.impl.js +3 -3
- package/dist/core/storage/session/session-resume.js +3 -3
- package/dist/core/storage/session/snapshot-cut.impl.js +3 -3
- package/dist/core/storage/session/snapshot-cut.js +3 -3
- package/dist/core/storage/session/snapshot-history.code.js +2 -2
- package/dist/core/storage/session/snapshot-history.impl.js +3 -3
- package/dist/core/storage/session/snapshot-history.js +3 -3
- package/dist/core/storage/session/sql-session-store.code.js +1 -1
- package/dist/core/storage/session/sql-session-store.impl.js +3 -3
- package/dist/core/storage/session/sql-session-store.js +3 -3
- package/dist/core/storage/session/tree-outline.impl.js +3 -3
- package/dist/core/storage/session/tree-outline.js +3 -3
- package/dist/core/storage/session/tree-presentation.impl.js +3 -3
- package/dist/core/storage/session/tree-presentation.js +3 -3
- package/dist/core/storage/storage-status.impl.js +3 -3
- package/dist/core/storage/storage-status.js +3 -3
- package/dist/core/storage/team.impl.js +3 -3
- package/dist/core/storage/team.js +3 -3
- package/dist/core/structured-output/index.code.js +1 -1
- package/dist/core/structured-output/index.impl.js +3 -3
- package/dist/core/structured-output/index.js +3 -3
- package/dist/core/tasks/task-completion-entry.impl.js +3 -3
- package/dist/core/tasks/task-completion-entry.js +3 -3
- package/dist/core/tasks/task-file-history.code.js +2 -2
- package/dist/core/tasks/task-file-history.impl.js +3 -3
- package/dist/core/tasks/task-file-history.js +3 -3
- package/dist/core/tasks/task-reference-archive.code.js +2 -2
- package/dist/core/tasks/task-reference-archive.js +3 -3
- package/dist/core/tasks/task-reference-identity.js +3 -3
- package/dist/core/tasks/task-reference-stream.impl.js +3 -3
- package/dist/core/tasks/task-reference-stream.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.impl.js +3 -3
- package/dist/core/tasks/task-unsaved-answer.js +3 -3
- package/dist/core/tasks/task-view-source.impl.js +3 -3
- package/dist/core/tasks/task-view-source.js +3 -3
- package/dist/core/tools/read-url.impl.js +3 -3
- package/dist/core/tools/read-url.js +3 -3
- package/dist/core/worktree-snapshot/blob-store.js +2 -2
- package/dist/core/worktree-snapshot/errors.code.js +1 -1
- package/dist/core/worktree-snapshot/errors.impl.js +3 -3
- package/dist/core/worktree-snapshot/errors.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.impl.js +3 -3
- package/dist/core/worktree-snapshot/session-index-reset.js +3 -3
- package/dist/extensions/codemode/execute.impl.js +3 -3
- package/dist/extensions/codemode/execute.js +3 -3
- package/dist/extensions/codemode/renderer.impl.js +3 -3
- package/dist/extensions/codemode/renderer.js +3 -3
- package/dist/extensions/mcp/cli.code.js +1 -1
- package/dist/extensions/mcp/cli.impl.js +3 -3
- package/dist/extensions/mcp/cli.js +3 -3
- package/dist/extensions/mcp/cli.lazy.code.js +2 -2
- package/dist/extensions/mcp/cli.lazy.impl.js +3 -3
- package/dist/extensions/mcp/cli.lazy.js +3 -3
- package/dist/extensions/mcp/runtime.code.js +1 -1
- package/dist/extensions/mcp/runtime.impl.js +3 -3
- package/dist/extensions/mcp/runtime.js +3 -3
- package/dist/index.d.ts +21 -1
- package/dist/index.js +2 -2
- package/dist/main-first-time-setup.code.js +1 -1
- package/dist/main-first-time-setup.impl.js +3 -3
- package/dist/main-first-time-setup.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.code.js +2 -2
- package/dist/modes/interactive/components/stored-tree-view.impl.js +3 -3
- package/dist/modes/interactive/components/stored-tree-view.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.impl.js +3 -3
- package/dist/modes/interactive/components/user-message-selector-archive.js +3 -3
- package/dist/modes/print-mode.js +1 -1
- package/dist/package-manager-cli.code.js +2 -2
- package/dist/package-manager-cli.impl.js +3 -3
- package/dist/package-manager-cli.js +3 -3
- package/dist/startup-files.json +1 -1
- package/dist/startup-stages/6.js +1 -1
- package/dist/utils/startup-database-spare.code.js +1 -1
- package/dist/utils/startup-database-spare.impl.js +3 -3
- package/dist/utils/startup-database-spare.js +3 -3
- package/dist/utils/tools-manager.impl.js +3 -3
- package/dist/utils/tools-manager.js +3 -3
- package/docs/background-tasks/reference.md +182 -0
- package/docs/background-tasks.md +98 -405
- package/docs/build.md +67 -27
- package/docs/changelog.mdx +9 -0
- package/docs/codemode.md +108 -39
- package/docs/compaction/branch-summaries.md +54 -0
- package/docs/compaction/custom-compactors.md +161 -0
- package/docs/compaction/memory-compaction.md +77 -0
- package/docs/compaction/reference.md +86 -38
- package/docs/compaction.md +51 -252
- package/docs/computer-use.md +169 -321
- package/docs/containerization.md +71 -57
- package/docs/custom-provider/api-reference.md +119 -25
- package/docs/custom-provider/oauth.md +114 -132
- package/docs/custom-provider/override.md +37 -27
- package/docs/custom-provider/registration.md +107 -83
- package/docs/custom-provider/streaming.md +85 -71
- package/docs/custom-provider.md +85 -52
- package/docs/development.md +39 -29
- package/docs/docs.json +76 -63
- package/docs/environment-variables.md +94 -44
- package/docs/extensions/api-reference.md +86 -43
- package/docs/extensions/authoring.md +162 -154
- package/docs/extensions/events.md +80 -25
- package/docs/extensions/examples.md +90 -85
- package/docs/extensions/ui.md +206 -82
- package/docs/extensions.md +79 -108
- package/docs/getting-started/authentication.md +67 -36
- package/docs/getting-started/first-session.md +53 -43
- package/docs/getting-started/installation.md +116 -89
- package/docs/getting-started/project-instructions.md +48 -34
- package/docs/guides/configuration.md +82 -20
- package/docs/guides/non-interactive.md +66 -24
- package/docs/guides/resume-on-any-machine.md +135 -82
- package/docs/guides/team-setup.md +114 -105
- package/docs/guides.md +76 -32
- package/docs/herdr.md +15 -16
- package/docs/how-atomic-works.md +140 -0
- package/docs/index.md +58 -44
- package/docs/intercom/operations.md +141 -151
- package/docs/intercom/reference.md +85 -108
- package/docs/intercom.md +84 -145
- package/docs/json.md +120 -67
- package/docs/keybindings.md +85 -49
- package/docs/libraries/agent-core.md +137 -275
- package/docs/libraries/ai.md +100 -84
- package/docs/libraries/codemode.md +210 -300
- package/docs/libraries/schema.md +59 -53
- package/docs/libraries/storage-postgres.md +49 -35
- package/docs/libraries/telemetry.md +153 -354
- package/docs/libraries/tui.md +265 -393
- package/docs/libraries.md +42 -26
- package/docs/llama-cpp.md +171 -161
- package/docs/mcp-servers.md +90 -51
- package/docs/models/choose-a-model.md +188 -0
- package/docs/models/reference.md +74 -30
- package/docs/models.md +153 -88
- package/docs/orchestration/migrating-workflows.md +23 -16
- package/docs/orchestration/patterns.md +39 -44
- package/docs/orchestration.md +65 -26
- package/docs/packages/authoring.md +51 -29
- package/docs/packages/reference.md +42 -21
- package/docs/packages.md +69 -58
- package/docs/programmatic.md +118 -24
- package/docs/prompt-templates.md +84 -83
- package/docs/providers/reference.md +43 -48
- package/docs/providers.md +219 -451
- package/docs/quickstart.md +140 -120
- package/docs/reference/cli.md +135 -97
- package/docs/reference.md +20 -18
- package/docs/rpc/examples.md +76 -20
- package/docs/rpc/extension-ui.md +64 -38
- package/docs/rpc/protocol.md +361 -110
- package/docs/rpc.md +57 -17
- package/docs/sdk/reference.md +409 -534
- package/docs/sdk/storage.md +53 -13
- package/docs/sdk/structured-decisions.md +82 -56
- package/docs/sdk/web-server.md +57 -43
- package/docs/sdk.md +106 -84
- package/docs/security.md +42 -64
- package/docs/session-format.md +62 -38
- package/docs/sessions.md +99 -214
- package/docs/settings.md +165 -195
- package/docs/shell-aliases.md +9 -6
- package/docs/skills/authoring.md +69 -48
- package/docs/skills/reference.md +51 -20
- package/docs/skills.md +99 -148
- package/docs/slash-commands.md +129 -0
- package/docs/storage/custom-adapters.md +160 -85
- package/docs/storage/jsonl.md +81 -66
- package/docs/storage/postgres/pgbouncer.md +120 -126
- package/docs/storage/postgres/tuning.md +120 -143
- package/docs/storage/postgres.md +314 -330
- package/docs/storage/sqlite.md +71 -42
- package/docs/storage.md +298 -302
- package/docs/subagents/authoring.md +55 -38
- package/docs/subagents/reference.md +73 -33
- package/docs/subagents.md +119 -187
- package/docs/terminal-setup.md +50 -38
- package/docs/termux.md +67 -41
- package/docs/themes/reference.md +23 -19
- package/docs/themes.md +142 -127
- package/docs/tmux.md +47 -55
- package/docs/tools.md +147 -109
- package/docs/tui/reference.md +166 -214
- package/docs/tui.md +196 -341
- package/docs/usage.md +118 -138
- package/docs/verification.md +79 -51
- package/docs/web-access.md +121 -101
- package/docs/windows.md +26 -27
- package/docs/worktree-snapshots/reference.md +245 -0
- package/docs/worktree-snapshots.md +71 -259
- package/package.json +8 -8
- package/dist/_shared/startup-0-2-5QHPCEON.js.map +0 -1
- package/docs/guides/intercom.md +0 -32
- package/docs/guides/orchestration.md +0 -28
- package/docs/guides/subagents.md +0 -37
package/docs/reference/cli.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "CLI reference"
|
|
3
3
|
sidebarTitle: "CLI"
|
|
4
|
-
description: "Commands, flags,
|
|
4
|
+
description: "Commands, flags, option-parsing rules, model matching, file arguments, subcommands, and exit codes for the atomic CLI."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
atomic [options] [@files...] [messages...]
|
|
8
|
+
atomic [options] [--] [@files...] [messages...]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Option parsing rules
|
|
@@ -17,20 +17,22 @@ atomic [options] [@files...] [messages...]
|
|
|
17
17
|
atomic --print -- "- leading-dash prompt"
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
- **Unknown flags
|
|
20
|
+
- **Unknown flags:** Unknown `--flags` are forwarded to loaded extensions; if no extension registers them, startup fails with `Error: Unknown option: --<name>`. Unknown single-dash options (such as `-x`) always fail immediately with `Error: Unknown option: -x` and are never forwarded to extensions.
|
|
21
|
+
- **Missing option values:** Passing a value-taking flag at the end of the command line without a value fails startup. `--mode`, `--name`, `--fallback-models`, `--use-theme`, `--session-dir`, `--session-store`, `--session-prefix`, `--storage`, and `--storage-file` print an explicit missing-value error; other value-taking built-in flags (such as `--model` or `-t`) fail with `Error: Unknown option`.
|
|
22
|
+
- **Validation and help:** 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. `atomic --help` loads extensions (including `-e` extensions) so extension-registered CLI flags appear in the help text.
|
|
21
23
|
|
|
22
24
|
## Modes
|
|
23
25
|
|
|
24
26
|
| Flag | Description |
|
|
25
27
|
| --- | --- |
|
|
26
28
|
| *(default)* | Interactive mode (fullscreen TUI) when both stdin and stdout are a TTY |
|
|
27
|
-
| `-p`, `--print` | Print response and exit (
|
|
29
|
+
| `-p`, `--print` | Print response and exit ([Run non-interactively](/guides/non-interactive)) |
|
|
28
30
|
| `--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
|
|
31
|
+
| `--export <in> [out]` | Export a session `.jsonl` file to HTML (defaults to `atomic-session-<stem>.html` in the current working directory), print `Exported to: <path>`, and exit `0` |
|
|
30
32
|
|
|
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
|
|
33
|
+
**`--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 disable interactive question prompts (`ask_user_question`).
|
|
32
34
|
|
|
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
|
|
35
|
+
**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 trims piped stdin and separates it from CLI prompt text or `@file` blocks with a blank line (`\n\n`) when adjacent text has no whitespace boundary:
|
|
34
36
|
|
|
35
37
|
```bash
|
|
36
38
|
cat README.md | atomic -p "Summarize this text"
|
|
@@ -38,24 +40,26 @@ cat README.md | atomic -p "Summarize this text"
|
|
|
38
40
|
|
|
39
41
|
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.
|
|
40
42
|
|
|
41
|
-
**Structured-output termination:** When a
|
|
43
|
+
**Structured-output termination:** When a tool configured to return a final structured JSON result completes during a print-mode turn (such as `final_decision`), Atomic exits immediately without another assistant turn and writes the JSON payload to stdout. Ordinary tool results are not printed as the final response. See [Structured decisions](/sdk/structured-decisions).
|
|
42
44
|
|
|
43
|
-
**
|
|
45
|
+
**HTML export rendering (`--export`):** When the exported branch contains a single subagent launch, `atomic --export` renders it as an `Agent(...)` card showing its prompt, tool calls, and final answer. Parallel launches and other extension tools keep their normal export format.
|
|
46
|
+
|
|
47
|
+
For fullscreen interactive display settings, mouse selection, and exit behavior, see [Use interactive mode](/usage), [Interface and display settings](/settings#interface-and-display), and [Keybindings](/keybindings#navigation).
|
|
44
48
|
|
|
45
49
|
## Model options
|
|
46
50
|
|
|
47
|
-
Configure provider logins and API keys in [Model providers](/providers), or add custom models and overrides in [Configure custom models](/models).
|
|
51
|
+
Configure provider logins and API keys in [Model providers](/providers), choose models daily in [Choose a model](/models/choose-a-model), or add custom models and overrides in [Configure custom models](/models).
|
|
48
52
|
|
|
49
53
|
| Option | Description |
|
|
50
54
|
| --- | --- |
|
|
51
55
|
| `--provider <name>` | Provider to search for `--model`, such as `anthropic`, `openai`, or `google`; requires `--model` |
|
|
52
56
|
| `--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 |
|
|
57
|
+
| `--api-key <key>` | API key overriding environment variables for this run. Requires a model to be specified via `--model`, `--provider`/`--model`, or `--models` (otherwise startup fails). Does not disambiguate providers that share a model |
|
|
54
58
|
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or `max`; model capability mapping still governs availability |
|
|
55
59
|
| `--models <patterns>` | Comma-separated patterns for scoped model cycling (`Ctrl+P`) and initial model scope |
|
|
56
60
|
| `--fallback-models <models>` | Comma-separated fallback models tried in order after retryable failures; replaces [`fallbackModels`](/settings#fallbackmodels) for this run |
|
|
57
61
|
| `--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 |
|
|
62
|
+
| `--list-models [search]` | List authenticated/available models sorted by provider then model ID as tab-separated columns (`model`, `level`, `context`, `max-out`, `images`) and exit. `level` shows the default startup thinking level (blank for non-reasoning models). Optional `[search]` fuzzy-matches provider, model ID, and display name |
|
|
59
63
|
|
|
60
64
|
### How `--model`, `--models`, and `--fallback-models` match models
|
|
61
65
|
|
|
@@ -84,32 +88,34 @@ In print mode, all fallback notices go to **stderr** (keeping stdout clean for s
|
|
|
84
88
|
|
|
85
89
|
| Option | Description |
|
|
86
90
|
| --- | --- |
|
|
87
|
-
| `-c`, `--continue` | Continue the most recent session for the current directory |
|
|
88
|
-
| `-r`, `--resume` | Browse and select a session |
|
|
91
|
+
| `-c`, `--continue` | Continue the most recent session for the current directory, or start a new session if none exists |
|
|
92
|
+
| `-r`, `--resume` | Browse and select a session (cancelling prints `No session selected` and exits `0`; renaming is available in interactive `/resume`, not in `atomic -r`) |
|
|
89
93
|
| `--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
94
|
| `--import <file>` | Import an exported JSONL session into session storage |
|
|
91
|
-
| `--session-id <id>` | Use an exact project session ID;
|
|
95
|
+
| `--session-id <id>` | Use an exact project session ID; warns and creates it when missing |
|
|
92
96
|
| `--fork <id\|prefix>` | Fork an exact ID or unique 8-hex UUID prefix into a new session in the current directory |
|
|
93
97
|
| `--session-dir <dir>` | Select JSONL session storage and lookup directory |
|
|
94
98
|
| `--session-store <path>` | Select a SQLite session database; relative paths resolve from the working directory |
|
|
95
99
|
| `--session-prefix <prefix>` | Use a non-default table prefix with `--session-store` |
|
|
96
100
|
| `--name <name>`, `-n <name>` | Set the session display name (rejects empty or whitespace-only values) |
|
|
97
101
|
| `--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
|
|
102
|
+
| `--storage <json>` | Select shared storage for this process in the JSON form of the `storage` setting; never saved ([Selecting storage per process](/storage#selecting-storage-per-process)) |
|
|
99
103
|
| `--storage-file <path>` | Read the `--storage` selection from a JSON file |
|
|
100
104
|
|
|
101
|
-
**
|
|
105
|
+
**Resolution, conflict, and validation rules:**
|
|
102
106
|
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
- `--session-id
|
|
106
|
-
-
|
|
107
|
-
- `--session-
|
|
108
|
-
- `--
|
|
109
|
-
- `--
|
|
110
|
-
-
|
|
107
|
+
- **Prefix disambiguation:** When an 8-hex prefix passed to `--session` or `--fork` matches both a regular session and internal subagent sessions launched around the same time, Atomic prefers non-internal sessions.
|
|
108
|
+
- **Missing recorded directory:** Resuming a session whose recorded working directory no longer exists prompts in interactive mode to continue in the current directory or fork into it, and exits `1` in non-interactive modes.
|
|
109
|
+
- **`--fork` with `--session-id`:** `--fork <src>` can be combined with `--session-id <new-id>` to assign an explicit ID to the forked session (exiting `1` if that ID already exists in the current directory). `--no-session` also accepts `--session-id`.
|
|
110
|
+
- **Flag conflicts:**
|
|
111
|
+
- `--import` cannot combine with `--session`, `--fork`, `--session-id`, `--continue`, or `--resume` (it can combine with `--no-session` or `--session-dir`).
|
|
112
|
+
- `--fork` cannot combine with `--session`, `--continue`, `--resume`, or `--no-session`.
|
|
113
|
+
- `--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 `-`.
|
|
114
|
+
- `--session-store` cannot combine with `--session-dir` or `--no-session`; `--session-prefix` requires `--session-store`.
|
|
115
|
+
- `--storage` cannot combine with `--storage-file`, and neither accepts `{ "dir": "..." }`.
|
|
116
|
+
- Combining `--storage` or `--storage-file` with a non-empty `ATOMIC_CODING_AGENT_SESSION_DIR` fails startup with an invalid storage configuration error and exit code `1` (unset the variable or pass an explicit session flag; see [Storage and team variables](/environment-variables#storage-and-team-variables)).
|
|
111
117
|
|
|
112
|
-
See [
|
|
118
|
+
See [Which selection wins](/storage#which-selection-wins) for full storage precedence rules.
|
|
113
119
|
|
|
114
120
|
## Tool options
|
|
115
121
|
|
|
@@ -141,7 +147,9 @@ An entry starting with `mcp__` filters MCP tools too. For example, `atomic --too
|
|
|
141
147
|
| `--approve`, `-a` | Trust project-local files and resources for this run |
|
|
142
148
|
| `--no-approve`, `-na` | Ignore project-local files and resources for this run |
|
|
143
149
|
|
|
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.
|
|
150
|
+
If both `--approve` and `--no-approve` are passed, the last flag wins. Project trust gates `.atomic` and legacy `.pi` project resources, project package settings, project-local context files, and `.agents` resources discovered from the project tree.
|
|
151
|
+
|
|
152
|
+
Loading an extension source outside the current project via `-e` / `--extension` can trigger a separate prompt to trust that extension source's own `.atomic`, `.pi`, or `.agents` resources. In non-interactive modes (`-p`, `--mode json`, `--mode rpc`), untrusted projects with local settings do not prompt; Atomic writes a stderr warning advising `--approve` (`-a`) and skips project files. Manage saved trust decisions with `/trust`; see [Security](/security).
|
|
145
153
|
|
|
146
154
|
## Resource options
|
|
147
155
|
|
|
@@ -170,11 +178,11 @@ atomic --no-extensions -e ./my-extension.ts
|
|
|
170
178
|
| --- | --- |
|
|
171
179
|
| `--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
180
|
| `--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
|
|
181
|
+
| `--use-theme <name[/name]>` | Set the interactive theme for this run without saving it ([Themes](/themes#initial-theme)) |
|
|
174
182
|
| `--offline` | Disable automatic network activity, including update checks, package updates, telemetry, and model catalog refreshes |
|
|
175
183
|
| `--debug` | Turn on [debug mode](/development#debugging) for this run, the same as `ATOMIC_DEBUG=1` |
|
|
176
184
|
| `--verbose` | Force verbose startup |
|
|
177
|
-
| `-h`, `--help` | Show help |
|
|
185
|
+
| `-h`, `--help` | Show help (loads extensions, including `-e`, so extension CLI flags appear) |
|
|
178
186
|
| `-v`, `--version` | Show version |
|
|
179
187
|
|
|
180
188
|
## File arguments
|
|
@@ -220,29 +228,30 @@ atomic --tools read,search,find,ls -p "Review the code"
|
|
|
220
228
|
## Package commands
|
|
221
229
|
|
|
222
230
|
```bash
|
|
223
|
-
atomic install <source> [-l]
|
|
224
|
-
atomic remove <source> [-l]
|
|
225
|
-
atomic uninstall <source> [-l]
|
|
226
|
-
atomic update [source|self|atomic
|
|
227
|
-
atomic update --all
|
|
228
|
-
atomic update --extensions
|
|
229
|
-
atomic update --models
|
|
230
|
-
atomic update --self
|
|
231
|
-
atomic update --force
|
|
232
|
-
atomic update --extension <src>
|
|
233
|
-
atomic list
|
|
234
|
-
atomic config [-l] [-a|-na]
|
|
231
|
+
atomic install <source> [-l|--local] [-a|-na] # Install package (-l/--local for project-local)
|
|
232
|
+
atomic remove <source> [-l|--local] [-a|-na] # Remove package
|
|
233
|
+
atomic uninstall <source> [-l|--local] [-a|-na] # Alias for remove
|
|
234
|
+
atomic update [source|self|atomic] [-a|-na] # Update Atomic only, or one package source
|
|
235
|
+
atomic update --all # Update Atomic and packages; reconcile pinned git refs
|
|
236
|
+
atomic update --extensions # Update packages only; reconcile pinned git refs
|
|
237
|
+
atomic update --models # Force-refresh authenticated provider model catalogs (15s timeout)
|
|
238
|
+
atomic update --self # Update Atomic only
|
|
239
|
+
atomic update --force # Reinstall Atomic even if the current version is latest
|
|
240
|
+
atomic update --extension <src> # Update one package (can be passed only once)
|
|
241
|
+
atomic list [-a|-na] # List installed packages
|
|
242
|
+
atomic config [-l|--local] [-a|-na] # Open resource TUI (-l/--local starts in project settings)
|
|
235
243
|
```
|
|
236
244
|
|
|
237
|
-
These commands manage Atomic packages, and `atomic update` updates the Atomic CLI installation.
|
|
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.
|
|
245
|
+
These commands manage Atomic packages, and `atomic update` updates the Atomic CLI installation. To uninstall Atomic itself, see [Uninstall](/getting-started/installation#uninstall).
|
|
244
246
|
|
|
245
|
-
`atomic update
|
|
247
|
+
- **Project trust:** All package commands (including `atomic update`, `atomic list`, and `atomic config`) resolve project trust and accept `--approve` (`-a`) and `--no-approve` (`-na`). On an interactive TTY in an untrusted project with local trust inputs, they prompt for project trust. `atomic config -l`, `atomic install <src> -l`, and `atomic remove <src> -l` exit `1` in untrusted projects unless `--approve` is passed or the project is already trusted.
|
|
248
|
+
- **Update targets and constraints:**
|
|
249
|
+
- Running bare `atomic update` updates Atomic only and prints a note that extensions were skipped (`Run atomic update --extensions to update extensions`).
|
|
250
|
+
- Passing both `--self` and `--extensions` behaves like `--all`.
|
|
251
|
+
- `--all` and `--models` cannot be combined with other update targets or a positional source, and `--extension` can be passed only once.
|
|
252
|
+
- On Windows, built-in self-update supports only `npm` and `pnpm` installs; other install methods exit `1` unless [`ATOMIC_SELF_UPDATE_COMMAND` or global `selfUpdateCommand`](#custom-update-command) is configured.
|
|
253
|
+
- **Intercom broker upgrade:** After updating the Atomic CLI, `atomic update` runs the new version's [`atomic intercom upgrade`](#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`. If you upgrade Atomic in place while a session is running and see a restart notice, restart that session (for example with `atomic -r`).
|
|
254
|
+
- **Model catalog refresh (`atomic update --models`):** Refreshes configured provider catalogs (15-second total timeout) without updating packages. Built-in catalogs 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.
|
|
246
255
|
|
|
247
256
|
See [Atomic packages](/packages) for package sources and security notes.
|
|
248
257
|
|
|
@@ -270,11 +279,15 @@ atomic auth print-api-key --model <model> [--provider <p>]
|
|
|
270
279
|
atomic auth print-bearer-token --model <model> [--provider <p>] [--min-expiry <dur>]
|
|
271
280
|
```
|
|
272
281
|
|
|
282
|
+
Passing `--help` or `-h` to `atomic auth` or any `auth` subcommand (before `--` and not as the value of a value-taking flag), or running bare `atomic auth` / `atomic auth help`, prints auth help to **stderr** and exits `0`. 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.
|
|
283
|
+
|
|
284
|
+
### auth login and auth logout
|
|
285
|
+
|
|
273
286
|
`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
287
|
|
|
275
288
|
`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>`.
|
|
276
289
|
|
|
277
|
-
`<provider>` accepts a provider ID or display name such as `openai` or `OpenAI`. An ambiguous name
|
|
290
|
+
`<provider>` accepts a provider ID or display name such as `openai` or `OpenAI`. An ambiguous name is rejected with the matching IDs; an exact provider ID always matches. After sign-in, Atomic refreshes that provider's model catalog (15-second timeout; if it fails or is interrupted with `Ctrl+C`, the login stays saved and refreshes on next start). `atomic auth login` exits `1` when run without an interactive terminal, when `--api-key` is passed for an OAuth-only provider, or when the provider uses ambient credentials configured outside Atomic (such as Bedrock or Vertex).
|
|
278
291
|
|
|
279
292
|
| Option | Description |
|
|
280
293
|
| --- | --- |
|
|
@@ -283,72 +296,92 @@ atomic auth print-bearer-token --model <model> [--provider <p>] [--min-expiry <d
|
|
|
283
296
|
|
|
284
297
|
`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).
|
|
285
298
|
|
|
286
|
-
|
|
299
|
+
### auth check
|
|
300
|
+
|
|
301
|
+
`atomic auth check` verifies the effective credential for a provider or model before starting a session ([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`. By default, checks never print credential material.
|
|
302
|
+
|
|
303
|
+
**`--json` output schema:**
|
|
287
304
|
|
|
288
|
-
|
|
305
|
+
| Status | JSON fields |
|
|
306
|
+
| --- | --- |
|
|
307
|
+
| `ready` | `{"status": "ready", "provider": "<id>", "authType": "api_key" \| "oauth"}` (adds `"credentials": "<value>"` only when `--credentials` is passed) |
|
|
308
|
+
| `not_ready` | `{"status": "not_ready", "provider": "<id>", "reason": "<reason>"}` |
|
|
309
|
+
| `invalid` | `{"status": "invalid", "provider": "<id>", "reason": "invalid_state"}` (`provider` is omitted if resolution failed before identifying a provider) |
|
|
310
|
+
|
|
311
|
+
Valid `reason` values:
|
|
312
|
+
|
|
313
|
+
- `provider_not_found`: The requested provider is not registered.
|
|
314
|
+
- `credentials_not_configured`: No stored, environment, or config credential exists for the provider.
|
|
315
|
+
- `credential_expired`: A stored OAuth token is expired and `--no-refresh` was passed.
|
|
316
|
+
- `credential_not_available`: OAuth refresh or token derivation failed.
|
|
317
|
+
- `invalid_state`: Malformed `auth.json`, broken `models.json`, fuzzy model export rejection, or invalid CLI arguments.
|
|
289
318
|
|
|
290
|
-
|
|
319
|
+
**Exporting credentials and read-only checks:**
|
|
291
320
|
|
|
292
|
-
|
|
321
|
+
- `--credentials` opts in to exporting the resolved credential. It requires `--provider` or an exact `--model` target: a fuzzy model match on a ready provider returns `invalid` (exit `2`), while on a non-ready provider it stays `not_ready` (exit `1`). On a ready check, plain stdout contains only the credential and `--json` adds the `credentials` field. On a non-ready check, plain stdout stays empty while stderr reports the status, and `--json` omits `credentials`.
|
|
322
|
+
- Checks refresh expired OAuth credentials by default through Atomic's locked `auth.json` update path. Pass `--no-refresh` for a read-only check that never creates, locks, or modifies `auth.json` (still resolving primary/legacy paths and `!command` API keys, while treating malformed `auth.json` as `invalid`). OAuth credential exports require at least 30 minutes of remaining lifetime; normal mode can refresh, while `--no-refresh` refuses shorter-lived tokens.
|
|
293
323
|
|
|
294
|
-
|
|
324
|
+
### auth print-api-key and auth print-bearer-token
|
|
295
325
|
|
|
296
|
-
|
|
326
|
+
The credential print commands emit one configured credential for an external client such as a proxy or script. The credential goes to **stdout and nothing else**; warnings, refresh notices, and help go to stderr, so `KEY=$(atomic auth print-api-key --model gpt-5.5)` never captures diagnostics.
|
|
297
327
|
|
|
298
|
-
|
|
328
|
+
- `--model` is required for both commands. Pass `--provider` when several configured providers offer the same model. Any flag outside `--provider` and `--model` (plus `--min-expiry` on `print-bearer-token`) is a usage error rather than an ignored flag.
|
|
329
|
+
- `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. When `--provider` is explicitly specified, requesting the wrong credential kind exits `4`; without `--provider`, it exits `2`.
|
|
330
|
+
- When `--model` matches several eligible providers without `--provider`, Atomic resolves each candidate before detecting ambiguity, so an OAuth candidate may refresh and persist a rotated token before exiting `3`. Pass `--provider` when you want to avoid probing unrelated providers.
|
|
331
|
+
- 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 `--`.
|
|
299
332
|
|
|
300
|
-
|
|
333
|
+
### Credential exit codes
|
|
301
334
|
|
|
302
|
-
|
|
335
|
+
**`print-api-key`, `print-bearer-token`, and `--credentials` writes:**
|
|
303
336
|
|
|
304
337
|
| Exit | Meaning |
|
|
305
338
|
| --- | --- |
|
|
306
|
-
| `0` | Credential written to stdout
|
|
339
|
+
| `0` | Credential written to stdout with one trailing newline |
|
|
307
340
|
| `1` | Usage error |
|
|
308
|
-
| `2` | No credential configured for that model or provider |
|
|
341
|
+
| `2` | No usable credential configured for that model or provider (including wrong kind when `--provider` is omitted) |
|
|
309
342
|
| `3` | Several configured providers match; pass `--provider` |
|
|
310
|
-
| `4` | That credential kind is unsupported for the provider |
|
|
311
|
-
| `5` | OAuth refresh failed
|
|
343
|
+
| `4` | That credential kind is unsupported for the explicitly specified `--provider` |
|
|
344
|
+
| `5` | OAuth refresh failed before local persistence (stored credentials change only if the provider completes that refresh later) |
|
|
312
345
|
| `6` | The provider cannot mint a token that lives as long as `--min-expiry` |
|
|
313
346
|
| `7` | The provider's OAuth credential could not be used; stored state is not guaranteed unchanged |
|
|
314
347
|
| `8` | The credential could not be written; nothing was emitted |
|
|
315
348
|
| `9` | Only part of the credential was written; discard the output |
|
|
316
349
|
|
|
317
|
-
|
|
350
|
+
**`atomic auth check`:**
|
|
318
351
|
|
|
319
|
-
| Exit |
|
|
352
|
+
| Exit | Meaning |
|
|
320
353
|
| --- | --- |
|
|
321
354
|
| `0` | `ready` |
|
|
322
355
|
| `1` | `not_ready`, including a fuzzy `--model` with `--credentials` when its resolved provider is not ready |
|
|
323
|
-
| `2` | `invalid`, including check usage errors
|
|
356
|
+
| `2` | `invalid`, including check usage errors or a fuzzy `--model` with `--credentials` when its resolved provider is otherwise ready |
|
|
324
357
|
| `8` | With `--credentials`, the credential could not be written; nothing was emitted |
|
|
325
358
|
| `9` | With `--credentials`, only part of the credential was written; discard the output |
|
|
326
359
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
360
|
+
<Warning>
|
|
361
|
+
**Exit code `9` (partial credential output):** Raw credential exports leave stdout empty on every nonzero exit *except* exit `9`. Exit `9` means the output stream failed partway through writing the secret—always discard stdout when a command exits `9`. Once the full credential reaches stdout, the exit code stays `0` even if draining fails later, with a diagnostic on stderr.
|
|
362
|
+
</Warning>
|
|
330
363
|
|
|
331
|
-
`auth check --credentials --json` may write a credential-free JSON status object on a nonzero check result.
|
|
364
|
+
`auth check --credentials --json` may write a credential-free JSON status object on a nonzero check result. Review [Credential export security](/security#credential-export) before wiring credential export into scripts.
|
|
332
365
|
|
|
333
366
|
## MCP commands
|
|
334
367
|
|
|
335
368
|
```bash
|
|
336
|
-
atomic mcp add <server> [options] -- <command> [args...]
|
|
369
|
+
atomic mcp add <server> [options] [--] <command> [args...]
|
|
337
370
|
atomic mcp add <server> [options] --url <url>
|
|
338
|
-
atomic mcp remove <server> [-l]
|
|
371
|
+
atomic mcp remove <server> [-l|--local]
|
|
339
372
|
atomic mcp list [--json]
|
|
340
|
-
atomic mcp login <server> [-l] [--timeout <seconds>]
|
|
341
|
-
atomic mcp logout <server> [-l]
|
|
373
|
+
atomic mcp login <server> [-l|--local] [--timeout <seconds>]
|
|
374
|
+
atomic mcp logout <server> [-l|--local]
|
|
342
375
|
```
|
|
343
376
|
|
|
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.
|
|
377
|
+
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. `atomic mcp` commands have no `--approve` flag; in an untrusted project, `.atomic/mcp.json` is ignored with a note advising you to start `atomic` in the project to trust it.
|
|
345
378
|
|
|
346
379
|
| Command | Description |
|
|
347
380
|
| --- | --- |
|
|
348
|
-
| `add <server>` | Add or replace a server entry in `mcp.json` |
|
|
381
|
+
| `add <server>` | Add or replace a server entry in `mcp.json`. `--` before `<command>` is optional (option parsing stops after `<server>` and `<command>`, forwarding later flags to the command). Mixing `--url` with a stdio command, or mixing HTTP-only and stdio-only options, exits `1` |
|
|
349
382
|
| `remove <server>` | Remove a server entry from `mcp.json` |
|
|
350
383
|
| `list` | Connect to enabled servers and print state, tools, and errors (exits `1` on config or connection failure) |
|
|
351
|
-
| `login <server>` | Sign in to an OAuth HTTP server through the browser |
|
|
384
|
+
| `login <server>` | Sign in to an OAuth HTTP server through the browser (or paste the final redirect URL in an interactive terminal when the browser cannot reach the local callback port). Refuses servers backed by `auth.provider` (use `atomic auth login <provider>` instead) and rejects `-l`/`--local` if the server is defined globally |
|
|
352
385
|
| `logout <server>` | Delete stored OAuth credentials for the server |
|
|
353
386
|
|
|
354
387
|
| Option | Commands | Description |
|
|
@@ -374,7 +407,7 @@ Passing `--help` or `-h` after `--` (for example `atomic mcp add srv -- cmd --he
|
|
|
374
407
|
|
|
375
408
|
```bash
|
|
376
409
|
atomic storage status [--json] # Selection, source, adapter, and connection per domain
|
|
377
|
-
atomic storage join <postgres-url> --password-file <path>|--token-file <path>|--auth azure|aws|gcp [--prefix <prefix>]
|
|
410
|
+
atomic storage join <postgres-url> --password-file <path>|--token-file <path>|--auth azure|aws|gcp [--prefix <prefix>]
|
|
378
411
|
atomic storage migrate [--db <url> [--password-file <path> | --token-file <path> | --auth azure|aws|gcp]] [--prefix <prefix>]
|
|
379
412
|
atomic storage move-snapshot-chunks <sqlite-file> [--prefix <prefix>]
|
|
380
413
|
atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]
|
|
@@ -386,28 +419,33 @@ atomic intercom restart # Replace t
|
|
|
386
419
|
atomic intercom upgrade # Replace a broker an older Atomic started, when safe
|
|
387
420
|
```
|
|
388
421
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
`atomic storage join` verifies the credential and connection (`SELECT 1` with a 15-second timeout) using `@bastani/atomic-storage-postgres` (for `postgres://` or `postgresql://` URLs), 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.
|
|
392
|
-
|
|
393
|
-
- 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.
|
|
394
|
-
- A libSQL URL (`libsql://`, `https://`, `http://`, `wss://`, `ws://`, or `file:`) is refused with `libsql-removed`: Atomic 0.10.11 removed libSQL support. See [Moving off libSQL](/storage#moving-off-libsql).
|
|
395
|
-
|
|
396
|
-
`atomic team status` adds the active profile (`individual`, `team`, `ci`, or `custom`) and project Intercom group. `atomic team join` and `atomic team leave` were removed with libSQL support in 0.10.11 and fail with `libsql-removed`. See [Team and CI setup](/guides/team-setup).
|
|
397
|
-
|
|
398
|
-
`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).
|
|
422
|
+
### Storage commands
|
|
399
423
|
|
|
400
|
-
|
|
424
|
+
- **`atomic storage status [--json]`:** 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`. Also shows the running Intercom broker, its multi-node state, and peer brokers live in the shared database. Modifies nothing and exits `1` if a selection is invalid, an adapter fails to load, or a database does not answer.
|
|
425
|
+
- **`atomic storage join <postgres-url> ...`:** Verifies the credential and connection (`SELECT 1` with a 15-second timeout) using `@bastani/atomic-storage-postgres` (for `postgres://` or `postgresql://` URLs), writes only the global `storage` setting, and reports any environment variables or settings that override it. Creates no tables and prints the install command if the adapter package is missing. 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.
|
|
426
|
+
- **`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 roles do not need schema-creation privileges (DDL).
|
|
427
|
+
- `--password-file`, `--token-file`, `--auth`, and `--prefix` are rejected unless `--db` is also passed.
|
|
428
|
+
- When no shared adapter storage is configured (or local SQLite/JSONL is selected), `migrate` exits `0` with a no-op message.
|
|
429
|
+
- On PostgreSQL (when no explicit `schema` option is set), `migrate` moves legacy tables from `public` into schema `atomic` (older Atomic processes still using `public` are refused until upgraded), rebuilds the worktree snapshot-links index concurrently without blocking writes (6-hour statement timeout), creates lazy fork/chat/Intercom tables, tunes autovacuum and `lz4` compression, warns if `pg_trgm` is unavailable, and **exits `1`** if stray Atomic tables are found in `public` after the move.
|
|
430
|
+
- **`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.
|
|
431
|
+
- **`atomic storage search-session <sqlite-file> <session-id> <pattern> [cursor]`:** Searches entries of a stored session in an existing local SQLite database by regex pattern. Rejects `:memory:` and URLs, restricts `<session-id>` to ASCII letters, digits, `-`, and `_`, accepts a numeric entry cursor (`seq`, `seq.match`, or `seq.match.line`), and fails if the session changes during the search. See [Recalling earlier work](/sessions#recalling-earlier-work).
|
|
432
|
+
- **`atomic storage export <dir>` and `atomic storage import <dir>`:** Export writes sessions to `<dir>/sessions/<sessionId>.jsonl` (compatible with `atomic --import`), skipping identical files and deleting nothing; `--limit <n>` requires a positive integer (`>= 1`) and exports the `n` most recently modified sessions, while `--since <time>` requires a parseable date or timestamp (such as `2026-11-01` or `2026-11-01T09:30:00Z`). Import validates every file in `<dir>/sessions` before writing, then adds new sessions and newer entries for existing sessions; partial failures list what was and was not written so you can rerun safely.
|
|
433
|
+
- `--sessions` is an optional no-op compatibility flag (both commands always transfer sessions).
|
|
434
|
+
- **Both** `export` and `import` refuse in-memory storage, and **both** refuse a selected shared PostgreSQL database unless you explicitly target it with `--storage <json>` or `--storage-file <path>`.
|
|
401
435
|
|
|
402
|
-
|
|
436
|
+
<Note>
|
|
437
|
+
**libSQL removal:** Atomic no longer supports libSQL (`libsql://`, `https://`, `http://`, `wss://`, `ws://`, or `file:` URLs in `storage join`). Passing a libSQL URL or running the retired `atomic team join` / `atomic team leave` commands exits `1`. See [Moving off libSQL](/storage#moving-off-libsql).
|
|
438
|
+
</Note>
|
|
403
439
|
|
|
404
|
-
|
|
440
|
+
### Team status
|
|
405
441
|
|
|
406
|
-
`atomic
|
|
442
|
+
`atomic team status [--json]` prints the active profile (`individual`, `team`, `ci`, or `custom`), project Intercom group, and the full storage status report. See [Team and CI setup](/guides/team-setup).
|
|
407
443
|
|
|
408
|
-
|
|
444
|
+
### Intercom commands
|
|
409
445
|
|
|
410
|
-
|
|
446
|
+
- **`atomic intercom status`:** Shows this machine's Intercom broker status and multi-node routing state.
|
|
447
|
+
- **`atomic intercom restart`:** Stops the running broker, waits for it to exit, and waits for a reconnecting session to start a new broker. Without connected sessions, the next session that uses Intercom starts one.
|
|
448
|
+
- **`atomic intercom upgrade`:** Replaces an older Atomic version's broker when safe. With no connected sessions, it stops the broker so the next session starts the new version. With connected sessions, it leaves the broker running so the next session of this version hands it over smoothly. Exits `1` only if stopping the broker fails. Installers and `atomic update` run it automatically. See [Upgrading Atomic with sessions running](/intercom/operations#upgrading-atomic-with-sessions-running).
|
|
411
449
|
|
|
412
450
|
See [Joining a machine to a shared database](/storage#joining-a-machine-to-a-shared-database) and [Running Intercom across machines](/intercom/operations#running-intercom-across-machines).
|
|
413
451
|
|
|
@@ -420,11 +458,11 @@ atomic blueprint prebuild [dir] [--park] [--approve|-a] # Build the
|
|
|
420
458
|
|
|
421
459
|
`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).
|
|
422
460
|
|
|
423
|
-
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).
|
|
461
|
+
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. Exits `2` on usage errors and `1` when cache keys cannot be computed. See [Caches for runners](/guides/resume-on-any-machine#caches-for-runners).
|
|
424
462
|
|
|
425
463
|
`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.
|
|
426
464
|
|
|
427
|
-
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 [
|
|
465
|
+
Because `prebuild` executes project code, the project must be trusted or `--approve` (`-a`) must be passed (`--no-approve` / `-na` is not accepted). 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 [Prebuilt worktrees](/guides/resume-on-any-machine#prebuilt-worktrees).
|
|
428
466
|
|
|
429
467
|
## Environment variables
|
|
430
468
|
|
|
@@ -434,7 +472,7 @@ See [Environment variables](/environment-variables) for the complete registry, e
|
|
|
434
472
|
- **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)).
|
|
435
473
|
- **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).
|
|
436
474
|
|
|
437
|
-
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
|
|
475
|
+
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 reference](/background-tasks/reference) for observation wait limits.
|
|
438
476
|
|
|
439
477
|
| Atomic variable | Legacy alias | Value |
|
|
440
478
|
| --- | --- | --- |
|
package/docs/reference.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "Reference index"
|
|
3
3
|
sidebarTitle: "Reference index"
|
|
4
|
-
description: "Look up Atomic CLI flags, settings, environment variables, keybindings, tools, storage, customization schemas, and APIs."
|
|
4
|
+
description: "Look up Atomic CLI flags, slash commands, settings, environment variables, keybindings, tools, storage, customization schemas, and APIs."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
Look up exact commands, settings, configuration schemas, tool behaviors, and API references here. For task walkthroughs, start with [Task guides](/guides) or [Build with Atomic](/build).
|
|
@@ -9,38 +9,40 @@ Look up exact commands, settings, configuration schemas, tool behaviors, and API
|
|
|
9
9
|
## Core reference
|
|
10
10
|
|
|
11
11
|
- [CLI reference](/reference/cli) covers commands, flags, model-matching rules, arguments, and exit codes.
|
|
12
|
+
- [Slash commands](/slash-commands) lists every built-in and bundled extension slash command, argument rules, and subagent-view routing.
|
|
12
13
|
- [Settings](/settings) lists every `settings.json` field with defaults, scopes, and constraints.
|
|
13
|
-
- [Environment variables](/environment-variables) documents Atomic variables, value parsing rules, legacy Pi aliases, color controls, and shell session metadata.
|
|
14
|
-
- [Keybindings](/keybindings) lists default shortcuts and custom `keybindings.json`
|
|
14
|
+
- [Environment variables](/environment-variables) documents Atomic variables, value parsing rules, proxy variables, legacy Pi aliases, color controls, and shell session metadata.
|
|
15
|
+
- [Keybindings](/keybindings) lists default shortcuts, selector controls, reserved keys, and custom `keybindings.json` rules.
|
|
15
16
|
- [Built-in tools](/tools) covers default coding tools, path selectors, and [exact-text editing](/tools#edit).
|
|
16
17
|
- [Codemode](/codemode) documents sandbox globals, tool calls, stored values, classifiers, image generation, and limits.
|
|
17
18
|
- [MCP servers](/mcp-servers) covers server configuration, tool exposure, resources, and authentication.
|
|
18
19
|
- [Web access](/web-access) documents `web_search`, `fetch_content`, `get_search_content`, `code_search`, slash commands, shortcuts, and `web-search.json`.
|
|
20
|
+
- [Background tasks reference](/background-tasks/reference) documents observation wait modes, heartbeat batching, Linux cgroup cleanup, and task error classes.
|
|
19
21
|
|
|
20
22
|
## Models, sessions, and storage
|
|
21
23
|
|
|
22
|
-
- [Provider reference](/providers/reference) covers stop reasons and
|
|
23
|
-
- [Model configuration reference](/models/reference) covers
|
|
24
|
-
- [
|
|
24
|
+
- [Provider reference](/providers/reference) covers credential resolution order, normalized stop reasons, and cross-provider error handling.
|
|
25
|
+
- [Model configuration reference](/models/reference) covers supported APIs, value resolution, capabilities, overrides, fast variants, and API compatibility.
|
|
26
|
+
- [`models.json` field reference](/models-configuration) lists every provider, model, override, and compatibility field (including [remote compaction models](/models#remote-compaction-models)).
|
|
25
27
|
- [Session format](/session-format) specifies the JSONL format, entry types, and `SessionManager` API.
|
|
26
|
-
- [Compaction reference](/compaction/reference) covers parameters,
|
|
27
|
-
- [
|
|
28
|
-
- [
|
|
28
|
+
- [Compaction reference](/compaction/reference) covers parameters, compactor HTTP contract, saved boundaries, hooks, exports, branch summary format, settings, and historical formats.
|
|
29
|
+
- [Worktree snapshots reference](/worktree-snapshots/reference) documents the snapshot SDK API, `WorkspaceError` classes, retention/garbage collection, and environment-hash inputs.
|
|
30
|
+
- [Storage](/storage) covers choosing a session store, sharing one database between machines, the `atomic storage` commands, exporting and importing sessions, and storage errors. Each store has its own page: [SQLite](/storage/sqlite), [JSONL](/storage/jsonl), and [PostgreSQL](/storage/postgres), with [`@bastani/atomic-storage-postgres`](/libraries/storage-postgres), [PgBouncer](/storage/postgres/pgbouncer), [server tuning](/storage/postgres/tuning), and [custom adapters](/storage/custom-adapters). For SDK apps, see [SDK session storage](/sdk/storage).
|
|
29
31
|
- [Environment blueprints](/guides/resume-on-any-machine#set-the-environment-up-with-a-blueprint) documents `.atomic/blueprint.yaml`, `atomic blueprint cache-key`, and `atomic blueprint prebuild`.
|
|
30
32
|
|
|
31
33
|
## Customization reference
|
|
32
34
|
|
|
33
|
-
- [Skill
|
|
34
|
-
- [Subagent reference](/subagents/reference) covers discovery, automatic model selection, fallback models,
|
|
35
|
+
- [Skill format](/skills/reference) specifies `SKILL.md` frontmatter and validation rules.
|
|
36
|
+
- [Subagent reference](/subagents/reference) covers discovery, automatic model selection, fallback models, reasoning levels, and `config.json`.
|
|
35
37
|
- [Intercom reference](/intercom/reference) specifies the `intercom` tool, delivery rules, groups, and settings.
|
|
36
|
-
- [Package reference](/packages/reference) covers package filtering, scope, and
|
|
37
|
-
- [Theme
|
|
38
|
+
- [Package reference](/packages/reference) covers package filtering, scope, and resource precedence.
|
|
39
|
+
- [Theme format](/themes/reference) specifies the theme file format, color tokens, and color values.
|
|
38
40
|
|
|
39
41
|
## API and protocol reference
|
|
40
42
|
|
|
41
43
|
- [Extension API reference](/extensions/api-reference) documents `ExtensionContext`, `ExtensionCommandContext`, and `ExtensionAPI` methods.
|
|
42
44
|
- [Extension events](/extensions/events) lists every extension event and its payload.
|
|
43
|
-
- [
|
|
45
|
+
- [Custom provider API](/custom-provider/api-reference) specifies custom provider configuration and model definition options.
|
|
44
46
|
- [SDK API reference](/sdk/reference) covers options, loaders, return values, run modes, and exports.
|
|
45
47
|
- [SDK session storage](/sdk/storage) documents `sessionStore`, `storage`, `resolveSessionStore()`, `StorageProvider`, and `createAgentSessionRuntime()` storage wiring.
|
|
46
48
|
- [Structured decisions](/sdk/structured-decisions) documents `decide()`, structured output tools, and provider limits.
|
|
@@ -50,10 +52,10 @@ Look up exact commands, settings, configuration schemas, tool behaviors, and API
|
|
|
50
52
|
|
|
51
53
|
## Platform setup
|
|
52
54
|
|
|
53
|
-
- [Windows](/windows)
|
|
54
|
-
- [
|
|
55
|
-
- [
|
|
56
|
-
- [tmux](/tmux)
|
|
55
|
+
- [Run on Windows](/windows)
|
|
56
|
+
- [Run on Android (Termux)](/termux)
|
|
57
|
+
- [Configure your terminal](/terminal-setup)
|
|
58
|
+
- [Run in tmux](/tmux)
|
|
57
59
|
- [Herdr](/herdr)
|
|
58
60
|
- [Shell aliases](/shell-aliases)
|
|
59
61
|
|