@xbrowser/cli 1.21.0 → 1.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/README.md +21 -3
  2. package/dist/{browser-CNBSH53B.js → browser-BVRFSUXU.js} +3 -2
  3. package/dist/{browser-C2VEOJC2.js → browser-DSYUAE7H.js} +5 -4
  4. package/dist/{browser-VZOOFLAH.js → browser-Q67BJTI2.js} +4 -3
  5. package/dist/{cdp-driver-KFX4A6WR.js → cdp-driver-DC7EIUG5.js} +4 -3
  6. package/dist/{cdp-driver-7Z6ZAT5E.js → cdp-driver-T7D6H2RW.js} +335 -546
  7. package/dist/{cdp-driver-26LGCHXV.js → cdp-driver-WWO2UZDR.js} +3 -2
  8. package/dist/{chunk-Z5RTK4GW.js → chunk-2Q3GQRUP.js} +2 -2
  9. package/dist/{chunk-CLYZPSDR.js → chunk-4OU37CXP.js} +354 -576
  10. package/dist/{chunk-HWWG2ISJ.js → chunk-7OP2ISEY.js} +353 -575
  11. package/dist/{chunk-PIWNMC36.js → chunk-A3MORKYR.js} +1 -1
  12. package/dist/{chunk-3FWLW7FS.js → chunk-A7NEA4PA.js} +39 -1
  13. package/dist/{chunk-OMU63E6J.js → chunk-FBQZ3PVD.js} +5 -8
  14. package/dist/chunk-GYB5BOSP.js +602 -0
  15. package/dist/{chunk-ESJYANQO.js → chunk-IFKJO2UR.js} +360 -582
  16. package/dist/{chunk-NODRQGOK.js → chunk-IR6C24P7.js} +97 -0
  17. package/dist/{chunk-TEXCXIBW.js → chunk-LPW6QS4M.js} +5 -8
  18. package/dist/{chunk-3KZ34AUC.js → chunk-MYH6FIBZ.js} +2 -1
  19. package/dist/{chunk-AVSTNODR.js → chunk-T4WTKBWI.js} +2 -2
  20. package/dist/{chunk-HBHOKZPN.js → chunk-V6KGBU5J.js} +97 -0
  21. package/dist/{chunk-IWVG4XYZ.js → chunk-VCVDILH6.js} +2 -1
  22. package/dist/{chunk-NKW4A74J.js → chunk-XTUAUFL3.js} +5 -8
  23. package/dist/cli.js +497 -252
  24. package/dist/daemon-main.js +25 -19
  25. package/dist/{human-interaction-Y5IDH6LD.js → human-interaction-57VYIR56.js} +1 -1
  26. package/dist/{human-interaction-ZUTR5AC2.js → human-interaction-67K43B4O.js} +1 -1
  27. package/dist/{human-interaction-4YR2N6R6.js → human-interaction-MXST5ZQM.js} +1 -1
  28. package/dist/index.d.ts +52 -4
  29. package/dist/index.js +500 -256
  30. package/dist/keep-awake-M4KJS4B4.js +29 -0
  31. package/dist/{launcher-44STYRJC.js → launcher-IK2FKW6T.js} +1 -1
  32. package/dist/{launcher-EXJHHAUL.js → launcher-LUOMMGZC.js} +1 -1
  33. package/dist/{plugin-singleton-FCNDN3FX.js → plugin-singleton-GJO7EZXB.js} +1 -1
  34. package/dist/{recovery-NXC35EQN.js → recovery-6RI2FE3E.js} +1 -1
  35. package/dist/{recovery-MDWAVXE4.js → recovery-LGY25LIM.js} +1 -1
  36. package/dist/{recovery-L5GLDX4O.js → recovery-LMJW537X.js} +1 -1
  37. package/dist/{session-recorder-SLDBENVF.js → session-recorder-563ISSJK.js} +1 -1
  38. package/dist/{session-recorder-3BEVWHOK.js → session-recorder-GEZVQBKW.js} +1 -1
  39. package/dist/session-replayer-N665T3G5.js +932 -0
  40. package/dist/stealth-2AA2FSNN.js +29 -0
  41. package/dist/stealth-JOXGV34D.js +29 -0
  42. package/package.json +11 -7
  43. package/dist/session-replayer-EVD4HZBB.js +0 -413
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # xbrowser
2
2
 
3
- > **Browser automation CLI** for web scraping, headless browsing, SEO analysis, and AI agent workflows. 51 commands, 75 plugins. A command-line alternative to Playwright, Puppeteer, and Selenium — **no code required**.
3
+ > **Browser automation CLI** for web scraping, headless browsing, SEO analysis, and AI agent workflows. 57 commands, 132 plugins. A command-line alternative to Playwright, Puppeteer, and Selenium — **no code required**.
4
4
 
5
5
  [![CI Status](https://github.com/dyyz1993/xbrowser/workflows/CI/badge.svg)](https://github.com/dyyz1993/xbrowser/actions)
6
6
  [![codecov](https://codecov.io/gh/dyyz1993/xbrowser/branch/master/graph/badge.svg)](https://codecov.io/gh/dyyz1993/xbrowser)
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## 特性
11
11
 
12
- - **51 浏览器命令** — 导航、交互、查询、存储、截图,覆盖常见自动化场景
12
+ - **57 浏览器命令** — 导航、交互、查询、存储、截图,覆盖常见自动化场景
13
13
  - **命令链** — 用 `&&`、`,`、`+`、`->`、`;` 串联多个命令,一行搞定复杂流程
14
14
  - **管道 & Heredoc** — 支持 stdin 管道和 heredoc 批量执行
15
15
  - **录制 / 回放** — 录制浏览器操作为 YAML,随时回放,可转换为 JS/Python/Bash 脚本
@@ -17,6 +17,7 @@
17
17
  - **CDP 连接** — 连接已运行的 Chrome/Chromium,无需重新启动浏览器
18
18
  - **会话管理** — 多会话并行,独立上下文
19
19
  - **Daemon 模式** — 后台常驻,快速响应
20
+ - **Stealth 伪装层** — UA-CH 档案驱动垫片 + 可配置 stealthConfig(详见 [docs/stealth.md](docs/stealth.md))
20
21
 
21
22
  ## Use Cases
22
23
 
@@ -56,6 +57,22 @@ xbrowser juejin publish --file article.md
56
57
  # (Each platform has its own plugin — run `xbrowser plugin list` to see available)
57
58
  ```
58
59
 
60
+ **Content Marketing — xbrowser promotes itself (dogfooding)**
61
+ ```bash
62
+ # Browse the built-in promo case library (self-healing replay, CLI for AI agents, stealth…)
63
+ xbrowser content cases
64
+
65
+ # Render a case into a platform-ready article (en/zh, {{VAR}} substituted)
66
+ xbrowser content draft --case self-healing-replay --lang zh
67
+
68
+ # Render an OG cover image with the browser itself — zero imaging libraries
69
+ xbrowser "set-viewport 1200 630 && content cover --title 'Self-Healing Replay' --output cover.png"
70
+
71
+ # Publish through any of the 18 platform plugins
72
+ xbrowser devto publish --file output/content/self-healing-replay-en.md --tags "typescript,automation"
73
+ ```
74
+ The full write → cover → publish loop that promotes xbrowser is itself built on xbrowser commands.
75
+
59
76
  ## 快速开始
60
77
 
61
78
  ### 安装
@@ -545,6 +562,7 @@ xbrowser 自带以下插件:
545
562
  | **douyin** | `ai-summary`, `user-info`, `video-info` | 抖音视频信息提取 |
546
563
  | **github** | `update-profile`, `add-social-link`, `create-gist`, `get-profile` | GitHub 个人资料管理 |
547
564
  | **web-automation** | `extract`, `paginate`, `fill-and-submit`, `screenshot` | 通用 Web 自动化工具 |
565
+ | **content** | `cases`, `draft`, `cover` | 内容营销:内置推广 case 渲染成文 + 浏览器自渲染封面 |
548
566
 
549
567
  使用插件命令:
550
568
 
@@ -883,7 +901,7 @@ xbrowser/
883
901
  | **Setup** | `npm i -g` — 0 config | Install + browser download | Install + browser download | Install + WebDriver + drivers |
884
902
  | **Web Scraping** | Built-in (`scrape`, `crawl`, `map`) | Write custom scripts | Write custom scripts | Write custom scripts |
885
903
  | **Search** | Built-in multi-engine (`search`) | No | No | No |
886
- | **Plugin Ecosystem** | 75 plugins | Limited | Limited | No |
904
+ | **Plugin Ecosystem** | 132 plugins | Limited | Limited | No |
887
905
  | **No Code Required** | ✅ CLI commands | ❌ Must write JS/TS | ❌ Must write JS/TS | ❌ Must write code |
888
906
  | **Headless Mode** | ✅ Default | ✅ | ✅ | ✅ |
889
907
  | **Record/Replay** | ✅ Built-in (`record`/`replay`) | ✅ Codegen | ❌ | ❌ |
@@ -20,8 +20,9 @@ import {
20
20
  saveSessionDiskMeta,
21
21
  setActivePage,
22
22
  touchSession
23
- } from "./chunk-ESJYANQO.js";
24
- import "./chunk-3KZ34AUC.js";
23
+ } from "./chunk-IFKJO2UR.js";
24
+ import "./chunk-GYB5BOSP.js";
25
+ import "./chunk-MYH6FIBZ.js";
25
26
  import "./chunk-GDKLH7ZY.js";
26
27
  import "./chunk-KFQGP6VL.js";
27
28
  export {
@@ -20,10 +20,11 @@ import {
20
20
  saveSessionDiskMeta,
21
21
  setActivePage,
22
22
  touchSession
23
- } from "./chunk-AVSTNODR.js";
24
- import "./chunk-CLYZPSDR.js";
25
- import "./chunk-3FWLW7FS.js";
26
- import "./chunk-3KZ34AUC.js";
23
+ } from "./chunk-T4WTKBWI.js";
24
+ import "./chunk-4OU37CXP.js";
25
+ import "./chunk-A7NEA4PA.js";
26
+ import "./chunk-GYB5BOSP.js";
27
+ import "./chunk-MYH6FIBZ.js";
27
28
  import "./chunk-GDKLH7ZY.js";
28
29
  import "./chunk-KFQGP6VL.js";
29
30
  export {
@@ -20,9 +20,10 @@ import {
20
20
  saveSessionDiskMeta,
21
21
  setActivePage,
22
22
  touchSession
23
- } from "./chunk-Z5RTK4GW.js";
24
- import "./chunk-HWWG2ISJ.js";
25
- import "./chunk-3KZ34AUC.js";
23
+ } from "./chunk-2Q3GQRUP.js";
24
+ import "./chunk-7OP2ISEY.js";
25
+ import "./chunk-GYB5BOSP.js";
26
+ import "./chunk-MYH6FIBZ.js";
26
27
  import "./chunk-GDKLH7ZY.js";
27
28
  import "./chunk-WYETQ5C7.js";
28
29
  import "./chunk-75DNUI6M.js";
@@ -14,15 +14,16 @@ import {
14
14
  scrollIntoView,
15
15
  waitForActionable,
16
16
  waitForNetworkIdle
17
- } from "./chunk-CLYZPSDR.js";
18
- import "./chunk-3FWLW7FS.js";
17
+ } from "./chunk-4OU37CXP.js";
18
+ import "./chunk-A7NEA4PA.js";
19
+ import "./chunk-GYB5BOSP.js";
19
20
  import {
20
21
  connectToCDP,
21
22
  findChrome,
22
23
  getCDPTargets,
23
24
  killChrome,
24
25
  launchChrome
25
- } from "./chunk-3KZ34AUC.js";
26
+ } from "./chunk-MYH6FIBZ.js";
26
27
  import "./chunk-GDKLH7ZY.js";
27
28
  import "./chunk-KFQGP6VL.js";
28
29
  export {