@jackwener/opencli 1.3.1 → 1.3.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.
Files changed (241) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/README.md +48 -9
  3. package/README.zh-CN.md +48 -9
  4. package/SKILL.md +317 -6
  5. package/TESTING.md +4 -4
  6. package/dist/browser/cdp.js +10 -1
  7. package/dist/browser/daemon-client.js +2 -1
  8. package/dist/browser/discover.js +2 -1
  9. package/dist/browser/errors.d.ts +2 -1
  10. package/dist/browser/errors.js +10 -10
  11. package/dist/browser/index.d.ts +1 -0
  12. package/dist/browser/index.js +1 -0
  13. package/dist/browser/page.js +12 -0
  14. package/dist/browser/stealth.d.ts +18 -0
  15. package/dist/browser/stealth.js +140 -0
  16. package/dist/browser.test.js +47 -1
  17. package/dist/build-manifest.js +1 -3
  18. package/dist/cli-manifest.json +2573 -989
  19. package/dist/cli.js +42 -2
  20. package/dist/clis/bilibili/download.js +20 -65
  21. package/dist/clis/bilibili/utils.js +2 -1
  22. package/dist/clis/chaoxing/assignments.js +2 -1
  23. package/dist/clis/doubao/ask.d.ts +1 -0
  24. package/dist/clis/doubao/ask.js +35 -0
  25. package/dist/clis/doubao/common.d.ts +23 -0
  26. package/dist/clis/doubao/common.js +564 -0
  27. package/dist/clis/doubao/new.d.ts +1 -0
  28. package/dist/clis/doubao/new.js +20 -0
  29. package/dist/clis/doubao/read.d.ts +1 -0
  30. package/dist/clis/doubao/read.js +19 -0
  31. package/dist/clis/doubao/send.d.ts +1 -0
  32. package/dist/clis/doubao/send.js +22 -0
  33. package/dist/clis/doubao/status.d.ts +1 -0
  34. package/dist/clis/doubao/status.js +24 -0
  35. package/dist/clis/doubao-app/ask.d.ts +1 -0
  36. package/dist/clis/doubao-app/ask.js +53 -0
  37. package/dist/clis/doubao-app/common.d.ts +37 -0
  38. package/dist/clis/doubao-app/common.js +110 -0
  39. package/dist/clis/doubao-app/dump.d.ts +1 -0
  40. package/dist/clis/doubao-app/dump.js +24 -0
  41. package/dist/clis/doubao-app/new.d.ts +1 -0
  42. package/dist/clis/doubao-app/new.js +20 -0
  43. package/dist/clis/doubao-app/read.d.ts +1 -0
  44. package/dist/clis/doubao-app/read.js +18 -0
  45. package/dist/clis/doubao-app/screenshot.d.ts +1 -0
  46. package/dist/clis/doubao-app/screenshot.js +18 -0
  47. package/dist/clis/doubao-app/send.d.ts +1 -0
  48. package/dist/clis/doubao-app/send.js +27 -0
  49. package/dist/clis/doubao-app/status.d.ts +1 -0
  50. package/dist/clis/doubao-app/status.js +16 -0
  51. package/dist/clis/hackernews/ask.yaml +38 -0
  52. package/dist/clis/hackernews/best.yaml +38 -0
  53. package/dist/clis/hackernews/jobs.yaml +36 -0
  54. package/dist/clis/hackernews/new.yaml +38 -0
  55. package/dist/clis/hackernews/search.yaml +44 -0
  56. package/dist/clis/hackernews/show.yaml +38 -0
  57. package/dist/clis/hackernews/top.yaml +3 -1
  58. package/dist/clis/hackernews/user.yaml +25 -0
  59. package/dist/clis/twitter/download.js +13 -97
  60. package/dist/clis/twitter/thread.js +2 -1
  61. package/dist/clis/v2ex/member.yaml +29 -0
  62. package/dist/clis/v2ex/node.yaml +34 -0
  63. package/dist/clis/v2ex/nodes.yaml +31 -0
  64. package/dist/clis/v2ex/replies.yaml +32 -0
  65. package/dist/clis/v2ex/user.yaml +34 -0
  66. package/dist/clis/weibo/search.d.ts +1 -0
  67. package/dist/clis/weibo/search.js +73 -0
  68. package/dist/clis/weixin/download.d.ts +12 -0
  69. package/dist/clis/weixin/download.js +183 -0
  70. package/dist/clis/xiaohongshu/download.js +12 -60
  71. package/dist/clis/xiaohongshu/publish.d.ts +18 -0
  72. package/dist/clis/xiaohongshu/publish.js +352 -0
  73. package/dist/clis/xiaohongshu/search.js +47 -15
  74. package/dist/clis/xiaohongshu/search.test.d.ts +1 -0
  75. package/dist/clis/xiaohongshu/search.test.js +114 -0
  76. package/dist/clis/yollomi/background.d.ts +4 -0
  77. package/dist/clis/yollomi/background.js +45 -0
  78. package/dist/clis/yollomi/edit.d.ts +5 -0
  79. package/dist/clis/yollomi/edit.js +56 -0
  80. package/dist/clis/yollomi/face-swap.d.ts +5 -0
  81. package/dist/clis/yollomi/face-swap.js +43 -0
  82. package/dist/clis/yollomi/generate.d.ts +9 -0
  83. package/dist/clis/yollomi/generate.js +100 -0
  84. package/dist/clis/yollomi/models.d.ts +1 -0
  85. package/dist/clis/yollomi/models.js +33 -0
  86. package/dist/clis/yollomi/object-remover.d.ts +4 -0
  87. package/dist/clis/yollomi/object-remover.js +42 -0
  88. package/dist/clis/yollomi/remove-bg.d.ts +4 -0
  89. package/dist/clis/yollomi/remove-bg.js +38 -0
  90. package/dist/clis/yollomi/restore.d.ts +4 -0
  91. package/dist/clis/yollomi/restore.js +38 -0
  92. package/dist/clis/yollomi/try-on.d.ts +4 -0
  93. package/dist/clis/yollomi/try-on.js +46 -0
  94. package/dist/clis/yollomi/upload.d.ts +7 -0
  95. package/dist/clis/yollomi/upload.js +71 -0
  96. package/dist/clis/yollomi/upscale.d.ts +4 -0
  97. package/dist/clis/yollomi/upscale.js +53 -0
  98. package/dist/clis/yollomi/utils.d.ts +45 -0
  99. package/dist/clis/yollomi/utils.js +180 -0
  100. package/dist/clis/yollomi/video.d.ts +5 -0
  101. package/dist/clis/yollomi/video.js +56 -0
  102. package/dist/clis/zhihu/download.d.ts +1 -5
  103. package/dist/clis/zhihu/download.js +20 -126
  104. package/dist/clis/zhihu/download.test.js +7 -5
  105. package/dist/clis/zhihu/question.js +2 -1
  106. package/dist/commanderAdapter.js +4 -6
  107. package/dist/constants.d.ts +2 -0
  108. package/dist/constants.js +2 -0
  109. package/dist/daemon.js +7 -3
  110. package/dist/discovery.js +10 -10
  111. package/dist/doctor.js +2 -1
  112. package/dist/download/article-download.d.ts +59 -0
  113. package/dist/download/article-download.js +178 -0
  114. package/dist/download/media-download.d.ts +49 -0
  115. package/dist/download/media-download.js +112 -0
  116. package/dist/errors.d.ts +23 -2
  117. package/dist/errors.js +58 -2
  118. package/dist/errors.test.d.ts +1 -0
  119. package/dist/errors.test.js +59 -0
  120. package/dist/execution.js +9 -10
  121. package/dist/explore.js +4 -2
  122. package/dist/external.d.ts +15 -0
  123. package/dist/external.js +48 -2
  124. package/dist/external.test.d.ts +1 -0
  125. package/dist/external.test.js +64 -0
  126. package/dist/main.js +10 -0
  127. package/dist/plugin.d.ts +4 -0
  128. package/dist/plugin.js +45 -23
  129. package/dist/plugin.test.js +6 -1
  130. package/dist/record.d.ts +47 -0
  131. package/dist/record.js +545 -0
  132. package/dist/registry.d.ts +7 -2
  133. package/dist/registry.js +2 -6
  134. package/dist/runtime.d.ts +3 -1
  135. package/dist/runtime.js +10 -3
  136. package/dist/validate.js +1 -3
  137. package/docs/.vitepress/config.mts +1 -0
  138. package/docs/adapters/browser/douban.md +18 -8
  139. package/docs/adapters/browser/doubao.md +35 -0
  140. package/docs/adapters/browser/hackernews.md +20 -4
  141. package/docs/adapters/browser/tiktok.md +1 -1
  142. package/docs/adapters/browser/v2ex.md +31 -10
  143. package/docs/adapters/browser/weibo.md +4 -0
  144. package/docs/adapters/browser/weixin.md +33 -0
  145. package/docs/adapters/browser/wikipedia.md +0 -9
  146. package/docs/adapters/browser/xiaohongshu.md +8 -6
  147. package/docs/adapters/browser/yollomi.md +69 -0
  148. package/docs/adapters/desktop/antigravity.md +0 -3
  149. package/docs/adapters/desktop/doubao-app.md +35 -0
  150. package/docs/adapters/index.md +19 -8
  151. package/docs/advanced/download.md +4 -0
  152. package/package.json +3 -1
  153. package/src/browser/cdp.ts +9 -1
  154. package/src/browser/daemon-client.ts +4 -3
  155. package/src/browser/discover.ts +2 -1
  156. package/src/browser/errors.ts +18 -11
  157. package/src/browser/index.ts +1 -0
  158. package/src/browser/page.ts +11 -0
  159. package/src/browser/stealth.ts +142 -0
  160. package/src/browser.test.ts +51 -1
  161. package/src/build-manifest.ts +1 -3
  162. package/src/cli.ts +45 -2
  163. package/src/clis/bilibili/download.ts +25 -83
  164. package/src/clis/bilibili/utils.ts +2 -1
  165. package/src/clis/chaoxing/assignments.ts +2 -1
  166. package/src/clis/doubao/ask.ts +40 -0
  167. package/src/clis/doubao/common.ts +619 -0
  168. package/src/clis/doubao/new.ts +22 -0
  169. package/src/clis/doubao/read.ts +20 -0
  170. package/src/clis/doubao/send.ts +25 -0
  171. package/src/clis/doubao/status.ts +27 -0
  172. package/src/clis/doubao-app/ask.ts +60 -0
  173. package/src/clis/doubao-app/common.ts +116 -0
  174. package/src/clis/doubao-app/dump.ts +28 -0
  175. package/src/clis/doubao-app/new.ts +21 -0
  176. package/src/clis/doubao-app/read.ts +21 -0
  177. package/src/clis/doubao-app/screenshot.ts +19 -0
  178. package/src/clis/doubao-app/send.ts +30 -0
  179. package/src/clis/doubao-app/status.ts +17 -0
  180. package/src/clis/hackernews/ask.yaml +38 -0
  181. package/src/clis/hackernews/best.yaml +38 -0
  182. package/src/clis/hackernews/jobs.yaml +36 -0
  183. package/src/clis/hackernews/new.yaml +38 -0
  184. package/src/clis/hackernews/search.yaml +44 -0
  185. package/src/clis/hackernews/show.yaml +38 -0
  186. package/src/clis/hackernews/top.yaml +3 -1
  187. package/src/clis/hackernews/user.yaml +25 -0
  188. package/src/clis/twitter/download.ts +13 -111
  189. package/src/clis/twitter/thread.ts +2 -1
  190. package/src/clis/v2ex/member.yaml +29 -0
  191. package/src/clis/v2ex/node.yaml +34 -0
  192. package/src/clis/v2ex/nodes.yaml +31 -0
  193. package/src/clis/v2ex/replies.yaml +32 -0
  194. package/src/clis/v2ex/user.yaml +34 -0
  195. package/src/clis/weibo/search.ts +78 -0
  196. package/src/clis/weixin/download.ts +199 -0
  197. package/src/clis/xiaohongshu/download.ts +12 -71
  198. package/src/clis/xiaohongshu/publish.ts +392 -0
  199. package/src/clis/xiaohongshu/search.test.ts +134 -0
  200. package/src/clis/xiaohongshu/search.ts +49 -15
  201. package/src/clis/yollomi/background.ts +48 -0
  202. package/src/clis/yollomi/edit.ts +58 -0
  203. package/src/clis/yollomi/face-swap.ts +45 -0
  204. package/src/clis/yollomi/generate.ts +95 -0
  205. package/src/clis/yollomi/models.ts +38 -0
  206. package/src/clis/yollomi/object-remover.ts +44 -0
  207. package/src/clis/yollomi/remove-bg.ts +40 -0
  208. package/src/clis/yollomi/restore.ts +40 -0
  209. package/src/clis/yollomi/try-on.ts +48 -0
  210. package/src/clis/yollomi/upload.ts +78 -0
  211. package/src/clis/yollomi/upscale.ts +49 -0
  212. package/src/clis/yollomi/utils.ts +202 -0
  213. package/src/clis/yollomi/video.ts +61 -0
  214. package/src/clis/zhihu/download.test.ts +7 -5
  215. package/src/clis/zhihu/download.ts +23 -158
  216. package/src/clis/zhihu/question.ts +2 -1
  217. package/src/commanderAdapter.ts +4 -7
  218. package/src/constants.ts +3 -0
  219. package/src/daemon.ts +7 -3
  220. package/src/discovery.ts +26 -26
  221. package/src/doctor.ts +2 -1
  222. package/src/download/article-download.ts +272 -0
  223. package/src/download/media-download.ts +178 -0
  224. package/src/errors.test.ts +79 -0
  225. package/src/errors.ts +92 -2
  226. package/src/execution.ts +14 -10
  227. package/src/explore.ts +4 -2
  228. package/src/external.test.ts +88 -0
  229. package/src/external.ts +56 -2
  230. package/src/generate.ts +2 -1
  231. package/src/main.ts +10 -0
  232. package/src/plugin.test.ts +7 -1
  233. package/src/plugin.ts +49 -25
  234. package/src/record.ts +617 -0
  235. package/src/registry.ts +9 -5
  236. package/src/runtime.ts +16 -4
  237. package/src/validate.ts +1 -3
  238. package/tests/e2e/browser-auth.test.ts +10 -1
  239. package/tests/e2e/browser-public.test.ts +13 -8
  240. package/tests/e2e/public-commands.test.ts +209 -21
  241. package/tests/smoke/api-health.test.ts +65 -6
@@ -6,19 +6,17 @@
6
6
 
7
7
  | Command | Description |
8
8
  |---------|-------------|
9
+ | `opencli douban search` | 搜索豆瓣电影、图书或音乐 |
10
+ | `opencli douban top250` | 豆瓣电影 Top 250 |
11
+ | `opencli douban subject` | 条目详情 |
12
+ | `opencli douban marks` | 我的标记 |
13
+ | `opencli douban reviews` | 我的短评 |
9
14
  | `opencli douban movie-hot` | 豆瓣电影热门榜单 |
10
15
  | `opencli douban book-hot` | 豆瓣图书热门榜单 |
11
- | `opencli douban search` | 搜索豆瓣电影、图书或音乐 |
12
16
 
13
17
  ## Usage Examples
14
18
 
15
19
  ```bash
16
- # 电影热门
17
- opencli douban movie-hot --limit 10
18
-
19
- # 图书热门
20
- opencli douban book-hot --limit 10
21
-
22
20
  # 搜索电影
23
21
  opencli douban search "流浪地球"
24
22
 
@@ -28,8 +26,20 @@ opencli douban search --type book "三体"
28
26
  # 搜索音乐
29
27
  opencli douban search --type music "周杰伦"
30
28
 
29
+ # 电影 Top 250
30
+ opencli douban top250 --limit 10
31
+
32
+ # 条目详情
33
+ opencli douban subject 1292052
34
+
35
+ # 电影热门
36
+ opencli douban movie-hot --limit 10
37
+
38
+ # 图书热门
39
+ opencli douban book-hot --limit 10
40
+
31
41
  # JSON output
32
- opencli douban movie-hot -f json
42
+ opencli douban top250 -f json
33
43
  ```
34
44
 
35
45
  ## Prerequisites
@@ -0,0 +1,35 @@
1
+ # doubao
2
+
3
+ Browser adapter for [Doubao Chat](https://www.doubao.com/chat).
4
+
5
+ ## Commands
6
+
7
+ | Command | Description |
8
+ |---------|-------------|
9
+ | `opencli doubao status` | Check whether the page is reachable and whether Doubao appears logged in |
10
+ | `opencli doubao new` | Start a new Doubao conversation |
11
+ | `opencli doubao send "..."` | Send a message to the current Doubao chat |
12
+ | `opencli doubao read` | Read the visible Doubao conversation |
13
+ | `opencli doubao ask "..."` | Send a prompt and wait for a reply |
14
+
15
+ ## Prerequisites
16
+
17
+ - Chrome is running
18
+ - You are already logged into [doubao.com](https://www.doubao.com/)
19
+ - Playwright MCP Bridge / browser bridge is configured for OpenCLI
20
+
21
+ ## Examples
22
+
23
+ ```bash
24
+ opencli doubao status
25
+ opencli doubao new
26
+ opencli doubao send "帮我总结这段文档"
27
+ opencli doubao read
28
+ opencli doubao ask "请写一个 Python 快速排序示例" --timeout 90
29
+ ```
30
+
31
+ ## Notes
32
+
33
+ - The adapter targets the web chat page at `https://www.doubao.com/chat`
34
+ - `new` first tries the visible "New Chat / 新对话" button, then falls back to the new-thread route
35
+ - `ask` uses DOM polling, so very long generations may need a larger `--timeout`
@@ -6,19 +6,35 @@
6
6
 
7
7
  | Command | Description |
8
8
  |---------|-------------|
9
- | `opencli hackernews top` | |
9
+ | `opencli hackernews top` | Hacker News top stories |
10
+ | `opencli hackernews new` | Hacker News newest stories |
11
+ | `opencli hackernews best` | Hacker News best stories |
12
+ | `opencli hackernews ask` | Hacker News Ask HN posts |
13
+ | `opencli hackernews show` | Hacker News Show HN posts |
14
+ | `opencli hackernews jobs` | Hacker News job postings |
15
+ | `opencli hackernews search <query>` | Search Hacker News stories |
16
+ | `opencli hackernews user <username>` | Hacker News user profile |
10
17
 
11
18
  ## Usage Examples
12
19
 
13
20
  ```bash
14
- # Quick start
21
+ # Top stories
15
22
  opencli hackernews top --limit 5
16
23
 
24
+ # Newest stories
25
+ opencli hackernews new --limit 10
26
+
27
+ # Search stories
28
+ opencli hackernews search "machine learning" --limit 5
29
+
30
+ # User profile
31
+ opencli hackernews user pg
32
+
17
33
  # JSON output
18
34
  opencli hackernews top -f json
19
35
 
20
- # Verbose mode
21
- opencli hackernews top -v
36
+ # Sort search by date
37
+ opencli hackernews search "rust" --sort date
22
38
  ```
23
39
 
24
40
  ## Prerequisites
@@ -29,7 +29,7 @@
29
29
  opencli tiktok profile --username tiktok
30
30
 
31
31
  # Search videos
32
- opencli tiktok search --query "cooking" --limit 10
32
+ opencli tiktok search "cooking" --limit 10
33
33
 
34
34
  # Trending explore videos
35
35
  opencli tiktok explore --limit 20
@@ -6,27 +6,48 @@
6
6
 
7
7
  | Command | Description |
8
8
  |---------|-------------|
9
- | `opencli v2ex hot` | |
10
- | `opencli v2ex latest` | |
11
- | `opencli v2ex topic` | |
12
- | `opencli v2ex daily` | |
13
- | `opencli v2ex me` | |
14
- | `opencli v2ex notifications` | |
9
+ | `opencli v2ex hot` | Hot topics |
10
+ | `opencli v2ex latest` | Latest topics |
11
+ | `opencli v2ex topic <id>` | Topic detail |
12
+ | `opencli v2ex node <name>` | Topics by node |
13
+ | `opencli v2ex user <username>` | Topics by user |
14
+ | `opencli v2ex member <username>` | User profile |
15
+ | `opencli v2ex replies <id>` | Topic replies |
16
+ | `opencli v2ex nodes` | All nodes (sorted by topic count) |
17
+ | `opencli v2ex daily` | Daily hot |
18
+ | `opencli v2ex me` | My profile (auth required) |
19
+ | `opencli v2ex notifications` | My notifications (auth required) |
15
20
 
16
21
  ## Usage Examples
17
22
 
18
23
  ```bash
19
- # Quick start
24
+ # Hot topics
20
25
  opencli v2ex hot --limit 5
21
26
 
27
+ # Browse topics in a node
28
+ opencli v2ex node python
29
+
30
+ # View topic replies
31
+ opencli v2ex replies 1000
32
+
33
+ # User's topics
34
+ opencli v2ex user Livid
35
+
36
+ # User profile
37
+ opencli v2ex member Livid
38
+
39
+ # List all nodes
40
+ opencli v2ex nodes --limit 10
41
+
22
42
  # JSON output
23
43
  opencli v2ex hot -f json
24
-
25
- # Verbose mode
26
- opencli v2ex hot -v
27
44
  ```
28
45
 
29
46
  ## Prerequisites
30
47
 
48
+ Most commands (`hot`, `latest`, `topic`, `node`, `user`, `member`, `replies`, `nodes`) use the public V2EX API and **require no browser or login**.
49
+
50
+ For `daily`, `me`, and `notifications`:
51
+
31
52
  - Chrome running and **logged into** v2ex.com
32
53
  - [Browser Bridge extension](/guide/browser-bridge) installed
@@ -7,6 +7,7 @@
7
7
  | Command | Description |
8
8
  |---------|-------------|
9
9
  | `opencli weibo hot` | |
10
+ | `opencli weibo search` | Search Weibo posts by keyword |
10
11
 
11
12
  ## Usage Examples
12
13
 
@@ -17,6 +18,9 @@ opencli weibo hot --limit 5
17
18
  # JSON output
18
19
  opencli weibo hot -f json
19
20
 
21
+ # Search
22
+ opencli weibo search "OpenAI" --limit 5
23
+
20
24
  # Verbose mode
21
25
  opencli weibo hot -v
22
26
  ```
@@ -0,0 +1,33 @@
1
+ # WeChat (微信公众号)
2
+
3
+ **Mode**: 🔐 Browser · **Domain**: `mp.weixin.qq.com`
4
+
5
+ ## Commands
6
+
7
+ | Command | Description |
8
+ |---------|-------------|
9
+ | `opencli weixin download` | 下载微信公众号文章为 Markdown 格式 |
10
+
11
+ ## Usage Examples
12
+
13
+ ```bash
14
+ # Export article to Markdown
15
+ opencli weixin download --url "https://mp.weixin.qq.com/s/xxx" --output ./weixin
16
+
17
+ # Export with locally downloaded images
18
+ opencli weixin download --url "https://mp.weixin.qq.com/s/xxx" --download-images
19
+
20
+ # Export without images
21
+ opencli weixin download --url "https://mp.weixin.qq.com/s/xxx" --no-download-images
22
+ ```
23
+
24
+ ## Output
25
+
26
+ Downloads to `<output>/<article-title>/`:
27
+ - `<article-title>.md` — Markdown with frontmatter (title, author, publish time, source URL)
28
+ - `images/` — Downloaded images (if `--download-images` is enabled, default: true)
29
+
30
+ ## Prerequisites
31
+
32
+ - Chrome running and **logged into** mp.weixin.qq.com (for articles behind login wall)
33
+ - [Browser Bridge extension](/guide/browser-bridge) installed
@@ -8,8 +8,6 @@
8
8
  |---------|-------------|
9
9
  | `opencli wikipedia search` | Search Wikipedia articles |
10
10
  | `opencli wikipedia summary` | Get Wikipedia article summary |
11
- | `opencli wikipedia random` | Get a random Wikipedia article |
12
- | `opencli wikipedia trending` | Most-read articles (yesterday) |
13
11
 
14
12
  ## Usage Examples
15
13
 
@@ -20,15 +18,8 @@ opencli wikipedia search "quantum computing" --limit 10
20
18
  # Get article summary
21
19
  opencli wikipedia summary "Artificial intelligence"
22
20
 
23
- # Get a random article
24
- opencli wikipedia random
25
-
26
- # Most-read articles (yesterday)
27
- opencli wikipedia trending --limit 5
28
-
29
21
  # Use with other languages
30
22
  opencli wikipedia search "人工智能" --lang zh
31
- opencli wikipedia random --lang ja
32
23
 
33
24
  # JSON output
34
25
  opencli wikipedia search "Rust" -f json
@@ -6,7 +6,7 @@
6
6
 
7
7
  | Command | Description |
8
8
  |---------|-------------|
9
- | `opencli xiaohongshu search` | |
9
+ | `opencli xiaohongshu search` | Search notes by keyword (returns title, author, likes, URL) |
10
10
  | `opencli xiaohongshu notifications` | |
11
11
  | `opencli xiaohongshu feed` | |
12
12
  | `opencli xiaohongshu user` | |
@@ -20,14 +20,16 @@
20
20
  ## Usage Examples
21
21
 
22
22
  ```bash
23
- # Quick start
24
- opencli xiaohongshu search --limit 5
23
+ # Search for notes
24
+ opencli xiaohongshu search 美食 --limit 10
25
25
 
26
26
  # JSON output
27
- opencli xiaohongshu search -f json
27
+ opencli xiaohongshu search 旅行 -f json
28
28
 
29
- # Verbose mode
30
- opencli xiaohongshu search -v
29
+ # Other commands
30
+ opencli xiaohongshu feed
31
+ opencli xiaohongshu notifications
32
+ opencli xiaohongshu download <url>
31
33
  ```
32
34
 
33
35
  ## Prerequisites
@@ -0,0 +1,69 @@
1
+ # Yollomi
2
+
3
+ **Mode**: 🔐 Browser · **Domain**: `yollomi.com`
4
+
5
+ AI image/video generation and editing on [yollomi.com](https://yollomi.com). Uses the same `/api/ai/*` routes as the web app; authentication is your **logged-in Chrome session** (NextAuth cookies).
6
+
7
+ ## Commands
8
+
9
+ | Command | Description |
10
+ |---------|-------------|
11
+ | `opencli yollomi generate` | Text-to-image / image-to-image |
12
+ | `opencli yollomi video` | Text-to-video / image-to-video |
13
+ | `opencli yollomi edit` | Qwen image edit (prompt + image) |
14
+ | `opencli yollomi upload` | Upload a local file → public URL for other commands |
15
+ | `opencli yollomi models` | List image / video / tool models and credit costs |
16
+ | `opencli yollomi remove-bg` | Remove background (free) |
17
+ | `opencli yollomi upscale` | Image upscaling |
18
+ | `opencli yollomi face-swap` | Face swap between two images |
19
+ | `opencli yollomi restore` | Photo restoration |
20
+ | `opencli yollomi try-on` | Virtual try-on |
21
+ | `opencli yollomi background` | AI background for product/object images |
22
+ | `opencli yollomi object-remover` | Remove objects (image + mask URLs) |
23
+
24
+ ## Usage Examples
25
+
26
+ ```bash
27
+ # List models
28
+ opencli yollomi models --type image
29
+
30
+ # Text-to-image (default model: z-image-turbo)
31
+ opencli yollomi generate "a red apple on a wooden table"
32
+
33
+ # Choose model and aspect ratio
34
+ opencli yollomi generate "sunset" --model flux-schnell --ratio 16:9
35
+
36
+ # Image-to-image: upload first, then pass URL
37
+ opencli yollomi upload ./photo.png
38
+ opencli yollomi generate "oil painting style" --model flux-2-pro --image "https://..."
39
+
40
+ # Video
41
+ opencli yollomi video "waves on a beach" --model kling-2-1
42
+
43
+ # Tools
44
+ opencli yollomi remove-bg https://example.com/image.png
45
+ opencli yollomi upscale https://example.com/image.png --scale 4
46
+ opencli yollomi edit https://example.com/in.png "make it vintage"
47
+ ```
48
+
49
+ ### Common options
50
+
51
+ | Option | Applies to | Description |
52
+ |--------|------------|-------------|
53
+ | `--model` | `generate`, `video` | Model id (see `yollomi models`) |
54
+ | `--ratio` | `generate`, `video` | Aspect ratio, e.g. `1:1`, `16:9` |
55
+ | `--image` | `generate`, `video` | Image URL for img2img / i2v |
56
+ | `--output` | Most | Output directory (default `./yollomi-output`) |
57
+ | `--no-download` | Several | Print URLs only, skip saving files |
58
+
59
+ ## Prerequisites
60
+
61
+ - Chrome running and **logged into** [yollomi.com](https://yollomi.com) (Google OAuth)
62
+ - [Browser Bridge extension](/guide/browser-bridge) installed; daemon connects on first command
63
+
64
+ The CLI ensures the automation tab is on `yollomi.com` before calling APIs (same-origin `fetch` with session cookies).
65
+
66
+ ## Notes
67
+
68
+ - **Credits**: Each model consumes account credits; insufficient credits returns HTTP 402.
69
+ - **Upload**: Local paths for tools are not accepted directly — use `yollomi upload` to get a URL, or pass an existing HTTPS image URL.
@@ -47,6 +47,3 @@ Quickly target and switch the active LLM engine. Example: `opencli antigravity m
47
47
 
48
48
  ### `opencli antigravity watch`
49
49
  A long-running, streaming process that continuously polls the Antigravity UI for chat updates and outputs them in real-time to standard output.
50
-
51
- ### `opencli antigravity serve --port 8082`
52
- Start an Anthropic-compatible `/v1/messages` proxy backed by the local Antigravity app. Useful when you want external tools to talk to Antigravity through an API-shaped interface.
@@ -0,0 +1,35 @@
1
+ # Doubao App (豆包桌面版)
2
+
3
+ Control the **Doubao AI Desktop App** via Chrome DevTools Protocol (CDP).
4
+
5
+ ## Prerequisites
6
+
7
+ 1. Launch Doubao Desktop with remote debugging enabled:
8
+ ```bash
9
+ /Applications/Doubao.app/Contents/MacOS/Doubao --remote-debugging-port=9225
10
+ ```
11
+ 2. Set the CDP endpoint:
12
+ ```bash
13
+ export OPENCLI_CDP_ENDPOINT="http://127.0.0.1:9225"
14
+ ```
15
+
16
+ ## Commands
17
+
18
+ | Command | Description |
19
+ |---------|-------------|
20
+ | `opencli doubao-app status` | Check CDP connection status |
21
+ | `opencli doubao-app new` | Start a new conversation |
22
+ | `opencli doubao-app send "message"` | Send a message to the current chat |
23
+ | `opencli doubao-app read` | Read the latest assistant reply |
24
+ | `opencli doubao-app ask "message"` | Send a prompt and wait for the reply |
25
+ | `opencli doubao-app screenshot` | Capture a screenshot of the app window |
26
+ | `opencli doubao-app dump` | Export DOM and snapshot debug info |
27
+
28
+ ## How It Works
29
+
30
+ Connects to the Doubao Electron app via CDP, injecting JavaScript into the renderer process to control the chat UI — sending messages, reading replies, and capturing screenshots.
31
+
32
+ ## Limitations
33
+
34
+ - Requires Doubao Desktop to be launched with `--remote-debugging-port`
35
+ - macOS / Linux / Windows (Electron-based, platform independent)
@@ -6,34 +6,43 @@ Run `opencli list` for the live registry.
6
6
 
7
7
  | Site | Commands | Mode |
8
8
  |------|----------|------|
9
- | **[twitter](/adapters/browser/twitter)** | `trending` `bookmarks` `profile` `search` `timeline` `thread` `following` `followers` `notifications` `post` `reply` `delete` `like` `article` `follow` `unfollow` `bookmark` `unbookmark` `download` `accept` `reply-dm` | 🔐 Browser |
9
+ | **[twitter](/adapters/browser/twitter)** | `trending` `bookmarks` `profile` `search` `timeline` `thread` `following` `followers` `notifications` `post` `reply` `delete` `like` `article` `follow` `unfollow` `bookmark` `unbookmark` `download` `accept` `reply-dm` `block` `unblock` `hide-reply` | 🔐 Browser |
10
10
  | **[reddit](/adapters/browser/reddit)** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `save` `comment` `subscribe` `saved` `upvoted` | 🔐 Browser |
11
11
  | **[bilibili](/adapters/browser/bilibili)** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `dynamic` `ranking` `following` `user-videos` `download` | 🔐 Browser |
12
12
  | **[zhihu](/adapters/browser/zhihu)** | `hot` `search` `question` `download` | 🔐 Browser |
13
- | **[xiaohongshu](/adapters/browser/xiaohongshu)** | `search` `notifications` `feed` `me` `user` `download` | 🔐 Browser |
14
- | **[xueqiu](/adapters/browser/xueqiu)** | `feed` `hot-stock` `hot` `search` `stock` `watchlist` | 🔐 Browser |
13
+ | **[xiaohongshu](/adapters/browser/xiaohongshu)** | `search` `notifications` `feed` `user` `download` `publish` `creator-notes` `creator-note-detail` `creator-notes-summary` `creator-profile` `creator-stats` | 🔐 Browser |
14
+ | **[xueqiu](/adapters/browser/xueqiu)** | `feed` `hot-stock` `hot` `search` `stock` `watchlist` `earnings-date` | 🔐 Browser |
15
15
  | **[youtube](/adapters/browser/youtube)** | `search` `video` `transcript` | 🔐 Browser |
16
- | **[v2ex](/adapters/browser/v2ex)** | `hot` `latest` `topic` `daily` `me` `notifications` | 🌐 / 🔐 |
16
+ | **[v2ex](/adapters/browser/v2ex)** | `hot` `latest` `topic` `node` `user` `member` `replies` `nodes` `daily` `me` `notifications` | 🌐 / 🔐 |
17
17
  | **[bloomberg](/adapters/browser/bloomberg)** | `main` `markets` `economics` `industries` `tech` `politics` `businessweek` `opinions` `feeds` `news` | 🌐 / 🔐 |
18
- | **[weibo](/adapters/browser/weibo)** | `hot` | 🔐 Browser |
18
+ | **[weibo](/adapters/browser/weibo)** | `hot` `search` | 🔐 Browser |
19
19
  | **[linkedin](/adapters/browser/linkedin)** | `search` | 🔐 Browser |
20
20
  | **[coupang](/adapters/browser/coupang)** | `search` `add-to-cart` | 🔐 Browser |
21
- | **[boss](/adapters/browser/boss)** | `search` `detail` | 🔐 Browser |
21
+ | **[boss](/adapters/browser/boss)** | `search` `detail` `recommend` `joblist` `greet` `batchgreet` `send` `chatlist` `chatmsg` `invite` `mark` `exchange` `resume` `stats` | 🔐 Browser |
22
22
  | **[ctrip](/adapters/browser/ctrip)** | `search` | 🔐 Browser |
23
23
  | **[reuters](/adapters/browser/reuters)** | `search` | 🔐 Browser |
24
24
  | **[smzdm](/adapters/browser/smzdm)** | `search` | 🔐 Browser |
25
25
  | **[jike](/adapters/browser/jike)** | `feed` `search` `post` `topic` `user` `create` `comment` `like` `repost` `notifications` | 🔐 Browser |
26
26
  | **[jimeng](/adapters/browser/jimeng)** | `generate` `history` | 🔐 Browser |
27
+ | **[yollomi](/adapters/browser/yollomi)** | `generate` `video` `edit` `upload` `models` `remove-bg` `upscale` `face-swap` `restore` `try-on` `background` `object-remover` | 🔐 Browser |
27
28
  | **[linux-do](/adapters/browser/linux-do)** | `hot` `latest` `categories` `category` `search` `topic` | 🔐 Browser |
28
29
  | **[chaoxing](/adapters/browser/chaoxing)** | `assignments` `exams` | 🔐 Browser |
29
30
  | **[grok](/adapters/browser/grok)** | `ask` | 🔐 Browser |
31
+ | **[doubao](/adapters/browser/doubao)** | `status` `new` `send` `read` `ask` | 🔐 Browser |
30
32
  | **[weread](/adapters/browser/weread)** | `shelf` `search` `book` `ranking` `notebooks` `highlights` `notes` | 🔐 Browser |
33
+ | **[douban](/adapters/browser/douban)** | `search` `top250` `subject` `marks` `reviews` `movie-hot` `book-hot` | 🔐 Browser |
34
+ | **[facebook](/adapters/browser/facebook)** | `feed` `profile` `search` `friends` `groups` `events` `notifications` `memories` `add-friend` `join-group` | 🔐 Browser |
35
+ | **[instagram](/adapters/browser/instagram)** | `explore` `profile` `search` `user` `followers` `following` `follow` `unfollow` `like` `unlike` `comment` `save` `unsave` `saved` | 🔐 Browser |
36
+ | **[medium](/adapters/browser/medium)** | `feed` `search` `user` | 🔐 Browser |
37
+ | **[sinablog](/adapters/browser/sinablog)** | `hot` `search` `article` `user` | 🔐 Browser |
38
+ | **[substack](/adapters/browser/substack)** | `feed` `search` `publication` | 🔐 Browser |
39
+ | **[tiktok](/adapters/browser/tiktok)** | `explore` `search` `profile` `user` `following` `follow` `unfollow` `like` `unlike` `comment` `save` `unsave` `live` `notifications` `friends` | 🔐 Browser |
31
40
 
32
41
  ## Public API Adapters
33
42
 
34
43
  | Site | Commands | Mode |
35
44
  |------|----------|------|
36
- | **[hackernews](/adapters/browser/hackernews)** | `top` | 🌐 Public |
45
+ | **[hackernews](/adapters/browser/hackernews)** | `top` `new` `best` `ask` `show` `jobs` `search` `user` | 🌐 Public |
37
46
  | **[bbc](/adapters/browser/bbc)** | `news` | 🌐 Public |
38
47
  | **[devto](/adapters/browser/devto)** | `top` `tag` `user` | 🌐 Public |
39
48
  | **[apple-podcasts](/adapters/browser/apple-podcasts)** | `search` `episodes` `top` | 🌐 Public |
@@ -44,7 +53,8 @@ Run `opencli list` for the live registry.
44
53
  | **[hf](/adapters/browser/hf)** | `top` | 🌐 Public |
45
54
  | **[sinafinance](/adapters/browser/sinafinance)** | `news` | 🌐 Public |
46
55
  | **[stackoverflow](/adapters/browser/stackoverflow)** | `hot` `search` `bounties` `unanswered` | 🌐 Public |
47
- | **[wikipedia](/adapters/browser/wikipedia)** | `search` `summary` | 🌐 Public |
56
+ | **[wikipedia](/adapters/browser/wikipedia)** | `search` `summary` `random` `trending` | 🌐 Public |
57
+ | **[lobsters](/adapters/browser/lobsters)** | `hot` `newest` `active` `tag` | 🌐 Public |
48
58
 
49
59
  ## Desktop Adapters
50
60
 
@@ -57,3 +67,4 @@ Run `opencli list` for the live registry.
57
67
  | **[ChatWise](/adapters/desktop/chatwise)** | Multi-LLM client | `status` `new` `send` `read` `ask` `model` `history` `export` `screenshot` |
58
68
  | **[Notion](/adapters/desktop/notion)** | Search, read, write pages | `status` `search` `read` `new` `write` `sidebar` `favorites` `export` |
59
69
  | **[Discord](/adapters/desktop/discord)** | Desktop messages & channels | `status` `send` `read` `channels` `servers` `search` `members` |
70
+ | **[Doubao App](/adapters/desktop/doubao-app)** | Doubao AI desktop app via CDP | `status` `new` `send` `read` `ask` `screenshot` `dump` |
@@ -10,6 +10,7 @@ OpenCLI supports downloading images, videos, and articles from supported platfor
10
10
  | **bilibili** | Videos | Requires `yt-dlp` installed |
11
11
  | **twitter** | Images, Videos | Downloads from user media tab or single tweet |
12
12
  | **zhihu** | Articles (Markdown) | Exports articles with optional image download |
13
+ | **weixin** | Articles (Markdown) | Exports WeChat Official Account articles |
13
14
 
14
15
  ## Prerequisites
15
16
 
@@ -43,6 +44,9 @@ opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --output ./zhihu
43
44
 
44
45
  # Export with local images
45
46
  opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --download-images
47
+
48
+ # Export WeChat article to Markdown
49
+ opencli weixin download --url "https://mp.weixin.qq.com/s/xxx" --output ./weixin
46
50
  ```
47
51
 
48
52
  ## Pipeline Step (YAML Adapters)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jackwener/opencli",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -53,11 +53,13 @@
53
53
  "cli-table3": "^0.6.5",
54
54
  "commander": "^14.0.3",
55
55
  "js-yaml": "^4.1.0",
56
+ "turndown": "^7.2.2",
56
57
  "ws": "^8.18.0"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@types/js-yaml": "^4.0.9",
60
61
  "@types/node": "^22.13.10",
62
+ "@types/turndown": "^5.0.6",
61
63
  "@types/ws": "^8.5.13",
62
64
  "tsx": "^4.19.3",
63
65
  "typescript": "^5.8.2",
@@ -12,6 +12,7 @@ import { WebSocket, type RawData } from 'ws';
12
12
  import type { BrowserCookie, IPage, ScreenshotOptions, SnapshotOptions, WaitOptions } from '../types.js';
13
13
  import { wrapForEval } from './utils.js';
14
14
  import { generateSnapshotJs, scrollToRefJs, getFormStateJs } from './dom-snapshot.js';
15
+ import { generateStealthJs } from './stealth.js';
15
16
  import {
16
17
  clickJs,
17
18
  typeTextJs,
@@ -71,9 +72,16 @@ export class CDPBridge {
71
72
  const timeoutMs = (opts?.timeout ?? 10) * 1000; // opts.timeout is in seconds
72
73
  const timeout = setTimeout(() => reject(new Error('CDP connect timeout')), timeoutMs);
73
74
 
74
- ws.on('open', () => {
75
+ ws.on('open', async () => {
75
76
  clearTimeout(timeout);
76
77
  this._ws = ws;
78
+ // Register stealth script to run before any page JS on every navigation.
79
+ try {
80
+ await this.send('Page.enable');
81
+ await this.send('Page.addScriptToEvaluateOnNewDocument', { source: generateStealthJs() });
82
+ } catch {
83
+ // Non-fatal: stealth is best-effort
84
+ }
77
85
  resolve(new CDPPage(this));
78
86
  });
79
87
 
@@ -4,11 +4,12 @@
4
4
  * Provides a typed send() function that posts a Command and returns a Result.
5
5
  */
6
6
 
7
- const DAEMON_PORT = parseInt(process.env.OPENCLI_DAEMON_PORT ?? '19825', 10);
8
- const DAEMON_URL = `http://127.0.0.1:${DAEMON_PORT}`;
9
-
7
+ import { DEFAULT_DAEMON_PORT } from '../constants.js';
10
8
  import type { BrowserSessionInfo } from '../types.js';
11
9
 
10
+ const DAEMON_PORT = parseInt(process.env.OPENCLI_DAEMON_PORT ?? String(DEFAULT_DAEMON_PORT), 10);
11
+ const DAEMON_URL = `http://127.0.0.1:${DAEMON_PORT}`;
12
+
12
13
  let _idCounter = 0;
13
14
 
14
15
  function generateId(): string {
@@ -5,6 +5,7 @@
5
5
  * scanning for @playwright/mcp locations.
6
6
  */
7
7
 
8
+ import { DEFAULT_DAEMON_PORT } from '../constants.js';
8
9
  import { isDaemonRunning } from './daemon-client.js';
9
10
 
10
11
  export { isDaemonRunning };
@@ -17,7 +18,7 @@ export async function checkDaemonStatus(): Promise<{
17
18
  extensionConnected: boolean;
18
19
  }> {
19
20
  try {
20
- const port = parseInt(process.env.OPENCLI_DAEMON_PORT ?? '19825', 10);
21
+ const port = parseInt(process.env.OPENCLI_DAEMON_PORT ?? String(DEFAULT_DAEMON_PORT), 10);
21
22
  const res = await fetch(`http://127.0.0.1:${port}/status`, {
22
23
  headers: { 'X-OpenCLI': '1' },
23
24
  });
@@ -5,31 +5,38 @@
5
5
  * The daemon architecture has a single failure mode: daemon not reachable or extension not connected.
6
6
  */
7
7
 
8
+ import { BrowserConnectError } from '../errors.js';
9
+ import { DEFAULT_DAEMON_PORT } from '../constants.js';
10
+
8
11
  export type ConnectFailureKind = 'daemon-not-running' | 'extension-not-connected' | 'command-failed' | 'unknown';
9
12
 
10
- export function formatBrowserConnectError(kind: ConnectFailureKind, detail?: string): Error {
13
+ export function formatBrowserConnectError(kind: ConnectFailureKind, detail?: string): BrowserConnectError {
11
14
  switch (kind) {
12
15
  case 'daemon-not-running':
13
- return new Error(
14
- 'Cannot connect to opencli daemon.\n\n' +
16
+ return new BrowserConnectError(
17
+ 'Cannot connect to opencli daemon.' +
18
+ (detail ? `\n\n${detail}` : ''),
15
19
  'The daemon should start automatically. If it doesn\'t, try:\n' +
16
20
  ' node dist/daemon.js\n' +
17
- 'Make sure port 19825 is available.' +
18
- (detail ? `\n\n${detail}` : ''),
21
+ `Make sure port ${DEFAULT_DAEMON_PORT} is available.`,
19
22
  );
20
23
  case 'extension-not-connected':
21
- return new Error(
22
- 'opencli Browser Bridge extension is not connected.\n\n' +
24
+ return new BrowserConnectError(
25
+ 'opencli Browser Bridge extension is not connected.' +
26
+ (detail ? `\n\n${detail}` : ''),
23
27
  'Please install the extension:\n' +
24
28
  ' 1. Download from GitHub Releases\n' +
25
29
  ' 2. Open chrome://extensions/ → Enable Developer Mode\n' +
26
30
  ' 3. Click "Load unpacked" → select the extension folder\n' +
27
- ' 4. Make sure Chrome is running' +
28
- (detail ? `\n\n${detail}` : ''),
31
+ ' 4. Make sure Chrome is running',
29
32
  );
30
33
  case 'command-failed':
31
- return new Error(`Browser command failed: ${detail ?? 'unknown error'}`);
34
+ return new BrowserConnectError(
35
+ `Browser command failed: ${detail ?? 'unknown error'}`,
36
+ );
32
37
  default:
33
- return new Error(detail ?? 'Failed to connect to browser');
38
+ return new BrowserConnectError(
39
+ detail ?? 'Failed to connect to browser',
40
+ );
34
41
  }
35
42
  }
@@ -10,6 +10,7 @@ export { BrowserBridge, BrowserBridge as PlaywrightMCP } from './mcp.js';
10
10
  export { CDPBridge } from './cdp.js';
11
11
  export { isDaemonRunning } from './daemon-client.js';
12
12
  export { generateSnapshotJs, scrollToRefJs, getFormStateJs } from './dom-snapshot.js';
13
+ export { generateStealthJs } from './stealth.js';
13
14
  export type { SnapshotOptions } from './dom-snapshot.js';
14
15
 
15
16
  import { extractTabEntries, diffTabIndexes, appendLimited } from './tabs.js';