@jackwener/opencli 1.6.9 → 1.6.10

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 (503) hide show
  1. package/README.md +115 -59
  2. package/README.zh-CN.md +121 -78
  3. package/dist/clis/_shared/common.d.ts +3 -0
  4. package/dist/clis/_shared/common.js +22 -0
  5. package/dist/clis/bilibili/hot.d.ts +1 -0
  6. package/dist/clis/bilibili/hot.js +35 -0
  7. package/dist/clis/bluesky/feeds.d.ts +1 -0
  8. package/dist/clis/bluesky/feeds.js +27 -0
  9. package/dist/clis/bluesky/followers.d.ts +1 -0
  10. package/dist/clis/bluesky/followers.js +27 -0
  11. package/dist/clis/bluesky/following.d.ts +1 -0
  12. package/dist/clis/bluesky/following.js +27 -0
  13. package/dist/clis/bluesky/profile.d.ts +1 -0
  14. package/dist/clis/bluesky/profile.js +29 -0
  15. package/dist/clis/bluesky/search.d.ts +1 -0
  16. package/dist/clis/bluesky/search.js +28 -0
  17. package/dist/clis/bluesky/starter-packs.d.ts +1 -0
  18. package/dist/clis/bluesky/starter-packs.js +28 -0
  19. package/dist/clis/bluesky/thread.d.ts +1 -0
  20. package/dist/clis/bluesky/thread.js +30 -0
  21. package/dist/clis/bluesky/trending.d.ts +1 -0
  22. package/dist/clis/bluesky/trending.js +19 -0
  23. package/dist/clis/bluesky/user.d.ts +1 -0
  24. package/dist/clis/bluesky/user.js +33 -0
  25. package/dist/clis/cnki/search.d.ts +1 -0
  26. package/dist/clis/cnki/search.js +60 -0
  27. package/dist/clis/cnki/search.test.d.ts +1 -0
  28. package/dist/clis/cnki/search.test.js +18 -0
  29. package/dist/clis/devto/tag.d.ts +1 -0
  30. package/dist/clis/devto/tag.js +32 -0
  31. package/dist/clis/devto/top.d.ts +1 -0
  32. package/dist/clis/devto/top.js +26 -0
  33. package/dist/clis/devto/user.d.ts +1 -0
  34. package/dist/clis/devto/user.js +31 -0
  35. package/dist/clis/dictionary/examples.d.ts +1 -0
  36. package/dist/clis/dictionary/examples.js +27 -0
  37. package/dist/clis/dictionary/search.d.ts +1 -0
  38. package/dist/clis/dictionary/search.js +29 -0
  39. package/dist/clis/dictionary/synonyms.d.ts +1 -0
  40. package/dist/clis/dictionary/synonyms.js +27 -0
  41. package/dist/clis/douban/subject.d.ts +1 -0
  42. package/dist/clis/douban/subject.js +118 -0
  43. package/dist/clis/douban/top250.d.ts +1 -0
  44. package/dist/clis/douban/top250.js +67 -0
  45. package/dist/clis/facebook/add-friend.d.ts +1 -0
  46. package/dist/clis/facebook/add-friend.js +43 -0
  47. package/dist/clis/facebook/events.d.ts +1 -0
  48. package/dist/clis/facebook/events.js +40 -0
  49. package/dist/clis/facebook/feed.d.ts +1 -0
  50. package/dist/clis/facebook/feed.js +59 -0
  51. package/dist/clis/facebook/friends.d.ts +1 -0
  52. package/dist/clis/facebook/friends.js +38 -0
  53. package/dist/clis/facebook/groups.d.ts +1 -0
  54. package/dist/clis/facebook/groups.js +46 -0
  55. package/dist/clis/facebook/join-group.d.ts +1 -0
  56. package/dist/clis/facebook/join-group.js +44 -0
  57. package/dist/clis/facebook/memories.d.ts +1 -0
  58. package/dist/clis/facebook/memories.js +35 -0
  59. package/dist/clis/facebook/notifications.d.ts +1 -0
  60. package/dist/clis/facebook/notifications.js +36 -0
  61. package/dist/clis/facebook/profile.d.ts +1 -0
  62. package/dist/clis/facebook/profile.js +37 -0
  63. package/dist/clis/facebook/search.d.ts +1 -0
  64. package/dist/clis/facebook/search.js +38 -0
  65. package/dist/clis/facebook/search.test.d.ts +1 -1
  66. package/dist/clis/facebook/search.test.js +6 -9
  67. package/dist/clis/gitee/index.d.ts +3 -0
  68. package/dist/clis/gitee/index.js +3 -0
  69. package/dist/clis/gitee/search.d.ts +1 -0
  70. package/dist/clis/gitee/search.js +136 -0
  71. package/dist/clis/gitee/trending.d.ts +1 -0
  72. package/dist/clis/gitee/trending.js +567 -0
  73. package/dist/clis/gitee/user.d.ts +1 -0
  74. package/dist/clis/gitee/user.js +199 -0
  75. package/dist/clis/gitee/user.test.d.ts +1 -0
  76. package/dist/clis/gitee/user.test.js +63 -0
  77. package/dist/clis/hackernews/ask.d.ts +1 -0
  78. package/dist/clis/hackernews/ask.js +29 -0
  79. package/dist/clis/hackernews/best.d.ts +1 -0
  80. package/dist/clis/hackernews/best.js +29 -0
  81. package/dist/clis/hackernews/jobs.d.ts +1 -0
  82. package/dist/clis/hackernews/jobs.js +27 -0
  83. package/dist/clis/hackernews/new.d.ts +1 -0
  84. package/dist/clis/hackernews/new.js +29 -0
  85. package/dist/clis/hackernews/search.d.ts +1 -0
  86. package/dist/clis/hackernews/search.js +36 -0
  87. package/dist/clis/hackernews/show.d.ts +1 -0
  88. package/dist/clis/hackernews/show.js +29 -0
  89. package/dist/clis/hackernews/top.d.ts +1 -0
  90. package/dist/clis/hackernews/top.js +29 -0
  91. package/dist/clis/hackernews/user.d.ts +1 -0
  92. package/dist/clis/hackernews/user.js +22 -0
  93. package/dist/clis/hupu/hot.d.ts +1 -0
  94. package/dist/clis/hupu/hot.js +40 -0
  95. package/dist/clis/instagram/comment.d.ts +1 -0
  96. package/dist/clis/instagram/comment.js +47 -0
  97. package/dist/clis/instagram/explore.d.ts +1 -0
  98. package/dist/clis/instagram/explore.js +41 -0
  99. package/dist/clis/instagram/follow.d.ts +1 -0
  100. package/dist/clis/instagram/follow.js +43 -0
  101. package/dist/clis/instagram/followers.d.ts +1 -0
  102. package/dist/clis/instagram/followers.js +45 -0
  103. package/dist/clis/instagram/following.d.ts +1 -0
  104. package/dist/clis/instagram/following.js +45 -0
  105. package/dist/clis/instagram/like.d.ts +1 -0
  106. package/dist/clis/instagram/like.js +45 -0
  107. package/dist/clis/instagram/profile.d.ts +1 -0
  108. package/dist/clis/instagram/profile.js +39 -0
  109. package/dist/clis/instagram/save.d.ts +1 -0
  110. package/dist/clis/instagram/save.js +45 -0
  111. package/dist/clis/instagram/saved.d.ts +1 -0
  112. package/dist/clis/instagram/saved.js +38 -0
  113. package/dist/clis/instagram/search.d.ts +1 -0
  114. package/dist/clis/instagram/search.js +38 -0
  115. package/dist/clis/instagram/unfollow.d.ts +1 -0
  116. package/dist/clis/instagram/unfollow.js +40 -0
  117. package/dist/clis/instagram/unlike.d.ts +1 -0
  118. package/dist/clis/instagram/unlike.js +45 -0
  119. package/dist/clis/instagram/unsave.d.ts +1 -0
  120. package/dist/clis/instagram/unsave.js +45 -0
  121. package/dist/clis/instagram/user.d.ts +1 -0
  122. package/dist/clis/instagram/user.js +48 -0
  123. package/dist/clis/jd/add-cart.d.ts +1 -0
  124. package/dist/clis/jd/add-cart.js +71 -0
  125. package/dist/clis/jd/cart.d.ts +1 -0
  126. package/dist/clis/jd/cart.js +79 -0
  127. package/dist/clis/jd/commands.test.d.ts +5 -0
  128. package/dist/clis/jd/commands.test.js +64 -0
  129. package/dist/clis/jd/detail.d.ts +1 -0
  130. package/dist/clis/jd/detail.js +62 -0
  131. package/dist/clis/jd/reviews.d.ts +1 -0
  132. package/dist/clis/jd/reviews.js +54 -0
  133. package/dist/clis/jd/search.d.ts +1 -0
  134. package/dist/clis/jd/search.js +65 -0
  135. package/dist/clis/jike/post.d.ts +1 -0
  136. package/dist/clis/jike/post.js +61 -0
  137. package/dist/clis/jike/topic.d.ts +1 -0
  138. package/dist/clis/jike/topic.js +51 -0
  139. package/dist/clis/jike/user.d.ts +1 -0
  140. package/dist/clis/jike/user.js +50 -0
  141. package/dist/clis/jimeng/generate.d.ts +1 -0
  142. package/dist/clis/jimeng/generate.js +83 -0
  143. package/dist/clis/jimeng/history.d.ts +1 -0
  144. package/dist/clis/jimeng/history.js +47 -0
  145. package/dist/clis/jimeng/new.d.ts +1 -0
  146. package/dist/clis/jimeng/new.js +43 -0
  147. package/dist/clis/jimeng/workspaces.d.ts +1 -0
  148. package/dist/clis/jimeng/workspaces.js +41 -0
  149. package/dist/clis/linux-do/categories.d.ts +1 -0
  150. package/dist/clis/linux-do/categories.js +65 -0
  151. package/dist/clis/linux-do/search.d.ts +1 -0
  152. package/dist/clis/linux-do/search.js +41 -0
  153. package/dist/clis/linux-do/tags.d.ts +1 -0
  154. package/dist/clis/linux-do/tags.js +39 -0
  155. package/dist/clis/linux-do/topic-content.test.js +5 -5
  156. package/dist/clis/linux-do/topic.d.ts +1 -0
  157. package/dist/clis/linux-do/topic.js +56 -0
  158. package/dist/clis/linux-do/user-posts.d.ts +1 -0
  159. package/dist/clis/linux-do/user-posts.js +61 -0
  160. package/dist/clis/linux-do/user-topics.d.ts +1 -0
  161. package/dist/clis/linux-do/user-topics.js +48 -0
  162. package/dist/clis/lobsters/active.d.ts +1 -0
  163. package/dist/clis/lobsters/active.js +26 -0
  164. package/dist/clis/lobsters/hot.d.ts +1 -0
  165. package/dist/clis/lobsters/hot.js +26 -0
  166. package/dist/clis/lobsters/newest.d.ts +1 -0
  167. package/dist/clis/lobsters/newest.js +26 -0
  168. package/dist/clis/lobsters/tag.d.ts +1 -0
  169. package/dist/clis/lobsters/tag.js +32 -0
  170. package/dist/clis/pixiv/detail.d.ts +1 -0
  171. package/dist/clis/pixiv/detail.js +58 -0
  172. package/dist/clis/pixiv/ranking.d.ts +1 -0
  173. package/dist/clis/pixiv/ranking.js +59 -0
  174. package/dist/clis/pixiv/user.d.ts +1 -0
  175. package/dist/clis/pixiv/user.js +52 -0
  176. package/dist/clis/reddit/frontpage.d.ts +1 -0
  177. package/dist/clis/reddit/frontpage.js +31 -0
  178. package/dist/clis/reddit/hot.d.ts +1 -0
  179. package/dist/clis/reddit/hot.js +45 -0
  180. package/dist/clis/reddit/popular.d.ts +1 -0
  181. package/dist/clis/reddit/popular.js +41 -0
  182. package/dist/clis/reddit/search.d.ts +1 -0
  183. package/dist/clis/reddit/search.js +65 -0
  184. package/dist/clis/reddit/subreddit.d.ts +1 -0
  185. package/dist/clis/reddit/subreddit.js +52 -0
  186. package/dist/clis/reddit/user-comments.d.ts +1 -0
  187. package/dist/clis/reddit/user-comments.js +44 -0
  188. package/dist/clis/reddit/user-posts.d.ts +1 -0
  189. package/dist/clis/reddit/user-posts.js +42 -0
  190. package/dist/clis/reddit/user.d.ts +1 -0
  191. package/dist/clis/reddit/user.js +37 -0
  192. package/dist/clis/stackoverflow/bounties.d.ts +1 -0
  193. package/dist/clis/stackoverflow/bounties.js +27 -0
  194. package/dist/clis/stackoverflow/hot.d.ts +1 -0
  195. package/dist/clis/stackoverflow/hot.js +24 -0
  196. package/dist/clis/stackoverflow/search.d.ts +1 -0
  197. package/dist/clis/stackoverflow/search.js +27 -0
  198. package/dist/clis/stackoverflow/unanswered.d.ts +1 -0
  199. package/dist/clis/stackoverflow/unanswered.js +26 -0
  200. package/dist/clis/steam/top-sellers.d.ts +1 -0
  201. package/dist/clis/steam/top-sellers.js +25 -0
  202. package/dist/clis/taobao/add-cart.d.ts +1 -0
  203. package/dist/clis/taobao/add-cart.js +149 -0
  204. package/dist/clis/taobao/cart.d.ts +1 -0
  205. package/dist/clis/taobao/cart.js +95 -0
  206. package/dist/clis/taobao/commands.test.d.ts +5 -0
  207. package/dist/clis/taobao/commands.test.js +64 -0
  208. package/dist/clis/taobao/detail.d.ts +1 -0
  209. package/dist/clis/taobao/detail.js +70 -0
  210. package/dist/clis/taobao/reviews.d.ts +1 -0
  211. package/dist/clis/taobao/reviews.js +76 -0
  212. package/dist/clis/taobao/search.d.ts +1 -0
  213. package/dist/clis/taobao/search.js +96 -0
  214. package/dist/clis/tiktok/comment.d.ts +1 -0
  215. package/dist/clis/tiktok/comment.js +57 -0
  216. package/dist/clis/tiktok/explore.d.ts +1 -0
  217. package/dist/clis/tiktok/explore.js +35 -0
  218. package/dist/clis/tiktok/follow.d.ts +1 -0
  219. package/dist/clis/tiktok/follow.js +39 -0
  220. package/dist/clis/tiktok/following.d.ts +1 -0
  221. package/dist/clis/tiktok/following.js +42 -0
  222. package/dist/clis/tiktok/friends.d.ts +1 -0
  223. package/dist/clis/tiktok/friends.js +43 -0
  224. package/dist/clis/tiktok/like.d.ts +1 -0
  225. package/dist/clis/tiktok/like.js +33 -0
  226. package/dist/clis/tiktok/live.d.ts +1 -0
  227. package/dist/clis/tiktok/live.js +47 -0
  228. package/dist/clis/tiktok/notifications.d.ts +1 -0
  229. package/dist/clis/tiktok/notifications.js +49 -0
  230. package/dist/clis/tiktok/profile.d.ts +1 -0
  231. package/dist/clis/tiktok/profile.js +54 -0
  232. package/dist/clis/tiktok/save.d.ts +1 -0
  233. package/dist/clis/tiktok/save.js +29 -0
  234. package/dist/clis/tiktok/search.d.ts +1 -0
  235. package/dist/clis/tiktok/search.js +39 -0
  236. package/dist/clis/tiktok/unfollow.d.ts +1 -0
  237. package/dist/clis/tiktok/unfollow.js +44 -0
  238. package/dist/clis/tiktok/unlike.d.ts +1 -0
  239. package/dist/clis/tiktok/unlike.js +33 -0
  240. package/dist/clis/tiktok/unsave.d.ts +1 -0
  241. package/dist/clis/tiktok/unsave.js +31 -0
  242. package/dist/clis/tiktok/user.d.ts +1 -0
  243. package/dist/clis/tiktok/user.js +41 -0
  244. package/dist/clis/v2ex/hot.d.ts +1 -0
  245. package/dist/clis/v2ex/hot.js +25 -0
  246. package/dist/clis/v2ex/latest.d.ts +1 -0
  247. package/dist/clis/v2ex/latest.js +25 -0
  248. package/dist/clis/v2ex/member.d.ts +1 -0
  249. package/dist/clis/v2ex/member.js +27 -0
  250. package/dist/clis/v2ex/node.d.ts +1 -0
  251. package/dist/clis/v2ex/node.js +38 -0
  252. package/dist/clis/v2ex/nodes.d.ts +1 -0
  253. package/dist/clis/v2ex/nodes.js +25 -0
  254. package/dist/clis/v2ex/replies.d.ts +1 -0
  255. package/dist/clis/v2ex/replies.js +26 -0
  256. package/dist/clis/v2ex/topic.d.ts +1 -0
  257. package/dist/clis/v2ex/topic.js +30 -0
  258. package/dist/clis/v2ex/user.d.ts +1 -0
  259. package/dist/clis/v2ex/user.js +33 -0
  260. package/dist/clis/xiaoe/catalog.d.ts +1 -0
  261. package/dist/clis/xiaoe/catalog.js +125 -0
  262. package/dist/clis/xiaoe/content.d.ts +1 -0
  263. package/dist/clis/xiaoe/content.js +39 -0
  264. package/dist/clis/xiaoe/courses.d.ts +1 -0
  265. package/dist/clis/xiaoe/courses.js +69 -0
  266. package/dist/clis/xiaoe/detail.d.ts +1 -0
  267. package/dist/clis/xiaoe/detail.js +35 -0
  268. package/dist/clis/xiaoe/play-url.d.ts +1 -0
  269. package/dist/clis/xiaoe/play-url.js +120 -0
  270. package/dist/clis/xiaohongshu/feed.d.ts +1 -0
  271. package/dist/clis/xiaohongshu/feed.js +32 -0
  272. package/dist/clis/xiaohongshu/notifications.d.ts +1 -0
  273. package/dist/clis/xiaohongshu/notifications.js +38 -0
  274. package/dist/clis/xueqiu/earnings-date.d.ts +1 -0
  275. package/dist/clis/xueqiu/earnings-date.js +61 -0
  276. package/dist/clis/xueqiu/feed.d.ts +1 -0
  277. package/dist/clis/xueqiu/feed.js +48 -0
  278. package/dist/clis/xueqiu/groups.d.ts +1 -0
  279. package/dist/clis/xueqiu/groups.js +25 -0
  280. package/dist/clis/xueqiu/hot-stock.d.ts +1 -0
  281. package/dist/clis/xueqiu/hot-stock.js +44 -0
  282. package/dist/clis/xueqiu/hot.d.ts +1 -0
  283. package/dist/clis/xueqiu/hot.js +44 -0
  284. package/dist/clis/xueqiu/kline.d.ts +1 -0
  285. package/dist/clis/xueqiu/kline.js +64 -0
  286. package/dist/clis/xueqiu/search.d.ts +1 -0
  287. package/dist/clis/xueqiu/search.js +49 -0
  288. package/dist/clis/xueqiu/stock.d.ts +1 -0
  289. package/dist/clis/xueqiu/stock.js +72 -0
  290. package/dist/clis/xueqiu/watchlist.d.ts +1 -0
  291. package/dist/clis/xueqiu/watchlist.js +45 -0
  292. package/dist/clis/zhihu/hot.d.ts +1 -0
  293. package/dist/clis/zhihu/hot.js +43 -0
  294. package/dist/clis/zhihu/search.d.ts +1 -0
  295. package/dist/clis/zhihu/search.js +52 -0
  296. package/dist/src/browser/daemon-client.d.ts +14 -3
  297. package/dist/src/browser/daemon-client.js +30 -14
  298. package/dist/src/browser/dom-helpers.test.js +3 -2
  299. package/dist/src/browser/errors.d.ts +26 -1
  300. package/dist/src/browser/errors.js +40 -7
  301. package/dist/src/browser/errors.test.d.ts +1 -0
  302. package/dist/src/browser/errors.test.js +51 -0
  303. package/dist/src/browser/page.d.ts +9 -8
  304. package/dist/src/browser/page.js +33 -31
  305. package/dist/src/browser.test.js +26 -6
  306. package/dist/src/build-manifest.d.ts +5 -11
  307. package/dist/src/build-manifest.js +6 -75
  308. package/dist/src/build-manifest.test.js +1 -39
  309. package/dist/src/cascade.js +3 -2
  310. package/dist/src/cli.d.ts +3 -3
  311. package/dist/src/cli.js +70 -62
  312. package/dist/src/cli.test.js +20 -15
  313. package/dist/src/clis/binance/asks.d.ts +1 -0
  314. package/dist/src/clis/binance/asks.js +20 -0
  315. package/dist/src/clis/binance/commands.test.d.ts +3 -1
  316. package/dist/src/clis/binance/commands.test.js +10 -6
  317. package/dist/src/clis/binance/depth.d.ts +1 -0
  318. package/dist/src/clis/binance/depth.js +20 -0
  319. package/dist/src/clis/binance/gainers.d.ts +1 -0
  320. package/dist/src/clis/binance/gainers.js +21 -0
  321. package/dist/src/clis/binance/klines.d.ts +1 -0
  322. package/dist/src/clis/binance/klines.js +20 -0
  323. package/dist/src/clis/binance/losers.d.ts +1 -0
  324. package/dist/src/clis/binance/losers.js +21 -0
  325. package/dist/src/clis/binance/pairs.d.ts +1 -0
  326. package/dist/src/clis/binance/pairs.js +20 -0
  327. package/dist/src/clis/binance/price.d.ts +1 -0
  328. package/dist/src/clis/binance/price.js +17 -0
  329. package/dist/src/clis/binance/prices.d.ts +1 -0
  330. package/dist/src/clis/binance/prices.js +18 -0
  331. package/dist/src/clis/binance/ticker.d.ts +1 -0
  332. package/dist/src/clis/binance/ticker.js +20 -0
  333. package/dist/src/clis/binance/top.d.ts +1 -0
  334. package/dist/src/clis/binance/top.js +20 -0
  335. package/dist/src/clis/binance/trades.d.ts +1 -0
  336. package/dist/src/clis/binance/trades.js +19 -0
  337. package/dist/src/completion-fast.d.ts +25 -0
  338. package/dist/src/completion-fast.js +140 -0
  339. package/dist/src/completion.d.ts +1 -0
  340. package/dist/src/completion.js +1 -0
  341. package/dist/src/diagnostic.test.js +2 -2
  342. package/dist/src/discovery.d.ts +3 -3
  343. package/dist/src/discovery.js +34 -97
  344. package/dist/src/download/index.d.ts +1 -1
  345. package/dist/src/engine.test.js +4 -19
  346. package/dist/src/generate-verified.d.ts +105 -0
  347. package/dist/src/generate-verified.js +696 -0
  348. package/dist/src/generate-verified.test.d.ts +1 -0
  349. package/dist/src/generate-verified.test.js +925 -0
  350. package/dist/src/generate.d.ts +9 -1
  351. package/dist/src/generate.js +2 -2
  352. package/dist/src/main.js +65 -12
  353. package/dist/src/pipeline/steps/download.d.ts +1 -17
  354. package/dist/src/pipeline/steps/download.js +20 -31
  355. package/dist/src/pipeline/steps/intercept.d.ts +1 -1
  356. package/dist/src/pipeline/steps/intercept.js +1 -1
  357. package/dist/src/pipeline/steps/tap.d.ts +1 -1
  358. package/dist/src/pipeline/steps/tap.js +1 -1
  359. package/dist/src/plugin-scaffold.d.ts +2 -2
  360. package/dist/src/plugin-scaffold.js +24 -21
  361. package/dist/src/plugin-scaffold.test.js +1 -1
  362. package/dist/src/plugin.d.ts +1 -1
  363. package/dist/src/plugin.js +4 -6
  364. package/dist/src/plugin.test.js +31 -31
  365. package/dist/src/record.js +26 -25
  366. package/dist/src/runtime-detect.js +3 -7
  367. package/dist/src/scripts/framework.d.ts +3 -0
  368. package/dist/src/scripts/framework.js +8 -4
  369. package/dist/src/scripts/store.d.ts +5 -1
  370. package/dist/src/scripts/store.js +5 -1
  371. package/dist/src/skill-generate.d.ts +30 -0
  372. package/dist/src/skill-generate.js +75 -0
  373. package/dist/src/skill-generate.test.d.ts +1 -0
  374. package/dist/src/skill-generate.test.js +173 -0
  375. package/dist/src/synthesize.d.ts +1 -1
  376. package/dist/src/synthesize.js +7 -8
  377. package/dist/src/types.d.ts +3 -1
  378. package/package.json +3 -3
  379. package/dist/clis/bilibili/hot.yaml +0 -38
  380. package/dist/clis/bluesky/feeds.yaml +0 -29
  381. package/dist/clis/bluesky/followers.yaml +0 -33
  382. package/dist/clis/bluesky/following.yaml +0 -33
  383. package/dist/clis/bluesky/profile.yaml +0 -27
  384. package/dist/clis/bluesky/search.yaml +0 -34
  385. package/dist/clis/bluesky/starter-packs.yaml +0 -34
  386. package/dist/clis/bluesky/thread.yaml +0 -32
  387. package/dist/clis/bluesky/trending.yaml +0 -27
  388. package/dist/clis/bluesky/user.yaml +0 -34
  389. package/dist/clis/devto/tag.yaml +0 -34
  390. package/dist/clis/devto/top.yaml +0 -29
  391. package/dist/clis/devto/user.yaml +0 -33
  392. package/dist/clis/dictionary/examples.yaml +0 -25
  393. package/dist/clis/dictionary/search.yaml +0 -27
  394. package/dist/clis/dictionary/synonyms.yaml +0 -25
  395. package/dist/clis/douban/subject.yaml +0 -107
  396. package/dist/clis/douban/top250.yaml +0 -70
  397. package/dist/clis/facebook/add-friend.yaml +0 -43
  398. package/dist/clis/facebook/events.yaml +0 -44
  399. package/dist/clis/facebook/feed.yaml +0 -63
  400. package/dist/clis/facebook/friends.yaml +0 -42
  401. package/dist/clis/facebook/groups.yaml +0 -50
  402. package/dist/clis/facebook/join-group.yaml +0 -44
  403. package/dist/clis/facebook/memories.yaml +0 -39
  404. package/dist/clis/facebook/notifications.yaml +0 -40
  405. package/dist/clis/facebook/profile.yaml +0 -37
  406. package/dist/clis/facebook/search.yaml +0 -47
  407. package/dist/clis/hackernews/ask.yaml +0 -38
  408. package/dist/clis/hackernews/best.yaml +0 -38
  409. package/dist/clis/hackernews/jobs.yaml +0 -36
  410. package/dist/clis/hackernews/new.yaml +0 -38
  411. package/dist/clis/hackernews/search.yaml +0 -44
  412. package/dist/clis/hackernews/show.yaml +0 -38
  413. package/dist/clis/hackernews/top.yaml +0 -38
  414. package/dist/clis/hackernews/user.yaml +0 -25
  415. package/dist/clis/hupu/hot.yaml +0 -43
  416. package/dist/clis/instagram/comment.yaml +0 -52
  417. package/dist/clis/instagram/explore.yaml +0 -43
  418. package/dist/clis/instagram/follow.yaml +0 -41
  419. package/dist/clis/instagram/followers.yaml +0 -51
  420. package/dist/clis/instagram/following.yaml +0 -51
  421. package/dist/clis/instagram/like.yaml +0 -46
  422. package/dist/clis/instagram/profile.yaml +0 -42
  423. package/dist/clis/instagram/save.yaml +0 -46
  424. package/dist/clis/instagram/saved.yaml +0 -40
  425. package/dist/clis/instagram/search.yaml +0 -44
  426. package/dist/clis/instagram/unfollow.yaml +0 -38
  427. package/dist/clis/instagram/unlike.yaml +0 -46
  428. package/dist/clis/instagram/unsave.yaml +0 -46
  429. package/dist/clis/instagram/user.yaml +0 -54
  430. package/dist/clis/jike/post.yaml +0 -59
  431. package/dist/clis/jike/topic.yaml +0 -53
  432. package/dist/clis/jike/user.yaml +0 -52
  433. package/dist/clis/jimeng/generate.yaml +0 -85
  434. package/dist/clis/jimeng/history.yaml +0 -46
  435. package/dist/clis/linux-do/categories.yaml +0 -70
  436. package/dist/clis/linux-do/search.yaml +0 -48
  437. package/dist/clis/linux-do/tags.yaml +0 -41
  438. package/dist/clis/linux-do/topic.yaml +0 -62
  439. package/dist/clis/linux-do/user-posts.yaml +0 -67
  440. package/dist/clis/linux-do/user-topics.yaml +0 -54
  441. package/dist/clis/lobsters/active.yaml +0 -29
  442. package/dist/clis/lobsters/hot.yaml +0 -29
  443. package/dist/clis/lobsters/newest.yaml +0 -29
  444. package/dist/clis/lobsters/tag.yaml +0 -34
  445. package/dist/clis/pixiv/detail.yaml +0 -49
  446. package/dist/clis/pixiv/ranking.yaml +0 -53
  447. package/dist/clis/pixiv/user.yaml +0 -46
  448. package/dist/clis/reddit/frontpage.yaml +0 -30
  449. package/dist/clis/reddit/hot.yaml +0 -47
  450. package/dist/clis/reddit/popular.yaml +0 -40
  451. package/dist/clis/reddit/search.yaml +0 -61
  452. package/dist/clis/reddit/subreddit.yaml +0 -50
  453. package/dist/clis/reddit/user-comments.yaml +0 -46
  454. package/dist/clis/reddit/user-posts.yaml +0 -44
  455. package/dist/clis/reddit/user.yaml +0 -40
  456. package/dist/clis/stackoverflow/bounties.yaml +0 -29
  457. package/dist/clis/stackoverflow/hot.yaml +0 -28
  458. package/dist/clis/stackoverflow/search.yaml +0 -33
  459. package/dist/clis/stackoverflow/unanswered.yaml +0 -28
  460. package/dist/clis/steam/top-sellers.yaml +0 -29
  461. package/dist/clis/tiktok/comment.yaml +0 -66
  462. package/dist/clis/tiktok/explore.yaml +0 -39
  463. package/dist/clis/tiktok/follow.yaml +0 -39
  464. package/dist/clis/tiktok/following.yaml +0 -46
  465. package/dist/clis/tiktok/friends.yaml +0 -47
  466. package/dist/clis/tiktok/like.yaml +0 -38
  467. package/dist/clis/tiktok/live.yaml +0 -51
  468. package/dist/clis/tiktok/notifications.yaml +0 -52
  469. package/dist/clis/tiktok/profile.yaml +0 -45
  470. package/dist/clis/tiktok/save.yaml +0 -34
  471. package/dist/clis/tiktok/search.yaml +0 -47
  472. package/dist/clis/tiktok/unfollow.yaml +0 -44
  473. package/dist/clis/tiktok/unlike.yaml +0 -38
  474. package/dist/clis/tiktok/unsave.yaml +0 -36
  475. package/dist/clis/tiktok/user.yaml +0 -44
  476. package/dist/clis/v2ex/hot.yaml +0 -28
  477. package/dist/clis/v2ex/latest.yaml +0 -28
  478. package/dist/clis/v2ex/member.yaml +0 -29
  479. package/dist/clis/v2ex/node.yaml +0 -34
  480. package/dist/clis/v2ex/nodes.yaml +0 -31
  481. package/dist/clis/v2ex/replies.yaml +0 -32
  482. package/dist/clis/v2ex/topic.yaml +0 -33
  483. package/dist/clis/v2ex/user.yaml +0 -34
  484. package/dist/clis/xiaoe/catalog.yaml +0 -129
  485. package/dist/clis/xiaoe/content.yaml +0 -43
  486. package/dist/clis/xiaoe/courses.yaml +0 -73
  487. package/dist/clis/xiaoe/detail.yaml +0 -39
  488. package/dist/clis/xiaoe/play-url.yaml +0 -124
  489. package/dist/clis/xiaohongshu/feed.yaml +0 -31
  490. package/dist/clis/xiaohongshu/notifications.yaml +0 -37
  491. package/dist/clis/xueqiu/earnings-date.yaml +0 -69
  492. package/dist/clis/xueqiu/feed.yaml +0 -53
  493. package/dist/clis/xueqiu/groups.yaml +0 -23
  494. package/dist/clis/xueqiu/hot-stock.yaml +0 -49
  495. package/dist/clis/xueqiu/hot.yaml +0 -46
  496. package/dist/clis/xueqiu/kline.yaml +0 -65
  497. package/dist/clis/xueqiu/search.yaml +0 -55
  498. package/dist/clis/xueqiu/stock.yaml +0 -69
  499. package/dist/clis/xueqiu/watchlist.yaml +0 -46
  500. package/dist/clis/zhihu/hot.yaml +0 -46
  501. package/dist/clis/zhihu/search.yaml +0 -59
  502. package/dist/src/yaml-schema.d.ts +0 -29
  503. package/dist/src/yaml-schema.js +0 -22
package/README.md CHANGED
@@ -1,34 +1,36 @@
1
1
  # OpenCLI
2
2
 
3
- > **Make any website, Electron App, or Local Tool your CLI.**
4
- > Zero risk · Reuse Chrome/Chromium login · AI-powered discovery · Universal CLI Hub
3
+ > **Turn websites, browser sessions, Electron apps, and local tools into deterministic interfaces for humans and AI agents.**
4
+ > Reuse your logged-in browser, automate live workflows, and crystallize repeated actions into reusable CLI commands.
5
5
 
6
6
  [![中文文档](https://img.shields.io/badge/docs-%E4%B8%AD%E6%96%87-0F766E?style=flat-square)](./README.zh-CN.md)
7
7
  [![npm](https://img.shields.io/npm/v/@jackwener/opencli?style=flat-square)](https://www.npmjs.com/package/@jackwener/opencli)
8
8
  [![Node.js Version](https://img.shields.io/node/v/@jackwener/opencli?style=flat-square)](https://nodejs.org)
9
9
  [![License](https://img.shields.io/npm/l/@jackwener/opencli?style=flat-square)](./LICENSE)
10
10
 
11
- A CLI tool that turns **any website**, **Electron app**, or **local CLI tool** into a command-line interface — Bilibili, Zhihu, 小红书, Twitter/X, Reddit, YouTube, Antigravity, `gh`, `docker`, and [many more](#built-in-commands) — powered by browser session reuse and AI-native discovery.
11
+ OpenCLI gives you one surface for three different kinds of automation:
12
12
 
13
- **Built for AI Agents** — Load the [`opencli-operate` skill](./skills/opencli-operate/SKILL.md) to give any AI agent (Claude Code, Cursor) direct browser control. Operate any website, then crystallize those interactions into reusable CLI commands. Configure `opencli list` in your `AGENT.md` or `.cursorrules` so the AI auto-discovers all available tools.
13
+ - **Use built-in adapters** for sites like Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, Twitter/X, and [many more](#built-in-commands).
14
+ - **Drive a live browser directly** with `opencli browser` when an AI agent needs to click, type, extract, or inspect a page in real time.
15
+ - **Generate new adapters** from real browser behavior with `explore`, `synthesize`, `generate`, and `cascade`.
14
16
 
15
- **CLI Hub** Register any local CLI (`opencli register mycli`) so AI agents can discover and call it alongside built-in commands. Auto-installs missing tools via your package manager (e.g. if `gh` isn't installed, `opencli gh ...` runs `brew install gh` first then re-executes seamlessly).
17
+ It also works as a **CLI hub** for local tools such as `gh`, `docker`, and other binaries you register yourself, plus **desktop app adapters** for Electron apps like Cursor, Codex, Antigravity, ChatGPT, and Notion.
16
18
 
17
- **CLI for Electron Apps** — Turn any Electron application into a CLI tool. Recombine, script, and extend apps like Antigravity Ultra from the terminal. AI agents can now control other AI apps natively.
19
+ ## Why OpenCLI
18
20
 
19
21
  ---
20
22
 
21
23
  ## Highlights
22
24
 
23
25
  - **CLI All Electron** — CLI-ify apps like Antigravity Ultra! Now AI can control itself natively.
24
- - **Browser Automation** — `operate` gives AI agents direct browser control: click, type, extract, screenshot — any interaction, fully scriptable.
26
+ - **Browser Automation** — `browser` gives AI agents direct browser control: click, type, extract, screenshot — any interaction, fully scriptable.
25
27
  - **Website → CLI** — Turn any website into a deterministic CLI: 70+ pre-built adapters, or crystallize your own with `opencli record`.
26
28
  - **Account-safe** — Reuses Chrome/Chromium logged-in state; your credentials never leave the browser.
27
29
  - **Anti-detection built-in** — Patches `navigator.webdriver`, stubs `window.chrome`, fakes plugin lists, cleans ChromeDriver/Playwright globals, and strips CDP frames from Error stack traces. Extensive anti-fingerprinting and risk-control evasion measures baked in at every layer.
28
- - **AI Agent ready** — `explore` discovers APIs, `synthesize` generates adapters, `cascade` finds auth strategies, `operate` controls the browser directly.
30
+ - **AI Agent ready** — `explore` discovers APIs, `synthesize` generates adapters, `cascade` finds auth strategies, `browser` controls the browser directly.
29
31
  - **External CLI Hub** — Discover, auto-install, and passthrough commands to any external CLI (gh, obsidian, docker, etc). Zero setup.
30
32
  - **Self-healing setup** — `opencli doctor` diagnoses and auto-starts the daemon, extension, and live browser connectivity.
31
- - **Dynamic Loader** — Simply drop `.ts` or `.yaml` adapters into the `clis/` folder for auto-registration.
33
+ - **Dynamic Loader** — Simply drop `.ts` adapters into the `clis/` folder for auto-registration.
32
34
  - **Zero LLM cost** — No tokens consumed at runtime. Run 10,000 times and pay nothing.
33
35
  - **Deterministic** — Same command, same output schema, every time. Pipeable, scriptable, CI-friendly.
34
36
  - **Broad coverage** — 79+ sites across global and Chinese platforms (Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, and more), plus desktop Electron apps via CDP.
@@ -37,90 +39,143 @@ A CLI tool that turns **any website**, **Electron app**, or **local CLI tool** i
37
39
 
38
40
  ## Quick Start
39
41
 
40
- ### 1. Install Browser Bridge Extension
42
+ ### 1. Install OpenCLI
41
43
 
42
- > OpenCLI connects to your browser through a lightweight **Browser Bridge** Chrome/Chromium extension + micro-daemon (zero config, auto-start).
44
+ ```bash
45
+ npm install -g @jackwener/opencli
46
+ ```
43
47
 
44
- 1. Go to the GitHub [Releases page](https://github.com/jackwener/opencli/releases) and download the latest `opencli-extension.zip`.
45
- 2. Unzip the file and open `chrome://extensions`, enable **Developer mode** (top-right toggle).
46
- 3. Click **Load unpacked** and select the unzipped folder.
48
+ ### 2. Install the Browser Bridge Extension
49
+
50
+ OpenCLI connects to Chrome/Chromium through a lightweight Browser Bridge extension plus a small local daemon. The daemon auto-starts when needed.
47
51
 
48
- ### 2. Install OpenCLI
52
+ 1. Download the latest `opencli-extension.zip` from the GitHub [Releases page](https://github.com/jackwener/opencli/releases).
53
+ 2. Unzip it, open `chrome://extensions`, and enable **Developer mode**.
54
+ 3. Click **Load unpacked** and select the unzipped folder.
49
55
 
50
- **Install via npm (recommended)**
56
+ ### 3. Verify the setup
51
57
 
52
58
  ```bash
53
- npm install -g @jackwener/opencli
59
+ opencli doctor
60
+ opencli daemon status
61
+ ```
54
62
 
55
- # Install AI skills for Claude Code / Cursor
56
- npx skills add jackwener/opencli
63
+ ### 4. Run your first commands
64
+
65
+ ```bash
66
+ opencli list
67
+ opencli hackernews top --limit 5
68
+ opencli bilibili hot --limit 5
57
69
  ```
58
70
 
59
- ### 3. Verify & Try
71
+ ## For Humans
72
+
73
+ Use OpenCLI directly when you want a reliable command instead of a live browser session:
74
+
75
+ - `opencli list` shows every registered command.
76
+ - `opencli <site> <command>` runs a built-in or generated adapter.
77
+ - `opencli register mycli` exposes a local CLI through the same discovery surface.
78
+ - `opencli daemon status` and `opencli doctor` help diagnose browser connectivity.
79
+
80
+ ## For AI Agents
81
+
82
+ Use two different entry points depending on the task:
83
+
84
+ - [`skills/opencli-explorer/SKILL.md`](./skills/opencli-explorer/SKILL.md): the entry point for creating new adapters — supports both fully automated generation (`opencli generate <url>`) and manual exploration workflows.
85
+ - [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md): the low-level control surface for live browsing, debugging, and manual intervention.
86
+
87
+ Install the packaged skills with:
60
88
 
61
89
  ```bash
62
- opencli doctor # Check extension + daemon connectivity
63
- opencli daemon status # Check daemon state (PID, uptime, memory)
90
+ npx skills add jackwener/opencli
64
91
  ```
65
92
 
66
- **Try it out:**
93
+ Or install only what you need:
67
94
 
68
95
  ```bash
69
- opencli list # See all commands
70
- opencli hackernews top --limit 5 # Public API, no browser needed
71
- opencli bilibili hot --limit 5 # Browser command (requires Extension)
96
+ npx skills add jackwener/opencli --skill opencli-usage
97
+ npx skills add jackwener/opencli --skill opencli-browser
98
+ npx skills add jackwener/opencli --skill opencli-explorer
99
+ npx skills add jackwener/opencli --skill opencli-oneshot
72
100
  ```
73
101
 
74
- ### 4. Browser Automation — Make Websites Accessible for AI Agents
102
+ In practice:
75
103
 
76
- Point your AI agent (Claude Code, Cursor) to [`skills/opencli-operate/SKILL.md`](./skills/opencli-operate/SKILL.md). It has everything needed full command reference, examples, and workflow.
104
+ - start with `opencli-explorer` when the agent needs a reusable command for a site (it covers both automated and manual flows)
105
+ - use `opencli-browser` when the agent needs to inspect or steer the page directly
77
106
 
78
- Available commands: `open`, `state`, `click`, `type`, `select`, `keys`, `wait`, `get`, `screenshot`, `scroll`, `back`, `eval`, `network`, `init`, `verify`, `close`.
107
+ Available browser commands include `open`, `state`, `click`, `type`, `select`, `keys`, `wait`, `get`, `screenshot`, `scroll`, `back`, `eval`, `network`, `init`, `verify`, and `close`.
79
108
 
80
- ### Update
109
+ ## Core Concepts
81
110
 
82
- ```bash
83
- npm install -g @jackwener/opencli@latest
84
- ```
111
+ ### `browser`: live control
85
112
 
86
- ### Install AI Skills
113
+ Use `opencli browser` when the task is inherently interactive and the agent needs to operate the page directly.
87
114
 
88
- OpenCLI provides [skills](./skills/) for AI agents (Claude Code, etc.):
115
+ ### Built-in adapters: stable commands
89
116
 
90
- ```bash
91
- # Install all OpenCLI skills
92
- npx skills add jackwener/opencli
117
+ Use site-specific commands such as `opencli hackernews top` or `opencli reddit hot` when the capability already exists and you want deterministic output.
93
118
 
94
- # Or install specific skills
95
- npx skills add jackwener/opencli --skill opencli-usage # Command reference
96
- npx skills add jackwener/opencli --skill opencli-operate # Browser automation for AI agents
97
- npx skills add jackwener/opencli --skill opencli-explorer # Adapter development guide
98
- npx skills add jackwener/opencli --skill opencli-oneshot # Quick command reference
99
- ```
119
+ ### `explore` / `synthesize` / `generate`: create new CLIs
100
120
 
101
- ---
121
+ Use these commands when the site you need is not covered yet:
102
122
 
103
- ### For Developers
123
+ - `explore` inspects the page, network activity, and capability surface.
124
+ - `synthesize` turns exploration artifacts into evaluate-based YAML adapters.
125
+ - `generate` runs the verified generation path and returns either a usable command or a structured explanation of why completion was blocked or needs human review.
104
126
 
105
- **Install from source**
127
+ ### `cascade`: auth strategy discovery
106
128
 
107
- ```bash
108
- git clone git@github.com:jackwener/opencli.git && cd opencli && npm install && npm run build && npm link
109
- ```
129
+ Use `cascade` to probe fallback auth paths such as public endpoints, cookies, and custom headers before you commit to an adapter design.
110
130
 
111
- **Load Source Browser Bridge Extension**
131
+ ### CLI Hub and desktop adapters
112
132
 
113
- 1. Open `chrome://extensions` and enable **Developer mode** (top-right toggle).
114
- 2. Click **Load unpacked** and select the `extension/` directory from this repository.
133
+ OpenCLI is not only for websites. It can also:
115
134
 
116
- ---
135
+ - expose local binaries like `gh`, `docker`, `obsidian`, or custom tools through `opencli <tool> ...`
136
+ - control Electron desktop apps through dedicated adapters and CDP-backed integrations
117
137
 
118
138
  ## Prerequisites
119
139
 
120
140
  - **Node.js**: >= 20.0.0 (or **Bun** >= 1.0)
121
- - **Chrome or Chromium** running **and logged into the target site** (e.g. bilibili.com, zhihu.com, xiaohongshu.com, goofish.com).
141
+ - **Chrome or Chromium** running and logged into the target site for browser-backed commands
142
+
143
+ > **Important**: Browser-backed commands reuse your Chrome/Chromium login session. If you get empty data or permission-like failures, first confirm the site is already open and authenticated in Chrome/Chromium.
144
+
145
+ ## Update
146
+
147
+ ```bash
148
+ npm install -g @jackwener/opencli@latest
149
+
150
+ # If you use the packaged OpenCLI skills, refresh them too
151
+ npx skills add jackwener/opencli
152
+ ```
153
+
154
+ Or refresh only the skills you actually use:
155
+
156
+ ```bash
157
+ npx skills add jackwener/opencli --skill opencli-usage
158
+ npx skills add jackwener/opencli --skill opencli-browser
159
+ npx skills add jackwener/opencli --skill opencli-explorer
160
+ npx skills add jackwener/opencli --skill opencli-oneshot
161
+ ```
162
+
163
+ ## For Developers
164
+
165
+ Install from source:
166
+
167
+ ```bash
168
+ git clone git@github.com:jackwener/opencli.git
169
+ cd opencli
170
+ npm install
171
+ npm run build
172
+ npm link
173
+ ```
174
+
175
+ To load the source Browser Bridge extension:
122
176
 
123
- > **⚠️ Important**: Browser commands reuse your Chrome/Chromium login session. You must be logged into the target website in Chrome or Chromium before running commands. If you get empty data or errors, check your login status first.
177
+ 1. Open `chrome://extensions` and enable **Developer mode**.
178
+ 2. Click **Load unpacked** and select this repository's `extension/` directory.
124
179
 
125
180
  ## Built-in Commands
126
181
 
@@ -135,6 +190,7 @@ git clone git@github.com:jackwener/opencli.git && cd opencli && npm install && n
135
190
  | **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` |
136
191
  | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` |
137
192
  | **1688** | `search` `item` `assets` `download` `store` |
193
+ | **gitee** | `trending` `search` `user` |
138
194
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
139
195
  | **yuanbao** | `new` `ask` |
140
196
  | **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
@@ -251,9 +307,9 @@ opencli plugin uninstall my-tool
251
307
 
252
308
  | Plugin | Type | Description |
253
309
  |--------|------|-------------|
254
- | [opencli-plugin-github-trending](https://github.com/ByteYue/opencli-plugin-github-trending) | YAML | GitHub Trending repositories |
310
+ | [opencli-plugin-github-trending](https://github.com/ByteYue/opencli-plugin-github-trending) | TS | GitHub Trending repositories |
255
311
  | [opencli-plugin-hot-digest](https://github.com/ByteYue/opencli-plugin-hot-digest) | TS | Multi-platform trending aggregator |
256
- | [opencli-plugin-juejin](https://github.com/Astro-Han/opencli-plugin-juejin) | YAML | 稀土掘金 (Juejin) hot articles |
312
+ | [opencli-plugin-juejin](https://github.com/Astro-Han/opencli-plugin-juejin) | TS | 稀土掘金 (Juejin) hot articles |
257
313
  | [opencli-plugin-vk](https://github.com/flobo3/opencli-plugin-vk) | TS | VK (VKontakte) wall, feed, and search |
258
314
 
259
315
  See [Plugins Guide](./docs/guide/plugins.md) for creating your own plugin.
@@ -266,7 +322,7 @@ See [Plugins Guide](./docs/guide/plugins.md) for creating your own plugin.
266
322
 
267
323
  ```bash
268
324
  opencli explore https://example.com --site mysite # Discover APIs + capabilities
269
- opencli synthesize mysite # Generate YAML adapters
325
+ opencli synthesize mysite # Generate TS adapters
270
326
  opencli generate https://example.com --goal "hot" # One-shot: explore → synthesize → register
271
327
  opencli cascade https://api.example.com/data # Auto-probe: PUBLIC → COOKIE → HEADER
272
328
  ```
package/README.zh-CN.md CHANGED
@@ -1,128 +1,170 @@
1
1
  # OpenCLI
2
2
 
3
- > **把任何网站、本地工具、Electron 应用变成能够让 AI 调用的命令行!**
4
- > 零风控 · 复用 Chrome/Chromium 登录 · AI 自动发现接口 · 全能 CLI 枢纽
3
+ > **把网站、浏览器会话、Electron 应用和本地工具,统一变成适合人类与 AI Agent 使用的确定性接口。**
4
+ > 复用浏览器登录态,先自动化真实操作,再把高频流程沉淀成可复用的 CLI 命令。
5
5
 
6
6
  [![English](https://img.shields.io/badge/docs-English-1D4ED8?style=flat-square)](./README.md)
7
7
  [![npm](https://img.shields.io/npm/v/@jackwener/opencli?style=flat-square)](https://www.npmjs.com/package/@jackwener/opencli)
8
8
  [![Node.js Version](https://img.shields.io/node/v/@jackwener/opencli?style=flat-square)](https://nodejs.org)
9
9
  [![License](https://img.shields.io/npm/l/@jackwener/opencli?style=flat-square)](./LICENSE)
10
10
 
11
- OpenCLI 将任何网站、本地 CLI 或 Electron 应用(如 Antigravity)变成命令行工具 — B站、知乎、小红书、Twitter/X、Reddit、YouTube,以及 `gh`、`docker` 等[多种站点与工具](#内置命令) — 复用浏览器登录态,AI 驱动探索。
11
+ OpenCLI 可以用同一套 CLI 做三类事情:
12
12
 
13
- **专为 AI Agent 打造**:加载 [`opencli-operate` skill](./skills/opencli-operate/SKILL.md),赋予 AI Agent(Claude Code、Cursor 等)直接操控浏览器的能力——操作任意网站,并将这些交互沉淀为可复用的 CLI 命令。在 `AGENT.md` 或 `.cursorrules` 中配置 `opencli list`,AI 即可自动发现并调用所有可用工具。
13
+ - **直接使用现成适配器**:B站、知乎、小红书、Twitter/X、Reddit、HackerNews [79+ 站点](#内置命令) 开箱即用。
14
+ - **直接驱动浏览器**:用 `opencli browser` 让 AI Agent 实时点击、输入、提取、截图、检查页面状态。
15
+ - **把新网站生成成 CLI**:通过 `explore`、`synthesize`、`generate`、`cascade` 从真实页面行为推导出新的适配器。
14
16
 
15
- **opencli 支持 CLI 化所有 electron 应用!最强大更新来袭!**
16
- CLI all electron!现在支持把所有 electron 应用 CLI 化,从而组合出各种神奇的能力。
17
- 如果你在使用诸如 Antigravity Ultra 等工具时觉得不够灵活或难以扩展,现在通过 OpenCLI 把他 CLI 化,轻松打破界限。
18
- 现在,**AI 可以自己控制自己**!结合 cc/openclaw 就可以远程控制任何 electron 应用!无限玩法!!
17
+ 除了网站能力,OpenCLI 还是一个 **CLI 枢纽**:你可以把 `gh`、`docker` 等本地工具统一注册到 `opencli` 下,也可以通过桌面端适配器控制 Cursor、Codex、Antigravity、ChatGPT、Notion Electron 应用。
19
18
 
20
- ---
19
+ ## 为什么是 OpenCLI
21
20
 
22
- ## 亮点
21
+ - **同一个心智模型**:网站、浏览器自动化、Electron 应用、本地 CLI 都走同一个入口。
22
+ - **复用真实会话**:浏览器命令直接使用你已经登录的 Chrome/Chromium,而不是重新造一套认证。
23
+ - **输出稳定**:适配器命令返回固定结构,适合 shell、脚本、CI 和 AI Agent 工具调用。
24
+ - **面向 AI Agent**:`browser` 负责实时操作,`explore` 负责探索接口,`synthesize` 负责生成适配器,`cascade` 负责探测认证路径。
25
+ - **运行成本低**:已有命令运行时不消耗模型 token。
26
+ - **天然可扩展**:既能用内置能力,也能注册本地 CLI,或直接往 `clis/` 丢 `.ts` 适配器。
23
27
 
24
- - **CLI All Electron** — 支持把所有 electron 应用(如 Antigravity Ultra)CLI 化,让 AI 控制自己!
25
- - **浏览器自动化** — `operate` 赋予 AI Agent 直接操控浏览器的能力:点击、输入、提取、截图,任意交互皆可脚本化
26
- - **网页转 CLI** — 将任意网站变成确定性命令行工具:79+ 预置适配器,或用 `opencli record` 沉淀自己的操作
27
- - **多站点覆盖** — 79+ 站点,横跨全球与中国平台(B站、知乎、小红书、Reddit、HackerNews 等),并支持通过 CDP 控制桌面 Electron 应用
28
- - **零风控** — 复用 Chrome/Chromium 登录态,无需存储任何凭证
29
- - **外部 CLI 枢纽** — 统一发现、自动安装、透传执行 `gh`、`docker` 等本地 CLI
30
- - **自修复配置** — `opencli doctor` 自动启动 daemon,诊断扩展和浏览器连接状态
31
- - **AI 原生** — `explore` 自动发现 API,`synthesize` 生成适配器,`cascade` 探测认证策略,`operate` 直接控制浏览器
32
- - **零 LLM 成本** — 运行时不消耗任何 token,跑一万次不花一分钱
33
- - **确定性** — 同一命令永远返回同一结构,可管道化、可脚本化、CI 友好
28
+ ## 快速开始
34
29
 
35
- ## 前置要求
30
+ ### 1. 安装 OpenCLI
36
31
 
37
- - **Node.js**: >= 20.0.0
38
- - **Chrome Chromium** 浏览器正在运行,且**已登录目标网站**(如 bilibili.com、zhihu.com、xiaohongshu.com、goofish.com)
32
+ ```bash
33
+ npm install -g @jackwener/opencli
34
+ ```
39
35
 
40
- > **⚠️ 重要**:大多数命令复用你的 Chrome/Chromium 登录状态。运行命令前,你必须已在 Chrome 或 Chromium 中打开目标网站并完成登录。如果获取到空数据或报错,请先检查你的浏览器登录状态。
36
+ ### 2. 安装 Browser Bridge 扩展
41
37
 
42
- OpenCLI 通过轻量化的 **Browser Bridge** Chrome/Chromium 扩展 + 微型 daemon 与浏览器通信(零配置,自动启动)。
38
+ OpenCLI 通过轻量 Browser Bridge 扩展和本地微型 daemon 与 Chrome/Chromium 通信。daemon 会按需自动启动。
43
39
 
44
- ### Browser Bridge 扩展配置
40
+ 1. GitHub [Releases 页面](https://github.com/jackwener/opencli/releases) 下载最新的 `opencli-extension.zip`。
41
+ 2. 解压后打开 `chrome://extensions`,启用 **开发者模式**。
42
+ 3. 点击 **加载已解压的扩展程序**,选择解压后的目录。
45
43
 
46
- 你可以选择以下任一方式安装扩展:
44
+ ### 3. 验证环境
47
45
 
48
- **方式一:下载构建好的安装包(推荐)**
49
- 1. 到 GitHub [Releases 页面](https://github.com/jackwener/opencli/releases) 下载最新的 `opencli-extension.zip`。
50
- 2. 解压后在 Chrome 或 Chromium 中打开 `chrome://extensions`,启用右上角的 **开发者模式**。
51
- 3. 点击 **加载已解压的扩展程序**,选择解压后的文件夹。
46
+ ```bash
47
+ opencli doctor
48
+ opencli daemon status
49
+ ```
52
50
 
53
- **方式二:加载源码(针对开发者)**
54
- 1. 同样在 `chrome://extensions` 开启 **开发者模式**。
55
- 2. 点击 **加载已解压的扩展程序**,选择本仓库代码树中的 `extension/` 文件夹。
51
+ ### 4. 跑第一个命令
56
52
 
57
- 完成!运行任何 opencli 浏览器命令时,后台微型 daemon 会自动启动与浏览器通信。无需配 API Token,零代码配置。
53
+ ```bash
54
+ opencli list
55
+ opencli hackernews top --limit 5
56
+ opencli bilibili hot --limit 5
57
+ ```
58
58
 
59
- > **Tip**:后续诊断和 daemon 管理:
60
- > ```bash
61
- > opencli doctor # 检查扩展和 daemon 连通性
62
- > opencli daemon status # 查看 daemon 状态
63
- > opencli daemon stop # 停止 daemon
64
- > ```
59
+ ## 给人类用户
65
60
 
66
- ## 快速开始
61
+ 如果你只是想稳定地调用网站或桌面应用能力,主路径很简单:
67
62
 
68
- ### npm 全局安装(推荐)
63
+ - `opencli list` 查看当前所有命令
64
+ - `opencli <site> <command>` 调用内置或生成好的适配器
65
+ - `opencli register mycli` 把本地 CLI 接入同一发现入口
66
+ - `opencli doctor` / `opencli daemon status` 处理浏览器连通性问题
69
67
 
70
- ```bash
71
- npm install -g @jackwener/opencli
68
+ ## 给 AI Agent
72
69
 
73
- # 安装 AI Skills(Claude Code / Cursor)
74
- npx skills add jackwener/opencli
75
- ```
70
+ 按任务类型,AI Agent 有两个不同入口:
71
+
72
+ - [`skills/opencli-explorer/SKILL.md`](./skills/opencli-explorer/SKILL.md):适配器创建入口,支持全自动生成(`opencli generate <url>`)和手动探索两种流程。
73
+ - [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md):底层控制入口,适合实时操作页面、debug 和人工介入。
76
74
 
77
- 直接使用:
75
+ 安装全部 OpenCLI skills:
78
76
 
79
77
  ```bash
80
- opencli list # 查看所有命令
81
- opencli list -f yaml # 以 YAML 列出所有命令
82
- opencli hackernews top --limit 5 # 公共 API,无需浏览器
83
- opencli bilibili hot --limit 5 # 浏览器命令
84
- opencli zhihu hot -f json # JSON 输出
85
- opencli zhihu hot -f yaml # YAML 输出
78
+ npx skills add jackwener/opencli
86
79
  ```
87
80
 
88
- ### 从源码安装(面向开发者)
81
+ 或只装需要的 skill:
89
82
 
90
83
  ```bash
91
- git clone git@github.com:jackwener/opencli.git
92
- cd opencli
93
- npm install
94
- npm run build
95
- npm link # 链接到全局环境
96
- opencli list # 可以在任何地方使用了!
84
+ npx skills add jackwener/opencli --skill opencli-usage
85
+ npx skills add jackwener/opencli --skill opencli-browser
86
+ npx skills add jackwener/opencli --skill opencli-explorer
87
+ npx skills add jackwener/opencli --skill opencli-oneshot
97
88
  ```
98
89
 
99
- ### 更新
90
+ 实际使用上:
100
91
 
101
- ```bash
102
- npm install -g @jackwener/opencli@latest
103
- ```
92
+ - 需要把某个站点收成可复用命令时,优先走 `opencli-explorer`(涵盖自动和手动两种路径)
93
+ - 需要直接检查页面、操作页面时,再走 `opencli-browser`
94
+
95
+ `browser` 可用命令包括:`open`、`state`、`click`、`type`、`select`、`keys`、`wait`、`get`、`screenshot`、`scroll`、`back`、`eval`、`network`、`init`、`verify`、`close`。
96
+
97
+ ## 核心概念
98
+
99
+ ### `browser`:实时操作
104
100
 
105
- ### 浏览器自动化 让 AI Agent 直接控制浏览器
101
+ 当任务本身就是交互式页面操作时,使用 `opencli browser` 直接驱动浏览器。
106
102
 
107
- [`skills/opencli-operate/SKILL.md`](./skills/opencli-operate/SKILL.md) 指向你的 AI Agent(Claude Code、Cursor),即可开箱即用,内含完整命令参考与使用示例。
103
+ ### 内置适配器:稳定命令
108
104
 
109
- 可用命令:`open`、`state`、`click`、`type`、`select`、`keys`、`wait`、`get`、`screenshot`、`scroll`、`back`、`eval`、`network`、`init`、`verify`、`close`。
105
+ 当某个站点能力已经存在时,优先使用 `opencli hackernews top`、`opencli reddit hot` 这类稳定命令,而不是重新走一遍浏览器操作。
110
106
 
111
- ### 安装 AI Skills
107
+ ### `explore` / `synthesize` / `generate`:生成新的 CLI
112
108
 
113
- OpenCLI 提供 [skills](./skills/) 供 AI Agent(Claude Code 等)使用:
109
+ 当你需要的网站还没覆盖时:
110
+
111
+ - `explore` 负责观察页面、网络请求和能力边界
112
+ - `synthesize` 负责把探索结果转成 evaluate-based YAML 适配器
113
+ - `generate` 负责跑通 verified generation 主链路,最后要么给出可直接使用的命令,要么返回结构化的阻塞原因 / 人工介入结果
114
+
115
+ ### `cascade`:认证策略探测
116
+
117
+ 用 `cascade` 去判断某个能力应该优先走公开接口、Cookie 还是自定义 Header,而不是一开始就把适配器写死。
118
+
119
+ ### CLI 枢纽与桌面端适配器
120
+
121
+ OpenCLI 不只是网站 CLI,还可以:
122
+
123
+ - 统一代理本地二进制工具,例如 `gh`、`docker`、`obsidian`
124
+ - 通过专门适配器和 CDP 集成控制 Electron 桌面应用
125
+
126
+ ## 前置要求
127
+
128
+ - **Node.js**: >= 20.0.0
129
+ - 浏览器型命令需要 Chrome 或 Chromium 处于运行中,并已登录目标网站
130
+
131
+ > **重要**:浏览器型命令直接复用你的 Chrome/Chromium 登录态。如果拿到空数据或出现权限类失败,先确认目标站点已经在浏览器里打开并完成登录。
132
+
133
+ ## 更新
114
134
 
115
135
  ```bash
116
- # 安装所有 OpenCLI skills
136
+ npm install -g @jackwener/opencli@latest
137
+
138
+ # 如果你在用打包发布的 OpenCLI skills,也一起刷新
117
139
  npx skills add jackwener/opencli
140
+ ```
141
+
142
+ 如果你只装了部分 skill,也可以只刷新自己在用的:
118
143
 
119
- # 或安装特定 skill
120
- npx skills add jackwener/opencli --skill opencli-usage # 命令参考
121
- npx skills add jackwener/opencli --skill opencli-operate # 浏览器自动化(AI Agent 专用)
122
- npx skills add jackwener/opencli --skill opencli-explorer # 适配器开发指南
123
- npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参考
144
+ ```bash
145
+ npx skills add jackwener/opencli --skill opencli-usage
146
+ npx skills add jackwener/opencli --skill opencli-browser
147
+ npx skills add jackwener/opencli --skill opencli-explorer
148
+ npx skills add jackwener/opencli --skill opencli-oneshot
124
149
  ```
125
150
 
151
+ ## 面向开发者
152
+
153
+ 从源码安装:
154
+
155
+ ```bash
156
+ git clone git@github.com:jackwener/opencli.git
157
+ cd opencli
158
+ npm install
159
+ npm run build
160
+ npm link
161
+ ```
162
+
163
+ 加载源码版 Browser Bridge 扩展:
164
+
165
+ 1. 打开 `chrome://extensions` 并启用 **开发者模式**
166
+ 2. 点击 **加载已解压的扩展程序**,选择本仓库里的 `extension/` 目录
167
+
126
168
  ## 内置命令
127
169
 
128
170
  运行 `opencli list` 查看完整注册表。
@@ -188,6 +230,7 @@ npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参
188
230
  | **google** | `news` `search` `suggest` `trends` | 公开 |
189
231
  | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` | 浏览器 |
190
232
  | **1688** | `search` `item` `assets` `download` `store` | 浏览器 |
233
+ | **gitee** | `trending` `search` `user` | 公开 / 浏览器 |
191
234
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` | 浏览器 |
192
235
  | **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` | OAuth API |
193
236
  | **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` | 浏览器 |
@@ -383,7 +426,7 @@ opencli plugin uninstall my-tool # 卸载
383
426
  # 1. Deep Explore — 网络拦截 → 响应分析 → 能力推理 → 框架检测
384
427
  opencli explore https://example.com --site mysite
385
428
 
386
- # 2. Synthesize — 从探索成果物生成 evaluate-based YAML 适配器
429
+ # 2. Synthesize — 从探索成果物生成 evaluate-based TS 适配器
387
430
  opencli synthesize mysite
388
431
 
389
432
  # 3. Generate — 一键完成:探索 → 合成 → 注册
@@ -6,3 +6,6 @@
6
6
  * Matches the signature of lodash.clamp and Rust's clamp.
7
7
  */
8
8
  export declare function clamp(value: number, min: number, max: number): number;
9
+ export declare function clampInt(raw: unknown, fallback: number, min: number, max: number): number;
10
+ export declare function normalizeNumericId(value: unknown, label: string, example: string): string;
11
+ export declare function requireNonEmptyQuery(value: unknown, label?: string): string;
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Shared utilities for CLI adapters.
3
3
  */
4
+ import { ArgumentError } from '@jackwener/opencli/errors';
4
5
  /**
5
6
  * Clamp a numeric value to [min, max].
6
7
  * Matches the signature of lodash.clamp and Rust's clamp.
@@ -8,3 +9,24 @@
8
9
  export function clamp(value, min, max) {
9
10
  return Math.max(min, Math.min(value, max));
10
11
  }
12
+ export function clampInt(raw, fallback, min, max) {
13
+ const parsed = Number(raw);
14
+ if (!Number.isFinite(parsed)) {
15
+ return fallback;
16
+ }
17
+ return clamp(Math.floor(parsed), min, max);
18
+ }
19
+ export function normalizeNumericId(value, label, example) {
20
+ const normalized = String(value ?? '').trim();
21
+ if (!/^\d+$/.test(normalized)) {
22
+ throw new ArgumentError(`${label} must be a numeric ID`, `Pass a numeric ${label}, for example: ${example}`);
23
+ }
24
+ return normalized;
25
+ }
26
+ export function requireNonEmptyQuery(value, label = 'query') {
27
+ const normalized = String(value ?? '').trim();
28
+ if (!normalized) {
29
+ throw new ArgumentError(`${label} cannot be empty`);
30
+ }
31
+ return normalized;
32
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ import { cli } from '@jackwener/opencli/registry';
2
+ cli({
3
+ site: 'bilibili',
4
+ name: 'hot',
5
+ description: 'B站热门视频',
6
+ domain: 'www.bilibili.com',
7
+ args: [
8
+ { name: 'limit', type: 'int', default: 20, help: 'Number of videos' },
9
+ ],
10
+ columns: ['rank', 'title', 'author', 'play', 'danmaku'],
11
+ pipeline: [
12
+ { navigate: 'https://www.bilibili.com' },
13
+ { evaluate: `(async () => {
14
+ const res = await fetch('https://api.bilibili.com/x/web-interface/popular?ps=\${{ args.limit }}&pn=1', {
15
+ credentials: 'include'
16
+ });
17
+ const data = await res.json();
18
+ return (data?.data?.list || []).map((item) => ({
19
+ title: item.title,
20
+ author: item.owner?.name,
21
+ play: item.stat?.view,
22
+ danmaku: item.stat?.danmaku,
23
+ }));
24
+ })()
25
+ ` },
26
+ { map: {
27
+ rank: '${{ index + 1 }}',
28
+ title: '${{ item.title }}',
29
+ author: '${{ item.author }}',
30
+ play: '${{ item.play }}',
31
+ danmaku: '${{ item.danmaku }}',
32
+ } },
33
+ { limit: '${{ args.limit }}' },
34
+ ],
35
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,27 @@
1
+ import { cli, Strategy } from '@jackwener/opencli/registry';
2
+ cli({
3
+ site: 'bluesky',
4
+ name: 'feeds',
5
+ description: 'Popular Bluesky feed generators',
6
+ domain: 'public.api.bsky.app',
7
+ strategy: Strategy.PUBLIC,
8
+ browser: false,
9
+ args: [
10
+ { name: 'limit', type: 'int', default: 20, help: 'Number of feeds' },
11
+ ],
12
+ columns: ['rank', 'name', 'likes', 'creator', 'description'],
13
+ pipeline: [
14
+ { fetch: {
15
+ url: 'https://public.api.bsky.app/xrpc/app.bsky.unspecced.getPopularFeedGenerators?limit=${{ args.limit }}',
16
+ } },
17
+ { select: 'feeds' },
18
+ { map: {
19
+ rank: '${{ index + 1 }}',
20
+ name: '${{ item.displayName }}',
21
+ likes: '${{ item.likeCount }}',
22
+ creator: '${{ item.creator.handle }}',
23
+ description: '${{ item.description }}',
24
+ } },
25
+ { limit: '${{ args.limit }}' },
26
+ ],
27
+ });