@ulpi/browse 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ $ browse snapshot -i -C
|
|
|
92
92
|
|
|
93
93
|
Every detected element gets a ref. `browse click @e3` just works.
|
|
94
94
|
|
|
95
|
-
### 4.
|
|
95
|
+
### 4. 58+ Purpose-Built Commands vs Generic Tools
|
|
96
96
|
|
|
97
97
|
@playwright/mcp has ~15 tools. For anything beyond navigate/click/type, you write JavaScript via `browser_evaluate`. `browse` has purpose-built commands that return structured, minimal output:
|
|
98
98
|
|
|
@@ -108,6 +108,17 @@ Every detected element gets a ref. `browse click @e3` just works.
|
|
|
108
108
|
| Snapshot diff | Not available | `snapshot-diff` |
|
|
109
109
|
| Responsive screenshots | Not available | `responsive` |
|
|
110
110
|
| Device emulation | Not available | `emulate iphone` |
|
|
111
|
+
| Input value | `browser_evaluate` + custom JS | `value <sel>` |
|
|
112
|
+
| Element count | `browser_evaluate` + custom JS | `count <sel>` |
|
|
113
|
+
| iframe targeting | Not available | `frame <sel>` / `frame main` |
|
|
114
|
+
| Network mocking | Not available | `route <pattern> block\|fulfill` |
|
|
115
|
+
| Offline mode | Not available | `offline on\|off` |
|
|
116
|
+
| State persistence | Not available | `state save\|load` |
|
|
117
|
+
| Credential vault | Not available | `auth save\|login\|list` |
|
|
118
|
+
| HAR recording | Not available | `har start\|stop` |
|
|
119
|
+
| Domain restriction | Not available | `--allowed-domains` |
|
|
120
|
+
| Prompt injection defense | Not available | `--content-boundaries` |
|
|
121
|
+
| JSON output mode | Not available | `--json` |
|
|
111
122
|
|
|
112
123
|
### 5. Persistent Daemon — 100ms Commands
|
|
113
124
|
|
|
@@ -167,10 +178,10 @@ For full process isolation (separate Chromium instances), use `BROWSE_PORT` to r
|
|
|
167
178
|
## Install
|
|
168
179
|
|
|
169
180
|
```bash
|
|
170
|
-
|
|
181
|
+
npm install -g @ulpi/browse
|
|
171
182
|
```
|
|
172
183
|
|
|
173
|
-
Requires [Bun](https://bun.sh). Chromium is installed automatically via Playwright.
|
|
184
|
+
Requires [Bun](https://bun.sh) runtime. Chromium is installed automatically via Playwright.
|
|
174
185
|
|
|
175
186
|
### Claude Code Skill
|
|
176
187
|
|
|
@@ -222,7 +233,7 @@ browse click @e52
|
|
|
222
233
|
`text` | `html [sel]` | `links` | `forms` | `accessibility`
|
|
223
234
|
|
|
224
235
|
### Interaction
|
|
225
|
-
`click <sel>` | `fill <sel> <val>` | `select <sel> <val>` | `hover <sel>` | `type <text>` | `press <key>` | `scroll [sel]` | `wait <sel>` | `viewport <WxH>`
|
|
236
|
+
`click <sel>` | `dblclick <sel>` | `fill <sel> <val>` | `select <sel> <val>` | `hover <sel>` | `focus <sel>` | `check <sel>` | `uncheck <sel>` | `drag <src> <tgt>` | `type <text>` | `press <key>` | `keydown <key>` | `keyup <key>` | `scroll [sel|up|down]` | `wait <sel|--url|--network-idle>` | `viewport <WxH>` | `highlight <sel>` | `download <sel> [path]`
|
|
226
237
|
|
|
227
238
|
### Snapshot & Refs
|
|
228
239
|
```
|
|
@@ -244,7 +255,7 @@ After snapshot, use `@e1`, `@e2`... as selectors in any command.
|
|
|
244
255
|
100+ devices: iPhone 12-17, Pixel 5-7, iPad, Galaxy, and all Playwright built-ins.
|
|
245
256
|
|
|
246
257
|
### Inspection
|
|
247
|
-
`js <expr>` | `eval <file>` | `css <sel> <prop>` | `attrs <sel>` | `state <sel>` | `console [--clear]` | `network [--clear]` | `cookies` | `storage [set <k> <v>]` | `perf`
|
|
258
|
+
`js <expr>` | `eval <file>` | `css <sel> <prop>` | `attrs <sel>` | `element-state <sel>` | `value <sel>` | `count <sel>` | `console [--clear]` | `network [--clear]` | `cookies` | `storage [set <k> <v>]` | `perf`
|
|
248
259
|
|
|
249
260
|
### Visual
|
|
250
261
|
`screenshot [path]` | `screenshot --annotate` | `pdf [path]` | `responsive [prefix]`
|
|
@@ -260,9 +271,21 @@ echo '[["goto","https://example.com"],["text"]]' | browse chain
|
|
|
260
271
|
### Tabs
|
|
261
272
|
`tabs` | `tab <id>` | `newtab [url]` | `closetab [id]`
|
|
262
273
|
|
|
274
|
+
### Frames
|
|
275
|
+
`frame <sel>` | `frame main`
|
|
276
|
+
|
|
263
277
|
### Sessions
|
|
264
278
|
`sessions` | `session-close <id>`
|
|
265
279
|
|
|
280
|
+
### Network
|
|
281
|
+
`route <pattern> block` | `route <pattern> fulfill <status> [body]` | `route clear` | `offline [on|off]`
|
|
282
|
+
|
|
283
|
+
### State & Auth
|
|
284
|
+
`state save [name]` | `state load [name]` | `auth save <name> <url> <user> <pass>` | `auth login <name>` | `auth list` | `auth delete <name>`
|
|
285
|
+
|
|
286
|
+
### Recording
|
|
287
|
+
`har start` | `har stop [path]`
|
|
288
|
+
|
|
266
289
|
### Server Control
|
|
267
290
|
`status` | `cookie <n>=<v>` | `header <n>:<v>` | `useragent <str>` | `stop` | `restart`
|
|
268
291
|
|
|
@@ -293,8 +316,16 @@ browse [--session <id>] <command>
|
|
|
293
316
|
|----------|---------|-------------|
|
|
294
317
|
| `BROWSE_PORT` | auto 9400-10400 | Fixed server port |
|
|
295
318
|
| `BROWSE_SESSION` | (none) | Default session ID for all commands |
|
|
319
|
+
| `BROWSE_INSTANCE` | auto (PPID) | Instance ID for multi-Claude isolation |
|
|
296
320
|
| `BROWSE_IDLE_TIMEOUT` | 1800000 (30m) | Idle shutdown in ms |
|
|
321
|
+
| `BROWSE_TIMEOUT` | (none) | Override all command timeouts (ms) |
|
|
297
322
|
| `BROWSE_LOCAL_DIR` | `.browse/` or `/tmp` | State/log directory |
|
|
323
|
+
| `BROWSE_JSON` | (none) | Set to `1` for JSON output mode |
|
|
324
|
+
| `BROWSE_CONTENT_BOUNDARIES` | (none) | Set to `1` for nonce-delimited output |
|
|
325
|
+
| `BROWSE_ALLOWED_DOMAINS` | (none) | Comma-separated domain allowlist |
|
|
326
|
+
| `BROWSE_PROXY` | (none) | Proxy server URL |
|
|
327
|
+
| `BROWSE_PROXY_BYPASS` | (none) | Proxy bypass list |
|
|
328
|
+
| `BROWSE_CDP_URL` | (none) | Connect to remote Chrome via CDP |
|
|
298
329
|
|
|
299
330
|
## Acknowledgments
|
|
300
331
|
|