@jackwener/opencli 1.7.6 → 1.7.8

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 (85) hide show
  1. package/README.md +17 -8
  2. package/README.zh-CN.md +14 -8
  3. package/cli-manifest.json +469 -11
  4. package/clis/51job/company.js +125 -0
  5. package/clis/51job/detail.js +108 -0
  6. package/clis/51job/hot.js +55 -0
  7. package/clis/51job/search.js +79 -0
  8. package/clis/51job/utils.js +302 -0
  9. package/clis/51job/utils.test.js +69 -0
  10. package/clis/amazon/discussion.js +37 -6
  11. package/clis/amazon/discussion.test.js +147 -32
  12. package/clis/bilibili/video.js +11 -4
  13. package/clis/bilibili/video.test.js +51 -0
  14. package/clis/chatgpt/image.js +1 -1
  15. package/clis/chatgpt-app/ask.js +3 -19
  16. package/clis/chatgpt-app/ax.js +132 -1
  17. package/clis/chatgpt-app/ax.test.js +23 -0
  18. package/clis/chatgpt-app/send.js +2 -21
  19. package/clis/deepseek/ask.js +50 -18
  20. package/clis/deepseek/ask.test.js +195 -2
  21. package/clis/deepseek/utils.js +113 -29
  22. package/clis/deepseek/utils.test.js +109 -1
  23. package/clis/gemini/image.js +1 -1
  24. package/clis/instagram/download.js +1 -1
  25. package/clis/powerchina/search.js +250 -0
  26. package/clis/powerchina/search.test.js +67 -0
  27. package/clis/sinafinance/stock.js +5 -2
  28. package/clis/sinafinance/stock.test.js +59 -0
  29. package/clis/toutiao/articles.js +81 -0
  30. package/clis/toutiao/articles.test.js +23 -0
  31. package/clis/twitter/likes.js +3 -2
  32. package/clis/twitter/search.js +4 -2
  33. package/clis/twitter/search.test.js +4 -0
  34. package/clis/twitter/shared.js +28 -0
  35. package/clis/twitter/shared.test.js +96 -0
  36. package/clis/twitter/thread.js +3 -1
  37. package/clis/twitter/timeline.js +3 -2
  38. package/clis/twitter/tweets.js +3 -2
  39. package/clis/twitter/tweets.test.js +1 -1
  40. package/clis/web/read.js +25 -5
  41. package/clis/web/read.test.js +76 -0
  42. package/clis/weixin/create-draft.js +225 -0
  43. package/clis/weixin/drafts.js +65 -0
  44. package/clis/weixin/drafts.test.js +65 -0
  45. package/clis/weread/ai-outline.js +170 -0
  46. package/clis/weread/ai-outline.test.js +83 -0
  47. package/clis/weread/book.js +57 -44
  48. package/clis/weread/commands.test.js +24 -0
  49. package/clis/xiaoyuzhou/podcast-episodes.js +2 -2
  50. package/clis/xiaoyuzhou/podcast-episodes.test.js +78 -0
  51. package/dist/src/browser/analyze.d.ts +103 -0
  52. package/dist/src/browser/analyze.js +230 -0
  53. package/dist/src/browser/analyze.test.d.ts +1 -0
  54. package/dist/src/browser/analyze.test.js +164 -0
  55. package/dist/src/browser/article-extract.d.ts +57 -0
  56. package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
  57. package/dist/src/browser/article-extract.e2e.test.js +105 -0
  58. package/dist/src/browser/article-extract.js +169 -0
  59. package/dist/src/browser/article-extract.test.d.ts +1 -0
  60. package/dist/src/browser/article-extract.test.js +94 -0
  61. package/dist/src/browser/cdp.js +11 -2
  62. package/dist/src/browser/verify-fixture.d.ts +59 -0
  63. package/dist/src/browser/verify-fixture.js +213 -0
  64. package/dist/src/browser/verify-fixture.test.d.ts +1 -0
  65. package/dist/src/browser/verify-fixture.test.js +161 -0
  66. package/dist/src/cli.d.ts +32 -0
  67. package/dist/src/cli.js +333 -43
  68. package/dist/src/cli.test.js +257 -1
  69. package/dist/src/commanderAdapter.js +12 -0
  70. package/dist/src/commanderAdapter.test.js +11 -0
  71. package/dist/src/daemon.d.ts +3 -2
  72. package/dist/src/daemon.js +16 -4
  73. package/dist/src/daemon.test.d.ts +1 -0
  74. package/dist/src/daemon.test.js +19 -0
  75. package/dist/src/download/article-download.d.ts +12 -0
  76. package/dist/src/download/article-download.js +141 -17
  77. package/dist/src/download/article-download.test.js +196 -0
  78. package/dist/src/download/index.js +73 -86
  79. package/dist/src/errors.js +4 -2
  80. package/dist/src/errors.test.js +13 -0
  81. package/dist/src/launcher.d.ts +1 -1
  82. package/dist/src/launcher.js +3 -3
  83. package/dist/src/output.js +1 -1
  84. package/dist/src/output.test.js +6 -0
  85. package/package.json +5 -1
package/README.md CHANGED
@@ -83,6 +83,8 @@ Or install only what you need:
83
83
  ```bash
84
84
  npx skills add jackwener/opencli --skill opencli-adapter-author
85
85
  npx skills add jackwener/opencli --skill opencli-autofix
86
+ npx skills add jackwener/opencli --skill opencli-browser
87
+ npx skills add jackwener/opencli --skill opencli-usage
86
88
  npx skills add jackwener/opencli --skill smart-search
87
89
  ```
88
90
 
@@ -92,6 +94,8 @@ npx skills add jackwener/opencli --skill smart-search
92
94
  |-------|------------|-------------------------------|
93
95
  | **opencli-adapter-author** | Operate a site in real time, or write a reusable adapter for a new site | "Help me check my Xiaohongshu notifications" / "Write an adapter for douyin trending" / "Make a command that grabs the top posts from this page" |
94
96
  | **opencli-autofix** | Repair a broken adapter when a built-in command fails | "`opencli zhihu hot` is returning empty — fix it" |
97
+ | **opencli-browser** | Browser automation reference for AI agents | "Use browser commands to scrape this page" |
98
+ | **opencli-usage** | Quick reference for all OpenCLI commands and sites | "What commands does OpenCLI have for Twitter?" |
95
99
  | **smart-search** | Search across existing OpenCLI capabilities | "Find me a Bilibili trending adapter" |
96
100
 
97
101
  ### How it works
@@ -109,9 +113,11 @@ The agent handles all the `opencli browser` commands internally — you just des
109
113
  **Skill references:**
110
114
  - [`skills/opencli-adapter-author/SKILL.md`](./skills/opencli-adapter-author/SKILL.md) — browser operation + adapter authoring, end-to-end
111
115
  - [`skills/opencli-autofix/SKILL.md`](./skills/opencli-autofix/SKILL.md) — repair broken adapters
116
+ - [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md) — browser automation reference
117
+ - [`skills/opencli-usage/SKILL.md`](./skills/opencli-usage/SKILL.md) — command and site reference
112
118
  - [`skills/smart-search/SKILL.md`](./skills/smart-search/SKILL.md) — capability search
113
119
 
114
- Available browser commands include `open`, `state`, `click`, `type`, `select`, `keys`, `wait`, `get`, `screenshot`, `scroll`, `back`, `eval`, `network`, `tab list`, `tab new`, `tab select`, `tab close`, `init`, `verify`, and `close`.
120
+ Available browser commands include `open`, `state`, `click`, `type`, `select`, `keys`, `wait`, `get`, `find`, `extract`, `frames`, `screenshot`, `scroll`, `back`, `eval`, `network`, `tab list`, `tab new`, `tab select`, `tab close`, `init`, `verify`, and `close`.
115
121
 
116
122
  `opencli browser open <url>` and `opencli browser tab new [url]` both return a target ID. Use `opencli browser tab list` to inspect the target IDs of tabs that already exist, then pass `--tab <targetId>` to route a command to a specific tab. `tab new` creates a new tab without changing the default browser target; only `tab select <targetId>` promotes that tab to the default target for later untargeted `opencli browser ...` commands.
117
123
 
@@ -183,6 +189,8 @@ Or refresh only the skills you actually use:
183
189
  ```bash
184
190
  npx skills add jackwener/opencli --skill opencli-adapter-author
185
191
  npx skills add jackwener/opencli --skill opencli-autofix
192
+ npx skills add jackwener/opencli --skill opencli-browser
193
+ npx skills add jackwener/opencli --skill opencli-usage
186
194
  npx skills add jackwener/opencli --skill smart-search
187
195
  ```
188
196
 
@@ -211,10 +219,10 @@ To load the source Browser Bridge extension:
211
219
  | **bilibili** | `hot` `search` `history` `feed` `ranking` `download` `comments` `dynamic` `favorite` `following` `me` `subtitle` `video` `user-videos` |
212
220
  | **tieba** | `hot` `posts` `search` `read` |
213
221
  | **hupu** | `hot` `search` `detail` `mentions` `reply` `like` `unlike` |
214
- | **twitter** | `trending` `search` `timeline` `lists` `list-tweets` `list-add` `list-remove` `bookmarks` `post` `download` `profile` `article` `like` `likes` `notifications` `reply` `reply-dm` `thread` `follow` `unfollow` `followers` `following` `block` `unblock` `bookmark` `unbookmark` `delete` `hide-reply` `accept` |
222
+ | **twitter** | `trending` `search` `timeline` `tweets` `lists` `list-tweets` `list-add` `list-remove` `bookmarks` `post` `download` `profile` `article` `like` `likes` `notifications` `reply` `reply-dm` `thread` `follow` `unfollow` `followers` `following` `block` `unblock` `bookmark` `unbookmark` `delete` `hide-reply` `accept` |
215
223
  | **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `upvoted` `save` `saved` `comment` `subscribe` |
216
224
  | **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` |
217
- | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` |
225
+ | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` |
218
226
  | **1688** | `search` `item` `assets` `download` `store` |
219
227
  | **gitee** | `trending` `search` `user` |
220
228
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
@@ -231,7 +239,8 @@ To load the source Browser Bridge extension:
231
239
  | **gov-policy** | `search` `recent` |
232
240
  | **nowcoder** | `hot` `trending` `topics` `recommend` `creators` `companies` `jobs` `search` `suggest` `experience` `referral` `salary` `papers` `practice` `notifications` `detail` |
233
241
  | **wanfang** | `search` |
234
- | **xiaoyuzhou** | `podcast*` `podcast-episodes*` `episode*` `download*` `transcript*` |
242
+ | **hackernews** | `top` `new` `best` `ask` `show` `jobs` `search` `user` |
243
+ | **xiaoyuzhou** | `auth*` `podcast*` `podcast-episodes*` `episode*` `download*` `transcript*` |
235
244
 
236
245
  90+ adapters in total — **[→ see all supported sites & commands](./docs/adapters/index.md)**
237
246
 
@@ -247,8 +256,8 @@ OpenCLI acts as a universal hub for your existing command-line tools — unified
247
256
  | **obsidian** | Obsidian vault management | `opencli obsidian search query="AI"` |
248
257
  | **docker** | Docker | `opencli docker ps` |
249
258
  | **lark-cli** | Lark/Feishu — messages, docs, calendar, tasks, 200+ commands | `opencli lark-cli calendar +agenda` |
250
- | **dingtalk** | DingTalk — cross-platform CLI for DingTalk's full suite, designed for humans and AI agents | `opencli dingtalk msg send --to user "hello"` |
251
- | **wecom** | WeCom/企业微信 — CLI for WeCom open platform, for humans and AI agents | `opencli wecom msg send --to user "hello"` |
259
+ | **dws** | DingTalk — cross-platform CLI for DingTalk's full suite, designed for humans and AI agents | `opencli dws msg send --to user "hello"` |
260
+ | **wecom-cli** | WeCom/企业微信 — CLI for WeCom open platform, for humans and AI agents | `opencli wecom-cli msg send --to user "hello"` |
252
261
  | **vercel** | Vercel — deploy projects, manage domains, env vars, logs | `opencli vercel deploy --prod` |
253
262
 
254
263
  **Register your own** — add any local CLI so AI agents can discover it via `opencli list`:
@@ -332,8 +341,8 @@ opencli follows Unix `sysexits.h` conventions so it integrates naturally with sh
332
341
 
333
342
  ```bash
334
343
  opencli spotify status || echo "exit $?" # 69 if browser not running
335
- opencli github issues 2>/dev/null
336
- [ $? -eq 77 ] && opencli github auth # auto-auth if not logged in
344
+ opencli gh issue list 2>/dev/null
345
+ [ $? -eq 77 ] && opencli gh auth login # auto-auth if not logged in
337
346
  ```
338
347
 
339
348
  ## Plugins
package/README.zh-CN.md CHANGED
@@ -81,6 +81,8 @@ npx skills add jackwener/opencli
81
81
  ```bash
82
82
  npx skills add jackwener/opencli --skill opencli-adapter-author
83
83
  npx skills add jackwener/opencli --skill opencli-autofix
84
+ npx skills add jackwener/opencli --skill opencli-browser
85
+ npx skills add jackwener/opencli --skill opencli-usage
84
86
  npx skills add jackwener/opencli --skill smart-search
85
87
  ```
86
88
 
@@ -90,6 +92,8 @@ npx skills add jackwener/opencli --skill smart-search
90
92
  |-------|---------|-------------------|
91
93
  | **opencli-adapter-author** | 实时操作任意网站,或为新站点写可复用适配器 | "帮我看看小红书的通知" / "帮我做一个抖音热门的适配器" / "帮我做一个抓取这个页面热帖的命令" |
92
94
  | **opencli-autofix** | 内置命令失败时修复已有适配器 | "`opencli zhihu hot` 返回空了,修一下" |
95
+ | **opencli-browser** | 浏览器自动化参考文档 | "用浏览器命令抓取这个页面" |
96
+ | **opencli-usage** | 所有命令和站点的快速参考 | "OpenCLI 有哪些 Twitter 相关的命令?" |
93
97
  | **smart-search** | 在现有 OpenCLI 能力里搜索 | "帮我找个 B 站热门相关的适配器" |
94
98
 
95
99
  ### 工作原理
@@ -107,9 +111,11 @@ Agent 在内部自动处理所有 `opencli browser` 命令——你只需用自
107
111
  **Skill 参考文档:**
108
112
  - [`skills/opencli-adapter-author/SKILL.md`](./skills/opencli-adapter-author/SKILL.md) — 浏览器操作 + 适配器编写,全流程
109
113
  - [`skills/opencli-autofix/SKILL.md`](./skills/opencli-autofix/SKILL.md) — 修复已有适配器
114
+ - [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md) — 浏览器自动化参考
115
+ - [`skills/opencli-usage/SKILL.md`](./skills/opencli-usage/SKILL.md) — 命令和站点参考
110
116
  - [`skills/smart-search/SKILL.md`](./skills/smart-search/SKILL.md) — 能力搜索
111
117
 
112
- `browser` 可用命令包括:`open`、`state`、`click`、`type`、`select`、`keys`、`wait`、`get`、`screenshot`、`scroll`、`back`、`eval`、`network`、`tab list`、`tab new`、`tab select`、`tab close`、`init`、`verify`、`close`。
118
+ `browser` 可用命令包括:`open`、`state`、`click`、`type`、`select`、`keys`、`wait`、`get`、`find`、`extract`、`frames`、`screenshot`、`scroll`、`back`、`eval`、`network`、`tab list`、`tab new`、`tab select`、`tab close`、`init`、`verify`、`close`。
113
119
 
114
120
  `opencli browser open <url>` 和 `opencli browser tab new [url]` 都会返回 target ID。`opencli browser tab list` 用来查看当前已存在 tab 的 target ID,再通过 `--tab <targetId>` 把命令明确路由到某个 tab。`tab new` 只会新建 tab,不会改变默认浏览器目标;只有显式执行 `tab select <targetId>`,才会把该 tab 设为后续未指定 target 的 `opencli browser ...` 命令的默认目标。
115
121
 
@@ -207,12 +213,12 @@ npm link
207
213
 
208
214
  | 站点 | 命令 | 模式 |
209
215
  |------|------|------|
210
- | **twitter** | `trending` `search` `timeline` `lists` `list-tweets` `list-add` `list-remove` `bookmarks` `profile` `thread` `following` `followers` `notifications` `post` `reply` `delete` `like` `likes` `article` `follow` `unfollow` `bookmark` `unbookmark` `download` `accept` `reply-dm` `block` `unblock` `hide-reply` | 浏览器 |
216
+ | **twitter** | `trending` `search` `timeline` `tweets` `lists` `list-tweets` `list-add` `list-remove` `bookmarks` `profile` `thread` `following` `followers` `notifications` `post` `reply` `delete` `like` `likes` `article` `follow` `unfollow` `bookmark` `unbookmark` `download` `accept` `reply-dm` `block` `unblock` `hide-reply` | 浏览器 |
211
217
  | **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `save` `comment` `subscribe` `saved` `upvoted` | 浏览器 |
212
218
  | **tieba** | `hot` `posts` `search` `read` | 浏览器 |
213
219
  | **hupu** | `hot` `search` `detail` `mentions` `reply` `like` `unlike` | 浏览器 |
214
220
  | **cursor** | `status` `send` `read` `new` `dump` `composer` `model` `extract-code` `ask` `screenshot` `history` `export` | 桌面端 |
215
- | **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `video` `dynamic` `ranking` `following` `user-videos` `download` | 浏览器 |
221
+ | **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `video` `comments` `dynamic` `ranking` `following` `user-videos` `download` | 浏览器 |
216
222
  | **codex** | `status` `send` `read` `new` `dump` `extract-diff` `model` `ask` `screenshot` `history` `export` | 桌面端 |
217
223
  | **chatwise** | `status` `new` `send` `read` `ask` `model` `history` `export` `screenshot` | 桌面端 |
218
224
  | **doubao** | `status` `new` `send` `read` `ask` `history` `detail` `meeting-summary` `meeting-transcript` | 浏览器 |
@@ -223,7 +229,7 @@ npm link
223
229
  | **xueqiu** | `feed` `hot-stock` `hot` `search` `stock` `comments` `watchlist` `earnings-date` `fund-holdings` `fund-snapshot` | 浏览器 |
224
230
  | **antigravity** | `status` `send` `read` `new` `dump` `extract-code` `model` `watch` `serve` | 桌面端 |
225
231
  | **chatgpt-app** | `status` `new` `send` `read` `ask` `model` | 桌面端 |
226
- | **xiaohongshu** | `search` `notifications` `feed` `user` `download` `publish` `creator-notes` `creator-note-detail` `creator-notes-summary` `creator-profile` `creator-stats` | 浏览器 |
232
+ | **xiaohongshu** | `search` `note` `comments` `notifications` `feed` `user` `download` `publish` `creator-notes` `creator-note-detail` `creator-notes-summary` `creator-profile` `creator-stats` | 浏览器 |
227
233
  | **xiaoe** | `courses` `detail` `catalog` `play-url` `content` | 浏览器 |
228
234
  | **quark** | `ls` `mkdir` `mv` `rename` `rm` `save` `share-tree` | 浏览器 |
229
235
  | **uiverse** | `code` `preview` | 浏览器 |
@@ -234,7 +240,7 @@ npm link
234
240
  | **gov-policy** | `search` `recent` | 公开 |
235
241
  | **nowcoder** | `hot` `trending` `topics` `recommend` `creators` `companies` `jobs` `search` `suggest` `experience` `referral` `salary` `papers` `practice` `notifications` `detail` | 公开 / 浏览器 |
236
242
  | **wanfang** | `search` | 公开 |
237
- | **xiaoyuzhou** | `podcast*` `podcast-episodes*` `episode*` `download*` `transcript*` | 本地凭证 |
243
+ | **xiaoyuzhou** | `podcast*` `podcast-episodes*` `episode*` `download*` `transcript*` `auth` | 本地凭证 |
238
244
  | **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` | 浏览器 |
239
245
  | **weixin** | `download` | 浏览器 |
240
246
  | **youtube** | `search` `video` `transcript` `comments` `channel` `playlist` `feed` `history` `watch-later` `subscriptions` `like` `unlike` `subscribe` `unsubscribe` | 浏览器 |
@@ -271,7 +277,7 @@ npm link
271
277
  | **douban** | `search` `top250` `subject` `photos` `download` `marks` `reviews` `movie-hot` `book-hot` | 浏览器 |
272
278
  | **facebook** | `feed` `profile` `search` `friends` `groups` `events` `notifications` `memories` `add-friend` `join-group` | 浏览器 |
273
279
  | **google** | `news` `search` `suggest` `trends` | 公开 |
274
- | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` | 浏览器 |
280
+ | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` | 浏览器 |
275
281
  | **1688** | `search` `item` `assets` `download` `store` | 浏览器 |
276
282
  | **gitee** | `trending` `search` `user` | 公开 / 浏览器 |
277
283
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` | 浏览器 |
@@ -306,8 +312,8 @@ OpenCLI 也可以作为你现有命令行工具的统一入口,负责发现、
306
312
  | **obsidian** | Obsidian 仓库管理 | `opencli obsidian search query="AI"` |
307
313
  | **docker** | Docker 命令行工具 | `opencli docker ps` |
308
314
  | **lark-cli** | 飞书 CLI — 消息、文档、日历、任务,200+ 命令 | `opencli lark-cli calendar +agenda` |
309
- | **dingtalk** | 钉钉 CLI — 钉钉全套产品能力的跨平台命令行工具,支持人类和 AI Agent 使用 | `opencli dingtalk msg send --to user "hello"` |
310
- | **wecom** | 企业微信 CLI — 企业微信开放平台命令行工具,支持人类和 AI Agent 使用 | `opencli wecom msg send --to user "hello"` |
315
+ | **dws** | 钉钉 CLI — 钉钉全套产品能力的跨平台命令行工具,支持人类和 AI Agent 使用 | `opencli dws msg send --to user "hello"` |
316
+ | **wecom-cli** | 企业微信 CLI — 企业微信开放平台命令行工具,支持人类和 AI Agent 使用 | `opencli wecom-cli msg send --to user "hello"` |
311
317
  | **vercel** | Vercel — 部署项目、管理域名、环境变量、日志 | `opencli vercel deploy --prod` |
312
318
 
313
319
  **零配置透传**:OpenCLI 会把你的输入原样转发给底层二进制,保留原生 stdout / stderr 行为。