@jackwener/opencli 1.7.22 → 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.
- package/README.md +35 -194
- package/README.zh-CN.md +42 -260
- package/cli-manifest.json +8160 -4392
- package/clis/12306/me.js +73 -0
- package/clis/12306/orders.js +96 -0
- package/clis/12306/passengers.js +90 -0
- package/clis/12306/price.js +166 -0
- package/clis/12306/stations.js +66 -0
- package/clis/12306/train.js +91 -0
- package/clis/12306/trains.js +119 -0
- package/clis/12306/utils.js +272 -0
- package/clis/12306/utils.test.js +331 -0
- package/clis/36kr/article.js +6 -3
- package/clis/36kr/article.test.js +46 -0
- package/clis/_atlassian/shared.js +577 -0
- package/clis/_atlassian/shared.test.js +170 -0
- package/clis/apple-podcasts/commands.test.js +20 -0
- package/clis/apple-podcasts/search.js +2 -2
- package/clis/barchart/greeks.js +144 -56
- package/clis/barchart/greeks.test.js +138 -0
- package/clis/bilibili/comment.js +125 -0
- package/clis/bilibili/comment.test.js +153 -0
- package/clis/bilibili/comments.js +116 -21
- package/clis/bilibili/comments.test.js +77 -18
- package/clis/bilibili/subtitle.js +76 -31
- package/clis/bilibili/subtitle.test.js +156 -9
- package/clis/bilibili/summary.js +167 -0
- package/clis/bilibili/summary.test.js +210 -0
- package/clis/bilibili/utils.js +63 -5
- package/clis/bilibili/utils.test.js +45 -1
- package/clis/booking/booking.test.js +356 -0
- package/clis/booking/search.js +351 -0
- package/clis/chatgpt/envelope.test.js +108 -0
- package/clis/chatgpt/image.js +2 -2
- package/clis/chatgpt/image.test.js +6 -0
- package/clis/chatgpt/utils.js +148 -41
- package/clis/chatgpt/utils.test.js +92 -2
- package/clis/chess/analyze.js +35 -0
- package/clis/chess/analyze.test.js +79 -0
- package/clis/chess/game.js +114 -0
- package/clis/chess/game.test.js +178 -0
- package/clis/chess/games.js +67 -0
- package/clis/chess/games.test.js +164 -0
- package/clis/chess/stats.js +32 -0
- package/clis/chess/stats.test.js +79 -0
- package/clis/chess/utils.js +170 -0
- package/clis/chess/utils.test.js +230 -0
- package/clis/confluence/commands.test.js +195 -0
- package/clis/confluence/create.js +39 -0
- package/clis/confluence/page.js +23 -0
- package/clis/confluence/search.js +34 -0
- package/clis/confluence/shared.js +173 -0
- package/clis/confluence/update.js +38 -0
- package/clis/douyin/_shared/browser-fetch.js +44 -20
- package/clis/douyin/_shared/browser-fetch.test.js +22 -1
- package/clis/douyin/_shared/evaluate-result.js +16 -0
- package/clis/douyin/_shared/tos-upload.js +105 -69
- package/clis/douyin/_shared/vod-upload.js +212 -0
- package/clis/douyin/_shared/vod-upload.test.js +38 -0
- package/clis/douyin/delete.js +137 -4
- package/clis/douyin/delete.test.js +90 -1
- package/clis/douyin/hashtag.js +84 -23
- package/clis/douyin/hashtag.test.js +113 -0
- package/clis/douyin/publish-upload-id.test.js +170 -0
- package/clis/douyin/publish.js +88 -42
- package/clis/douyin/user-videos.js +9 -2
- package/clis/douyin/user-videos.test.js +43 -0
- package/clis/flomo/memos.js +228 -0
- package/clis/flomo/memos.test.js +144 -0
- package/clis/geogebra/add-circle.js +46 -0
- package/clis/geogebra/add-line.js +35 -0
- package/clis/geogebra/add-point.js +27 -0
- package/clis/geogebra/add-polygon.js +25 -0
- package/clis/geogebra/eval.js +35 -0
- package/clis/geogebra/geogebra.test.js +175 -0
- package/clis/geogebra/hexagon.js +62 -0
- package/clis/geogebra/info.js +72 -0
- package/clis/geogebra/list.js +35 -0
- package/clis/geogebra/triangle.js +60 -0
- package/clis/geogebra/utils.js +271 -0
- package/clis/gitee/search.js +2 -2
- package/clis/gitee/search.test.js +65 -0
- package/clis/jike/post.js +27 -17
- package/clis/jike/read.test.js +86 -0
- package/clis/jike/topic.js +32 -19
- package/clis/jike/user.js +33 -20
- package/clis/jira/attachments.js +28 -0
- package/clis/jira/commands.test.js +287 -0
- package/clis/jira/comments.js +28 -0
- package/clis/jira/issue.js +28 -0
- package/clis/jira/links.js +28 -0
- package/clis/jira/search.js +47 -0
- package/clis/jira/shared.js +256 -0
- package/clis/lesswrong/comments.js +1 -1
- package/clis/lesswrong/curated.js +1 -1
- package/clis/lesswrong/frontpage.js +1 -1
- package/clis/lesswrong/frontpage.test.js +37 -0
- package/clis/lesswrong/new.js +1 -1
- package/clis/lesswrong/read.js +1 -1
- package/clis/lesswrong/sequences.js +1 -1
- package/clis/lesswrong/shortform.js +1 -1
- package/clis/lesswrong/tag.js +1 -1
- package/clis/lesswrong/top-month.js +1 -1
- package/clis/lesswrong/top-week.js +1 -1
- package/clis/lesswrong/top-year.js +1 -1
- package/clis/lesswrong/top.js +1 -1
- package/clis/linkedin/connect.js +401 -0
- package/clis/linkedin/connect.test.js +213 -0
- package/clis/linkedin/inbox.js +234 -0
- package/clis/linkedin/inbox.test.js +152 -0
- package/clis/linkedin/job-detail.js +167 -0
- package/clis/linkedin/job-detail.test.js +38 -0
- package/clis/linkedin/jobs-preferences.js +113 -0
- package/clis/linkedin/jobs-preferences.test.js +43 -0
- package/clis/linkedin/people-search.js +262 -0
- package/clis/linkedin/people-search.test.js +216 -0
- package/clis/linkedin/post-analytics.js +74 -0
- package/clis/linkedin/post-analytics.test.js +40 -0
- package/clis/linkedin/posts-core.js +241 -0
- package/clis/linkedin/posts.js +22 -0
- package/clis/linkedin/posts.test.js +40 -0
- package/clis/linkedin/profile-analytics.js +104 -0
- package/clis/linkedin/profile-analytics.test.js +67 -0
- package/clis/linkedin/profile-experience.js +671 -0
- package/clis/linkedin/profile-experience.test.js +152 -0
- package/clis/linkedin/profile-projects.js +311 -0
- package/clis/linkedin/profile-projects.test.js +111 -0
- package/clis/linkedin/profile-read.js +148 -0
- package/clis/linkedin/profile-read.test.js +77 -0
- package/clis/linkedin/safe-send.js +357 -0
- package/clis/linkedin/safe-send.test.js +204 -0
- package/clis/linkedin/salesnav-inbox.js +210 -0
- package/clis/linkedin/salesnav-inbox.test.js +113 -0
- package/clis/linkedin/salesnav-message.js +360 -0
- package/clis/linkedin/salesnav-message.test.js +172 -0
- package/clis/linkedin/salesnav-search.js +186 -0
- package/clis/linkedin/salesnav-search.test.js +76 -0
- package/clis/linkedin/salesnav-thread.js +212 -0
- package/clis/linkedin/salesnav-thread.test.js +79 -0
- package/clis/linkedin/sent-invitations.js +92 -0
- package/clis/linkedin/sent-invitations.test.js +62 -0
- package/clis/linkedin/services-read.js +213 -0
- package/clis/linkedin/services-read.test.js +105 -0
- package/clis/linkedin/shared.js +124 -0
- package/clis/linkedin/thread-snapshot.js +214 -0
- package/clis/linkedin/thread-snapshot.test.js +89 -0
- package/clis/linkedin/timeline.js +14 -7
- package/clis/linkedin-learning/course.js +138 -0
- package/clis/linkedin-learning/course.test.js +114 -0
- package/clis/linkedin-learning/search.js +155 -0
- package/clis/linkedin-learning/search.test.js +144 -0
- package/clis/linkedin-learning/trending.js +133 -0
- package/clis/linkedin-learning/trending.test.js +123 -0
- package/clis/notebooklm/add-source.js +269 -0
- package/clis/notebooklm/add-source.test.js +97 -0
- package/clis/notebooklm/create.js +76 -0
- package/clis/notebooklm/create.test.js +58 -0
- package/clis/notebooklm/generate-audio.js +91 -0
- package/clis/notebooklm/generate-audio.test.js +63 -0
- package/clis/notebooklm/generate-slides.js +106 -0
- package/clis/notebooklm/generate-slides.test.js +75 -0
- package/clis/notebooklm/open.test.js +10 -10
- package/clis/notebooklm/rpc.js +20 -6
- package/clis/notebooklm/rpc.test.js +27 -1
- package/clis/notebooklm/utils.js +100 -24
- package/clis/notebooklm/utils.test.js +60 -1
- package/clis/notebooklm/write-note.js +103 -0
- package/clis/notebooklm/write-note.test.js +70 -0
- package/clis/pixiv/detail.js +41 -34
- package/clis/pixiv/detail.test.js +93 -0
- package/clis/pixiv/user.js +36 -31
- package/clis/pixiv/user.test.js +100 -0
- package/clis/pixiv/utils.js +56 -7
- package/clis/powerchina/search.js +3 -3
- package/clis/powerchina/search.test.js +27 -1
- package/clis/reddit/extract-media.test.js +149 -0
- package/clis/reddit/frontpage.js +47 -9
- package/clis/reddit/frontpage.test.js +34 -0
- package/clis/reddit/home.js +31 -1
- package/clis/reddit/home.test.js +46 -3
- package/clis/reddit/hot.js +32 -1
- package/clis/reddit/hot.test.js +15 -1
- package/clis/reddit/popular.js +39 -1
- package/clis/reddit/popular.test.js +26 -0
- package/clis/reddit/saved.js +1 -1
- package/clis/reddit/search.js +38 -1
- package/clis/reddit/search.test.js +26 -0
- package/clis/reddit/subreddit.js +52 -7
- package/clis/reddit/subreddit.test.js +31 -0
- package/clis/reddit/subscribed.js +165 -0
- package/clis/reddit/subscribed.test.js +168 -0
- package/clis/reddit/upvoted.js +1 -1
- package/clis/suno/commands.test.js +188 -0
- package/clis/suno/download.js +140 -0
- package/clis/suno/download.test.js +151 -0
- package/clis/suno/generate.js +231 -0
- package/clis/suno/generate.test.js +252 -0
- package/clis/suno/list.js +79 -0
- package/clis/suno/status.js +63 -0
- package/clis/suno/utils.js +549 -0
- package/clis/suno/utils.test.js +329 -0
- package/clis/twitter/device-follow.js +193 -0
- package/clis/twitter/device-follow.test.js +287 -0
- package/clis/twitter/download.js +443 -73
- package/clis/twitter/download.test.js +457 -0
- package/clis/twitter/followers.js +6 -2
- package/clis/twitter/followers.test.js +19 -1
- package/clis/twitter/following.js +14 -5
- package/clis/twitter/following.test.js +29 -0
- package/clis/twitter/likes.js +12 -4
- package/clis/twitter/likes.test.js +26 -1
- package/clis/twitter/list-add.js +1 -1
- package/clis/twitter/list-create.js +155 -0
- package/clis/twitter/list-create.test.js +169 -0
- package/clis/twitter/list-remove.js +13 -6
- package/clis/twitter/list-remove.test.js +74 -0
- package/clis/twitter/list-tweets.js +6 -2
- package/clis/twitter/list-tweets.test.js +41 -1
- package/clis/twitter/lists.js +31 -4
- package/clis/twitter/lists.test.js +152 -16
- package/clis/twitter/notifications.js +4 -4
- package/clis/twitter/post.js +62 -4
- package/clis/twitter/post.test.js +35 -3
- package/clis/twitter/profile.js +81 -28
- package/clis/twitter/profile.test.js +113 -2
- package/clis/twitter/quote.js +9 -4
- package/clis/twitter/reply.js +13 -10
- package/clis/twitter/reply.test.js +41 -0
- package/clis/twitter/search.js +7 -3
- package/clis/twitter/search.test.js +41 -0
- package/clis/twitter/shared.js +155 -0
- package/clis/twitter/shared.test.js +465 -1
- package/clis/twitter/thread.js +10 -2
- package/clis/twitter/thread.test.js +58 -0
- package/clis/twitter/timeline.js +6 -2
- package/clis/twitter/timeline.test.js +2 -0
- package/clis/twitter/tweets.js +3 -2
- package/clis/twitter/tweets.test.js +1 -1
- package/clis/twitter/utils.js +53 -16
- package/clis/upwork/detail.js +132 -0
- package/clis/upwork/feed.js +109 -0
- package/clis/upwork/search.js +115 -0
- package/clis/upwork/upwork.test.js +566 -0
- package/clis/upwork/utils.js +323 -0
- package/clis/weibo/delete.js +172 -0
- package/clis/weibo/delete.test.js +94 -0
- package/clis/weibo/publish.js +37 -14
- package/clis/weibo/publish.test.js +14 -5
- package/clis/weibo/user-posts.js +234 -0
- package/clis/weibo/user-posts.test.js +92 -0
- package/clis/weread/book-search.js +438 -0
- package/clis/weread/book-search.test.js +242 -0
- package/clis/weread/search-regression.test.js +98 -11
- package/clis/weread/search.js +32 -9
- package/clis/weread-official/book.js +135 -0
- package/clis/weread-official/commands.test.js +385 -0
- package/clis/weread-official/discover.js +107 -0
- package/clis/weread-official/list-apis.js +95 -0
- package/clis/weread-official/notes.js +171 -0
- package/clis/weread-official/readdata.js +158 -0
- package/clis/weread-official/review.js +93 -0
- package/clis/weread-official/search.js +106 -0
- package/clis/weread-official/shelf.js +97 -0
- package/clis/weread-official/utils.js +293 -0
- package/clis/weread-official/utils.test.js +242 -0
- package/clis/wikipedia/trending.js +7 -3
- package/clis/wikipedia/trending.test.js +57 -0
- package/clis/xianyu/chat.js +24 -109
- package/clis/xianyu/chat.test.js +5 -0
- package/clis/xianyu/im.js +322 -0
- package/clis/xianyu/im.test.js +253 -0
- package/clis/xianyu/inbox.js +96 -0
- package/clis/xianyu/messages.js +91 -0
- package/clis/xianyu/reply.js +82 -0
- package/clis/xiaohongshu/creator-note-detail.js +166 -28
- package/clis/xiaohongshu/creator-note-detail.test.js +196 -36
- package/clis/xiaohongshu/creator-notes-summary.js +2 -1
- package/clis/xiaohongshu/creator-notes-summary.test.js +7 -0
- package/clis/xiaohongshu/creator-notes.js +252 -2
- package/clis/xiaohongshu/creator-notes.test.js +90 -1
- package/clis/xiaohongshu/creator-stats.js +2 -1
- package/clis/xiaohongshu/creator-stats.test.js +24 -0
- package/clis/xiaohongshu/delete-note.js +260 -0
- package/clis/xiaohongshu/delete-note.test.js +172 -0
- package/clis/xiaohongshu/download.js +97 -39
- package/clis/xiaohongshu/download.test.js +201 -0
- package/clis/xiaohongshu/publish.js +48 -8
- package/clis/xiaohongshu/publish.test.js +65 -10
- package/clis/xiaohongshu/user-helpers.test.js +41 -0
- package/clis/xiaohongshu/user.js +27 -4
- package/clis/xiaoyuzhou/download.js +1 -1
- package/clis/xiaoyuzhou/transcript.js +1 -1
- package/clis/youdao/note.js +258 -0
- package/clis/youdao/note.test.js +99 -0
- package/clis/youtube/transcript.js +397 -24
- package/clis/youtube/transcript.test.js +196 -6
- package/clis/zhihu/answer-comments.js +280 -0
- package/clis/zhihu/answer-comments.test.js +287 -0
- package/clis/zhihu/answer-detail.js +2 -19
- package/clis/zhihu/answer-detail.test.js +8 -0
- package/clis/zhihu/collection.js +17 -16
- package/clis/zhihu/collection.test.js +50 -3
- package/clis/zhihu/download.js +1 -1
- package/clis/zhihu/question.js +42 -17
- package/clis/zhihu/question.test.js +113 -11
- package/clis/zhihu/search.js +195 -43
- package/clis/zhihu/search.test.js +198 -0
- package/clis/zhihu/text.js +29 -0
- package/clis/zhihu/text.test.js +24 -0
- package/dist/src/browser/errors.js +4 -2
- package/dist/src/browser/errors.test.js +6 -0
- package/dist/src/browser/network-cache.js +13 -1
- package/dist/src/browser/network-cache.test.js +17 -0
- package/dist/src/browser/page.js +30 -4
- package/dist/src/browser/page.test.js +42 -0
- package/dist/src/browser/utils.d.ts +1 -1
- package/dist/src/cli-argv-preprocess.d.ts +26 -0
- package/dist/src/cli-argv-preprocess.js +138 -0
- package/dist/src/cli-argv-preprocess.test.js +79 -0
- package/dist/src/convention-audit.js +15 -8
- package/dist/src/convention-audit.test.js +21 -0
- package/dist/src/download/index.js +13 -1
- package/dist/src/download/index.test.js +23 -1
- package/dist/src/download/media-download.js +15 -2
- package/dist/src/download/media-download.test.d.ts +1 -0
- package/dist/src/download/media-download.test.js +112 -0
- package/dist/src/download/progress.js +2 -2
- package/dist/src/download/progress.test.js +12 -1
- package/dist/src/electron-apps.js +1 -1
- package/dist/src/electron-apps.test.js +7 -2
- package/dist/src/errors.d.ts +17 -0
- package/dist/src/errors.js +22 -0
- package/dist/src/external-clis.yaml +8 -0
- package/dist/src/main.js +14 -2
- package/dist/src/output.js +11 -1
- package/dist/src/output.test.js +6 -0
- package/dist/src/registry.js +1 -0
- package/dist/src/registry.test.js +11 -0
- package/dist/src/utils.d.ts +43 -0
- package/dist/src/utils.js +97 -0
- package/dist/src/utils.test.d.ts +1 -0
- package/dist/src/utils.test.js +155 -0
- package/package.json +8 -2
- package/scripts/silent-column-drop-baseline.json +0 -52
- package/scripts/typed-error-lint-baseline.json +28 -380
- package/clis/slock/_utils.js +0 -12
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# OpenCLI
|
|
2
2
|
|
|
3
|
-
> **
|
|
4
|
-
>
|
|
3
|
+
> **Convert any website into a CLI & run Browser Use on your logged-in Chrome.**
|
|
4
|
+
> Turn websites, browser sessions, Electron apps, and local tools into deterministic interfaces for humans and AI agents.
|
|
5
|
+
> Or run Browser Use against any page — navigate, fill forms, click, extract, automate.
|
|
5
6
|
|
|
6
7
|
[](./README.zh-CN.md)
|
|
7
8
|
[](https://www.npmjs.com/package/@jackwener/opencli)
|
|
@@ -11,30 +12,16 @@
|
|
|
11
12
|
OpenCLI gives you one surface for three different kinds of automation:
|
|
12
13
|
|
|
13
14
|
- **Use built-in adapters** for sites like Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, Twitter/X, and [many more](#built-in-commands).
|
|
14
|
-
- **Let AI Agents operate any website** — install the `opencli-
|
|
15
|
+
- **Let AI Agents operate any website** — install the `opencli-browser` skill in your AI agent (Claude Code, Cursor, etc.), and it can navigate, click, type/fill, extract, and inspect any page through your logged-in browser via `opencli browser` primitives.
|
|
15
16
|
- **Write new adapters** end-to-end with `opencli browser` + the `opencli-adapter-author` skill, which guides from first recon through field decoding, code, and `opencli browser verify`.
|
|
16
17
|
|
|
17
18
|
It also works as a **CLI hub** for local tools such as `gh`, `docker`, `longbridge`, `tg`, `discord`, `wx`, `ntn` (Notion), and other binaries you register yourself, plus **desktop app adapters** for Electron apps like Cursor, Codex, Antigravity, and ChatGPT.
|
|
18
19
|
|
|
19
|
-
## Highlights
|
|
20
|
-
|
|
21
|
-
- **Desktop App Control** — Drive Electron apps (Cursor, Codex, ChatGPT, etc.) directly from the terminal via CDP.
|
|
22
|
-
- **Browser Automation for AI Agents** — Install the `opencli-adapter-author` skill, and your AI agent can operate any website: navigate, click, type/fill, extract, screenshot — all through your logged-in Chrome session.
|
|
23
|
-
- **Multi-profile Browser Bridge** — Install the extension in each Chrome profile you want to use, then route commands with `--profile`, `OPENCLI_PROFILE`, or `opencli profile use`.
|
|
24
|
-
- **Website → CLI** — Turn any website into a deterministic CLI: 100+ site surfaces are already registered, or write your own with the `opencli-adapter-author` skill + `opencli browser verify`.
|
|
25
|
-
- **Account-safe** — Reuses Chrome/Chromium logged-in state; your credentials never leave the browser.
|
|
26
|
-
- **AI Agent ready** — One skill takes you from site recon through API discovery, field decoding, adapter writing, and verification.
|
|
27
|
-
- **CLI Hub** — Discover, auto-install, and passthrough commands to any external CLI (gh, docker, obsidian, tg, discord, wx, etc).
|
|
28
|
-
- **Zero LLM cost** — No tokens consumed at runtime. Run 10,000 times and pay nothing.
|
|
29
|
-
- **Deterministic** — Same command, same output schema, every time. Pipeable, scriptable, CI-friendly.
|
|
30
|
-
|
|
31
|
-
---
|
|
32
|
-
|
|
33
20
|
## Quick Start
|
|
34
21
|
|
|
35
22
|
### 1. Install OpenCLI
|
|
36
23
|
|
|
37
|
-
OpenCLI requires **Node.js >=
|
|
24
|
+
OpenCLI requires **Node.js >= 20**.
|
|
38
25
|
|
|
39
26
|
```bash
|
|
40
27
|
node --version
|
|
@@ -105,7 +92,7 @@ If you want to add your own commands, start with the [Extending OpenCLI guide](.
|
|
|
105
92
|
|
|
106
93
|
OpenCLI's browser commands are designed to be used by AI Agents — not run manually. Install skills into your AI agent (Claude Code, Cursor, etc.), and the agent operates websites on your behalf using your logged-in Chrome session.
|
|
107
94
|
|
|
108
|
-
### Install skills
|
|
95
|
+
### Install skills (also refreshes existing installs)
|
|
109
96
|
|
|
110
97
|
```bash
|
|
111
98
|
npx skills add jackwener/opencli
|
|
@@ -118,22 +105,20 @@ npx skills add jackwener/opencli --skill opencli-adapter-author
|
|
|
118
105
|
npx skills add jackwener/opencli --skill opencli-autofix
|
|
119
106
|
npx skills add jackwener/opencli --skill opencli-browser
|
|
120
107
|
npx skills add jackwener/opencli --skill opencli-usage
|
|
121
|
-
npx skills add jackwener/opencli --skill smart-search
|
|
122
108
|
```
|
|
123
109
|
|
|
124
110
|
### Which skill to use
|
|
125
111
|
|
|
126
112
|
| Skill | When to use | Example prompt to your AI agent |
|
|
127
113
|
|-------|------------|-------------------------------|
|
|
128
|
-
| **opencli-adapter-author** |
|
|
114
|
+
| **opencli-adapter-author** | Write a reusable adapter for a new site or add a command to an existing site | "Write an adapter for douyin trending" / "Make a command that grabs the top posts from this page" |
|
|
129
115
|
| **opencli-autofix** | Repair a broken adapter when a built-in command fails | "`opencli zhihu hot` is returning empty — fix it" |
|
|
130
|
-
| **opencli-browser** |
|
|
116
|
+
| **opencli-browser** | Drive a real Chrome page ad-hoc — navigate, fill forms, click, extract | "Help me check my Xiaohongshu notifications" / "Help me fill out this form" / "Use browser commands to scrape this page" |
|
|
131
117
|
| **opencli-usage** | Quick reference for all OpenCLI commands and sites | "What commands does OpenCLI have for Twitter?" |
|
|
132
|
-
| **smart-search** | Search across existing OpenCLI capabilities | "Find me a Bilibili trending adapter" |
|
|
133
118
|
|
|
134
119
|
### How it works
|
|
135
120
|
|
|
136
|
-
Once `opencli-
|
|
121
|
+
Once `opencli-browser` is installed, your AI agent can:
|
|
137
122
|
|
|
138
123
|
1. **Navigate** to any URL using your logged-in browser
|
|
139
124
|
2. **Read** page content via structured DOM snapshots (not screenshots)
|
|
@@ -144,53 +129,25 @@ Once `opencli-adapter-author` is installed, your AI agent can:
|
|
|
144
129
|
The agent handles all the `opencli browser` commands internally — you just describe what you want done in natural language.
|
|
145
130
|
|
|
146
131
|
**Skill references:**
|
|
147
|
-
- [`skills/opencli-
|
|
132
|
+
- [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md) — drive Chrome ad-hoc (navigate, fill forms, click, extract)
|
|
133
|
+
- [`skills/opencli-adapter-author/SKILL.md`](./skills/opencli-adapter-author/SKILL.md) — write a new adapter end-to-end
|
|
148
134
|
- [`skills/opencli-autofix/SKILL.md`](./skills/opencli-autofix/SKILL.md) — repair broken adapters
|
|
149
|
-
- [`skills/opencli-browser/SKILL.md`](./skills/opencli-browser/SKILL.md) — browser automation reference
|
|
150
135
|
- [`skills/opencli-usage/SKILL.md`](./skills/opencli-usage/SKILL.md) — command and site reference
|
|
151
|
-
- [`skills/smart-search/SKILL.md`](./skills/smart-search/SKILL.md) — capability search
|
|
152
136
|
|
|
153
137
|
Available browser commands include `open`, `state`, `click`, `type`, `fill`, `select`, `keys`, `wait`, `get`, `find`, `extract`, `frames`, `screenshot`, `scroll`, `back`, `eval`, `network`, `tab list`, `tab new`, `tab select`, `tab close`, `init`, `verify`, and `close`.
|
|
154
138
|
|
|
155
139
|
`opencli browser` commands require a `<session>` positional immediately after `browser`. `opencli browser work open <url>` and `opencli browser work tab new [url]` both return a target ID. Use `opencli browser work tab list` to inspect target IDs, 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 commands in the same session.
|
|
156
140
|
|
|
157
|
-
##
|
|
158
|
-
|
|
159
|
-
### `browser`: AI Agent browser control
|
|
160
|
-
|
|
161
|
-
`opencli browser` commands are the low-level primitives that AI Agents use to operate websites. You don't run these manually — instead, install the `opencli-adapter-author` skill into your AI agent, describe what you want in natural language, and the agent handles the browser operations.
|
|
162
|
-
|
|
163
|
-
For example, tell your agent: *"Help me check my Xiaohongshu notifications"* — the agent will use `opencli browser <session> open`, `state`, `click`, etc. under the hood.
|
|
164
|
-
|
|
165
|
-
### Built-in adapters: stable commands
|
|
166
|
-
|
|
167
|
-
Use site-specific commands such as `opencli hackernews top` or `opencli reddit hot` when the capability already exists. These are deterministic and work without browser — ideal for both humans and AI agents.
|
|
168
|
-
|
|
169
|
-
### Writing a new adapter
|
|
170
|
-
|
|
171
|
-
When the site you need is not yet covered, use the `opencli-adapter-author` skill. It takes the agent end-to-end:
|
|
172
|
-
|
|
173
|
-
1. Recon the site and classify its pattern (SPA / SSR / JSONP / Token / Streaming).
|
|
174
|
-
2. Discover the right endpoint — network inspection, initial state, bundle search, token trace, or interceptor fallback.
|
|
175
|
-
3. Decide the auth strategy — `PUBLIC` / `COOKIE` / `INTERCEPT` / `UI` / `LOCAL`.
|
|
176
|
-
4. Decode response fields and design output columns.
|
|
177
|
-
5. `opencli browser recon analyze <url>` for one-shot recon, then `opencli browser recon init <site>/<name>` → write adapter → `opencli browser recon verify <site>/<name>`.
|
|
178
|
-
6. Persist site knowledge to `~/.opencli/sites/<site>/` so the next adapter for the same site is faster.
|
|
179
|
-
|
|
180
|
-
### CLI Hub and desktop adapters
|
|
181
|
-
|
|
182
|
-
OpenCLI is not only for websites. It can also:
|
|
183
|
-
|
|
184
|
-
- expose local binaries like `gh`, `docker`, `obsidian`, `tg`, `discord`, `wx`, or custom tools through `opencli <tool> ...`
|
|
185
|
-
- control Electron desktop apps through dedicated adapters and CDP-backed integrations
|
|
186
|
-
|
|
187
|
-
## Prerequisites
|
|
141
|
+
## Writing a new adapter
|
|
188
142
|
|
|
189
|
-
|
|
190
|
-
- **Bun**: >= 1.0 (optional alternative runtime)
|
|
191
|
-
- **Chrome or Chromium** running and logged into the target site for browser-backed commands
|
|
143
|
+
When the site you need is not yet covered, use the `opencli-adapter-author` skill end-to-end:
|
|
192
144
|
|
|
193
|
-
|
|
145
|
+
1. **Recon** the site and pick a pattern (SPA / SSR / JSONP / Token / Streaming).
|
|
146
|
+
2. **Discover** the right endpoint — network inspection, initial state, bundle search, token trace, or interceptor fallback.
|
|
147
|
+
3. **Pick auth** — `PUBLIC` / `COOKIE` / `INTERCEPT` / `UI` / `LOCAL`.
|
|
148
|
+
4. **Decode** response fields and design output columns.
|
|
149
|
+
5. `opencli browser recon analyze <url>` → `opencli browser recon init <site>/<name>` → write adapter → `opencli browser recon verify <site>/<name>`.
|
|
150
|
+
6. Site knowledge persists to `~/.opencli/sites/<site>/` so the next adapter for the same site starts from context.
|
|
194
151
|
|
|
195
152
|
## Configuration
|
|
196
153
|
|
|
@@ -208,121 +165,35 @@ OpenCLI is not only for websites. It can also:
|
|
|
208
165
|
|
|
209
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.
|
|
210
167
|
|
|
211
|
-
## Update
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
npm install -g @jackwener/opencli@latest
|
|
215
|
-
|
|
216
|
-
# If you use the packaged OpenCLI skills, refresh them too
|
|
217
|
-
npx skills add jackwener/opencli
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
Or refresh only the skills you actually use:
|
|
221
|
-
|
|
222
|
-
```bash
|
|
223
|
-
npx skills add jackwener/opencli --skill opencli-adapter-author
|
|
224
|
-
npx skills add jackwener/opencli --skill opencli-autofix
|
|
225
|
-
npx skills add jackwener/opencli --skill opencli-browser
|
|
226
|
-
npx skills add jackwener/opencli --skill opencli-usage
|
|
227
|
-
npx skills add jackwener/opencli --skill smart-search
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
## For Developers
|
|
231
|
-
|
|
232
|
-
Install from source:
|
|
233
|
-
|
|
234
|
-
```bash
|
|
235
|
-
git clone git@github.com:jackwener/opencli.git
|
|
236
|
-
cd opencli
|
|
237
|
-
npm install
|
|
238
|
-
npm run build
|
|
239
|
-
npm link
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
To load the source Browser Bridge extension:
|
|
243
|
-
|
|
244
|
-
1. Open `chrome://extensions` and enable **Developer mode**.
|
|
245
|
-
2. Click **Load unpacked** and select this repository's `extension/` directory.
|
|
246
|
-
|
|
247
168
|
## Built-in Commands
|
|
248
169
|
|
|
249
170
|
| Site | Commands |
|
|
250
171
|
|------|----------|
|
|
251
172
|
| **xiaohongshu** | `search` `note` `comments` `feed` `user` `download` `publish` `notifications` `creator-notes` `creator-notes-summary` `creator-note-detail` `creator-profile` `creator-stats` |
|
|
252
|
-
| **
|
|
253
|
-
| **bilibili** | `hot` `search` `history` `feed` `ranking` `download` `comments` `dynamic` `favorite` `following` `me` `subtitle` `video` `user-videos` |
|
|
254
|
-
| **tieba** | `hot` `posts` `search` `read` |
|
|
255
|
-
| **hupu** | `hot` `search` `detail` `mentions` `reply` `like` `unlike` |
|
|
256
|
-
| **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` |
|
|
257
|
-
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `upvoted` `save` `saved` `comment` `subscribe` |
|
|
173
|
+
| **bilibili** | `hot` `search` `history` `feed` `ranking` `download` `comments` `dynamic` `favorite` `following` `me` `subtitle` `summary` `video` `user-videos` |
|
|
258
174
|
| **zhihu** | `hot` `search` `question` `download` `follow` `like` `favorite` `comment` `answer` |
|
|
259
|
-
| **
|
|
260
|
-
| **
|
|
261
|
-
| **
|
|
262
|
-
| **
|
|
175
|
+
| **hackernews** | `top` `new` `best` `ask` `show` `jobs` `search` `user` |
|
|
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` |
|
|
178
|
+
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `upvoted` `save` `saved` `comment` `subscribe` |
|
|
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` |
|
|
263
180
|
| **claude** | `ask` `send` `new` `status` `read` `history` `detail` |
|
|
264
|
-
| **
|
|
181
|
+
| **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
|
|
265
182
|
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
|
|
266
|
-
| **
|
|
267
|
-
| **
|
|
268
|
-
| **xiaoe** | `courses` `detail` `catalog` `play-url` `content` |
|
|
269
|
-
| **quark** | `ls` `mkdir` `mv` `rename` `rm` `save` `share-tree` |
|
|
270
|
-
| **uiverse** | `code` `preview` |
|
|
271
|
-
| **baidu-scholar** | `search` |
|
|
272
|
-
| **google-scholar** | `search` `cite` `profile` |
|
|
273
|
-
| **gov-law** | `search` `recent` |
|
|
274
|
-
| **gov-policy** | `search` `recent` |
|
|
275
|
-
| **nowcoder** | `hot` `trending` `topics` `recommend` `creators` `companies` `jobs` `search` `suggest` `experience` `referral` `salary` `papers` `practice` `notifications` `detail` |
|
|
276
|
-
| **wanfang** | `search` |
|
|
277
|
-
| **hackernews** | `top` `new` `best` `ask` `show` `jobs` `search` `user` |
|
|
278
|
-
| **xiaoyuzhou** | `auth*` `podcast*` `podcast-episodes*` `episode*` `download*` `transcript*` |
|
|
279
|
-
|
|
280
|
-
100+ site surfaces in total — **[→ see all supported sites & commands](./docs/adapters/index.md)**
|
|
183
|
+
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` |
|
|
184
|
+
| **upwork** | `search` `feed` `detail` |
|
|
281
185
|
|
|
282
|
-
|
|
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).
|
|
283
187
|
|
|
284
188
|
## CLI Hub
|
|
285
189
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
| External CLI | Description | Example |
|
|
289
|
-
|--------------|-------------|---------|
|
|
290
|
-
| **gh** | GitHub CLI | `opencli gh pr list --limit 5` |
|
|
291
|
-
| **obsidian** | Obsidian vault management | `opencli obsidian search query="AI"` |
|
|
292
|
-
| **docker** | Docker | `opencli docker ps` |
|
|
293
|
-
| **longbridge** | Longbridge CLI — market data, account management, and trading via Longbridge OpenAPI | `opencli longbridge quote TSLA.US --format json` |
|
|
294
|
-
| **ntn** | Notion CLI — official Notion API CLI for pages, databases, blocks, search, comments | `opencli ntn pages list` |
|
|
295
|
-
| **lark-cli** | Lark/Feishu — messages, docs, calendar, tasks, 200+ commands | `opencli lark-cli calendar +agenda` |
|
|
296
|
-
| **dws** | DingTalk — cross-platform CLI for DingTalk's full suite, designed for humans and AI agents | `opencli dws msg send --to user "hello"` |
|
|
297
|
-
| **wecom-cli** | WeCom/企业微信 — CLI for WeCom open platform, for humans and AI agents | `opencli wecom-cli msg send --to user "hello"` |
|
|
298
|
-
| **tg(tg-cli)** | Telegram — local-first sync, search, and export via MTProto for AI agents | `opencli tg search "AI news" -f json` |
|
|
299
|
-
| **discord(discord-cli)** | Discord — local-first sync, search, and export via SQLite for AI agents | `opencli discord recent --channel general` |
|
|
300
|
-
| **wx(wx-cli)** | WeChat — query local WeChat data: sessions, messages, search, contacts, export | `opencli wx search "OpenCLI"` |
|
|
301
|
-
| **vercel** | Vercel — deploy projects, manage domains, env vars, logs | `opencli vercel deploy --prod` |
|
|
302
|
-
|
|
303
|
-
**Register your own** — add any local CLI so AI agents can discover it via `opencli list`:
|
|
304
|
-
|
|
305
|
-
```bash
|
|
306
|
-
opencli external register mycli
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
**Manual install** — some external CLIs use official shell-script installers rather than shell-free package-manager commands. For `ntn`, install from <https://ntn.dev> first, then run `opencli ntn ...`.
|
|
190
|
+
Unified passthrough for your existing command-line tools. Run `opencli <tool> ...` for any of:
|
|
310
191
|
|
|
311
|
-
|
|
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)`
|
|
312
193
|
|
|
313
|
-
|
|
194
|
+
Register your own with `opencli external register <name>`; list everything with `opencli external list`.
|
|
314
195
|
|
|
315
|
-
|
|
316
|
-
|-----|-------------|-----|
|
|
317
|
-
| **Cursor** | Control Cursor IDE — Composer, chat, code extraction | [Doc](./docs/adapters/desktop/cursor.md) |
|
|
318
|
-
| **Codex** | Drive OpenAI Codex CLI agent headlessly | [Doc](./docs/adapters/desktop/codex.md) |
|
|
319
|
-
| **Antigravity** | Control Antigravity Ultra from terminal | [Doc](./docs/adapters/desktop/antigravity.md) |
|
|
320
|
-
| **ChatGPT App** | Automate ChatGPT macOS desktop app | [Doc](./docs/adapters/desktop/chatgpt-app.md) |
|
|
321
|
-
| **ChatWise** | Multi-LLM client (GPT-4, Claude, Gemini) | [Doc](./docs/adapters/desktop/chatwise.md) |
|
|
322
|
-
| **Discord** | Discord Desktop — messages, channels, servers | [Doc](./docs/adapters/desktop/discord.md) |
|
|
323
|
-
| **Doubao** | Control Doubao AI desktop app via CDP | [Doc](./docs/adapters/desktop/doubao-app.md) |
|
|
324
|
-
|
|
325
|
-
To add a new Electron app, start with [docs/guide/electron-app-cli.md](./docs/guide/electron-app-cli.md).
|
|
196
|
+
**Desktop app adapters** (Electron, via CDP): Cursor / Codex / Antigravity / ChatGPT App / ChatWise / Discord / Doubao — see [`docs/adapters/desktop/`](./docs/adapters/desktop/).
|
|
326
197
|
|
|
327
198
|
## Download Support
|
|
328
199
|
|
|
@@ -368,25 +239,7 @@ opencli bilibili hot -v # Verbose: show pipeline debug steps
|
|
|
368
239
|
|
|
369
240
|
## Exit Codes
|
|
370
241
|
|
|
371
|
-
opencli follows Unix `sysexits.h`
|
|
372
|
-
|
|
373
|
-
| Code | Meaning | When |
|
|
374
|
-
|------|---------|------|
|
|
375
|
-
| `0` | Success | Command completed normally |
|
|
376
|
-
| `1` | Generic error | Unexpected / unclassified failure |
|
|
377
|
-
| `2` | Usage error | Bad arguments or unknown command |
|
|
378
|
-
| `66` | Empty result | No data returned (`EX_NOINPUT`) |
|
|
379
|
-
| `69` | Service unavailable | Browser Bridge not connected (`EX_UNAVAILABLE`) |
|
|
380
|
-
| `75` | Temporary failure | Command timed out — retry (`EX_TEMPFAIL`) |
|
|
381
|
-
| `77` | Auth required | Not logged in to target site (`EX_NOPERM`) |
|
|
382
|
-
| `78` | Config error | Missing credentials or bad config (`EX_CONFIG`) |
|
|
383
|
-
| `130` | Interrupted | Ctrl-C / SIGINT |
|
|
384
|
-
|
|
385
|
-
```bash
|
|
386
|
-
opencli spotify status || echo "exit $?" # 69 if browser not running
|
|
387
|
-
opencli gh issue list 2>/dev/null
|
|
388
|
-
[ $? -eq 77 ] && opencli gh auth login # auto-auth if not logged in
|
|
389
|
-
```
|
|
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).
|
|
390
243
|
|
|
391
244
|
## Plugins
|
|
392
245
|
|
|
@@ -408,18 +261,6 @@ opencli plugin uninstall my-tool
|
|
|
408
261
|
|
|
409
262
|
See [Plugins Guide](./docs/guide/plugins.md) for creating your own plugin.
|
|
410
263
|
|
|
411
|
-
## For AI Agents (Developer Guide)
|
|
412
|
-
|
|
413
|
-
Before writing any adapter code, read the [`opencli-adapter-author` skill](./skills/opencli-adapter-author/SKILL.md). It takes you end-to-end:
|
|
414
|
-
|
|
415
|
-
- Recon the site and pick a pattern (SPA / SSR / JSONP / Token / Streaming).
|
|
416
|
-
- Discover the right endpoint via `opencli browser <session> network`, `eval`, or the interceptor fallback.
|
|
417
|
-
- Decide auth strategy (`PUBLIC` / `COOKIE` / `INTERCEPT` / `UI` / `LOCAL`).
|
|
418
|
-
- Run `opencli browser recon analyze <url>` for one-shot recon, decode response fields, design columns, scaffold with `opencli browser recon init`.
|
|
419
|
-
- Verify with `opencli browser recon verify <site>/<name>` before shipping.
|
|
420
|
-
|
|
421
|
-
For long-lived personal commands that should live in your own Git repo, use a local plugin instead; see [Extending OpenCLI](./docs/guide/extending-opencli.md). Quick private adapters can still live at `~/.opencli/clis/<site>/<name>.js`. Site knowledge (endpoints, field maps, fixtures) accumulates in `~/.opencli/sites/<site>/` so the next adapter for the same site starts from context instead of zero.
|
|
422
|
-
|
|
423
264
|
## Testing
|
|
424
265
|
|
|
425
266
|
See **[TESTING.md](./TESTING.md)** for how to run and write tests.
|
|
@@ -429,7 +270,7 @@ See **[TESTING.md](./TESTING.md)** for how to run and write tests.
|
|
|
429
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`.
|
|
430
271
|
- **"attach failed: Cannot access a chrome-extension:// URL"** — Another extension may be interfering. Try disabling other extensions temporarily.
|
|
431
272
|
- **Empty data or 'Unauthorized' error** — Your Chrome/Chromium login session may have expired. Navigate to the target site and log in again.
|
|
432
|
-
- **Node API errors / missing `fetch` / startup crash on old Node** — OpenCLI requires **Node.js >=
|
|
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.
|
|
433
274
|
- **Daemon issues** — Check status: `curl localhost:19825/status` · View logs: `curl localhost:19825/logs`
|
|
434
275
|
|
|
435
276
|
## Star History
|