@jackwener/opencli 1.6.9 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (531) hide show
  1. package/README.md +128 -59
  2. package/README.zh-CN.md +134 -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.js +35 -0
  6. package/dist/clis/bluesky/feeds.d.ts +1 -0
  7. package/dist/clis/bluesky/feeds.js +27 -0
  8. package/dist/clis/bluesky/followers.d.ts +1 -0
  9. package/dist/clis/bluesky/followers.js +27 -0
  10. package/dist/clis/bluesky/following.d.ts +1 -0
  11. package/dist/clis/bluesky/following.js +27 -0
  12. package/dist/clis/bluesky/profile.d.ts +1 -0
  13. package/dist/clis/bluesky/profile.js +29 -0
  14. package/dist/clis/bluesky/search.d.ts +1 -0
  15. package/dist/clis/bluesky/search.js +28 -0
  16. package/dist/clis/bluesky/starter-packs.d.ts +1 -0
  17. package/dist/clis/bluesky/starter-packs.js +28 -0
  18. package/dist/clis/bluesky/thread.d.ts +1 -0
  19. package/dist/clis/bluesky/thread.js +30 -0
  20. package/dist/clis/bluesky/trending.d.ts +1 -0
  21. package/dist/clis/bluesky/trending.js +19 -0
  22. package/dist/clis/bluesky/user.d.ts +1 -0
  23. package/dist/clis/bluesky/user.js +33 -0
  24. package/dist/clis/cnki/search.d.ts +1 -0
  25. package/dist/clis/cnki/search.js +60 -0
  26. package/dist/clis/cnki/search.test.d.ts +1 -0
  27. package/dist/clis/cnki/search.test.js +18 -0
  28. package/dist/clis/devto/tag.d.ts +1 -0
  29. package/dist/clis/devto/tag.js +32 -0
  30. package/dist/clis/devto/top.d.ts +1 -0
  31. package/dist/clis/devto/top.js +26 -0
  32. package/dist/clis/devto/user.d.ts +1 -0
  33. package/dist/clis/devto/user.js +31 -0
  34. package/dist/clis/dictionary/examples.d.ts +1 -0
  35. package/dist/clis/dictionary/examples.js +27 -0
  36. package/dist/clis/dictionary/search.d.ts +1 -0
  37. package/dist/clis/dictionary/search.js +29 -0
  38. package/dist/clis/dictionary/synonyms.d.ts +1 -0
  39. package/dist/clis/dictionary/synonyms.js +27 -0
  40. package/dist/clis/douban/subject.d.ts +1 -0
  41. package/dist/clis/douban/subject.js +118 -0
  42. package/dist/clis/douban/top250.d.ts +1 -0
  43. package/dist/clis/douban/top250.js +67 -0
  44. package/dist/clis/facebook/add-friend.d.ts +1 -0
  45. package/dist/clis/facebook/add-friend.js +43 -0
  46. package/dist/clis/facebook/events.d.ts +1 -0
  47. package/dist/clis/facebook/events.js +40 -0
  48. package/dist/clis/facebook/feed.d.ts +1 -0
  49. package/dist/clis/facebook/feed.js +59 -0
  50. package/dist/clis/facebook/friends.d.ts +1 -0
  51. package/dist/clis/facebook/friends.js +38 -0
  52. package/dist/clis/facebook/groups.d.ts +1 -0
  53. package/dist/clis/facebook/groups.js +46 -0
  54. package/dist/clis/facebook/join-group.d.ts +1 -0
  55. package/dist/clis/facebook/join-group.js +44 -0
  56. package/dist/clis/facebook/memories.d.ts +1 -0
  57. package/dist/clis/facebook/memories.js +35 -0
  58. package/dist/clis/facebook/notifications.d.ts +1 -0
  59. package/dist/clis/facebook/notifications.js +36 -0
  60. package/dist/clis/facebook/profile.d.ts +1 -0
  61. package/dist/clis/facebook/profile.js +37 -0
  62. package/dist/clis/facebook/search.d.ts +1 -0
  63. package/dist/clis/facebook/search.js +38 -0
  64. package/dist/clis/facebook/search.test.d.ts +1 -1
  65. package/dist/clis/facebook/search.test.js +6 -9
  66. package/dist/clis/gitee/index.d.ts +3 -0
  67. package/dist/clis/gitee/index.js +3 -0
  68. package/dist/clis/gitee/search.d.ts +1 -0
  69. package/dist/clis/gitee/search.js +136 -0
  70. package/dist/clis/gitee/trending.d.ts +1 -0
  71. package/dist/clis/gitee/trending.js +567 -0
  72. package/dist/clis/gitee/user.d.ts +1 -0
  73. package/dist/clis/gitee/user.js +199 -0
  74. package/dist/clis/gitee/user.test.d.ts +1 -0
  75. package/dist/clis/gitee/user.test.js +63 -0
  76. package/dist/clis/hackernews/ask.d.ts +1 -0
  77. package/dist/clis/hackernews/ask.js +29 -0
  78. package/dist/clis/hackernews/best.d.ts +1 -0
  79. package/dist/clis/hackernews/best.js +29 -0
  80. package/dist/clis/hackernews/jobs.d.ts +1 -0
  81. package/dist/clis/hackernews/jobs.js +27 -0
  82. package/dist/clis/hackernews/new.d.ts +1 -0
  83. package/dist/clis/hackernews/new.js +29 -0
  84. package/dist/clis/hackernews/search.d.ts +1 -0
  85. package/dist/clis/hackernews/search.js +36 -0
  86. package/dist/clis/hackernews/show.d.ts +1 -0
  87. package/dist/clis/hackernews/show.js +29 -0
  88. package/dist/clis/hackernews/top.d.ts +1 -0
  89. package/dist/clis/hackernews/top.js +29 -0
  90. package/dist/clis/hackernews/user.d.ts +1 -0
  91. package/dist/clis/hackernews/user.js +22 -0
  92. package/dist/clis/hupu/hot.d.ts +1 -0
  93. package/dist/clis/hupu/hot.js +40 -0
  94. package/dist/clis/instagram/comment.d.ts +1 -0
  95. package/dist/clis/instagram/comment.js +47 -0
  96. package/dist/clis/instagram/explore.d.ts +1 -0
  97. package/dist/clis/instagram/explore.js +41 -0
  98. package/dist/clis/instagram/follow.d.ts +1 -0
  99. package/dist/clis/instagram/follow.js +43 -0
  100. package/dist/clis/instagram/followers.d.ts +1 -0
  101. package/dist/clis/instagram/followers.js +45 -0
  102. package/dist/clis/instagram/following.d.ts +1 -0
  103. package/dist/clis/instagram/following.js +45 -0
  104. package/dist/clis/instagram/like.d.ts +1 -0
  105. package/dist/clis/instagram/like.js +45 -0
  106. package/dist/clis/instagram/profile.d.ts +1 -0
  107. package/dist/clis/instagram/profile.js +39 -0
  108. package/dist/clis/instagram/save.d.ts +1 -0
  109. package/dist/clis/instagram/save.js +45 -0
  110. package/dist/clis/instagram/saved.d.ts +1 -0
  111. package/dist/clis/instagram/saved.js +38 -0
  112. package/dist/clis/instagram/search.d.ts +1 -0
  113. package/dist/clis/instagram/search.js +38 -0
  114. package/dist/clis/instagram/unfollow.d.ts +1 -0
  115. package/dist/clis/instagram/unfollow.js +40 -0
  116. package/dist/clis/instagram/unlike.d.ts +1 -0
  117. package/dist/clis/instagram/unlike.js +45 -0
  118. package/dist/clis/instagram/unsave.d.ts +1 -0
  119. package/dist/clis/instagram/unsave.js +45 -0
  120. package/dist/clis/instagram/user.d.ts +1 -0
  121. package/dist/clis/instagram/user.js +48 -0
  122. package/dist/clis/jd/add-cart.d.ts +1 -0
  123. package/dist/clis/jd/add-cart.js +71 -0
  124. package/dist/clis/jd/cart.d.ts +1 -0
  125. package/dist/clis/jd/cart.js +79 -0
  126. package/dist/clis/jd/commands.test.d.ts +5 -0
  127. package/dist/clis/jd/commands.test.js +64 -0
  128. package/dist/clis/jd/detail.d.ts +1 -0
  129. package/dist/clis/jd/detail.js +62 -0
  130. package/dist/clis/jd/reviews.d.ts +1 -0
  131. package/dist/clis/jd/reviews.js +54 -0
  132. package/dist/clis/jd/search.d.ts +1 -0
  133. package/dist/clis/jd/search.js +65 -0
  134. package/dist/clis/jianyu/detail.d.ts +1 -0
  135. package/dist/clis/jianyu/detail.js +20 -0
  136. package/dist/clis/jianyu/search.d.ts +41 -4
  137. package/dist/clis/jianyu/search.js +458 -96
  138. package/dist/clis/jianyu/search.test.js +105 -0
  139. package/dist/clis/jianyu/shared/china-bid-search.d.ts +12 -0
  140. package/dist/clis/jianyu/shared/china-bid-search.js +165 -0
  141. package/dist/clis/jianyu/shared/procurement-contract.d.ts +68 -0
  142. package/dist/clis/jianyu/shared/procurement-contract.js +324 -0
  143. package/dist/clis/jianyu/shared/procurement-contract.test.d.ts +1 -0
  144. package/dist/clis/jianyu/shared/procurement-contract.test.js +72 -0
  145. package/dist/clis/jianyu/shared/procurement-detail.d.ts +6 -0
  146. package/dist/clis/jianyu/shared/procurement-detail.js +92 -0
  147. package/dist/clis/jianyu/shared/procurement-detail.test.d.ts +1 -0
  148. package/dist/clis/jianyu/shared/procurement-detail.test.js +72 -0
  149. package/dist/clis/jike/post.d.ts +1 -0
  150. package/dist/clis/jike/post.js +61 -0
  151. package/dist/clis/jike/topic.d.ts +1 -0
  152. package/dist/clis/jike/topic.js +51 -0
  153. package/dist/clis/jike/user.d.ts +1 -0
  154. package/dist/clis/jike/user.js +50 -0
  155. package/dist/clis/jimeng/generate.d.ts +1 -0
  156. package/dist/clis/jimeng/generate.js +83 -0
  157. package/dist/clis/jimeng/history.d.ts +1 -0
  158. package/dist/clis/jimeng/history.js +47 -0
  159. package/dist/clis/jimeng/new.d.ts +1 -0
  160. package/dist/clis/jimeng/new.js +43 -0
  161. package/dist/clis/jimeng/workspaces.d.ts +1 -0
  162. package/dist/clis/jimeng/workspaces.js +41 -0
  163. package/dist/clis/linux-do/categories.d.ts +1 -0
  164. package/dist/clis/linux-do/categories.js +65 -0
  165. package/dist/clis/linux-do/search.d.ts +1 -0
  166. package/dist/clis/linux-do/search.js +41 -0
  167. package/dist/clis/linux-do/tags.d.ts +1 -0
  168. package/dist/clis/linux-do/tags.js +39 -0
  169. package/dist/clis/linux-do/topic-content.test.js +5 -5
  170. package/dist/clis/linux-do/topic.d.ts +1 -0
  171. package/dist/clis/linux-do/topic.js +56 -0
  172. package/dist/clis/linux-do/user-posts.d.ts +1 -0
  173. package/dist/clis/linux-do/user-posts.js +61 -0
  174. package/dist/clis/linux-do/user-topics.d.ts +1 -0
  175. package/dist/clis/linux-do/user-topics.js +48 -0
  176. package/dist/clis/lobsters/active.d.ts +1 -0
  177. package/dist/clis/lobsters/active.js +26 -0
  178. package/dist/clis/lobsters/hot.d.ts +1 -0
  179. package/dist/clis/lobsters/hot.js +26 -0
  180. package/dist/clis/lobsters/newest.d.ts +1 -0
  181. package/dist/clis/lobsters/newest.js +26 -0
  182. package/dist/clis/lobsters/tag.d.ts +1 -0
  183. package/dist/clis/lobsters/tag.js +32 -0
  184. package/dist/clis/pixiv/detail.d.ts +1 -0
  185. package/dist/clis/pixiv/detail.js +58 -0
  186. package/dist/clis/pixiv/ranking.d.ts +1 -0
  187. package/dist/clis/pixiv/ranking.js +59 -0
  188. package/dist/clis/pixiv/user.d.ts +1 -0
  189. package/dist/clis/pixiv/user.js +52 -0
  190. package/dist/clis/reddit/frontpage.d.ts +1 -0
  191. package/dist/clis/reddit/frontpage.js +31 -0
  192. package/dist/clis/reddit/hot.d.ts +1 -0
  193. package/dist/clis/reddit/hot.js +45 -0
  194. package/dist/clis/reddit/popular.d.ts +1 -0
  195. package/dist/clis/reddit/popular.js +41 -0
  196. package/dist/clis/reddit/search.d.ts +1 -0
  197. package/dist/clis/reddit/search.js +65 -0
  198. package/dist/clis/reddit/subreddit.d.ts +1 -0
  199. package/dist/clis/reddit/subreddit.js +52 -0
  200. package/dist/clis/reddit/user-comments.d.ts +1 -0
  201. package/dist/clis/reddit/user-comments.js +44 -0
  202. package/dist/clis/reddit/user-posts.d.ts +1 -0
  203. package/dist/clis/reddit/user-posts.js +42 -0
  204. package/dist/clis/reddit/user.d.ts +1 -0
  205. package/dist/clis/reddit/user.js +37 -0
  206. package/dist/clis/stackoverflow/bounties.d.ts +1 -0
  207. package/dist/clis/stackoverflow/bounties.js +27 -0
  208. package/dist/clis/stackoverflow/hot.d.ts +1 -0
  209. package/dist/clis/stackoverflow/hot.js +24 -0
  210. package/dist/clis/stackoverflow/search.d.ts +1 -0
  211. package/dist/clis/stackoverflow/search.js +27 -0
  212. package/dist/clis/stackoverflow/unanswered.d.ts +1 -0
  213. package/dist/clis/stackoverflow/unanswered.js +26 -0
  214. package/dist/clis/steam/top-sellers.d.ts +1 -0
  215. package/dist/clis/steam/top-sellers.js +25 -0
  216. package/dist/clis/taobao/add-cart.d.ts +1 -0
  217. package/dist/clis/taobao/add-cart.js +149 -0
  218. package/dist/clis/taobao/cart.d.ts +1 -0
  219. package/dist/clis/taobao/cart.js +95 -0
  220. package/dist/clis/taobao/commands.test.d.ts +5 -0
  221. package/dist/clis/taobao/commands.test.js +64 -0
  222. package/dist/clis/taobao/detail.d.ts +1 -0
  223. package/dist/clis/taobao/detail.js +70 -0
  224. package/dist/clis/taobao/reviews.d.ts +1 -0
  225. package/dist/clis/taobao/reviews.js +76 -0
  226. package/dist/clis/taobao/search.d.ts +1 -0
  227. package/dist/clis/taobao/search.js +96 -0
  228. package/dist/clis/tiktok/comment.d.ts +1 -0
  229. package/dist/clis/tiktok/comment.js +57 -0
  230. package/dist/clis/tiktok/explore.d.ts +1 -0
  231. package/dist/clis/tiktok/explore.js +35 -0
  232. package/dist/clis/tiktok/follow.d.ts +1 -0
  233. package/dist/clis/tiktok/follow.js +39 -0
  234. package/dist/clis/tiktok/following.d.ts +1 -0
  235. package/dist/clis/tiktok/following.js +42 -0
  236. package/dist/clis/tiktok/friends.d.ts +1 -0
  237. package/dist/clis/tiktok/friends.js +43 -0
  238. package/dist/clis/tiktok/like.d.ts +1 -0
  239. package/dist/clis/tiktok/like.js +33 -0
  240. package/dist/clis/tiktok/live.d.ts +1 -0
  241. package/dist/clis/tiktok/live.js +47 -0
  242. package/dist/clis/tiktok/notifications.d.ts +1 -0
  243. package/dist/clis/tiktok/notifications.js +49 -0
  244. package/dist/clis/tiktok/profile.d.ts +1 -0
  245. package/dist/clis/tiktok/profile.js +54 -0
  246. package/dist/clis/tiktok/save.d.ts +1 -0
  247. package/dist/clis/tiktok/save.js +29 -0
  248. package/dist/clis/tiktok/search.d.ts +1 -0
  249. package/dist/clis/tiktok/search.js +39 -0
  250. package/dist/clis/tiktok/unfollow.d.ts +1 -0
  251. package/dist/clis/tiktok/unfollow.js +44 -0
  252. package/dist/clis/tiktok/unlike.d.ts +1 -0
  253. package/dist/clis/tiktok/unlike.js +33 -0
  254. package/dist/clis/tiktok/unsave.d.ts +1 -0
  255. package/dist/clis/tiktok/unsave.js +31 -0
  256. package/dist/clis/tiktok/user.d.ts +1 -0
  257. package/dist/clis/tiktok/user.js +41 -0
  258. package/dist/clis/v2ex/hot.d.ts +1 -0
  259. package/dist/clis/v2ex/hot.js +25 -0
  260. package/dist/clis/v2ex/latest.d.ts +1 -0
  261. package/dist/clis/v2ex/latest.js +25 -0
  262. package/dist/clis/v2ex/member.d.ts +1 -0
  263. package/dist/clis/v2ex/member.js +27 -0
  264. package/dist/clis/v2ex/node.d.ts +1 -0
  265. package/dist/clis/v2ex/node.js +38 -0
  266. package/dist/clis/v2ex/nodes.d.ts +1 -0
  267. package/dist/clis/v2ex/nodes.js +25 -0
  268. package/dist/clis/v2ex/replies.d.ts +1 -0
  269. package/dist/clis/v2ex/replies.js +26 -0
  270. package/dist/clis/v2ex/topic.d.ts +1 -0
  271. package/dist/clis/v2ex/topic.js +30 -0
  272. package/dist/clis/v2ex/user.d.ts +1 -0
  273. package/dist/clis/v2ex/user.js +33 -0
  274. package/dist/clis/xiaoe/catalog.d.ts +1 -0
  275. package/dist/clis/xiaoe/catalog.js +161 -0
  276. package/dist/clis/xiaoe/content.d.ts +1 -0
  277. package/dist/clis/xiaoe/content.js +39 -0
  278. package/dist/clis/xiaoe/courses.d.ts +1 -0
  279. package/dist/clis/xiaoe/courses.js +69 -0
  280. package/dist/clis/xiaoe/detail.d.ts +1 -0
  281. package/dist/clis/xiaoe/detail.js +35 -0
  282. package/dist/clis/xiaoe/play-url.d.ts +1 -0
  283. package/dist/clis/xiaoe/play-url.js +120 -0
  284. package/dist/clis/xiaohongshu/feed.d.ts +1 -0
  285. package/dist/clis/xiaohongshu/feed.js +32 -0
  286. package/dist/clis/xiaohongshu/notifications.d.ts +1 -0
  287. package/dist/clis/xiaohongshu/notifications.js +38 -0
  288. package/dist/clis/xueqiu/earnings-date.d.ts +1 -0
  289. package/dist/clis/xueqiu/earnings-date.js +61 -0
  290. package/dist/clis/xueqiu/feed.d.ts +1 -0
  291. package/dist/clis/xueqiu/feed.js +48 -0
  292. package/dist/clis/xueqiu/groups.d.ts +1 -0
  293. package/dist/clis/xueqiu/groups.js +25 -0
  294. package/dist/clis/xueqiu/hot-stock.d.ts +1 -0
  295. package/dist/clis/xueqiu/hot-stock.js +44 -0
  296. package/dist/clis/xueqiu/hot.d.ts +1 -0
  297. package/dist/clis/xueqiu/hot.js +44 -0
  298. package/dist/clis/xueqiu/kline.d.ts +1 -0
  299. package/dist/clis/xueqiu/kline.js +64 -0
  300. package/dist/clis/xueqiu/search.d.ts +1 -0
  301. package/dist/clis/xueqiu/search.js +49 -0
  302. package/dist/clis/xueqiu/stock.d.ts +1 -0
  303. package/dist/clis/xueqiu/stock.js +72 -0
  304. package/dist/clis/xueqiu/watchlist.d.ts +1 -0
  305. package/dist/clis/xueqiu/watchlist.js +45 -0
  306. package/dist/clis/zhihu/hot.d.ts +1 -0
  307. package/dist/clis/zhihu/hot.js +43 -0
  308. package/dist/clis/zhihu/search.d.ts +1 -0
  309. package/dist/clis/zhihu/search.js +52 -0
  310. package/dist/src/browser/bridge.js +1 -1
  311. package/dist/src/browser/daemon-client.d.ts +16 -4
  312. package/dist/src/browser/daemon-client.js +33 -15
  313. package/dist/src/browser/daemon-client.test.js +0 -3
  314. package/dist/src/browser/dom-helpers.test.js +3 -2
  315. package/dist/src/browser/errors.d.ts +26 -1
  316. package/dist/src/browser/errors.js +40 -7
  317. package/dist/src/browser/errors.test.d.ts +1 -0
  318. package/dist/src/browser/errors.test.js +51 -0
  319. package/dist/src/browser/page.d.ts +9 -8
  320. package/dist/src/browser/page.js +33 -31
  321. package/dist/src/browser.test.js +25 -6
  322. package/dist/src/build-manifest.d.ts +5 -11
  323. package/dist/src/build-manifest.js +6 -75
  324. package/dist/src/build-manifest.test.js +1 -39
  325. package/dist/src/cascade.js +3 -2
  326. package/dist/src/cli.d.ts +3 -3
  327. package/dist/src/cli.js +71 -71
  328. package/dist/src/cli.test.js +20 -15
  329. package/dist/src/clis/binance/asks.d.ts +1 -0
  330. package/dist/src/clis/binance/asks.js +20 -0
  331. package/dist/src/clis/binance/commands.test.d.ts +3 -1
  332. package/dist/src/clis/binance/commands.test.js +10 -6
  333. package/dist/src/clis/binance/depth.d.ts +1 -0
  334. package/dist/src/clis/binance/depth.js +20 -0
  335. package/dist/src/clis/binance/gainers.d.ts +1 -0
  336. package/dist/src/clis/binance/gainers.js +21 -0
  337. package/dist/src/clis/binance/klines.d.ts +1 -0
  338. package/dist/src/clis/binance/klines.js +20 -0
  339. package/dist/src/clis/binance/losers.d.ts +1 -0
  340. package/dist/src/clis/binance/losers.js +21 -0
  341. package/dist/src/clis/binance/pairs.d.ts +1 -0
  342. package/dist/src/clis/binance/pairs.js +20 -0
  343. package/dist/src/clis/binance/price.d.ts +1 -0
  344. package/dist/src/clis/binance/price.js +17 -0
  345. package/dist/src/clis/binance/prices.d.ts +1 -0
  346. package/dist/src/clis/binance/prices.js +18 -0
  347. package/dist/src/clis/binance/ticker.d.ts +1 -0
  348. package/dist/src/clis/binance/ticker.js +20 -0
  349. package/dist/src/clis/binance/top.d.ts +1 -0
  350. package/dist/src/clis/binance/top.js +20 -0
  351. package/dist/src/clis/binance/trades.d.ts +1 -0
  352. package/dist/src/clis/binance/trades.js +19 -0
  353. package/dist/src/commands/daemon.d.ts +2 -6
  354. package/dist/src/commands/daemon.js +2 -58
  355. package/dist/src/commands/daemon.test.js +24 -120
  356. package/dist/src/completion-fast.d.ts +25 -0
  357. package/dist/src/completion-fast.js +140 -0
  358. package/dist/src/completion.d.ts +1 -0
  359. package/dist/src/completion.js +1 -0
  360. package/dist/src/constants.d.ts +0 -2
  361. package/dist/src/constants.js +0 -2
  362. package/dist/src/daemon.d.ts +1 -1
  363. package/dist/src/daemon.js +2 -15
  364. package/dist/src/diagnostic.test.js +2 -2
  365. package/dist/src/discovery.d.ts +3 -3
  366. package/dist/src/discovery.js +34 -97
  367. package/dist/src/download/index.d.ts +1 -1
  368. package/dist/src/engine.test.js +4 -19
  369. package/dist/src/execution.js +5 -1
  370. package/dist/src/generate-verified.d.ts +105 -0
  371. package/dist/src/generate-verified.js +696 -0
  372. package/dist/src/generate-verified.test.d.ts +1 -0
  373. package/dist/src/generate-verified.test.js +925 -0
  374. package/dist/src/generate.d.ts +9 -1
  375. package/dist/src/generate.js +2 -2
  376. package/dist/src/main.js +65 -12
  377. package/dist/src/pipeline/steps/download.d.ts +1 -17
  378. package/dist/src/pipeline/steps/download.js +20 -31
  379. package/dist/src/pipeline/steps/intercept.d.ts +1 -1
  380. package/dist/src/pipeline/steps/intercept.js +1 -1
  381. package/dist/src/pipeline/steps/tap.d.ts +1 -1
  382. package/dist/src/pipeline/steps/tap.js +1 -1
  383. package/dist/src/plugin-scaffold.d.ts +2 -2
  384. package/dist/src/plugin-scaffold.js +24 -21
  385. package/dist/src/plugin-scaffold.test.js +1 -1
  386. package/dist/src/plugin.d.ts +1 -1
  387. package/dist/src/plugin.js +4 -6
  388. package/dist/src/plugin.test.js +31 -31
  389. package/dist/src/record.js +26 -25
  390. package/dist/src/runtime-detect.js +3 -7
  391. package/dist/src/scripts/framework.d.ts +3 -0
  392. package/dist/src/scripts/framework.js +8 -4
  393. package/dist/src/scripts/store.d.ts +5 -1
  394. package/dist/src/scripts/store.js +5 -1
  395. package/dist/src/skill-generate.d.ts +30 -0
  396. package/dist/src/skill-generate.js +75 -0
  397. package/dist/src/skill-generate.test.d.ts +1 -0
  398. package/dist/src/skill-generate.test.js +173 -0
  399. package/dist/src/synthesize.d.ts +1 -1
  400. package/dist/src/synthesize.js +7 -8
  401. package/dist/src/types.d.ts +3 -1
  402. package/package.json +4 -3
  403. package/dist/clis/bilibili/hot.yaml +0 -38
  404. package/dist/clis/bluesky/feeds.yaml +0 -29
  405. package/dist/clis/bluesky/followers.yaml +0 -33
  406. package/dist/clis/bluesky/following.yaml +0 -33
  407. package/dist/clis/bluesky/profile.yaml +0 -27
  408. package/dist/clis/bluesky/search.yaml +0 -34
  409. package/dist/clis/bluesky/starter-packs.yaml +0 -34
  410. package/dist/clis/bluesky/thread.yaml +0 -32
  411. package/dist/clis/bluesky/trending.yaml +0 -27
  412. package/dist/clis/bluesky/user.yaml +0 -34
  413. package/dist/clis/devto/tag.yaml +0 -34
  414. package/dist/clis/devto/top.yaml +0 -29
  415. package/dist/clis/devto/user.yaml +0 -33
  416. package/dist/clis/dictionary/examples.yaml +0 -25
  417. package/dist/clis/dictionary/search.yaml +0 -27
  418. package/dist/clis/dictionary/synonyms.yaml +0 -25
  419. package/dist/clis/douban/subject.yaml +0 -107
  420. package/dist/clis/douban/top250.yaml +0 -70
  421. package/dist/clis/facebook/add-friend.yaml +0 -43
  422. package/dist/clis/facebook/events.yaml +0 -44
  423. package/dist/clis/facebook/feed.yaml +0 -63
  424. package/dist/clis/facebook/friends.yaml +0 -42
  425. package/dist/clis/facebook/groups.yaml +0 -50
  426. package/dist/clis/facebook/join-group.yaml +0 -44
  427. package/dist/clis/facebook/memories.yaml +0 -39
  428. package/dist/clis/facebook/notifications.yaml +0 -40
  429. package/dist/clis/facebook/profile.yaml +0 -37
  430. package/dist/clis/facebook/search.yaml +0 -47
  431. package/dist/clis/hackernews/ask.yaml +0 -38
  432. package/dist/clis/hackernews/best.yaml +0 -38
  433. package/dist/clis/hackernews/jobs.yaml +0 -36
  434. package/dist/clis/hackernews/new.yaml +0 -38
  435. package/dist/clis/hackernews/search.yaml +0 -44
  436. package/dist/clis/hackernews/show.yaml +0 -38
  437. package/dist/clis/hackernews/top.yaml +0 -38
  438. package/dist/clis/hackernews/user.yaml +0 -25
  439. package/dist/clis/hupu/hot.yaml +0 -43
  440. package/dist/clis/instagram/comment.yaml +0 -52
  441. package/dist/clis/instagram/explore.yaml +0 -43
  442. package/dist/clis/instagram/follow.yaml +0 -41
  443. package/dist/clis/instagram/followers.yaml +0 -51
  444. package/dist/clis/instagram/following.yaml +0 -51
  445. package/dist/clis/instagram/like.yaml +0 -46
  446. package/dist/clis/instagram/profile.yaml +0 -42
  447. package/dist/clis/instagram/save.yaml +0 -46
  448. package/dist/clis/instagram/saved.yaml +0 -40
  449. package/dist/clis/instagram/search.yaml +0 -44
  450. package/dist/clis/instagram/unfollow.yaml +0 -38
  451. package/dist/clis/instagram/unlike.yaml +0 -46
  452. package/dist/clis/instagram/unsave.yaml +0 -46
  453. package/dist/clis/instagram/user.yaml +0 -54
  454. package/dist/clis/jike/post.yaml +0 -59
  455. package/dist/clis/jike/topic.yaml +0 -53
  456. package/dist/clis/jike/user.yaml +0 -52
  457. package/dist/clis/jimeng/generate.yaml +0 -85
  458. package/dist/clis/jimeng/history.yaml +0 -46
  459. package/dist/clis/linux-do/categories.yaml +0 -70
  460. package/dist/clis/linux-do/search.yaml +0 -48
  461. package/dist/clis/linux-do/tags.yaml +0 -41
  462. package/dist/clis/linux-do/topic.yaml +0 -62
  463. package/dist/clis/linux-do/user-posts.yaml +0 -67
  464. package/dist/clis/linux-do/user-topics.yaml +0 -54
  465. package/dist/clis/lobsters/active.yaml +0 -29
  466. package/dist/clis/lobsters/hot.yaml +0 -29
  467. package/dist/clis/lobsters/newest.yaml +0 -29
  468. package/dist/clis/lobsters/tag.yaml +0 -34
  469. package/dist/clis/pixiv/detail.yaml +0 -49
  470. package/dist/clis/pixiv/ranking.yaml +0 -53
  471. package/dist/clis/pixiv/user.yaml +0 -46
  472. package/dist/clis/reddit/frontpage.yaml +0 -30
  473. package/dist/clis/reddit/hot.yaml +0 -47
  474. package/dist/clis/reddit/popular.yaml +0 -40
  475. package/dist/clis/reddit/search.yaml +0 -61
  476. package/dist/clis/reddit/subreddit.yaml +0 -50
  477. package/dist/clis/reddit/user-comments.yaml +0 -46
  478. package/dist/clis/reddit/user-posts.yaml +0 -44
  479. package/dist/clis/reddit/user.yaml +0 -40
  480. package/dist/clis/stackoverflow/bounties.yaml +0 -29
  481. package/dist/clis/stackoverflow/hot.yaml +0 -28
  482. package/dist/clis/stackoverflow/search.yaml +0 -33
  483. package/dist/clis/stackoverflow/unanswered.yaml +0 -28
  484. package/dist/clis/steam/top-sellers.yaml +0 -29
  485. package/dist/clis/tiktok/comment.yaml +0 -66
  486. package/dist/clis/tiktok/explore.yaml +0 -39
  487. package/dist/clis/tiktok/follow.yaml +0 -39
  488. package/dist/clis/tiktok/following.yaml +0 -46
  489. package/dist/clis/tiktok/friends.yaml +0 -47
  490. package/dist/clis/tiktok/like.yaml +0 -38
  491. package/dist/clis/tiktok/live.yaml +0 -51
  492. package/dist/clis/tiktok/notifications.yaml +0 -52
  493. package/dist/clis/tiktok/profile.yaml +0 -45
  494. package/dist/clis/tiktok/save.yaml +0 -34
  495. package/dist/clis/tiktok/search.yaml +0 -47
  496. package/dist/clis/tiktok/unfollow.yaml +0 -44
  497. package/dist/clis/tiktok/unlike.yaml +0 -38
  498. package/dist/clis/tiktok/unsave.yaml +0 -36
  499. package/dist/clis/tiktok/user.yaml +0 -44
  500. package/dist/clis/v2ex/hot.yaml +0 -28
  501. package/dist/clis/v2ex/latest.yaml +0 -28
  502. package/dist/clis/v2ex/member.yaml +0 -29
  503. package/dist/clis/v2ex/node.yaml +0 -34
  504. package/dist/clis/v2ex/nodes.yaml +0 -31
  505. package/dist/clis/v2ex/replies.yaml +0 -32
  506. package/dist/clis/v2ex/topic.yaml +0 -33
  507. package/dist/clis/v2ex/user.yaml +0 -34
  508. package/dist/clis/xiaoe/catalog.yaml +0 -129
  509. package/dist/clis/xiaoe/content.yaml +0 -43
  510. package/dist/clis/xiaoe/courses.yaml +0 -73
  511. package/dist/clis/xiaoe/detail.yaml +0 -39
  512. package/dist/clis/xiaoe/play-url.yaml +0 -124
  513. package/dist/clis/xiaohongshu/feed.yaml +0 -31
  514. package/dist/clis/xiaohongshu/notifications.yaml +0 -37
  515. package/dist/clis/xueqiu/earnings-date.yaml +0 -69
  516. package/dist/clis/xueqiu/feed.yaml +0 -53
  517. package/dist/clis/xueqiu/groups.yaml +0 -23
  518. package/dist/clis/xueqiu/hot-stock.yaml +0 -49
  519. package/dist/clis/xueqiu/hot.yaml +0 -46
  520. package/dist/clis/xueqiu/kline.yaml +0 -65
  521. package/dist/clis/xueqiu/search.yaml +0 -55
  522. package/dist/clis/xueqiu/stock.yaml +0 -69
  523. package/dist/clis/xueqiu/watchlist.yaml +0 -46
  524. package/dist/clis/zhihu/hot.yaml +0 -46
  525. package/dist/clis/zhihu/search.yaml +0 -59
  526. package/dist/src/daemon.test.js +0 -65
  527. package/dist/src/idle-manager.d.ts +0 -19
  528. package/dist/src/idle-manager.js +0 -54
  529. package/dist/src/yaml-schema.d.ts +0 -29
  530. package/dist/src/yaml-schema.js +0 -22
  531. /package/dist/{src/daemon.test.d.ts → clis/bilibili/hot.d.ts} +0 -0
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,156 @@ 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
+ ```
54
61
 
55
- # Install AI skills for Claude Code / Cursor
56
- npx skills add jackwener/opencli
62
+ ### 4. Run your first commands
63
+
64
+ ```bash
65
+ opencli list
66
+ opencli hackernews top --limit 5
67
+ opencli bilibili hot --limit 5
57
68
  ```
58
69
 
59
- ### 3. Verify & Try
70
+ ## For Humans
71
+
72
+ Use OpenCLI directly when you want a reliable command instead of a live browser session:
73
+
74
+ - `opencli list` shows every registered command.
75
+ - `opencli <site> <command>` runs a built-in or generated adapter.
76
+ - `opencli register mycli` exposes a local CLI through the same discovery surface.
77
+ - `opencli doctor` helps diagnose browser connectivity.
78
+
79
+ ## For AI Agents
80
+
81
+ Use two different entry points depending on the task:
82
+
83
+ - [`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.
84
+ - [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md): the low-level control surface for live browsing, debugging, and manual intervention.
85
+
86
+ Install the packaged skills with:
60
87
 
61
88
  ```bash
62
- opencli doctor # Check extension + daemon connectivity
63
- opencli daemon status # Check daemon state (PID, uptime, memory)
89
+ npx skills add jackwener/opencli
64
90
  ```
65
91
 
66
- **Try it out:**
92
+ Or install only what you need:
67
93
 
68
94
  ```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)
95
+ npx skills add jackwener/opencli --skill opencli-usage
96
+ npx skills add jackwener/opencli --skill opencli-browser
97
+ npx skills add jackwener/opencli --skill opencli-explorer
98
+ npx skills add jackwener/opencli --skill opencli-oneshot
72
99
  ```
73
100
 
74
- ### 4. Browser Automation — Make Websites Accessible for AI Agents
101
+ In practice:
75
102
 
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.
103
+ - start with `opencli-explorer` when the agent needs a reusable command for a site (it covers both automated and manual flows)
104
+ - use `opencli-browser` when the agent needs to inspect or steer the page directly
77
105
 
78
- Available commands: `open`, `state`, `click`, `type`, `select`, `keys`, `wait`, `get`, `screenshot`, `scroll`, `back`, `eval`, `network`, `init`, `verify`, `close`.
106
+ Available browser commands include `open`, `state`, `click`, `type`, `select`, `keys`, `wait`, `get`, `screenshot`, `scroll`, `back`, `eval`, `network`, `init`, `verify`, and `close`.
79
107
 
80
- ### Update
108
+ ## Core Concepts
81
109
 
82
- ```bash
83
- npm install -g @jackwener/opencli@latest
84
- ```
110
+ ### `browser`: live control
85
111
 
86
- ### Install AI Skills
112
+ Use `opencli browser` when the task is inherently interactive and the agent needs to operate the page directly.
87
113
 
88
- OpenCLI provides [skills](./skills/) for AI agents (Claude Code, etc.):
114
+ ### Built-in adapters: stable commands
89
115
 
90
- ```bash
91
- # Install all OpenCLI skills
92
- npx skills add jackwener/opencli
116
+ Use site-specific commands such as `opencli hackernews top` or `opencli reddit hot` when the capability already exists and you want deterministic output.
93
117
 
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
- ```
118
+ ### `explore` / `synthesize` / `generate`: create new CLIs
100
119
 
101
- ---
120
+ Use these commands when the site you need is not covered yet:
102
121
 
103
- ### For Developers
122
+ - `explore` inspects the page, network activity, and capability surface.
123
+ - `synthesize` turns exploration artifacts into evaluate-based YAML adapters.
124
+ - `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
125
 
105
- **Install from source**
126
+ ### `cascade`: auth strategy discovery
106
127
 
107
- ```bash
108
- git clone git@github.com:jackwener/opencli.git && cd opencli && npm install && npm run build && npm link
109
- ```
128
+ Use `cascade` to probe fallback auth paths such as public endpoints, cookies, and custom headers before you commit to an adapter design.
110
129
 
111
- **Load Source Browser Bridge Extension**
130
+ ### CLI Hub and desktop adapters
112
131
 
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.
132
+ OpenCLI is not only for websites. It can also:
115
133
 
116
- ---
134
+ - expose local binaries like `gh`, `docker`, `obsidian`, or custom tools through `opencli <tool> ...`
135
+ - control Electron desktop apps through dedicated adapters and CDP-backed integrations
117
136
 
118
137
  ## Prerequisites
119
138
 
120
139
  - **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).
140
+ - **Chrome or Chromium** running and logged into the target site for browser-backed commands
141
+
142
+ > **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.
143
+
144
+ ## Configuration
145
+
146
+ | Variable | Default | Description |
147
+ |----------|---------|-------------|
148
+ | `OPENCLI_DAEMON_PORT` | `19825` | HTTP port for the daemon-extension bridge |
149
+ | `OPENCLI_WINDOW_FOCUSED` | `false` | Set to `1` to open automation windows in the foreground (useful for debugging) |
150
+ | `OPENCLI_BROWSER_CONNECT_TIMEOUT` | `30` | Seconds to wait for browser connection |
151
+ | `OPENCLI_BROWSER_COMMAND_TIMEOUT` | `60` | Seconds to wait for a single browser command |
152
+ | `OPENCLI_BROWSER_EXPLORE_TIMEOUT` | `120` | Seconds to wait for explore/record operations |
153
+ | `OPENCLI_CDP_ENDPOINT` | — | Chrome DevTools Protocol endpoint for remote browser or Electron apps |
154
+ | `OPENCLI_CDP_TARGET` | — | Filter CDP targets by URL substring (e.g. `detail.1688.com`) |
155
+ | `OPENCLI_VERBOSE` | `false` | Enable verbose logging (`-v` flag also works) |
156
+ | `OPENCLI_DIAGNOSTIC` | `false` | Set to `1` to capture structured diagnostic context on failures |
157
+
158
+ ## Update
159
+
160
+ ```bash
161
+ npm install -g @jackwener/opencli@latest
162
+
163
+ # If you use the packaged OpenCLI skills, refresh them too
164
+ npx skills add jackwener/opencli
165
+ ```
166
+
167
+ Or refresh only the skills you actually use:
168
+
169
+ ```bash
170
+ npx skills add jackwener/opencli --skill opencli-usage
171
+ npx skills add jackwener/opencli --skill opencli-browser
172
+ npx skills add jackwener/opencli --skill opencli-explorer
173
+ npx skills add jackwener/opencli --skill opencli-oneshot
174
+ ```
175
+
176
+ ## For Developers
177
+
178
+ Install from source:
179
+
180
+ ```bash
181
+ git clone git@github.com:jackwener/opencli.git
182
+ cd opencli
183
+ npm install
184
+ npm run build
185
+ npm link
186
+ ```
187
+
188
+ To load the source Browser Bridge extension:
122
189
 
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.
190
+ 1. Open `chrome://extensions` and enable **Developer mode**.
191
+ 2. Click **Load unpacked** and select this repository's `extension/` directory.
124
192
 
125
193
  ## Built-in Commands
126
194
 
@@ -135,6 +203,7 @@ git clone git@github.com:jackwener/opencli.git && cd opencli && npm install && n
135
203
  | **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` |
136
204
  | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` |
137
205
  | **1688** | `search` `item` `assets` `download` `store` |
206
+ | **gitee** | `trending` `search` `user` |
138
207
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
139
208
  | **yuanbao** | `new` `ask` |
140
209
  | **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
@@ -251,9 +320,9 @@ opencli plugin uninstall my-tool
251
320
 
252
321
  | Plugin | Type | Description |
253
322
  |--------|------|-------------|
254
- | [opencli-plugin-github-trending](https://github.com/ByteYue/opencli-plugin-github-trending) | YAML | GitHub Trending repositories |
323
+ | [opencli-plugin-github-trending](https://github.com/ByteYue/opencli-plugin-github-trending) | TS | GitHub Trending repositories |
255
324
  | [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 |
325
+ | [opencli-plugin-juejin](https://github.com/Astro-Han/opencli-plugin-juejin) | TS | 稀土掘金 (Juejin) hot articles |
257
326
  | [opencli-plugin-vk](https://github.com/flobo3/opencli-plugin-vk) | TS | VK (VKontakte) wall, feed, and search |
258
327
 
259
328
  See [Plugins Guide](./docs/guide/plugins.md) for creating your own plugin.
@@ -266,7 +335,7 @@ See [Plugins Guide](./docs/guide/plugins.md) for creating your own plugin.
266
335
 
267
336
  ```bash
268
337
  opencli explore https://example.com --site mysite # Discover APIs + capabilities
269
- opencli synthesize mysite # Generate YAML adapters
338
+ opencli synthesize mysite # Generate TS adapters
270
339
  opencli generate https://example.com --goal "hot" # One-shot: explore → synthesize → register
271
340
  opencli cascade https://api.example.com/data # Auto-probe: PUBLIC → COOKIE → HEADER
272
341
  ```
package/README.zh-CN.md CHANGED
@@ -1,128 +1,183 @@
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
+ ```
52
49
 
53
- **方式二:加载源码(针对开发者)**
54
- 1. 同样在 `chrome://extensions` 开启 **开发者模式**。
55
- 2. 点击 **加载已解压的扩展程序**,选择本仓库代码树中的 `extension/` 文件夹。
50
+ ### 4. 跑第一个命令
56
51
 
57
- 完成!运行任何 opencli 浏览器命令时,后台微型 daemon 会自动启动与浏览器通信。无需配 API Token,零代码配置。
52
+ ```bash
53
+ opencli list
54
+ opencli hackernews top --limit 5
55
+ opencli bilibili hot --limit 5
56
+ ```
58
57
 
59
- > **Tip**:后续诊断和 daemon 管理:
60
- > ```bash
61
- > opencli doctor # 检查扩展和 daemon 连通性
62
- > opencli daemon status # 查看 daemon 状态
63
- > opencli daemon stop # 停止 daemon
64
- > ```
58
+ ## 给人类用户
65
59
 
66
- ## 快速开始
60
+ 如果你只是想稳定地调用网站或桌面应用能力,主路径很简单:
67
61
 
68
- ### npm 全局安装(推荐)
62
+ - `opencli list` 查看当前所有命令
63
+ - `opencli <site> <command>` 调用内置或生成好的适配器
64
+ - `opencli register mycli` 把本地 CLI 接入同一发现入口
65
+ - `opencli doctor` 处理浏览器连通性问题
69
66
 
70
- ```bash
71
- npm install -g @jackwener/opencli
67
+ ## 给 AI Agent
72
68
 
73
- # 安装 AI Skills(Claude Code / Cursor)
74
- npx skills add jackwener/opencli
75
- ```
69
+ 按任务类型,AI Agent 有两个不同入口:
76
70
 
77
- 直接使用:
71
+ - [`skills/opencli-explorer/SKILL.md`](./skills/opencli-explorer/SKILL.md):适配器创建入口,支持全自动生成(`opencli generate <url>`)和手动探索两种流程。
72
+ - [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md):底层控制入口,适合实时操作页面、debug 和人工介入。
73
+
74
+ 安装全部 OpenCLI skills:
78
75
 
79
76
  ```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 输出
77
+ npx skills add jackwener/opencli
86
78
  ```
87
79
 
88
- ### 从源码安装(面向开发者)
80
+ 或只装需要的 skill:
89
81
 
90
82
  ```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 # 可以在任何地方使用了!
83
+ npx skills add jackwener/opencli --skill opencli-usage
84
+ npx skills add jackwener/opencli --skill opencli-browser
85
+ npx skills add jackwener/opencli --skill opencli-explorer
86
+ npx skills add jackwener/opencli --skill opencli-oneshot
97
87
  ```
98
88
 
99
- ### 更新
89
+ 实际使用上:
100
90
 
101
- ```bash
102
- npm install -g @jackwener/opencli@latest
103
- ```
91
+ - 需要把某个站点收成可复用命令时,优先走 `opencli-explorer`(涵盖自动和手动两种路径)
92
+ - 需要直接检查页面、操作页面时,再走 `opencli-browser`
93
+
94
+ `browser` 可用命令包括:`open`、`state`、`click`、`type`、`select`、`keys`、`wait`、`get`、`screenshot`、`scroll`、`back`、`eval`、`network`、`init`、`verify`、`close`。
95
+
96
+ ## 核心概念
97
+
98
+ ### `browser`:实时操作
99
+
100
+ 当任务本身就是交互式页面操作时,使用 `opencli browser` 直接驱动浏览器。
104
101
 
105
- ### 浏览器自动化 — 让 AI Agent 直接控制浏览器
102
+ ### 内置适配器:稳定命令
106
103
 
107
- [`skills/opencli-operate/SKILL.md`](./skills/opencli-operate/SKILL.md) 指向你的 AI Agent(Claude Code、Cursor),即可开箱即用,内含完整命令参考与使用示例。
104
+ 当某个站点能力已经存在时,优先使用 `opencli hackernews top`、`opencli reddit hot` 这类稳定命令,而不是重新走一遍浏览器操作。
108
105
 
109
- 可用命令:`open`、`state`、`click`、`type`、`select`、`keys`、`wait`、`get`、`screenshot`、`scroll`、`back`、`eval`、`network`、`init`、`verify`、`close`。
106
+ ### `explore` / `synthesize` / `generate`:生成新的 CLI
110
107
 
111
- ### 安装 AI Skills
108
+ 当你需要的网站还没覆盖时:
112
109
 
113
- OpenCLI 提供 [skills](./skills/) 供 AI Agent(Claude Code 等)使用:
110
+ - `explore` 负责观察页面、网络请求和能力边界
111
+ - `synthesize` 负责把探索结果转成 evaluate-based YAML 适配器
112
+ - `generate` 负责跑通 verified generation 主链路,最后要么给出可直接使用的命令,要么返回结构化的阻塞原因 / 人工介入结果
113
+
114
+ ### `cascade`:认证策略探测
115
+
116
+ 用 `cascade` 去判断某个能力应该优先走公开接口、Cookie 还是自定义 Header,而不是一开始就把适配器写死。
117
+
118
+ ### CLI 枢纽与桌面端适配器
119
+
120
+ OpenCLI 不只是网站 CLI,还可以:
121
+
122
+ - 统一代理本地二进制工具,例如 `gh`、`docker`、`obsidian`
123
+ - 通过专门适配器和 CDP 集成控制 Electron 桌面应用
124
+
125
+ ## 前置要求
126
+
127
+ - **Node.js**: >= 20.0.0
128
+ - 浏览器型命令需要 Chrome 或 Chromium 处于运行中,并已登录目标网站
129
+
130
+ > **重要**:浏览器型命令直接复用你的 Chrome/Chromium 登录态。如果拿到空数据或出现权限类失败,先确认目标站点已经在浏览器里打开并完成登录。
131
+
132
+ ## 配置
133
+
134
+ | 变量 | 默认值 | 说明 |
135
+ |------|--------|------|
136
+ | `OPENCLI_DAEMON_PORT` | `19825` | daemon-extension 通信端口 |
137
+ | `OPENCLI_WINDOW_FOCUSED` | `false` | 设为 `1` 时 automation 窗口在前台打开(适合调试) |
138
+ | `OPENCLI_BROWSER_CONNECT_TIMEOUT` | `30` | 浏览器连接超时(秒) |
139
+ | `OPENCLI_BROWSER_COMMAND_TIMEOUT` | `60` | 单个浏览器命令超时(秒) |
140
+ | `OPENCLI_BROWSER_EXPLORE_TIMEOUT` | `120` | explore/record 操作超时(秒) |
141
+ | `OPENCLI_CDP_ENDPOINT` | — | Chrome DevTools Protocol 端点,用于远程浏览器或 Electron 应用 |
142
+ | `OPENCLI_CDP_TARGET` | — | 按 URL 子串过滤 CDP target(如 `detail.1688.com`) |
143
+ | `OPENCLI_VERBOSE` | `false` | 启用详细日志(`-v` 也可以) |
144
+ | `OPENCLI_DIAGNOSTIC` | `false` | 设为 `1` 时在失败时输出结构化诊断上下文 |
145
+
146
+ ## 更新
114
147
 
115
148
  ```bash
116
- # 安装所有 OpenCLI skills
149
+ npm install -g @jackwener/opencli@latest
150
+
151
+ # 如果你在用打包发布的 OpenCLI skills,也一起刷新
117
152
  npx skills add jackwener/opencli
153
+ ```
154
+
155
+ 如果你只装了部分 skill,也可以只刷新自己在用的:
156
+
157
+ ```bash
158
+ npx skills add jackwener/opencli --skill opencli-usage
159
+ npx skills add jackwener/opencli --skill opencli-browser
160
+ npx skills add jackwener/opencli --skill opencli-explorer
161
+ npx skills add jackwener/opencli --skill opencli-oneshot
162
+ ```
163
+
164
+ ## 面向开发者
118
165
 
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 # 快速命令参考
166
+ 从源码安装:
167
+
168
+ ```bash
169
+ git clone git@github.com:jackwener/opencli.git
170
+ cd opencli
171
+ npm install
172
+ npm run build
173
+ npm link
124
174
  ```
125
175
 
176
+ 加载源码版 Browser Bridge 扩展:
177
+
178
+ 1. 打开 `chrome://extensions` 并启用 **开发者模式**
179
+ 2. 点击 **加载已解压的扩展程序**,选择本仓库里的 `extension/` 目录
180
+
126
181
  ## 内置命令
127
182
 
128
183
  运行 `opencli list` 查看完整注册表。
@@ -188,6 +243,7 @@ npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参
188
243
  | **google** | `news` `search` `suggest` `trends` | 公开 |
189
244
  | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` | 浏览器 |
190
245
  | **1688** | `search` `item` `assets` `download` `store` | 浏览器 |
246
+ | **gitee** | `trending` `search` `user` | 公开 / 浏览器 |
191
247
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` | 浏览器 |
192
248
  | **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` | OAuth API |
193
249
  | **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` | 浏览器 |
@@ -383,7 +439,7 @@ opencli plugin uninstall my-tool # 卸载
383
439
  # 1. Deep Explore — 网络拦截 → 响应分析 → 能力推理 → 框架检测
384
440
  opencli explore https://example.com --site mysite
385
441
 
386
- # 2. Synthesize — 从探索成果物生成 evaluate-based YAML 适配器
442
+ # 2. Synthesize — 从探索成果物生成 evaluate-based TS 适配器
387
443
  opencli synthesize mysite
388
444
 
389
445
  # 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,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 {};