@ulpi/browse 1.0.1 → 1.0.3
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 +11 -0
- package/dist/{browse.mjs → browse.cjs} +564 -285
- package/package.json +4 -3
- package/skill/SKILL.md +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulpi/browse",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ulpi-io/browse"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"playwright-core": "^1.58.2"
|
|
15
15
|
},
|
|
16
16
|
"bin": {
|
|
17
|
-
"browse": "dist/browse.
|
|
17
|
+
"browse": "dist/browse.cjs"
|
|
18
18
|
},
|
|
19
19
|
"description": "Fast headless browser CLI — persistent Chromium daemon via Playwright.",
|
|
20
20
|
"engines": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
|
-
"build": "esbuild src/cli.ts --bundle --format=
|
|
44
|
+
"build": "esbuild src/cli.ts --bundle --format=cjs --platform=node --target=node18 --outfile=dist/browse.cjs --external:playwright --external:playwright-core --external:better-sqlite3 --external:electron --external:chromium-bidi --banner:js='#!/usr/bin/env node\nconst __import_meta_url = require(\"url\").pathToFileURL(__filename).href;' --define:import.meta.url=__import_meta_url",
|
|
45
45
|
"build:all": "bash scripts/build-all.sh",
|
|
46
46
|
"dev": "tsx src/cli.ts",
|
|
47
47
|
"server": "tsx src/server.ts",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/better-sqlite3": "^7.0.0",
|
|
56
56
|
"@types/node": "^25.5.0",
|
|
57
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
57
58
|
"esbuild": "^0.25.0",
|
|
58
59
|
"tsx": "^4.0.0",
|
|
59
60
|
"typescript": "^5.9.3",
|
package/skill/SKILL.md
CHANGED
|
@@ -216,6 +216,12 @@ browse --session myapp goto https://app.com/login # login...
|
|
|
216
216
|
browse session-close myapp # state auto-saved (encrypted if BROWSE_ENCRYPTION_KEY set)
|
|
217
217
|
browse --session myapp goto https://app.com/dashboard # cookies auto-restored
|
|
218
218
|
|
|
219
|
+
# Persistent profiles (full browser state, own Chromium)
|
|
220
|
+
browse --profile mysite goto https://app.com # all state persists automatically
|
|
221
|
+
browse --profile mysite snapshot -i # still logged in next time
|
|
222
|
+
browse profile list # list all profiles with size
|
|
223
|
+
browse profile delete old-site # remove a profile
|
|
224
|
+
|
|
219
225
|
# Load state at launch
|
|
220
226
|
browse --state auth.json goto https://app.com # load cookies before first command
|
|
221
227
|
|
|
@@ -464,6 +470,14 @@ browse sessions List active sessions
|
|
|
464
470
|
browse session-close <id> Close a session
|
|
465
471
|
```
|
|
466
472
|
|
|
473
|
+
### Profiles
|
|
474
|
+
```
|
|
475
|
+
browse --profile <name> <cmd> Use persistent browser profile
|
|
476
|
+
browse profile list List profiles with disk size
|
|
477
|
+
browse profile delete <name> Delete a profile
|
|
478
|
+
browse profile clean [--older-than <d>] Remove old profiles (default: 7 days)
|
|
479
|
+
```
|
|
480
|
+
|
|
467
481
|
### State persistence
|
|
468
482
|
```
|
|
469
483
|
browse state save [name] Save cookies + localStorage (all origins)
|
|
@@ -528,6 +542,7 @@ browse inspect Open DevTools (requires BROWSE_DEBUG_PORT)
|
|
|
528
542
|
| Flag | Description |
|
|
529
543
|
|------|-------------|
|
|
530
544
|
| `--session <id>` | Named session (isolates tabs, refs, cookies — auto-persists on close) |
|
|
545
|
+
| `--profile <name>` | Persistent browser profile (own Chromium, full state) |
|
|
531
546
|
| `--state <path>` | Load state file (cookies/storage) before first command |
|
|
532
547
|
| `--json` | Wrap output as `{success, data, command}` |
|
|
533
548
|
| `--content-boundaries` | Wrap page content in nonce-delimited markers (prompt injection defense) |
|
|
@@ -598,6 +613,7 @@ browse inspect Open DevTools (requires BROWSE_DEBUG_PORT)
|
|
|
598
613
|
| Limit output size | `--max-output 5000 text` |
|
|
599
614
|
| See the browser | `browse --headed goto <url>` |
|
|
600
615
|
| Bypass bot detection | `--runtime rebrowser goto <url>` |
|
|
616
|
+
| Persistent login state | `--profile mysite` → browse around → close → reopen (still logged in) |
|
|
601
617
|
|
|
602
618
|
## Architecture
|
|
603
619
|
|