@jackwener/opencli 1.8.0 → 1.8.1

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 (153) hide show
  1. package/README.md +8 -49
  2. package/README.zh-CN.md +8 -52
  3. package/cli-manifest.json +1796 -191
  4. package/clis/_atlassian/shared.js +577 -0
  5. package/clis/_atlassian/shared.test.js +170 -0
  6. package/clis/bilibili/comment.js +125 -0
  7. package/clis/bilibili/comment.test.js +153 -0
  8. package/clis/bilibili/comments.js +116 -21
  9. package/clis/bilibili/comments.test.js +77 -18
  10. package/clis/bilibili/subtitle.js +76 -31
  11. package/clis/bilibili/subtitle.test.js +156 -9
  12. package/clis/bilibili/utils.js +63 -5
  13. package/clis/bilibili/utils.test.js +45 -1
  14. package/clis/chess/analyze.js +35 -0
  15. package/clis/chess/analyze.test.js +79 -0
  16. package/clis/chess/game.js +114 -0
  17. package/clis/chess/game.test.js +178 -0
  18. package/clis/chess/games.js +67 -0
  19. package/clis/chess/games.test.js +164 -0
  20. package/clis/chess/stats.js +32 -0
  21. package/clis/chess/stats.test.js +79 -0
  22. package/clis/chess/utils.js +170 -0
  23. package/clis/chess/utils.test.js +230 -0
  24. package/clis/confluence/commands.test.js +195 -0
  25. package/clis/confluence/create.js +39 -0
  26. package/clis/confluence/page.js +23 -0
  27. package/clis/confluence/search.js +34 -0
  28. package/clis/confluence/shared.js +173 -0
  29. package/clis/confluence/update.js +38 -0
  30. package/clis/douyin/hashtag.js +84 -23
  31. package/clis/douyin/hashtag.test.js +113 -0
  32. package/clis/geogebra/add-circle.js +46 -0
  33. package/clis/geogebra/add-line.js +35 -0
  34. package/clis/geogebra/add-point.js +27 -0
  35. package/clis/geogebra/add-polygon.js +25 -0
  36. package/clis/geogebra/eval.js +35 -0
  37. package/clis/geogebra/geogebra.test.js +175 -0
  38. package/clis/geogebra/hexagon.js +62 -0
  39. package/clis/geogebra/info.js +72 -0
  40. package/clis/geogebra/list.js +35 -0
  41. package/clis/geogebra/triangle.js +60 -0
  42. package/clis/geogebra/utils.js +271 -0
  43. package/clis/jira/attachments.js +28 -0
  44. package/clis/jira/commands.test.js +287 -0
  45. package/clis/jira/comments.js +28 -0
  46. package/clis/jira/issue.js +28 -0
  47. package/clis/jira/links.js +28 -0
  48. package/clis/jira/search.js +47 -0
  49. package/clis/jira/shared.js +256 -0
  50. package/clis/linkedin/job-detail.js +167 -0
  51. package/clis/linkedin/job-detail.test.js +38 -0
  52. package/clis/linkedin/jobs-preferences.js +113 -0
  53. package/clis/linkedin/jobs-preferences.test.js +43 -0
  54. package/clis/linkedin/post-analytics.js +74 -0
  55. package/clis/linkedin/post-analytics.test.js +40 -0
  56. package/clis/linkedin/posts-core.js +241 -0
  57. package/clis/linkedin/posts.js +22 -0
  58. package/clis/linkedin/posts.test.js +40 -0
  59. package/clis/linkedin/profile-analytics.js +104 -0
  60. package/clis/linkedin/profile-analytics.test.js +67 -0
  61. package/clis/linkedin/profile-experience.js +671 -0
  62. package/clis/linkedin/profile-experience.test.js +152 -0
  63. package/clis/linkedin/profile-projects.js +311 -0
  64. package/clis/linkedin/profile-projects.test.js +111 -0
  65. package/clis/linkedin/profile-read.js +148 -0
  66. package/clis/linkedin/profile-read.test.js +77 -0
  67. package/clis/linkedin/services-read.js +213 -0
  68. package/clis/linkedin/services-read.test.js +105 -0
  69. package/clis/linkedin/shared.js +124 -0
  70. package/clis/linkedin/timeline.js +14 -7
  71. package/clis/notebooklm/add-source.js +269 -0
  72. package/clis/notebooklm/add-source.test.js +97 -0
  73. package/clis/notebooklm/create.js +76 -0
  74. package/clis/notebooklm/create.test.js +58 -0
  75. package/clis/notebooklm/generate-audio.js +91 -0
  76. package/clis/notebooklm/generate-audio.test.js +63 -0
  77. package/clis/notebooklm/generate-slides.js +106 -0
  78. package/clis/notebooklm/generate-slides.test.js +75 -0
  79. package/clis/notebooklm/open.test.js +10 -10
  80. package/clis/notebooklm/rpc.js +20 -6
  81. package/clis/notebooklm/rpc.test.js +27 -1
  82. package/clis/notebooklm/utils.js +100 -24
  83. package/clis/notebooklm/utils.test.js +60 -1
  84. package/clis/notebooklm/write-note.js +103 -0
  85. package/clis/notebooklm/write-note.test.js +70 -0
  86. package/clis/pixiv/detail.js +41 -34
  87. package/clis/pixiv/detail.test.js +93 -0
  88. package/clis/pixiv/user.js +36 -31
  89. package/clis/pixiv/user.test.js +100 -0
  90. package/clis/pixiv/utils.js +56 -7
  91. package/clis/suno/generate.js +5 -0
  92. package/clis/suno/generate.test.js +9 -0
  93. package/clis/suno/status.js +3 -2
  94. package/clis/suno/utils.js +33 -24
  95. package/clis/suno/utils.test.js +106 -0
  96. package/clis/twitter/followers.js +6 -2
  97. package/clis/twitter/followers.test.js +19 -1
  98. package/clis/twitter/following.js +14 -5
  99. package/clis/twitter/following.test.js +29 -0
  100. package/clis/twitter/likes.js +12 -4
  101. package/clis/twitter/likes.test.js +26 -1
  102. package/clis/twitter/list-add.js +1 -1
  103. package/clis/twitter/list-remove.js +1 -1
  104. package/clis/twitter/notifications.js +4 -4
  105. package/clis/twitter/post.js +62 -4
  106. package/clis/twitter/post.test.js +35 -3
  107. package/clis/twitter/profile.js +81 -28
  108. package/clis/twitter/profile.test.js +113 -2
  109. package/clis/twitter/quote.js +9 -4
  110. package/clis/twitter/reply.js +13 -10
  111. package/clis/twitter/reply.test.js +41 -0
  112. package/clis/twitter/search.js +1 -1
  113. package/clis/twitter/search.test.js +35 -0
  114. package/clis/twitter/shared.js +11 -0
  115. package/clis/twitter/shared.test.js +37 -1
  116. package/clis/twitter/utils.js +53 -16
  117. package/clis/upwork/detail.js +132 -0
  118. package/clis/upwork/feed.js +109 -0
  119. package/clis/upwork/search.js +115 -0
  120. package/clis/upwork/upwork.test.js +566 -0
  121. package/clis/upwork/utils.js +323 -0
  122. package/clis/weread/book-search.js +438 -0
  123. package/clis/weread/book-search.test.js +242 -0
  124. package/clis/weread/search-regression.test.js +80 -0
  125. package/clis/weread/search.js +17 -2
  126. package/clis/xiaohongshu/creator-note-detail.js +165 -28
  127. package/clis/xiaohongshu/creator-note-detail.test.js +186 -37
  128. package/clis/xiaohongshu/creator-notes.js +251 -2
  129. package/clis/xiaohongshu/creator-notes.test.js +79 -2
  130. package/clis/xiaohongshu/download.js +97 -39
  131. package/clis/xiaohongshu/download.test.js +201 -0
  132. package/clis/zhihu/answer-comments.js +2 -21
  133. package/clis/zhihu/answer-detail.js +2 -31
  134. package/clis/zhihu/collection.js +2 -14
  135. package/clis/zhihu/collection.test.js +4 -3
  136. package/clis/zhihu/question.js +1 -9
  137. package/clis/zhihu/question.test.js +2 -2
  138. package/clis/zhihu/search.js +1 -12
  139. package/clis/zhihu/search.test.js +2 -2
  140. package/clis/zhihu/text.js +29 -0
  141. package/clis/zhihu/text.test.js +24 -0
  142. package/dist/src/browser/network-cache.js +13 -1
  143. package/dist/src/browser/network-cache.test.js +17 -0
  144. package/dist/src/download/index.js +13 -1
  145. package/dist/src/download/index.test.js +23 -1
  146. package/dist/src/download/media-download.test.js +3 -1
  147. package/dist/src/download/progress.js +2 -2
  148. package/dist/src/download/progress.test.js +12 -1
  149. package/dist/src/output.js +11 -1
  150. package/dist/src/output.test.js +6 -0
  151. package/dist/src/registry.js +1 -0
  152. package/dist/src/registry.test.js +11 -0
  153. package/package.json +1 -1
package/README.md CHANGED
@@ -21,7 +21,7 @@ It also works as a **CLI hub** for local tools such as `gh`, `docker`, `longbrid
21
21
 
22
22
  ### 1. Install OpenCLI
23
23
 
24
- OpenCLI requires **Node.js >= 21**.
24
+ OpenCLI requires **Node.js >= 20**.
25
25
 
26
26
  ```bash
27
27
  node --version
@@ -149,14 +149,6 @@ When the site you need is not yet covered, use the `opencli-adapter-author` skil
149
149
  5. `opencli browser recon analyze <url>` → `opencli browser recon init <site>/<name>` → write adapter → `opencli browser recon verify <site>/<name>`.
150
150
  6. Site knowledge persists to `~/.opencli/sites/<site>/` so the next adapter for the same site starts from context.
151
151
 
152
- ## Prerequisites
153
-
154
- - **Node.js**: >= 21.0.0 (required for the standard npm install path)
155
- - **Bun**: >= 1.0 (optional alternative runtime)
156
- - **Chrome or Chromium** running and logged into the target site for browser-backed commands
157
-
158
- > **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.
159
-
160
152
  ## Configuration
161
153
 
162
154
  | Variable | Default | Description |
@@ -173,23 +165,6 @@ When the site you need is not yet covered, use the `opencli-adapter-author` skil
173
165
 
174
166
  `opencli browser *` requires an explicit `<session>` positional, uses a foreground browser window by default, and keeps that session's tab lease until `opencli browser <session> close` or idle cleanup. Browser-backed adapters use a background adapter window and release one-shot tab leases by default. Interactive adapters can declare `siteSession: 'persistent'` to keep a stable site tab for continuity; pass `--site-session ephemeral` for a one-shot tab.
175
167
 
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:
189
-
190
- 1. Open `chrome://extensions` and enable **Developer mode**.
191
- 2. Click **Load unpacked** and select this repository's `extension/` directory.
192
-
193
168
  ## Built-in Commands
194
169
 
195
170
  | Site | Commands |
@@ -198,21 +173,23 @@ To load the source Browser Bridge extension:
198
173
  | **bilibili** | `hot` `search` `history` `feed` `ranking` `download` `comments` `dynamic` `favorite` `following` `me` `subtitle` `summary` `video` `user-videos` |
199
174
  | **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` |
200
175
  | **hackernews** | `top` `new` `best` `ask` `show` `jobs` `search` `user` |
201
- | **linkedin** | `connect` `inbox` `safe-send` `search` `sent-invitations` `thread-snapshot` `timeline` `salesnav-search` `salesnav-inbox` `salesnav-message` `salesnav-thread` |
176
+ | **geogebra** | `eval` `add-point` `add-line` `add-circle` `add-polygon` `triangle` `hexagon` `list` `info` |
177
+ | **linkedin** | `connect` `inbox` `job-detail` `jobs-preferences` `post-analytics` `posts` `profile-experience` `profile-projects` `profile-read` `profile-analytics` `safe-send` `search` `services-read` `sent-invitations` `thread-snapshot` `timeline` `salesnav-search` `salesnav-inbox` `salesnav-message` `salesnav-thread` |
202
178
  | **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `upvoted` `save` `saved` `comment` `subscribe` |
203
179
  | **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` |
204
180
  | **claude** | `ask` `send` `new` `status` `read` `history` `detail` |
205
181
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
206
182
  | **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
207
183
  | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` |
184
+ | **upwork** | `search` `feed` `detail` |
208
185
 
209
- Curated highlights — **[→ see all 100+ supported sites & commands](./docs/adapters/index.md)** (douyin / weibo / spotify / 1688 / quark / nowcoder / google-scholar / hupu / xianyu / weread / weread-official / xiaoyuzhou / and more).
186
+ Curated highlights — **[→ see all 100+ supported sites & commands](./docs/adapters/index.md)** (douyin / weibo / spotify / 1688 / quark / nowcoder / google-scholar / hupu / xianyu / weread / weread-official / xiaoyuzhou / Chess.com / and more).
210
187
 
211
188
  ## CLI Hub
212
189
 
213
190
  Unified passthrough for your existing command-line tools. Run `opencli <tool> ...` for any of:
214
191
 
215
- `gh` · `docker` · `vercel` · `wrangler` · `ntn` · `obsidian` · `longbridge` · `lark-cli` · `dws` · `wecom-cli` · `tg` · `discord` · `wx`
192
+ `gh` · `docker` · `vercel` · `wrangler` · `obsidian` · `longbridge` · `lark-cli` · `ntn(notion)` · `dws(DingTalk Workspace)` · `wecom-cli(企业微信)` · `tg(tg-cli)` · `discord(discord-cli)` · `wx(wx-cli)`
216
193
 
217
194
  Register your own with `opencli external register <name>`; list everything with `opencli external list`.
218
195
 
@@ -262,25 +239,7 @@ opencli bilibili hot -v # Verbose: show pipeline debug steps
262
239
 
263
240
  ## Exit Codes
264
241
 
265
- opencli follows Unix `sysexits.h` conventions so it integrates naturally with shell pipelines and CI scripts:
266
-
267
- | Code | Meaning | When |
268
- |------|---------|------|
269
- | `0` | Success | Command completed normally |
270
- | `1` | Generic error | Unexpected / unclassified failure |
271
- | `2` | Usage error | Bad arguments or unknown command |
272
- | `66` | Empty result | No data returned (`EX_NOINPUT`) |
273
- | `69` | Service unavailable | Browser Bridge not connected (`EX_UNAVAILABLE`) |
274
- | `75` | Temporary failure | Command timed out — retry (`EX_TEMPFAIL`) |
275
- | `77` | Auth required | Not logged in to target site (`EX_NOPERM`) |
276
- | `78` | Config error | Missing credentials or bad config (`EX_CONFIG`) |
277
- | `130` | Interrupted | Ctrl-C / SIGINT |
278
-
279
- ```bash
280
- opencli spotify status || echo "exit $?" # 69 if browser not running
281
- opencli gh issue list 2>/dev/null
282
- [ $? -eq 77 ] && opencli gh auth login # auto-auth if not logged in
283
- ```
242
+ opencli follows Unix `sysexits.h` so CI / scripts can branch on failure mode: `0` success, `66` empty result, `69` Browser Bridge down, `75` timeout, `77` auth required, `78` config error, `130` Ctrl-C. Full reference: [docs/guide/exit-codes.md](./docs/guide/exit-codes.md).
284
243
 
285
244
  ## Plugins
286
245
 
@@ -311,7 +270,7 @@ See **[TESTING.md](./TESTING.md)** for how to run and write tests.
311
270
  - **"Extension not connected"** — Ensure the Browser Bridge extension is installed from the [Chrome Web Store](https://chromewebstore.google.com/detail/opencli/ildkmabpimmkaediidaifkhjpohdnifk) and **enabled** in `chrome://extensions`.
312
271
  - **"attach failed: Cannot access a chrome-extension:// URL"** — Another extension may be interfering. Try disabling other extensions temporarily.
313
272
  - **Empty data or 'Unauthorized' error** — Your Chrome/Chromium login session may have expired. Navigate to the target site and log in again.
314
- - **Node API errors / missing `fetch` / startup crash on old Node** — OpenCLI requires **Node.js >= 21**. Run `node --version`, upgrade Node if needed, then retry.
273
+ - **Node API errors / missing `fetch` / startup crash on old Node** — OpenCLI requires **Node.js >= 20**. Run `node --version`, upgrade Node if needed, then retry.
315
274
  - **Daemon issues** — Check status: `curl localhost:19825/status` · View logs: `curl localhost:19825/logs`
316
275
 
317
276
  ## Star History
package/README.zh-CN.md CHANGED
@@ -21,7 +21,7 @@ OpenCLI 可以用同一套 CLI 做三类事情:
21
21
 
22
22
  ### 1. 安装 OpenCLI
23
23
 
24
- OpenCLI 要求 **Node.js >= 21**。
24
+ OpenCLI 要求 **Node.js >= 20**。
25
25
 
26
26
  ```bash
27
27
  node --version
@@ -136,14 +136,6 @@ Agent 在内部自动处理所有 `opencli browser` 命令——你只需用自
136
136
  5. `opencli browser recon analyze <url>` → `opencli browser recon init <site>/<name>` → 写适配器 → `opencli browser recon verify <site>/<name>`
137
137
  6. 站点知识沉到 `~/.opencli/sites/<site>/`,下次同站点直接吃缓存
138
138
 
139
- ## 前置要求
140
-
141
- - **Node.js**: >= 21.0.0(标准 npm 安装路径要求)
142
- - **Bun**: >= 1.0(可选替代运行时)
143
- - 浏览器型命令需要 Chrome 或 Chromium 处于运行中,并已登录目标网站
144
-
145
- > **重要**:浏览器型命令直接复用你的 Chrome/Chromium 登录态。如果拿到空数据或出现权限类失败,先确认目标站点已经在浏览器里打开并完成登录。
146
-
147
139
  ## 配置
148
140
 
149
141
  | 变量 | 默认值 | 说明 |
@@ -159,23 +151,6 @@ Agent 在内部自动处理所有 `opencli browser` 命令——你只需用自
159
151
 
160
152
  `opencli browser *` 必须紧跟一个 `<session>` 位置参数,默认使用前台窗口,并保留该 session 的 tab lease,直到你手动执行 `opencli browser <session> close` 或等空闲超时。浏览器型 adapter 默认使用后台 adapter 窗口并在命令结束后释放一次性 tab lease;如果需要调试最终页面,可以传 `--window foreground --keep-tab true`。
161
153
 
162
- ## 面向开发者
163
-
164
- 从源码安装:
165
-
166
- ```bash
167
- git clone git@github.com:jackwener/opencli.git
168
- cd opencli
169
- npm install
170
- npm run build
171
- npm link
172
- ```
173
-
174
- 加载源码版 Browser Bridge 扩展:
175
-
176
- 1. 打开 `chrome://extensions` 并启用 **开发者模式**
177
- 2. 点击 **加载已解压的扩展程序**,选择本仓库里的 `extension/` 目录
178
-
179
154
  ## 内置命令
180
155
 
181
156
  运行 `opencli list` 查看完整注册表。
@@ -186,21 +161,23 @@ npm link
186
161
  | **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `summary` `video` `comments` `dynamic` `ranking` `following` `user-videos` `download` |
187
162
  | **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` |
188
163
  | **hackernews** | `top` `new` `best` `ask` `show` `jobs` `search` `user` |
189
- | **linkedin** | `connect` `inbox` `safe-send` `search` `people-search` `sent-invitations` `thread-snapshot` `timeline` `salesnav-search` `salesnav-inbox` `salesnav-message` `salesnav-thread` |
164
+ | **geogebra** | `eval` `add-point` `add-line` `add-circle` `add-polygon` `triangle` `hexagon` `list` `info` |
165
+ | **linkedin** | `connect` `inbox` `job-detail` `jobs-preferences` `post-analytics` `posts` `profile-experience` `profile-projects` `profile-read` `profile-analytics` `safe-send` `search` `people-search` `services-read` `sent-invitations` `thread-snapshot` `timeline` `salesnav-search` `salesnav-inbox` `salesnav-message` `salesnav-thread` |
190
166
  | **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `save` `comment` `subscribe` `saved` `upvoted` |
191
167
  | **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` |
192
168
  | **claude** | `ask` `send` `new` `status` `read` `history` `detail` |
193
169
  | **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
194
170
  | **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
195
171
  | **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` |
172
+ | **upwork** | `search` `feed` `detail` |
196
173
 
197
- 精选清单 — **[→ 查看全部 100+ 站点和命令](./docs/adapters/index.md)**(小红书 / B站 / 知乎 / Twitter / Reddit / 抖音 / 微博 / 微信读书 / 小宇宙 / 1688 / 夸克 / Spotify / 牛客 / arxiv / Bilibili / 等)。
174
+ 精选清单 — **[→ 查看全部 100+ 站点和命令](./docs/adapters/index.md)**(小红书 / B站 / 知乎 / Twitter / Reddit / 抖音 / 微博 / 微信读书 / 小宇宙 / 1688 / 夸克 / Spotify / 牛客 / arxiv / Chess.com / Bilibili / 等)。
198
175
 
199
176
  ### 外部 CLI 枢纽
200
177
 
201
178
  把现有命令行工具统一接入 `opencli <tool> ...`:
202
179
 
203
- `gh` · `docker` · `vercel` · `wrangler` · `ntn` · `obsidian` · `longbridge` · `lark-cli` · `dws` · `wecom-cli` · `tg` · `discord` · `wx`
180
+ `gh` · `docker` · `vercel` · `wrangler` · `obsidian` · `longbridge` · `lark-cli` · `ntn(notion)` · `dws(DingTalk Workspace)` · `wecom-cli(企业微信)` · `tg(tg-cli)` · `discord(discord-cli)` · `wx(wx-cli)`
204
181
 
205
182
  注册自定义本地 CLI:`opencli external register <name>`;查看所有:`opencli external list`。
206
183
 
@@ -296,28 +273,7 @@ opencli bilibili hot -v # 详细模式:展示管线执行步骤调试
296
273
 
297
274
  ## 退出码
298
275
 
299
- opencli 遵循 Unix `sysexits.h` 惯例,可无缝接入 shell 管道和 CI 脚本:
300
-
301
- | 退出码 | 含义 | 触发场景 |
302
- |--------|------|----------|
303
- | `0` | 成功 | 命令正常完成 |
304
- | `1` | 通用错误 | 未分类的意外错误 |
305
- | `2` | 用法错误 | 参数错误或未知命令 |
306
- | `66` | 无数据 | 命令返回空结果(`EX_NOINPUT`) |
307
- | `69` | 服务不可用 | Browser Bridge 未连接(`EX_UNAVAILABLE`) |
308
- | `75` | 临时失败 | 命令超时,可重试(`EX_TEMPFAIL`) |
309
- | `77` | 需要认证 | 未登录目标网站(`EX_NOPERM`) |
310
- | `78` | 配置错误 | 凭证缺失或配置有误(`EX_CONFIG`) |
311
- | `130` | 中断 | Ctrl-C / SIGINT |
312
-
313
- ```bash
314
- opencli bilibili hot 2>/dev/null
315
- case $? in
316
- 0) echo "ok" ;;
317
- 69) echo "请先启动 Browser Bridge" ;;
318
- 77) echo "请先登录 bilibili.com" ;;
319
- esac
320
- ```
276
+ opencli 遵循 Unix `sysexits.h`,CI / 脚本可按失败模式分支:`0` 成功、`66` 无数据、`69` Browser Bridge 未连接、`75` 超时、`77` 需要认证、`78` 配置错误、`130` Ctrl-C。完整参考:[docs/zh/guide/exit-codes.md](./docs/zh/guide/exit-codes.md)。
321
277
 
322
278
  ## 插件
323
279
 
@@ -351,7 +307,7 @@ opencli plugin uninstall my-tool # 卸载
351
307
  - **返回空数据,或者报错 "Unauthorized"**
352
308
  - Chrome/Chromium 里的登录态可能已经过期。请打开当前页面,在新标签页重新手工登录或刷新该页面。
353
309
  - **Node API 错误 / 缺少 `fetch` / 旧 Node 启动即崩**
354
- - OpenCLI 要求 **Node.js >= 21**。先执行 `node --version`,如果版本过低先升级,再重试命令。
310
+ - OpenCLI 要求 **Node.js >= 20**。先执行 `node --version`,如果版本过低先升级,再重试命令。
355
311
  - **Daemon 问题**
356
312
  - 检查 daemon 状态:`curl localhost:19825/status`
357
313
  - 查看扩展日志:`curl localhost:19825/logs`