@bastani/atomic 0.8.26-alpha.6 → 0.8.26-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.
- package/CHANGELOG.md +18 -0
- package/README.md +7 -4
- package/dist/builtin/intercom/CHANGELOG.md +6 -0
- package/dist/builtin/intercom/package.json +2 -2
- package/dist/builtin/mcp/CHANGELOG.md +6 -0
- package/dist/builtin/mcp/package.json +3 -3
- package/dist/builtin/subagents/CHANGELOG.md +6 -0
- package/dist/builtin/subagents/agents/codebase-online-researcher.md +9 -9
- package/dist/builtin/subagents/agents/debugger.md +6 -6
- package/dist/builtin/subagents/package.json +4 -4
- package/dist/builtin/subagents/prompts/parallel-handoff-plan.md +1 -1
- package/dist/builtin/subagents/skills/browser/EXAMPLES.md +151 -0
- package/dist/builtin/subagents/skills/browser/LICENSE.txt +21 -0
- package/dist/builtin/subagents/skills/browser/REFERENCE.md +451 -0
- package/dist/builtin/subagents/skills/browser/SKILL.md +170 -0
- package/dist/builtin/subagents/skills/subagent/SKILL.md +4 -4
- package/dist/builtin/web-access/CHANGELOG.md +6 -0
- package/dist/builtin/web-access/package.json +2 -2
- package/dist/builtin/workflows/CHANGELOG.md +11 -0
- package/dist/builtin/workflows/builtin/deep-research-codebase.ts +4 -1
- package/dist/builtin/workflows/builtin/goal.ts +127 -99
- package/dist/builtin/workflows/builtin/open-claude-design.ts +224 -147
- package/dist/builtin/workflows/builtin/ralph.ts +160 -197
- package/dist/builtin/workflows/package.json +2 -2
- package/dist/builtin/workflows/skills/research-codebase/SKILL.md +1 -1
- package/dist/builtin/workflows/src/tui/stage-chat-view.ts +9 -0
- package/dist/core/agent-session.d.ts +28 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +110 -28
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +6 -3
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +23 -10
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/compaction/context-compaction.d.ts +61 -0
- package/dist/core/compaction/context-compaction.d.ts.map +1 -0
- package/dist/core/compaction/context-compaction.js +602 -0
- package/dist/core/compaction/context-compaction.js.map +1 -0
- package/dist/core/compaction/index.d.ts +1 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +1 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/session-manager.d.ts +41 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +146 -7
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/index.d.ts +1 -1
- package/dist/modes/index.d.ts.map +1 -1
- package/dist/modes/index.js.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
- package/dist/modes/interactive/components/chat-session-host.js +17 -0
- package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +74 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-client.d.ts +12 -7
- package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-client.js +8 -1
- package/dist/modes/rpc/rpc-client.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +4 -0
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-types.d.ts +13 -2
- package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-types.js.map +1 -1
- package/docs/compaction.md +42 -23
- package/docs/custom-provider.md +11 -9
- package/docs/extensions.md +35 -35
- package/docs/index.md +1 -8
- package/docs/json.md +14 -11
- package/docs/packages.md +2 -0
- package/docs/providers.md +4 -1
- package/docs/quickstart.md +5 -12
- package/docs/rpc.md +44 -8
- package/docs/sdk.md +1 -8
- package/docs/session-format.md +25 -12
- package/docs/sessions.md +2 -1
- package/docs/skills.md +1 -15
- package/docs/termux.md +9 -10
- package/docs/themes.md +2 -2
- package/docs/tmux.md +3 -3
- package/docs/tui.md +19 -32
- package/docs/usage.md +2 -0
- package/docs/workflows.md +44 -2
- package/package.json +4 -12
- package/dist/builtin/subagents/skills/browser-use/SKILL.md +0 -234
- package/dist/builtin/subagents/skills/browser-use/references/cdp-python.md +0 -76
- package/dist/builtin/subagents/skills/browser-use/references/multi-session.md +0 -92
- package/node_modules/@earendil-works/pi-tui/README.md +0 -779
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +0 -54
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js +0 -632
- package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/box.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js +0 -104
- package/node_modules/@earendil-works/pi-tui/dist/components/box.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts +0 -22
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js +0 -35
- package/node_modules/@earendil-works/pi-tui/dist/components/cancellable-loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +0 -249
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +0 -1857
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/components/image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts +0 -37
- package/node_modules/@earendil-works/pi-tui/dist/components/input.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js +0 -378
- package/node_modules/@earendil-works/pi-tui/dist/components/input.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +0 -31
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +0 -69
- package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +0 -644
- package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js +0 -159
- package/node_modules/@earendil-works/pi-tui/dist/components/select-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js +0 -185
- package/node_modules/@earendil-works/pi-tui/dist/components/settings-list.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts +0 -12
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/components/spacer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts +0 -19
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +0 -89
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts +0 -13
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js +0 -51
- package/node_modules/@earendil-works/pi-tui/dist/components/truncated-text.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +0 -39
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js +0 -2
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +0 -16
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +0 -110
- package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +0 -23
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +0 -32
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts +0 -193
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js +0 -174
- package/node_modules/@earendil-works/pi-tui/dist/keybindings.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts +0 -184
- package/node_modules/@earendil-works/pi-tui/dist/keys.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/keys.js +0 -1173
- package/node_modules/@earendil-works/pi-tui/dist/keys.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts +0 -28
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js +0 -44
- package/node_modules/@earendil-works/pi-tui/dist/kill-ring.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts +0 -3
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js +0 -53
- package/node_modules/@earendil-works/pi-tui/dist/native-modifiers.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +0 -50
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +0 -361
- package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -90
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +0 -366
- package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +0 -113
- package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -472
- package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +0 -227
- package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +0 -1106
- package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts +0 -17
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/undo-stack.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -84
- package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/utils.js +0 -1029
- package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts +0 -25
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.d.ts.map +0 -1
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js +0 -96
- package/node_modules/@earendil-works/pi-tui/dist/word-navigation.js.map +0 -1
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
- package/node_modules/@earendil-works/pi-tui/package.json +0 -47
- package/node_modules/get-east-asian-width/index.d.ts +0 -60
- package/node_modules/get-east-asian-width/index.js +0 -30
- package/node_modules/get-east-asian-width/license +0 -9
- package/node_modules/get-east-asian-width/lookup-data.js +0 -21
- package/node_modules/get-east-asian-width/lookup.js +0 -138
- package/node_modules/get-east-asian-width/package.json +0 -71
- package/node_modules/get-east-asian-width/readme.md +0 -65
- package/node_modules/get-east-asian-width/utilities.js +0 -24
- package/node_modules/marked/LICENSE.md +0 -44
- package/node_modules/marked/README.md +0 -106
- package/node_modules/marked/bin/main.js +0 -282
- package/node_modules/marked/bin/marked.js +0 -15
- package/node_modules/marked/lib/marked.cjs +0 -2211
- package/node_modules/marked/lib/marked.cjs.map +0 -7
- package/node_modules/marked/lib/marked.d.cts +0 -728
- package/node_modules/marked/lib/marked.d.ts +0 -728
- package/node_modules/marked/lib/marked.esm.js +0 -2189
- package/node_modules/marked/lib/marked.esm.js.map +0 -7
- package/node_modules/marked/lib/marked.umd.js +0 -2213
- package/node_modules/marked/lib/marked.umd.js.map +0 -7
- package/node_modules/marked/man/marked.1 +0 -111
- package/node_modules/marked/man/marked.1.md +0 -92
- package/node_modules/marked/marked.min.js +0 -69
- package/node_modules/marked/package.json +0 -111
package/docs/skills.md
CHANGED
|
@@ -116,16 +116,9 @@ description: What this skill does and when to use it. Be specific.
|
|
|
116
116
|
|
|
117
117
|
## Setup
|
|
118
118
|
|
|
119
|
-
Run once before first use
|
|
119
|
+
Run once before first use:
|
|
120
120
|
```bash
|
|
121
|
-
# npm
|
|
122
|
-
cd /path/to/skill && npm install
|
|
123
|
-
|
|
124
|
-
# Bun
|
|
125
121
|
cd /path/to/skill && bun install
|
|
126
|
-
|
|
127
|
-
# pnpm
|
|
128
|
-
cd /path/to/skill && pnpm install
|
|
129
122
|
```
|
|
130
123
|
|
|
131
124
|
## Usage
|
|
@@ -216,14 +209,7 @@ description: Web search and content extraction via Brave Search API. Use for sea
|
|
|
216
209
|
## Setup
|
|
217
210
|
|
|
218
211
|
```bash
|
|
219
|
-
# npm
|
|
220
|
-
cd /path/to/brave-search && npm install
|
|
221
|
-
|
|
222
|
-
# Bun
|
|
223
212
|
cd /path/to/brave-search && bun install
|
|
224
|
-
|
|
225
|
-
# pnpm
|
|
226
|
-
cd /path/to/brave-search && pnpm install
|
|
227
213
|
```
|
|
228
214
|
|
|
229
215
|
## Search
|
package/docs/termux.md
CHANGED
|
@@ -16,16 +16,11 @@ pkg update && pkg upgrade
|
|
|
16
16
|
# Install dependencies
|
|
17
17
|
pkg install nodejs termux-api git
|
|
18
18
|
|
|
19
|
-
# Install Atomic
|
|
20
|
-
# npm is installed by `pkg install nodejs`; Bun and pnpm must be installed separately before using those commands.
|
|
21
|
-
# npm
|
|
19
|
+
# Install Atomic with npm (included with Termux's nodejs package)
|
|
22
20
|
npm install -g @bastani/atomic
|
|
23
21
|
|
|
24
|
-
# Bun
|
|
25
|
-
bun install -g @bastani/atomic
|
|
26
|
-
|
|
27
|
-
# pnpm
|
|
28
|
-
pnpm add -g @bastani/atomic
|
|
22
|
+
# If you have installed Bun separately in Termux, you can use Bun instead:
|
|
23
|
+
# bun install -g @bastani/atomic
|
|
29
24
|
|
|
30
25
|
# Create config directory
|
|
31
26
|
mkdir -p ~/.atomic/agent
|
|
@@ -129,9 +124,13 @@ Run once to grant storage permissions:
|
|
|
129
124
|
termux-setup-storage
|
|
130
125
|
```
|
|
131
126
|
|
|
132
|
-
###
|
|
127
|
+
### Package installation issues
|
|
128
|
+
|
|
129
|
+
Termux does not currently provide an official `pkg install bun` package. On a fresh Termux install, use npm from the `nodejs` package; use Bun only if you installed it separately for your device.
|
|
130
|
+
|
|
131
|
+
If npm fails, try clearing the cache before retrying:
|
|
133
132
|
|
|
134
|
-
If npm fails, try clearing the cache:
|
|
135
133
|
```bash
|
|
136
134
|
npm cache clean --force
|
|
135
|
+
npm install -g @bastani/atomic
|
|
137
136
|
```
|
package/docs/themes.md
CHANGED
|
@@ -52,7 +52,7 @@ vim ~/.atomic/agent/themes/my-theme.json
|
|
|
52
52
|
|
|
53
53
|
```json
|
|
54
54
|
{
|
|
55
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
55
|
+
"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
56
56
|
"name": "my-theme",
|
|
57
57
|
"vars": {
|
|
58
58
|
"primary": "#00aaff",
|
|
@@ -122,7 +122,7 @@ vim ~/.atomic/agent/themes/my-theme.json
|
|
|
122
122
|
|
|
123
123
|
```json
|
|
124
124
|
{
|
|
125
|
-
"$schema": "https://raw.githubusercontent.com/
|
|
125
|
+
"$schema": "https://raw.githubusercontent.com/bastani-inc/atomic/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
|
|
126
126
|
"name": "my-theme",
|
|
127
127
|
"vars": {
|
|
128
128
|
"blue": "#0066cc",
|
package/docs/tmux.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tmux Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Atomic works inside tmux, but tmux strips modifier information from certain keys by default. Without configuration, `SHIFT+Enter` and `CTRL+Enter` are usually indistinguishable from plain `Enter`.
|
|
4
4
|
|
|
5
5
|
## Recommended Configuration
|
|
6
6
|
|
|
@@ -18,7 +18,7 @@ tmux kill-server
|
|
|
18
18
|
tmux
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Atomic requests extended key reporting automatically when Kitty keyboard protocol is not available. With `extended-keys-format csi-u`, tmux forwards modified keys in CSI-u format, which is the most reliable configuration.
|
|
22
22
|
|
|
23
23
|
## Why `csi-u` Is Recommended
|
|
24
24
|
|
|
@@ -40,7 +40,7 @@ With `extended-keys-format csi-u`, the same keys are forwarded as:
|
|
|
40
40
|
- `CTRL+D` → `\x1b[100;5u`
|
|
41
41
|
- `CTRL+Enter` → `\x1b[13;5u`
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Atomic supports both formats, but `csi-u` is the recommended tmux setup.
|
|
44
44
|
|
|
45
45
|
## What This Fixes
|
|
46
46
|
|
package/docs/tui.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Extensions and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks.
|
|
6
6
|
|
|
7
|
-
**Source:**
|
|
7
|
+
**Source:** TUI components are provided by Atomic's installed `@earendil-works/pi-tui` runtime dependency (`node_modules/@earendil-works/pi-tui/dist/`).
|
|
8
8
|
|
|
9
9
|
## Component Interface
|
|
10
10
|
|
|
@@ -86,27 +86,18 @@ Without this propagation, typing with an IME (Chinese, Japanese, Korean, etc.) w
|
|
|
86
86
|
|
|
87
87
|
## Using Components
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Use `ctx.ui.custom()` with a component factory. The factory receives `done(result)`, and `ctx.ui.custom()` resolves with that result when the component finishes:
|
|
90
90
|
|
|
91
91
|
```typescript
|
|
92
92
|
pi.on("session_start", async (_event, ctx) => {
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
const result = await ctx.ui.custom((tui, theme, keybindings, done) => {
|
|
94
|
+
return new MyComponent(done);
|
|
95
|
+
});
|
|
96
|
+
ctx.ui.notify(`Selected: ${result}`, "info");
|
|
96
97
|
});
|
|
97
98
|
```
|
|
98
99
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
async execute(toolCallId, params, onUpdate, ctx, signal) {
|
|
103
|
-
const handle = pi.ui.custom(myComponent);
|
|
104
|
-
// ...
|
|
105
|
-
handle.close();
|
|
106
|
-
}
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Pass `{ signal }` to `ctx.ui.custom()` when the UI belongs to an abortable tool or operation. If the signal aborts, Atomic dismisses the custom UI and rejects the returned promise with the signal reason.
|
|
100
|
+
Pass `{ signal }` to `ctx.ui.custom()` when the UI belongs to an abortable operation. If the signal aborts, Atomic dismisses the custom UI and rejects the returned promise with the signal reason. For overlays, use `options.onHandle` to receive an overlay handle for programmatic visibility control.
|
|
110
101
|
|
|
111
102
|
## Overlays
|
|
112
103
|
|
|
@@ -371,20 +362,15 @@ pi.registerCommand("pick", {
|
|
|
371
362
|
const items = ["Option A", "Option B", "Option C"];
|
|
372
363
|
const selector = new MySelector(items);
|
|
373
364
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
selector
|
|
378
|
-
ctx.ui.notify(`Selected: ${item}`, "info");
|
|
379
|
-
handle.close();
|
|
380
|
-
resolve();
|
|
381
|
-
};
|
|
382
|
-
selector.onCancel = () => {
|
|
383
|
-
handle.close();
|
|
384
|
-
resolve();
|
|
385
|
-
};
|
|
386
|
-
handle = ctx.ui.custom(selector);
|
|
365
|
+
const selected = await ctx.ui.custom<string | undefined>((_tui, _theme, _keybindings, done) => {
|
|
366
|
+
selector.onSelect = (item) => done(item);
|
|
367
|
+
selector.onCancel = () => done(undefined);
|
|
368
|
+
return selector;
|
|
387
369
|
});
|
|
370
|
+
|
|
371
|
+
if (selected) {
|
|
372
|
+
ctx.ui.notify(`Selected: ${selected}`, "info");
|
|
373
|
+
}
|
|
388
374
|
}
|
|
389
375
|
});
|
|
390
376
|
```
|
|
@@ -450,10 +436,11 @@ interface MyTheme {
|
|
|
450
436
|
Set `PI_TUI_WRITE_LOG` to capture the raw ANSI stream written to stdout.
|
|
451
437
|
|
|
452
438
|
```bash
|
|
453
|
-
|
|
454
|
-
PI_TUI_WRITE_LOG=/tmp/tui-ansi.log bunx tsx packages/tui/test/chat-simple.ts
|
|
439
|
+
PI_TUI_WRITE_LOG=/tmp/tui-ansi.log atomic
|
|
455
440
|
```
|
|
456
441
|
|
|
442
|
+
Atomic vendors TUI components through the installed `@earendil-works/pi-tui` dependency; this monorepo does not include the upstream TUI test source tree.
|
|
443
|
+
|
|
457
444
|
## Performance
|
|
458
445
|
|
|
459
446
|
Cache rendered output when possible:
|
|
@@ -480,7 +467,7 @@ class CachedComponent {
|
|
|
480
467
|
}
|
|
481
468
|
```
|
|
482
469
|
|
|
483
|
-
Call `invalidate()` when state changes, then `
|
|
470
|
+
Call `invalidate()` when state changes, then `ctx.ui.requestRender()` from the extension context or `tui.requestRender()` from a `ctx.ui.custom()` factory to trigger re-render.
|
|
484
471
|
|
|
485
472
|
## Invalidation and Theme Changes
|
|
486
473
|
|
package/docs/usage.md
CHANGED
|
@@ -49,6 +49,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
|
|
|
49
49
|
| `/fork` | Create a new session from a previous user message |
|
|
50
50
|
| `/clone` | Duplicate the current active branch into a new session |
|
|
51
51
|
| `/compact [prompt]` | Manually compact context, optionally with custom instructions |
|
|
52
|
+
| `/context-compact` | Delete safe older transcript objects verbatim; no arguments |
|
|
52
53
|
| `/copy` | Copy last assistant message to clipboard |
|
|
53
54
|
| `/export [file]` | Export session to HTML |
|
|
54
55
|
| `/share` | Upload as private GitHub gist with shareable HTML link |
|
|
@@ -90,6 +91,7 @@ Useful session commands:
|
|
|
90
91
|
- `/fork` creates a new session from an earlier user message.
|
|
91
92
|
- `/clone` duplicates the current active branch into a new session file.
|
|
92
93
|
- `/compact` summarizes older messages to free context.
|
|
94
|
+
- `/context-compact` uses a fixed no-argument deletion-only planner and applies only validated logical deletions; trailing text is not used as a prompt.
|
|
93
95
|
|
|
94
96
|
See [Sessions](/sessions) and [Compaction](/compaction) for details.
|
|
95
97
|
|
package/docs/workflows.md
CHANGED
|
@@ -154,7 +154,7 @@ For the builtin result tables below, `deep-research-codebase`, `goal`, and `ralp
|
|
|
154
154
|
| `deep-research-codebase` | Scout + research-history chain → parallel specialist waves → aggregator. Indexes the whole repo and synthesizes findings. | Broad or cross-cutting research before you decide what to change. Prefer `/skill:research-codebase` for one subsystem. |
|
|
155
155
|
| `goal` | Persisted goal ledger → bounded worker turns → receipts → three-reviewer gate → deterministic reducer → final report. | Small-to-medium scope changes when you can identify the work surface, state the exact outcome, and name the validation that proves it is done — for example tests, lint/typecheck, docs builds, or observable behavior. |
|
|
156
156
|
| `ralph` | RFC planning → sub-agent orchestration → simplification → parallel review → optional final-stage PR handoff. | Larger migrations, broad refactors, multi-package changes, and spec-to-reviewed-change work where you want Atomic to plan the approach, delegate implementation through sub-agents, simplify, review, iterate, and optionally allow only the final `pull-request` stage to attempt PR creation with `create_pr=true`. |
|
|
157
|
-
| `open-claude-design` | Design-system onboarding → reference import → HTML generation → impeccable-driven refinement → quality gate → rich HTML handoff. Renders a live `preview.html` you can iterate against (opens through `browser
|
|
157
|
+
| `open-claude-design` | Design-system onboarding → reference import → HTML generation → impeccable-driven refinement → quality gate → rich HTML handoff. Renders a live `preview.html` you can iterate against (opens through `browser` when available). | UI, page, component, theme, or design-token work that benefits from generation + critique loops. |
|
|
158
158
|
|
|
159
159
|
### `deep-research-codebase`
|
|
160
160
|
|
|
@@ -1020,6 +1020,25 @@ Builder basics:
|
|
|
1020
1020
|
|
|
1021
1021
|
Author workflows to create at least one tracked stage by calling `ctx.task()`, `ctx.chain()`, `ctx.parallel()`, `ctx.stage()`, or `ctx.workflow()` in the run body so each run has graph nodes to inspect, attach to, interrupt, resume, and render.
|
|
1022
1022
|
|
|
1023
|
+
### Guiding Principles
|
|
1024
|
+
|
|
1025
|
+
- Stage prompts should be locally scoped: describe only the current stage's objective, inputs, expected outputs, and success criteria.
|
|
1026
|
+
- Avoid references to other stages unless the current stage explicitly receives and needs that information.
|
|
1027
|
+
- Avoid workflow-specific or stage-specific vocabulary that is not explained inside the current prompt.
|
|
1028
|
+
- Use clear software engineering terminology in self-described prompts.
|
|
1029
|
+
- Avoid hard-coded regular expressions for condition matching when gating reviews or model outputs.
|
|
1030
|
+
- Prefer structured output schemas for review/gate decisions whenever model output needs to be evaluated.
|
|
1031
|
+
- Treat atomic workflow units as language model stages, not deterministic tools.
|
|
1032
|
+
- When deterministic gates are needed, create small dedicated stages that instruct a model to run a specific tool or perform a specific check. This keeps gates adaptive to the current codebase while preserving explicit workflow structure.
|
|
1033
|
+
|
|
1034
|
+
### Context engineering guidance
|
|
1035
|
+
|
|
1036
|
+
Workflow guidance should also cover the context passed between stages:
|
|
1037
|
+
|
|
1038
|
+
- Prefer creating files or artifacts for substantial handoffs, then instruct the next stage to read the file, instead of dumping large text output directly into the next stage prompt or context.
|
|
1039
|
+
- Prefer forked context for non-reviewer stages so long-running implementation work can preserve coherency and continuity.
|
|
1040
|
+
- Prefer a clean context window for reviewer stages so earlier implementation stages do not bias the reviewer. Reviewers should evaluate the supplied artifacts, changed files, tests, and explicit criteria as independently as possible.
|
|
1041
|
+
|
|
1023
1042
|
### Inputs
|
|
1024
1043
|
|
|
1025
1044
|
Inputs are declared with TypeBox `Type.*` schemas passed to `.input(key, schema)`. `Type` is re-exported from `@bastani/workflows` (along with the `Static` and `TSchema` type helpers), so you do not import from `typebox` directly in workflow files. Workflow packages still declare `typebox` as a peer dependency so the SDK's shipped types resolve under `tsc` — see [Programmatic Usage](#programmatic-usage). Common input schemas map to picker kinds and accepted runtime values:
|
|
@@ -1480,6 +1499,20 @@ registry.get("alpha");
|
|
|
1480
1499
|
|
|
1481
1500
|
A workflow is an information-flow system, not just a list of prompts. Most workflow failures come from missing, stale, oversized, or poorly-routed context. Design every stage boundary deliberately.
|
|
1482
1501
|
|
|
1502
|
+
### Locally Scoped Stage Prompts
|
|
1503
|
+
|
|
1504
|
+
Stage prompts should be local contracts, not miniature descriptions of the entire workflow runtime. Write prompts as if the stage could be executed independently from a fresh session with only the listed inputs. Include:
|
|
1505
|
+
|
|
1506
|
+
- the stage's current objective and what is out of scope for this stage
|
|
1507
|
+
- the exact files, artifacts, child outputs, or user inputs it may use
|
|
1508
|
+
- the expected output format or structured-output tool/schema it must return
|
|
1509
|
+
- the checks, tools, or deterministic commands it should run when relevant
|
|
1510
|
+
- the success criteria that let this stage stop
|
|
1511
|
+
|
|
1512
|
+
Avoid unrelated workflow internals such as reducer algorithms, future PR stages, sibling reviewer names, loop implementation details, or project-specific nicknames unless they are explicitly part of the current stage contract. If a term such as a gate name, ledger field, or workflow nickname is necessary, define it in the prompt before using it.
|
|
1513
|
+
|
|
1514
|
+
Choose context mode deliberately. Use `context: "fork"` or `forkFromSessionFile` for coherent long-running implementation stages that need continuity from their own earlier work. Use `context: "fresh"` for unbiased reviewer, evaluator, and gate stages so they inspect the current files and explicit artifacts rather than inheriting the implementer's assumptions. When continuity is needed across fresh stages, pass it explicitly through files, declared outputs, and `reads`.
|
|
1515
|
+
|
|
1483
1516
|
### Context Fundamentals
|
|
1484
1517
|
|
|
1485
1518
|
Treat context as a finite attention budget. Include only information needed for the current decision, place critical constraints near the beginning or end of prompts, and use progressive disclosure instead of loading every possible reference up front.
|
|
@@ -1523,6 +1556,8 @@ A good compressed handoff includes:
|
|
|
1523
1556
|
|
|
1524
1557
|
Use `output`, `outputMode: "file-only"`, `reads`, and `chainDir` for large research bundles, logs, or reviewer outputs. Keep summaries compact and let downstream stages read full artifacts only when needed. In the downstream stage prompt, explicitly say something like `Read the file at ${artifactPath} before continuing.` Do not inject full session tails, all previous stage outputs, or every prior review round into later prompts by default; pass the latest relevant artifact paths and make older history discoverable from a ledger or index file.
|
|
1525
1558
|
|
|
1559
|
+
Substantial handoffs should travel through files or durable artifacts instead of hidden transcript assumptions. This keeps stage prompts small, makes review/audit possible, and lets later stages reread the authoritative material without depending on what a previous model happened to summarize.
|
|
1560
|
+
|
|
1526
1561
|
```ts
|
|
1527
1562
|
const researchPath = ".atomic/workflows/runs/context-demo/research.md";
|
|
1528
1563
|
await ctx.task("researcher", {
|
|
@@ -1586,6 +1621,10 @@ Build validation into the workflow instead of waiting for a final manual check.
|
|
|
1586
1621
|
- reviewer stages: fresh-context reviewers that inspect artifacts and current files
|
|
1587
1622
|
- LLM-as-judge stages: direct scoring, pairwise comparison, or rubric-based grading for subjective outputs
|
|
1588
1623
|
|
|
1624
|
+
Prefer structured output schemas or structured-output tools for model review and gate decisions. Do not make correctness depend on brittle regular-expression matching against free-form prose such as “looks good”, “approved”, or “PASS”. A schema with explicit booleans/enums, findings arrays, confidence, evidence fields, and error reporting is easier to validate, replay, and safely default to “not approved” when malformed.
|
|
1625
|
+
|
|
1626
|
+
Use small dedicated model stages for adaptive gates when deterministic code alone cannot decide what to check. For example, a stage can read an artifact, inspect the repo, run a named tool or command, and then emit a structured decision. Keep that stage's prompt narrow: tell it the specific check to perform, the files/tools it may use, and the structured decision it must return.
|
|
1627
|
+
|
|
1589
1628
|
When using LLM judges, mitigate bias by defining score anchors, asking for evidence, calibrating against examples, and keeping length/order effects in mind. Track pass rates and failures over time for reusable workflows.
|
|
1590
1629
|
|
|
1591
1630
|
### Tools, MCP, Memory, and Hosted Execution
|
|
@@ -1618,12 +1657,13 @@ Before implementing or shipping a non-trivial workflow, answer these questions:
|
|
|
1618
1657
|
- **Inputs:** Which values should be declared as inputs? What is the narrowest schema type? Which defaults are safe?
|
|
1619
1658
|
- **Starter pattern:** Which [workflow starter pattern](#workflow-starter-patterns) best matches the task, and where does the actual design intentionally diverge?
|
|
1620
1659
|
- **Stage decomposition:** For each stage, what question does it answer, what context does it need, what output should it return, and what model/tool/MCP requirements does it have?
|
|
1660
|
+
- **Local stage contract:** Can this stage prompt stand alone with its current objective, inputs/artifacts, expected outputs, tools/checks, and success criteria, without unexplained workflow internals or future-stage assumptions?
|
|
1621
1661
|
- **Information flow:** For every edge between stages, is `previous` enough, or should the handoff use structured returns, files, `reads`, `output`, or `outputMode`?
|
|
1622
1662
|
- **Output contract:** Which outputs should be declared with `.output(...)`, which stage/task/child results should `.run()` return for those keys, and what runtime type must each value have? If another workflow may call this workflow as a child, which non-default outputs should the parent rely on?
|
|
1623
1663
|
- **Context size:** Can downstream stages succeed from the handoff alone? Should large transcripts, logs, or research bundles be summarized or saved as artifacts?
|
|
1624
1664
|
- **Control flow:** Should the workflow use `ctx.chain`, `ctx.parallel`, `ctx.ui`, bounded loops, `failFast`, or `fallbackModels`?
|
|
1625
1665
|
- **User experience:** Are stage names readable in status and graph views? Is the final output compact? Are important artifacts saved with stable paths?
|
|
1626
|
-
- **Validation:** What success criteria, review gates, deterministic checks, or evaluator stages prove the workflow did the right thing?
|
|
1666
|
+
- **Validation:** What success criteria, review gates, deterministic checks, or evaluator stages prove the workflow did the right thing? Are model gates schema-backed instead of regex/prose-matched, and do adaptive gates run as focused model stages with explicit tool/check instructions?
|
|
1627
1667
|
|
|
1628
1668
|
Good workflows are information-flow systems, not just prompt sequences. Keep stage prompts focused, preserve evidence with file paths or artifacts, and pass only the context each downstream stage needs.
|
|
1629
1669
|
|
|
@@ -1639,4 +1679,6 @@ Good workflows are information-flow systems, not just prompt sequences. Keep sta
|
|
|
1639
1679
|
- Do not expect named workflow runs to block the chat turn; they are background tasks.
|
|
1640
1680
|
- Do not call `kill` when the user asks to interrupt or pause resumably.
|
|
1641
1681
|
- Keep stage names readable because they appear in workflow status and UI.
|
|
1682
|
+
- Do not write stage prompts that depend on hidden workflow-wide awareness; make each model stage locally scoped and self-described.
|
|
1683
|
+
- Do not parse model gate decisions from ad-hoc prose with regular expressions; use structured output schemas/tools or a focused checking stage that returns a structured decision.
|
|
1642
1684
|
- Return compact structured output and save large artifacts to files.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bastani/atomic",
|
|
3
|
-
"version": "0.8.26-alpha.
|
|
3
|
+
"version": "0.8.26-alpha.7",
|
|
4
4
|
"description": "Atomic coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"atomicConfig": {
|
|
@@ -63,16 +63,13 @@
|
|
|
63
63
|
"copy-builtin-workflows": "bun run copy-builtin-packages",
|
|
64
64
|
"docs:check": "bun run scripts/validate-docs-links.ts",
|
|
65
65
|
"verify:workflow-types": "bun run scripts/verify-workflow-sdk-types.ts",
|
|
66
|
-
"verify:bundled-pi-tui": "bun run scripts/verify-bundled-pi-tui-install.ts",
|
|
67
66
|
"test": "vitest --run",
|
|
68
|
-
"prepack": "bun run scripts/materialize-bundled-pi-tui.ts",
|
|
69
|
-
"postpack": "bun run scripts/materialize-bundled-pi-tui.ts --clean",
|
|
70
67
|
"prepublishOnly": "bun run clean && bun run build"
|
|
71
68
|
},
|
|
72
69
|
"dependencies": {
|
|
73
|
-
"@earendil-works/pi-agent-core": "^0.78.
|
|
74
|
-
"@earendil-works/pi-ai": "^0.78.
|
|
75
|
-
"@earendil-works/pi-tui": "^0.78.
|
|
70
|
+
"@earendil-works/pi-agent-core": "^0.78.1",
|
|
71
|
+
"@earendil-works/pi-ai": "^0.78.1",
|
|
72
|
+
"@earendil-works/pi-tui": "^0.78.1",
|
|
76
73
|
"@modelcontextprotocol/ext-apps": "^1.7.2",
|
|
77
74
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
78
75
|
"@mozilla/readability": "^0.6.0",
|
|
@@ -97,11 +94,6 @@
|
|
|
97
94
|
"yaml": "^2.9.0",
|
|
98
95
|
"zod": "^3.25.0 || ^4.0.0"
|
|
99
96
|
},
|
|
100
|
-
"bundleDependencies": [
|
|
101
|
-
"@earendil-works/pi-tui",
|
|
102
|
-
"get-east-asian-width",
|
|
103
|
-
"marked"
|
|
104
|
-
],
|
|
105
97
|
"overrides": {
|
|
106
98
|
"rimraf": "6.1.2",
|
|
107
99
|
"gaxios": {
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: browser-use
|
|
3
|
-
description: Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, or extract information from web pages.
|
|
4
|
-
allowed-tools: Bash(browser-use:*)
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Browser Automation with browser-use CLI
|
|
8
|
-
|
|
9
|
-
The `browser-use` command provides fast, persistent browser automation. A background daemon keeps the browser open across commands, giving ~50ms latency per call.
|
|
10
|
-
|
|
11
|
-
## Prerequisites
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
browser-use doctor # Verify installation
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
For setup details, see https://github.com/browser-use/browser-use/blob/main/browser_use/skill_cli/README.md
|
|
18
|
-
|
|
19
|
-
## Core Workflow
|
|
20
|
-
|
|
21
|
-
1. **Navigate**: `browser-use open <url>` — launches headless browser and opens page
|
|
22
|
-
2. **Inspect**: `browser-use state` — returns clickable elements with indices
|
|
23
|
-
3. **Interact**: use indices from state (`browser-use click 5`, `browser-use input 3 "text"`)
|
|
24
|
-
4. **Verify**: `browser-use state` or `browser-use screenshot` to confirm
|
|
25
|
-
5. **Repeat**: browser stays open between commands
|
|
26
|
-
|
|
27
|
-
If a command fails, run `browser-use close` first to clear any broken session, then retry.
|
|
28
|
-
|
|
29
|
-
To use the user's existing Chrome (preserves logins/cookies): run `browser-use connect` first.
|
|
30
|
-
To use a cloud browser instead: run `browser-use cloud connect` first.
|
|
31
|
-
After either, commands work the same way.
|
|
32
|
-
|
|
33
|
-
### If `browser-use connect` fails
|
|
34
|
-
|
|
35
|
-
When `browser-use connect` cannot find a running Chrome with remote debugging, prompt the user with two options:
|
|
36
|
-
|
|
37
|
-
1. **Use their real Chrome browser** — they need to enable remote debugging first:
|
|
38
|
-
- Open `chrome://inspect/#remote-debugging` in Chrome, or relaunch Chrome with `--remote-debugging-port=9222`
|
|
39
|
-
- Then retry `browser-use connect`
|
|
40
|
-
2. **Use managed Chromium with their Chrome profile** — no Chrome setup needed:
|
|
41
|
-
- Run `browser-use profile list` to show available profiles
|
|
42
|
-
- Ask which profile they want, then use `browser-use --profile "ProfileName" open <url>`
|
|
43
|
-
- This launches a separate Chromium instance with their profile data (cookies, logins, extensions)
|
|
44
|
-
|
|
45
|
-
Let the user choose — don't assume one path over the other.
|
|
46
|
-
|
|
47
|
-
## Browser Modes
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
browser-use open <url> # Default: headless Chromium (no setup needed)
|
|
51
|
-
browser-use --headed open <url> # Visible window (for debugging)
|
|
52
|
-
browser-use connect # Connect to user's Chrome (preserves logins/cookies)
|
|
53
|
-
browser-use cloud connect # Cloud browser (zero-config, requires API key)
|
|
54
|
-
browser-use --profile "Default" open <url> # Real Chrome with specific profile
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
After `connect` or `cloud connect`, all subsequent commands go to that browser — no extra flags needed.
|
|
58
|
-
|
|
59
|
-
## Commands
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# Navigation
|
|
63
|
-
browser-use open <url> # Navigate to URL
|
|
64
|
-
browser-use back # Go back in history
|
|
65
|
-
browser-use scroll down # Scroll down (--amount N for pixels)
|
|
66
|
-
browser-use scroll up # Scroll up
|
|
67
|
-
browser-use tab list # List all tabs
|
|
68
|
-
browser-use tab new [url] # Open a new tab (blank or with URL)
|
|
69
|
-
browser-use tab switch <index> # Switch to tab by index
|
|
70
|
-
browser-use tab close <index> [index...] # Close one or more tabs
|
|
71
|
-
|
|
72
|
-
# Page State — always run state first to get element indices
|
|
73
|
-
browser-use state # URL, title, clickable elements with indices
|
|
74
|
-
browser-use screenshot [path.png] # Screenshot (base64 if no path, --full for full page)
|
|
75
|
-
|
|
76
|
-
# Interactions — use indices from state
|
|
77
|
-
browser-use click <index> # Click element by index
|
|
78
|
-
browser-use click <x> <y> # Click at pixel coordinates
|
|
79
|
-
browser-use type "text" # Type into focused element
|
|
80
|
-
browser-use input <index> "text" # Click element, clear existing text, then type
|
|
81
|
-
browser-use input <index> "" # Clear a field without typing new text
|
|
82
|
-
browser-use keys "Enter" # Send keyboard keys (also "Control+a", etc.)
|
|
83
|
-
browser-use select <index> "option" # Select dropdown option
|
|
84
|
-
browser-use upload <index> <path> # Upload file to file input
|
|
85
|
-
browser-use hover <index> # Hover over element
|
|
86
|
-
browser-use dblclick <index> # Double-click element
|
|
87
|
-
browser-use rightclick <index> # Right-click element
|
|
88
|
-
|
|
89
|
-
# Data Extraction
|
|
90
|
-
browser-use eval "js code" # Execute JavaScript, return result
|
|
91
|
-
browser-use get title # Page title
|
|
92
|
-
browser-use get html [--selector "h1"] # Page HTML (or scoped to selector)
|
|
93
|
-
browser-use get text <index> # Element text content
|
|
94
|
-
browser-use get value <index> # Input/textarea value
|
|
95
|
-
browser-use get attributes <index> # Element attributes
|
|
96
|
-
browser-use get bbox <index> # Bounding box (x, y, width, height)
|
|
97
|
-
|
|
98
|
-
# Wait
|
|
99
|
-
browser-use wait selector "css" # Wait for element (--state visible|hidden|attached|detached, --timeout ms)
|
|
100
|
-
browser-use wait text "text" # Wait for text to appear
|
|
101
|
-
|
|
102
|
-
# Cookies
|
|
103
|
-
browser-use cookies get [--url <url>] # Get cookies (optionally filtered)
|
|
104
|
-
browser-use cookies set <name> <value> # Set cookie (--domain, --secure, --http-only, --same-site, --expires)
|
|
105
|
-
browser-use cookies clear [--url <url>] # Clear cookies
|
|
106
|
-
browser-use cookies export <file> # Export to JSON
|
|
107
|
-
browser-use cookies import <file> # Import from JSON
|
|
108
|
-
|
|
109
|
-
# Session
|
|
110
|
-
browser-use close # Close browser and stop daemon
|
|
111
|
-
browser-use sessions # List active sessions
|
|
112
|
-
browser-use close --all # Close all sessions
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
For advanced browser control (CDP, device emulation, tab activation), see `references/cdp-python.md`.
|
|
116
|
-
|
|
117
|
-
## Cloud API
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
browser-use cloud connect # Provision cloud browser and connect (zero-config)
|
|
121
|
-
browser-use cloud login <api-key> # Save API key (or set BROWSER_USE_API_KEY)
|
|
122
|
-
browser-use cloud logout # Remove API key
|
|
123
|
-
browser-use cloud v2 GET /browsers # REST passthrough (v2 or v3)
|
|
124
|
-
browser-use cloud v2 POST /tasks '{"task":"...","url":"..."}'
|
|
125
|
-
browser-use cloud v2 poll <task-id> # Poll task until done
|
|
126
|
-
browser-use cloud v2 --help # Show API endpoints
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
`cloud connect` provisions a cloud browser with a persistent profile (auto-created on first use), connects via CDP, and prints a live URL. `browser-use close` disconnects AND stops the cloud browser. For custom browser settings (proxy, timeout, specific profile), use `cloud v2 POST /browsers` directly with the desired parameters.
|
|
130
|
-
|
|
131
|
-
### Agent Self-Registration
|
|
132
|
-
|
|
133
|
-
Only use this if you don't already have an API key (check `browser-use doctor` to see if api_key is set). If already logged in, skip this entirely.
|
|
134
|
-
|
|
135
|
-
1. `browser-use cloud signup` — get a challenge
|
|
136
|
-
2. Solve the challenge
|
|
137
|
-
3. `browser-use cloud signup --verify <challenge-id> <answer>` — verify and save API key
|
|
138
|
-
4. `browser-use cloud signup --claim` — generate URL for a human to claim the account
|
|
139
|
-
|
|
140
|
-
## Tunnels
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
browser-use tunnel <port> # Start Cloudflare tunnel (idempotent)
|
|
144
|
-
browser-use tunnel list # Show active tunnels
|
|
145
|
-
browser-use tunnel stop <port> # Stop tunnel
|
|
146
|
-
browser-use tunnel stop --all # Stop all tunnels
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
## Profile Management
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
browser-use profile list # List detected browsers and profiles
|
|
153
|
-
browser-use profile sync --all # Sync profiles to cloud
|
|
154
|
-
browser-use profile update # Download/update profile-use binary
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
## Command Chaining
|
|
158
|
-
|
|
159
|
-
Commands can be chained with `&&`. The browser persists via the daemon, so chaining is safe and efficient.
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
browser-use open https://example.com && browser-use state
|
|
163
|
-
browser-use input 5 "user@example.com" && browser-use input 6 "password" && browser-use click 7
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
Chain when you don't need intermediate output. Run separately when you need to parse `state` to discover indices first.
|
|
167
|
-
|
|
168
|
-
## Common Workflows
|
|
169
|
-
|
|
170
|
-
### Authenticated Browsing
|
|
171
|
-
|
|
172
|
-
When a task requires an authenticated site (Gmail, GitHub, internal tools), use Chrome profiles:
|
|
173
|
-
|
|
174
|
-
```bash
|
|
175
|
-
browser-use profile list # Check available profiles
|
|
176
|
-
# Ask the user which profile to use, then:
|
|
177
|
-
browser-use --profile "Default" open https://github.com # Already logged in
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
### Exposing Local Dev Servers
|
|
181
|
-
|
|
182
|
-
```bash
|
|
183
|
-
browser-use tunnel 3000 # → https://abc.trycloudflare.com
|
|
184
|
-
browser-use open https://abc.trycloudflare.com # Browse the tunnel
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Multiple Browsers
|
|
188
|
-
|
|
189
|
-
For subagent workflows or running multiple browsers in parallel, use `--session NAME`. Each session gets its own browser. See `references/multi-session.md`.
|
|
190
|
-
|
|
191
|
-
## Configuration
|
|
192
|
-
|
|
193
|
-
```bash
|
|
194
|
-
browser-use config list # Show all config values
|
|
195
|
-
browser-use config set cloud_connect_proxy jp # Set a value
|
|
196
|
-
browser-use config get cloud_connect_proxy # Get a value
|
|
197
|
-
browser-use config unset cloud_connect_timeout # Remove a value
|
|
198
|
-
browser-use doctor # Shows config + diagnostics
|
|
199
|
-
browser-use setup # Interactive post-install setup
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
Config stored in `~/.browser-use/config.json`.
|
|
203
|
-
|
|
204
|
-
## Global Options
|
|
205
|
-
|
|
206
|
-
| Option | Description |
|
|
207
|
-
|--------|-------------|
|
|
208
|
-
| `--headed` | Show browser window |
|
|
209
|
-
| `--profile [NAME]` | Use real Chrome (bare `--profile` uses "Default") |
|
|
210
|
-
| `--cdp-url <url>` | Connect via CDP URL (`http://` or `ws://`) |
|
|
211
|
-
| `--session NAME` | Target a named session (default: "default") |
|
|
212
|
-
| `--json` | Output as JSON |
|
|
213
|
-
| `--mcp` | Run as MCP server via stdin/stdout |
|
|
214
|
-
|
|
215
|
-
## Tips
|
|
216
|
-
|
|
217
|
-
1. **Always run `state` first** to see available elements and their indices
|
|
218
|
-
2. **Use `--headed` for debugging** to see what the browser is doing
|
|
219
|
-
3. **Sessions persist** — browser stays open between commands
|
|
220
|
-
4. **CLI aliases**: `bu`, `browser`, and `browseruse` all work
|
|
221
|
-
5. **If commands fail**, run `browser-use close` first, then retry
|
|
222
|
-
|
|
223
|
-
## Troubleshooting
|
|
224
|
-
|
|
225
|
-
- **Browser won't start?** `browser-use close` then `browser-use --headed open <url>`
|
|
226
|
-
- **Element not found?** `browser-use scroll down` then `browser-use state`
|
|
227
|
-
- **Run diagnostics:** `browser-use doctor`
|
|
228
|
-
|
|
229
|
-
## Cleanup
|
|
230
|
-
|
|
231
|
-
```bash
|
|
232
|
-
browser-use close # Close browser session
|
|
233
|
-
browser-use tunnel stop --all # Stop tunnels (if any)
|
|
234
|
-
```
|