@jackwener/opencli 1.1.0 → 1.1.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/.agents/skills/cross-project-adapter-migration/SKILL.md +2 -2
- package/.github/pull_request_template.md +7 -0
- package/.github/workflows/doc-check.yml +36 -0
- package/.github/workflows/docs.yml +7 -42
- package/CHANGELOG.md +23 -0
- package/CLI-EXPLORER.md +9 -8
- package/README.md +25 -10
- package/README.zh-CN.md +26 -11
- package/SKILL.md +95 -31
- package/dist/browser/cdp.js +6 -1
- package/dist/browser/page.d.ts +4 -1
- package/dist/browser/page.js +7 -1
- package/dist/build-manifest.js +23 -16
- package/dist/cli-manifest.json +431 -276
- package/dist/cli.d.ts +6 -0
- package/dist/cli.js +189 -162
- package/dist/clis/apple-podcasts/commands.test.d.ts +2 -0
- package/dist/clis/apple-podcasts/commands.test.js +76 -0
- package/dist/clis/apple-podcasts/search.js +2 -2
- package/dist/clis/apple-podcasts/top.js +9 -2
- package/dist/clis/arxiv/search.js +1 -1
- package/dist/clis/bilibili/dynamic.js +1 -1
- package/dist/clis/bilibili/favorite.js +1 -1
- package/dist/clis/bilibili/feed.js +1 -1
- package/dist/clis/bilibili/following.js +1 -1
- package/dist/clis/bilibili/history.js +1 -1
- package/dist/clis/bilibili/me.js +1 -1
- package/dist/clis/bilibili/ranking.js +1 -1
- package/dist/clis/bilibili/search.js +3 -3
- package/dist/clis/bilibili/subtitle.js +1 -1
- package/dist/clis/bilibili/user-videos.js +1 -1
- package/dist/{bilibili.d.ts → clis/bilibili/utils.d.ts} +1 -1
- package/dist/clis/bloomberg/businessweek.js +17 -0
- package/dist/clis/bloomberg/economics.js +17 -0
- package/dist/clis/bloomberg/feeds.d.ts +1 -0
- package/dist/clis/bloomberg/feeds.js +15 -0
- package/dist/clis/bloomberg/industries.d.ts +1 -0
- package/dist/clis/bloomberg/industries.js +17 -0
- package/dist/clis/bloomberg/main.d.ts +1 -0
- package/dist/clis/bloomberg/main.js +17 -0
- package/dist/clis/bloomberg/markets.d.ts +1 -0
- package/dist/clis/bloomberg/markets.js +17 -0
- package/dist/clis/bloomberg/news.d.ts +1 -0
- package/dist/clis/bloomberg/news.js +105 -0
- package/dist/clis/bloomberg/opinions.d.ts +1 -0
- package/dist/clis/bloomberg/opinions.js +17 -0
- package/dist/clis/bloomberg/politics.d.ts +1 -0
- package/dist/clis/bloomberg/politics.js +17 -0
- package/dist/clis/bloomberg/tech.d.ts +1 -0
- package/dist/clis/bloomberg/tech.js +17 -0
- package/dist/clis/bloomberg/utils.d.ts +34 -0
- package/dist/clis/bloomberg/utils.js +364 -0
- package/dist/clis/bloomberg/utils.test.d.ts +1 -0
- package/dist/clis/bloomberg/utils.test.js +129 -0
- package/dist/clis/boss/batchgreet.js +2 -2
- package/dist/clis/boss/chatlist.js +2 -2
- package/dist/clis/boss/detail.js +2 -2
- package/dist/clis/boss/greet.js +4 -4
- package/dist/clis/boss/search.js +1 -1
- package/dist/clis/boss/send.js +1 -1
- package/dist/clis/boss/stats.js +2 -2
- package/dist/clis/chaoxing/assignments.js +1 -1
- package/dist/clis/chaoxing/exams.js +1 -1
- package/dist/{chaoxing.d.ts → clis/chaoxing/utils.d.ts} +1 -1
- package/dist/{chaoxing.js → clis/chaoxing/utils.js} +0 -2
- package/dist/clis/chaoxing/utils.test.d.ts +1 -0
- package/dist/{chaoxing.test.js → clis/chaoxing/utils.test.js} +1 -1
- package/dist/clis/chatgpt/read.js +1 -1
- package/dist/clis/chatwise/export.js +1 -1
- package/dist/clis/chatwise/model.js +2 -2
- package/dist/clis/chatwise/screenshot.js +1 -1
- package/dist/clis/codex/export.js +1 -1
- package/dist/clis/codex/model.js +2 -2
- package/dist/clis/codex/screenshot.js +1 -1
- package/dist/clis/coupang/add-to-cart.js +3 -4
- package/dist/clis/coupang/search.js +2 -4
- package/dist/clis/coupang/utils.test.d.ts +1 -0
- package/dist/{coupang.test.js → clis/coupang/utils.test.js} +1 -1
- package/dist/clis/ctrip/search.js +1 -1
- package/dist/clis/cursor/export.js +1 -1
- package/dist/clis/cursor/model.js +2 -2
- package/dist/clis/cursor/screenshot.js +1 -1
- package/dist/clis/jike/comment.js +2 -3
- package/dist/clis/jike/create.js +1 -2
- package/dist/clis/jike/feed.js +0 -1
- package/dist/clis/jike/like.js +1 -2
- package/dist/clis/jike/notifications.js +0 -1
- package/dist/clis/jike/post.yaml +1 -0
- package/dist/clis/jike/repost.js +1 -2
- package/dist/clis/jike/search.js +2 -3
- package/dist/clis/jike/topic.yaml +1 -0
- package/dist/clis/jike/user.yaml +1 -0
- package/dist/clis/jimeng/history.yaml +0 -1
- package/dist/clis/linkedin/search.js +7 -7
- package/dist/clis/linux-do/category.yaml +1 -0
- package/dist/clis/linux-do/search.yaml +4 -3
- package/dist/clis/linux-do/topic.yaml +1 -0
- package/dist/clis/notion/export.js +1 -1
- package/dist/clis/reddit/comment.js +3 -4
- package/dist/clis/reddit/read.js +4 -5
- package/dist/clis/reddit/save.js +2 -3
- package/dist/clis/reddit/saved.js +0 -1
- package/dist/clis/reddit/search.yaml +1 -0
- package/dist/clis/reddit/subscribe.js +0 -1
- package/dist/clis/reddit/upvote.js +2 -3
- package/dist/clis/reddit/upvoted.js +0 -1
- package/dist/clis/reddit/user-comments.yaml +1 -0
- package/dist/clis/reddit/user-posts.yaml +1 -0
- package/dist/clis/reddit/user.yaml +1 -0
- package/dist/clis/reuters/search.js +1 -1
- package/dist/clis/smzdm/search.js +2 -3
- package/dist/clis/stackoverflow/search.yaml +1 -0
- package/dist/clis/steam/top-sellers.yaml +29 -0
- package/dist/clis/twitter/accept.js +2 -2
- package/dist/clis/twitter/article.js +2 -2
- package/dist/clis/twitter/block.d.ts +1 -0
- package/dist/clis/twitter/block.js +88 -0
- package/dist/clis/twitter/delete.js +1 -1
- package/dist/clis/twitter/hide-reply.d.ts +1 -0
- package/dist/clis/twitter/hide-reply.js +66 -0
- package/dist/clis/twitter/like.js +1 -1
- package/dist/clis/twitter/post.js +1 -1
- package/dist/clis/twitter/reply-dm.js +1 -1
- package/dist/clis/twitter/reply.js +2 -2
- package/dist/clis/twitter/search.js +1 -1
- package/dist/clis/twitter/thread.js +2 -2
- package/dist/clis/twitter/trending.d.ts +1 -0
- package/dist/clis/twitter/trending.js +91 -0
- package/dist/clis/twitter/unblock.d.ts +1 -0
- package/dist/clis/twitter/unblock.js +71 -0
- package/dist/clis/v2ex/topic.yaml +1 -0
- package/dist/clis/weibo/hot.js +0 -1
- package/dist/clis/weread/book.js +1 -1
- package/dist/clis/weread/highlights.js +1 -1
- package/dist/clis/weread/notes.js +1 -1
- package/dist/clis/weread/search.js +1 -1
- package/dist/clis/wikipedia/search.js +1 -1
- package/dist/clis/xiaohongshu/creator-note-detail.d.ts +15 -0
- package/dist/clis/xiaohongshu/creator-note-detail.js +69 -5
- package/dist/clis/xiaohongshu/creator-note-detail.test.js +80 -33
- package/dist/clis/xiaohongshu/creator-notes.js +35 -5
- package/dist/clis/xiaohongshu/creator-notes.test.js +35 -6
- package/dist/clis/xiaohongshu/creator-profile.js +0 -1
- package/dist/clis/xiaohongshu/creator-stats.js +0 -1
- package/dist/clis/xiaohongshu/download.js +2 -3
- package/dist/clis/xiaohongshu/feed.yaml +0 -1
- package/dist/clis/xiaohongshu/notifications.yaml +0 -1
- package/dist/clis/xiaohongshu/search.js +2 -2
- package/dist/clis/xiaohongshu/user.js +1 -2
- package/dist/clis/yahoo-finance/quote.js +0 -1
- package/dist/clis/youtube/search.js +1 -1
- package/dist/clis/youtube/transcript.js +1 -1
- package/dist/clis/youtube/video.js +1 -1
- package/dist/clis/zhihu/download.js +1 -2
- package/dist/clis/zhihu/question.js +1 -1
- package/dist/clis/zhihu/search.yaml +4 -3
- package/dist/commanderAdapter.d.ts +21 -0
- package/dist/commanderAdapter.js +111 -0
- package/dist/{engine.d.ts → discovery.d.ts} +0 -6
- package/dist/{engine.js → discovery.js} +1 -98
- package/dist/download/index.d.ts +2 -6
- package/dist/download/index.js +19 -46
- package/dist/engine.test.d.ts +1 -1
- package/dist/engine.test.js +8 -7
- package/dist/execution.d.ts +22 -0
- package/dist/execution.js +129 -0
- package/dist/explore.js +121 -107
- package/dist/external-clis.yaml +48 -0
- package/dist/external.d.ts +7 -2
- package/dist/external.js +11 -14
- package/dist/main.js +1 -1
- package/dist/pipeline/steps/browser.js +8 -2
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +2 -0
- package/dist/runtime.d.ts +5 -0
- package/dist/runtime.js +8 -0
- package/dist/serialization.d.ts +34 -0
- package/dist/serialization.js +63 -0
- package/dist/types.d.ts +4 -1
- package/docs/.vitepress/config.mts +14 -3
- package/docs/adapters/browser/arxiv.md +27 -0
- package/docs/adapters/browser/barchart.md +32 -0
- package/docs/adapters/browser/bloomberg.md +70 -0
- package/docs/adapters/browser/chaoxing.md +39 -0
- package/docs/adapters/browser/grok.md +35 -0
- package/docs/adapters/browser/hf.md +42 -0
- package/docs/adapters/browser/jike.md +45 -0
- package/docs/adapters/browser/jimeng.md +39 -0
- package/docs/adapters/browser/linux-do.md +45 -0
- package/docs/adapters/browser/sinafinance.md +35 -0
- package/docs/adapters/browser/stackoverflow.md +35 -0
- package/docs/adapters/browser/steam.md +26 -0
- package/docs/adapters/browser/twitter.md +3 -0
- package/docs/adapters/browser/weread.md +48 -0
- package/docs/adapters/browser/wikipedia.md +30 -0
- package/docs/adapters/browser/xiaohongshu.md +5 -1
- package/docs/adapters/desktop/chatgpt.md +3 -3
- package/docs/adapters/index.md +13 -0
- package/docs/advanced/download.md +4 -4
- package/docs/developer/architecture.md +17 -4
- package/package.json +1 -1
- package/scripts/check-doc-coverage.sh +69 -0
- package/scripts/copy-yaml.cjs +7 -0
- package/src/browser/cdp.ts +6 -1
- package/src/browser/page.ts +7 -1
- package/src/build-manifest.ts +25 -19
- package/src/cli.ts +218 -139
- package/src/clis/apple-podcasts/commands.test.ts +95 -0
- package/src/clis/apple-podcasts/search.ts +2 -2
- package/src/clis/apple-podcasts/top.ts +12 -2
- package/src/clis/arxiv/search.ts +1 -1
- package/src/clis/bilibili/dynamic.ts +1 -1
- package/src/clis/bilibili/favorite.ts +1 -1
- package/src/clis/bilibili/feed.ts +1 -1
- package/src/clis/bilibili/following.ts +1 -1
- package/src/clis/bilibili/history.ts +1 -1
- package/src/clis/bilibili/me.ts +1 -1
- package/src/clis/bilibili/ranking.ts +1 -1
- package/src/clis/bilibili/search.ts +3 -3
- package/src/clis/bilibili/subtitle.ts +1 -1
- package/src/clis/bilibili/user-videos.ts +1 -1
- package/src/{bilibili.ts → clis/bilibili/utils.ts} +1 -1
- package/src/clis/bloomberg/businessweek.ts +18 -0
- package/src/clis/bloomberg/economics.ts +18 -0
- package/src/clis/bloomberg/feeds.ts +16 -0
- package/src/clis/bloomberg/industries.ts +18 -0
- package/src/clis/bloomberg/main.ts +18 -0
- package/src/clis/bloomberg/markets.ts +18 -0
- package/src/clis/bloomberg/news.ts +136 -0
- package/src/clis/bloomberg/opinions.ts +18 -0
- package/src/clis/bloomberg/politics.ts +18 -0
- package/src/clis/bloomberg/tech.ts +18 -0
- package/src/clis/bloomberg/utils.test.ts +135 -0
- package/src/clis/bloomberg/utils.ts +429 -0
- package/src/clis/boss/batchgreet.ts +2 -2
- package/src/clis/boss/chatlist.ts +2 -2
- package/src/clis/boss/detail.ts +2 -2
- package/src/clis/boss/greet.ts +4 -4
- package/src/clis/boss/search.ts +1 -1
- package/src/clis/boss/send.ts +1 -1
- package/src/clis/boss/stats.ts +2 -2
- package/src/clis/chaoxing/assignments.ts +1 -1
- package/src/clis/chaoxing/exams.ts +1 -1
- package/src/{chaoxing.test.ts → clis/chaoxing/utils.test.ts} +1 -1
- package/src/{chaoxing.ts → clis/chaoxing/utils.ts} +1 -3
- package/src/clis/chatgpt/README.zh-CN.md +3 -3
- package/src/clis/chatgpt/read.ts +1 -1
- package/src/clis/chatwise/export.ts +1 -1
- package/src/clis/chatwise/model.ts +2 -2
- package/src/clis/chatwise/screenshot.ts +1 -1
- package/src/clis/codex/export.ts +1 -1
- package/src/clis/codex/model.ts +2 -2
- package/src/clis/codex/screenshot.ts +1 -1
- package/src/clis/coupang/add-to-cart.ts +3 -4
- package/src/clis/coupang/search.ts +2 -4
- package/src/{coupang.test.ts → clis/coupang/utils.test.ts} +1 -1
- package/src/clis/ctrip/search.ts +1 -1
- package/src/clis/cursor/export.ts +1 -1
- package/src/clis/cursor/model.ts +2 -2
- package/src/clis/cursor/screenshot.ts +1 -1
- package/src/clis/jike/comment.ts +2 -3
- package/src/clis/jike/create.ts +1 -2
- package/src/clis/jike/feed.ts +0 -1
- package/src/clis/jike/like.ts +1 -2
- package/src/clis/jike/notifications.ts +0 -1
- package/src/clis/jike/post.yaml +1 -0
- package/src/clis/jike/repost.ts +1 -2
- package/src/clis/jike/search.ts +2 -3
- package/src/clis/jike/topic.yaml +1 -0
- package/src/clis/jike/user.yaml +1 -0
- package/src/clis/jimeng/history.yaml +0 -1
- package/src/clis/linkedin/search.ts +7 -7
- package/src/clis/linux-do/category.yaml +1 -0
- package/src/clis/linux-do/search.yaml +4 -3
- package/src/clis/linux-do/topic.yaml +1 -0
- package/src/clis/notion/export.ts +1 -1
- package/src/clis/reddit/comment.ts +3 -4
- package/src/clis/reddit/read.ts +4 -5
- package/src/clis/reddit/save.ts +2 -3
- package/src/clis/reddit/saved.ts +0 -1
- package/src/clis/reddit/search.yaml +1 -0
- package/src/clis/reddit/subscribe.ts +0 -1
- package/src/clis/reddit/upvote.ts +2 -3
- package/src/clis/reddit/upvoted.ts +0 -1
- package/src/clis/reddit/user-comments.yaml +1 -0
- package/src/clis/reddit/user-posts.yaml +1 -0
- package/src/clis/reddit/user.yaml +1 -0
- package/src/clis/reuters/search.ts +1 -1
- package/src/clis/smzdm/search.ts +2 -3
- package/src/clis/stackoverflow/search.yaml +1 -0
- package/src/clis/steam/top-sellers.yaml +29 -0
- package/src/clis/twitter/accept.ts +2 -2
- package/src/clis/twitter/article.ts +2 -2
- package/src/clis/twitter/block.ts +92 -0
- package/src/clis/twitter/delete.ts +1 -1
- package/src/clis/twitter/hide-reply.ts +70 -0
- package/src/clis/twitter/like.ts +1 -1
- package/src/clis/twitter/post.ts +1 -1
- package/src/clis/twitter/reply-dm.ts +1 -1
- package/src/clis/twitter/reply.ts +2 -2
- package/src/clis/twitter/search.ts +1 -1
- package/src/clis/twitter/thread.ts +2 -2
- package/src/clis/twitter/trending.ts +113 -0
- package/src/clis/twitter/unblock.ts +75 -0
- package/src/clis/v2ex/topic.yaml +1 -0
- package/src/clis/weibo/hot.ts +0 -1
- package/src/clis/weread/book.ts +1 -1
- package/src/clis/weread/highlights.ts +1 -1
- package/src/clis/weread/notes.ts +1 -1
- package/src/clis/weread/search.ts +1 -1
- package/src/clis/wikipedia/search.ts +1 -1
- package/src/clis/xiaohongshu/creator-note-detail.test.ts +82 -33
- package/src/clis/xiaohongshu/creator-note-detail.ts +89 -5
- package/src/clis/xiaohongshu/creator-notes.test.ts +39 -6
- package/src/clis/xiaohongshu/creator-notes.ts +44 -5
- package/src/clis/xiaohongshu/creator-profile.ts +0 -1
- package/src/clis/xiaohongshu/creator-stats.ts +0 -1
- package/src/clis/xiaohongshu/download.ts +2 -3
- package/src/clis/xiaohongshu/feed.yaml +0 -1
- package/src/clis/xiaohongshu/notifications.yaml +0 -1
- package/src/clis/xiaohongshu/search.ts +2 -2
- package/src/clis/xiaohongshu/user.ts +1 -2
- package/src/clis/yahoo-finance/quote.ts +0 -1
- package/src/clis/youtube/search.ts +1 -1
- package/src/clis/youtube/transcript.ts +1 -1
- package/src/clis/youtube/video.ts +1 -1
- package/src/clis/zhihu/download.ts +1 -2
- package/src/clis/zhihu/question.ts +1 -1
- package/src/clis/zhihu/search.yaml +4 -3
- package/src/commanderAdapter.ts +113 -0
- package/src/{engine.ts → discovery.ts} +1 -108
- package/src/download/index.ts +21 -54
- package/src/engine.test.ts +8 -7
- package/src/execution.ts +138 -0
- package/src/explore.ts +135 -109
- package/src/external-clis.yaml +9 -0
- package/src/external.ts +15 -12
- package/src/main.ts +1 -1
- package/src/pipeline/steps/browser.ts +7 -2
- package/src/registry.ts +5 -0
- package/src/runtime.ts +9 -0
- package/src/serialization.ts +79 -0
- package/src/types.ts +1 -1
- package/tests/e2e/browser-public.test.ts +25 -0
- package/tests/e2e/public-commands.test.ts +55 -1
- package/dist/clis/twitter/trending.yaml +0 -46
- package/docs/public/CNAME +0 -1
- package/src/clis/twitter/trending.yaml +0 -46
- /package/dist/{bilibili.js → clis/bilibili/utils.js} +0 -0
- /package/dist/{chaoxing.test.d.ts → clis/bloomberg/businessweek.d.ts} +0 -0
- /package/dist/{coupang.test.d.ts → clis/bloomberg/economics.d.ts} +0 -0
- /package/dist/{coupang.d.ts → clis/coupang/utils.d.ts} +0 -0
- /package/dist/{coupang.js → clis/coupang/utils.js} +0 -0
- /package/src/{coupang.ts → clis/coupang/utils.ts} +0 -0
|
@@ -166,10 +166,10 @@ cli({
|
|
|
166
166
|
|
|
167
167
|
### 3.4 公共模式复用
|
|
168
168
|
|
|
169
|
-
迁移过程中如果发现多个适配器共享逻辑,考虑提取到 `src/<site
|
|
169
|
+
迁移过程中如果发现多个适配器共享逻辑,考虑提取到 `src/clis/<site>/utils.ts` 工具文件:
|
|
170
170
|
|
|
171
171
|
```typescript
|
|
172
|
-
// src/<site
|
|
172
|
+
// src/clis/<site>/utils.ts
|
|
173
173
|
export async function fetchWithAuth(page, url) { ... }
|
|
174
174
|
export function parseItem(raw) { ... }
|
|
175
175
|
```
|
|
@@ -19,6 +19,13 @@ Related issue:
|
|
|
19
19
|
- [ ] I updated tests or docs if needed
|
|
20
20
|
- [ ] I included output or screenshots when useful
|
|
21
21
|
|
|
22
|
+
### Documentation (if adding/modifying an adapter)
|
|
23
|
+
|
|
24
|
+
- [ ] Added doc page under `docs/adapters/` (if new adapter)
|
|
25
|
+
- [ ] Updated `docs/adapters/index.md` table (if new adapter)
|
|
26
|
+
- [ ] Updated sidebar in `docs/.vitepress/config.mts` (if new adapter)
|
|
27
|
+
|
|
22
28
|
## Screenshots / Output
|
|
23
29
|
|
|
24
30
|
<!-- If applicable, paste CLI output or screenshots here. -->
|
|
31
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Doc Check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches: [main, dev]
|
|
6
|
+
|
|
7
|
+
concurrency:
|
|
8
|
+
group: doc-check-${{ github.ref }}
|
|
9
|
+
cancel-in-progress: true
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
# ── Adapter doc coverage ──
|
|
13
|
+
doc-coverage:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Check adapter doc coverage
|
|
19
|
+
run: bash scripts/check-doc-coverage.sh --strict
|
|
20
|
+
|
|
21
|
+
# ── VitePress build validation ──
|
|
22
|
+
docs-build:
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: '22'
|
|
30
|
+
cache: 'npm'
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: npm ci
|
|
34
|
+
|
|
35
|
+
- name: Build docs (catches broken links & sidebar refs)
|
|
36
|
+
run: npm run docs:build
|
|
@@ -1,52 +1,17 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Trigger Website Rebuild (Docs Updated)
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
5
|
branches: [main]
|
|
6
6
|
paths: ['docs/**']
|
|
7
|
-
workflow_dispatch:
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
pages: write
|
|
12
|
-
id-token: write
|
|
13
|
-
|
|
14
|
-
concurrency:
|
|
15
|
-
group: pages
|
|
16
|
-
cancel-in-progress: false
|
|
17
7
|
|
|
18
8
|
jobs:
|
|
19
|
-
|
|
9
|
+
dispatch:
|
|
20
10
|
runs-on: ubuntu-latest
|
|
21
11
|
steps:
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
fetch-depth: 0
|
|
25
|
-
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: 20
|
|
29
|
-
cache: npm
|
|
30
|
-
|
|
31
|
-
- name: Install dependencies
|
|
32
|
-
run: npm ci
|
|
33
|
-
|
|
34
|
-
- name: Build docs
|
|
35
|
-
run: npm run docs:build
|
|
36
|
-
|
|
37
|
-
- uses: actions/configure-pages@v4
|
|
38
|
-
|
|
39
|
-
- uses: actions/upload-pages-artifact@v3
|
|
12
|
+
- name: Trigger opencli-website rebuild
|
|
13
|
+
uses: peter-evans/repository-dispatch@v3
|
|
40
14
|
with:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
environment:
|
|
45
|
-
name: github-pages
|
|
46
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
47
|
-
needs: build
|
|
48
|
-
runs-on: ubuntu-latest
|
|
49
|
-
steps:
|
|
50
|
-
- name: Deploy to GitHub Pages
|
|
51
|
-
id: deployment
|
|
52
|
-
uses: actions/deploy-pages@v4
|
|
15
|
+
token: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
|
|
16
|
+
repository: jackwener/opencli-website
|
|
17
|
+
event-type: docs-updated
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.0](https://github.com/jackwener/opencli/compare/v1.0.6...v1.1.0) (2026-03-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add antigravity serve command — Anthropic API proxy ([35a0fed](https://github.com/jackwener/opencli/commit/35a0fed8a0c1cb714298f672c19f017bbc9a9630))
|
|
9
|
+
* add arxiv and wikipedia adapters ([#132](https://github.com/jackwener/opencli/issues/132)) ([3cda14a](https://github.com/jackwener/opencli/commit/3cda14a2ab502e3bebfba6cdd9842c35b2b66b41))
|
|
10
|
+
* add external CLI hub for discovery, auto-installation, and execution of external tools. ([b3e32d8](https://github.com/jackwener/opencli/commit/b3e32d8a05744c9bcdfef96f5ff3085ac72bd353))
|
|
11
|
+
* add sinafinance 7x24 news adapter ([#131](https://github.com/jackwener/opencli/issues/131)) ([02793e9](https://github.com/jackwener/opencli/commit/02793e990ef4bdfdde9d7a748960b8a9ed6ea988))
|
|
12
|
+
* **boss:** add 8 new recruitment management commands ([#133](https://github.com/jackwener/opencli/issues/133)) ([7e973ca](https://github.com/jackwener/opencli/commit/7e973ca59270029f33021a483ca4974dc3975d36))
|
|
13
|
+
* **serve:** implement auto new conv, model mapping, and precise completion detection ([0e8c96b](https://github.com/jackwener/opencli/commit/0e8c96b6d9baebad5deb90b9e0620af5570b259d))
|
|
14
|
+
* **serve:** use CDP mouse click + Input.insertText for reliable message injection ([c63af6d](https://github.com/jackwener/opencli/commit/c63af6d41808dddf6f0f76789aa6c042f391f0b0))
|
|
15
|
+
* xiaohongshu creator flows migration ([#124](https://github.com/jackwener/opencli/issues/124)) ([8f17259](https://github.com/jackwener/opencli/commit/8f1725982ec06d121d7c15b5cf3cda2f5941c32a))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **docs:** use base '/' for custom domain and add CNAME file ([#129](https://github.com/jackwener/opencli/issues/129)) ([2876750](https://github.com/jackwener/opencli/commit/2876750891bc8a66be577b06ead4db61852c8e81))
|
|
21
|
+
* **serve:** update model mappings to match actual Antigravity UI ([36bc57a](https://github.com/jackwener/opencli/commit/36bc57a9624cdfaa50ffb2c1ad7f9c518c5e6c55))
|
|
22
|
+
* type safety for wikiFetch and arxiv abstract truncation ([4600b9d](https://github.com/jackwener/opencli/commit/4600b9d46dc7b56ff564c5f100c3a94c6a792c06))
|
|
23
|
+
* use UTC+8 for XHS timestamp formatting (CI timezone fix) ([03f067d](https://github.com/jackwener/opencli/commit/03f067d90764487f0439705df36e1a5c969a7f98))
|
|
24
|
+
* **xiaohongshu:** use fixed UTC+8 offset in trend timestamp formatting (CI timezone fix) ([593436e](https://github.com/jackwener/opencli/commit/593436e4cb5852f396fbaaa9f87ef1a0b518e76d))
|
|
25
|
+
|
|
3
26
|
## [1.0.6](https://github.com/jackwener/opencli/compare/v1.0.5...v1.0.6) (2026-03-20)
|
|
4
27
|
|
|
5
28
|
|
package/CLI-EXPLORER.md
CHANGED
|
@@ -196,7 +196,7 @@ cat src/clis/<site>/feed.ts # 读最相似的那个
|
|
|
196
196
|
|
|
197
197
|
写 TS 适配器之前,先看看你的目标站点有没有**现成的 helper 函数**可以复用:
|
|
198
198
|
|
|
199
|
-
#### Bilibili (`src/bilibili.ts`)
|
|
199
|
+
#### Bilibili (`src/clis/bilibili/utils.ts`)
|
|
200
200
|
|
|
201
201
|
| 函数 | 用途 | 何时使用 |
|
|
202
202
|
|------|------|----------|
|
|
@@ -342,10 +342,11 @@ name: search
|
|
|
342
342
|
description: 知乎搜索
|
|
343
343
|
|
|
344
344
|
args:
|
|
345
|
-
|
|
345
|
+
query:
|
|
346
346
|
type: str
|
|
347
347
|
required: true
|
|
348
|
-
|
|
348
|
+
positional: true
|
|
349
|
+
description: Search query
|
|
349
350
|
limit:
|
|
350
351
|
type: int
|
|
351
352
|
default: 10
|
|
@@ -355,7 +356,7 @@ pipeline:
|
|
|
355
356
|
|
|
356
357
|
- evaluate: |
|
|
357
358
|
(async () => {
|
|
358
|
-
const q = encodeURIComponent('${{ args.
|
|
359
|
+
const q = encodeURIComponent('${{ args.query }}');
|
|
359
360
|
const res = await fetch('/api/v4/search_v3?q=' + q + '&t=general&limit=${{ args.limit }}', {
|
|
360
361
|
credentials: 'include'
|
|
361
362
|
});
|
|
@@ -455,7 +456,7 @@ cli({
|
|
|
455
456
|
name: 'search',
|
|
456
457
|
description: 'Search tweets',
|
|
457
458
|
strategy: Strategy.HEADER,
|
|
458
|
-
args: [{ name: '
|
|
459
|
+
args: [{ name: 'query', required: true, positional: true }],
|
|
459
460
|
columns: ['rank', 'author', 'text', 'likes'],
|
|
460
461
|
func: async (page, kwargs) => {
|
|
461
462
|
await page.goto('https://x.com');
|
|
@@ -474,7 +475,7 @@ cli({
|
|
|
474
475
|
'X-Twitter-Auth-Type': 'OAuth2Session',
|
|
475
476
|
};
|
|
476
477
|
|
|
477
|
-
const variables = JSON.stringify({ rawQuery: '${kwargs.
|
|
478
|
+
const variables = JSON.stringify({ rawQuery: '${kwargs.query}', count: 20 });
|
|
478
479
|
const url = '/i/api/graphql/xxx/SearchTimeline?variables=' + encodeURIComponent(variables);
|
|
479
480
|
const res = await fetch(url, { headers, credentials: 'include' });
|
|
480
481
|
return await res.json();
|
|
@@ -631,7 +632,7 @@ git add src/clis/mysite/ && git commit -m "feat(mysite): add hot" && git push
|
|
|
631
632
|
```typescript
|
|
632
633
|
import { cli, Strategy } from '../../registry.js';
|
|
633
634
|
import type { IPage } from '../../types.js';
|
|
634
|
-
import { apiGet } from '
|
|
635
|
+
import { apiGet } from './utils.js'; // 复用平台 SDK
|
|
635
636
|
|
|
636
637
|
cli({
|
|
637
638
|
site: 'bilibili',
|
|
@@ -694,7 +695,7 @@ cli({
|
|
|
694
695
|
| 嵌套字段访问 | `${{ item.node?.title }}` 不工作 | 在 evaluate 中 flatten 数据,不在模板中用 optional chaining |
|
|
695
696
|
| 缺少 `strategy: public` | 公开 API 也启动浏览器,7s → 1s | 公开 API 加上 `strategy: public` + `browser: false` |
|
|
696
697
|
| evaluate 返回字符串 | map 步骤收到 `""` 而非数组 | pipeline 有 auto-parse,但建议在 evaluate 内 `.map()` 整形 |
|
|
697
|
-
| 搜索参数被 URL 编码 | `${{ args.
|
|
698
|
+
| 搜索参数被 URL 编码 | `${{ args.query }}` 被浏览器二次编码 | 在 evaluate 内用 `encodeURIComponent()` 手动编码 |
|
|
698
699
|
| Cookie 过期 | 返回 401 / 空数据 | 在浏览器里重新登录目标站点 |
|
|
699
700
|
| Extension tab 残留 | Chrome 多出 `chrome-extension://` tab | 已自动清理;若残留,手动关闭即可 |
|
|
700
701
|
| TS evaluate 格式 | `() => {}` 报 `result is not a function` | TS 中 `page.evaluate()` 必须用 IIFE:`(async () => { ... })()` |
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# OpenCLI
|
|
2
2
|
|
|
3
|
-
> **Make any website
|
|
4
|
-
> Zero risk · Reuse Chrome login · AI-powered discovery ·
|
|
3
|
+
> **Make any website, Electron App, or Local Tool your CLI.**
|
|
4
|
+
> Zero risk · Reuse Chrome login · AI-powered discovery · Universal CLI Hub
|
|
5
5
|
|
|
6
6
|
[中文文档](./README.zh-CN.md)
|
|
7
7
|
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
A CLI tool that turns **any website** or **Electron app** into a command-line interface — Bilibili, Zhihu, 小红书, Twitter/X, Reddit, YouTube, Antigravity, and [many more](#built-in-commands) — powered by browser session reuse and AI-native discovery.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Built for AI Agents**: Simply configure an instruction in your global `AGENT.md` or `.cursorrules` guiding the AI to execute `opencli list` via Bash to discover available tools. Register your favorite local CLIs (`opencli register mycli`), and the AI will automatically learn how to invoke all your tools perfectly!
|
|
15
|
+
|
|
16
|
+
**CLI All Electron Apps! The Most Powerful Update Has Arrived!**
|
|
15
17
|
Turn ANY Electron application into a CLI tool! Recombine, script, and extend applications like Antigravity Ultra seamlessly. Now AI can control itself natively. Unlimited possibilities await!
|
|
16
18
|
|
|
17
19
|
---
|
|
@@ -120,7 +122,7 @@ Run `opencli list` for the live registry.
|
|
|
120
122
|
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `save` `comment` `subscribe` `saved` `upvoted` | Browser |
|
|
121
123
|
| **cursor** | `status` `send` `read` `new` `dump` `composer` `model` `extract-code` `ask` `screenshot` `history` `export` | Desktop |
|
|
122
124
|
| **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `dynamic` `ranking` `following` `user-videos` `download` | Browser |
|
|
123
|
-
| **codex** | `status` `send` `read` `new` `extract-diff` `model` `ask` `screenshot` `history` `export` | Desktop |
|
|
125
|
+
| **codex** | `status` `send` `read` `new` `dump` `extract-diff` `model` `ask` `screenshot` `history` `export` | Desktop |
|
|
124
126
|
| **chatwise** | `status` `new` `send` `read` `ask` `model` `history` `export` `screenshot` | Desktop |
|
|
125
127
|
| **notion** | `status` `search` `read` `new` `write` `sidebar` `favorites` `export` | Desktop |
|
|
126
128
|
| **discord-app** | `status` `send` `read` `channels` `servers` `search` `members` | Desktop |
|
|
@@ -128,14 +130,15 @@ Run `opencli list` for the live registry.
|
|
|
128
130
|
| **xueqiu** | `feed` `hot-stock` `hot` `search` `stock` `watchlist` | Browser |
|
|
129
131
|
| **antigravity** | `status` `send` `read` `new` `dump` `extract-code` `model` `watch` | Desktop |
|
|
130
132
|
| **chatgpt** | `status` `new` `send` `read` `ask` | Desktop |
|
|
131
|
-
| **xiaohongshu** | `search` `notifications` `feed` `
|
|
133
|
+
| **xiaohongshu** | `search` `notifications` `feed` `user` `download` `creator-notes` `creator-note-detail` `creator-notes-summary` `creator-profile` `creator-stats` | Browser |
|
|
132
134
|
| **apple-podcasts** | `search` `episodes` `top` | Public |
|
|
133
135
|
| **xiaoyuzhou** | `podcast` `podcast-episodes` `episode` | Public |
|
|
134
136
|
| **zhihu** | `hot` `search` `question` `download` | Browser |
|
|
135
137
|
| **youtube** | `search` `video` `transcript` | Browser |
|
|
136
|
-
| **boss** | `search` `detail` | Browser |
|
|
138
|
+
| **boss** | `search` `detail` `recommend` `joblist` `greet` `batchgreet` `send` `chatlist` `chatmsg` `invite` `mark` `exchange` `resume` `stats` | Browser |
|
|
137
139
|
| **coupang** | `search` `add-to-cart` | Browser |
|
|
138
140
|
| **bbc** | `news` | Public |
|
|
141
|
+
| **bloomberg** | `main` `markets` `economics` `industries` `tech` `politics` `businessweek` `opinions` `feeds` `news` | Public / Browser |
|
|
139
142
|
| **ctrip** | `search` | Browser |
|
|
140
143
|
| **github** | `search` | Public |
|
|
141
144
|
| **arxiv** | `search` `paper` | Public |
|
|
@@ -147,6 +150,18 @@ Run `opencli list` for the live registry.
|
|
|
147
150
|
| **weibo** | `hot` | Browser |
|
|
148
151
|
| **yahoo-finance** | `quote` | Browser |
|
|
149
152
|
| **sinafinance** | `news` | 🌐 Public |
|
|
153
|
+
| **barchart** | `quote` `options` `greeks` `flow` | Browser |
|
|
154
|
+
| **chaoxing** | `assignments` `exams` | Browser |
|
|
155
|
+
| **grok** | `ask` | Desktop |
|
|
156
|
+
| **hf** | `top` | Public |
|
|
157
|
+
| **jike** | `feed` `search` `create` `like` `comment` `repost` `notifications` `post` `topic` `user` | Browser |
|
|
158
|
+
| **jimeng** | `generate` `history` | Browser |
|
|
159
|
+
| **linux-do** | `hot` `latest` `search` `categories` `category` `topic` | Public |
|
|
160
|
+
| **stackoverflow** | `hot` `search` `bounties` `unanswered` | Public |
|
|
161
|
+
| **steam** | `top-sellers` | Public |
|
|
162
|
+
| **weread** | `shelf` `search` `book` `highlights` `notes` `notebooks` `ranking` | Browser |
|
|
163
|
+
|
|
164
|
+
> **Bloomberg note**: The RSS-backed Bloomberg listing commands (`main`, section feeds, `feeds`) work without a browser. `bloomberg news` is for standard Bloomberg story/article pages that your current Chrome session can already access. Audio and some other non-standard pages may fail, and OpenCLI does not bypass Bloomberg paywall or entitlement checks.
|
|
150
165
|
|
|
151
166
|
### External CLI Hub
|
|
152
167
|
|
|
@@ -215,23 +230,23 @@ brew install yt-dlp
|
|
|
215
230
|
|
|
216
231
|
```bash
|
|
217
232
|
# Download images/videos from Xiaohongshu note
|
|
218
|
-
opencli xiaohongshu download --
|
|
233
|
+
opencli xiaohongshu download --note-id abc123 --output ./xhs
|
|
219
234
|
|
|
220
235
|
# Download Bilibili video (requires yt-dlp)
|
|
221
236
|
opencli bilibili download --bvid BV1xxx --output ./bilibili
|
|
222
237
|
opencli bilibili download --bvid BV1xxx --quality 1080p # Specify quality
|
|
223
238
|
|
|
224
239
|
# Download Twitter media from user
|
|
225
|
-
opencli twitter download
|
|
240
|
+
opencli twitter download elonmusk --limit 20 --output ./twitter
|
|
226
241
|
|
|
227
242
|
# Download single tweet media
|
|
228
243
|
opencli twitter download --tweet-url "https://x.com/user/status/123" --output ./twitter
|
|
229
244
|
|
|
230
245
|
# Export Zhihu article to Markdown
|
|
231
|
-
opencli zhihu download
|
|
246
|
+
opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --output ./zhihu
|
|
232
247
|
|
|
233
248
|
# Export with local images
|
|
234
|
-
opencli zhihu download
|
|
249
|
+
opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --download-images
|
|
235
250
|
```
|
|
236
251
|
|
|
237
252
|
### Pipeline Step (for YAML adapters)
|
package/README.zh-CN.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# OpenCLI
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
> 零风控 · 复用 Chrome 登录 · AI 自动发现接口 ·
|
|
3
|
+
> **把任何网站、本地工具、Electron 应用变成能够让 AI 调用的命令行!**
|
|
4
|
+
> 零风控 · 复用 Chrome 登录 · AI 自动发现接口 · 全能 CLI 枢纽
|
|
5
5
|
|
|
6
6
|
[English](./README.md)
|
|
7
7
|
|
|
@@ -11,7 +11,9 @@
|
|
|
11
11
|
|
|
12
12
|
OpenCLI 将任何网站或 Electron 应用(如 Antigravity)变成命令行工具 — B站、知乎、小红书、Twitter/X、Reddit、YouTube 等[多种站点与应用](#内置命令) — 复用浏览器登录态,AI 驱动探索。
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**专为 AI Agent 打造**:只需在全局 `.cursorrules` 或 `AGENT.md` 中配置简单指令,引导 AI 通过 Bash 执行 `opencli list` 来检索可用的 CLI 工具及其用法。随后,将你常用的 CLI 列表整合注册进去(`opencli register mycli`),AI 便能瞬间学会自动调用相应的本地工具!
|
|
15
|
+
|
|
16
|
+
**opencli 支持 CLI 化所有 electron 应用!最强大更新来袭!**
|
|
15
17
|
CLI all electron!现在支持把所有 electron 应用 CLI 化,从而组合出各种神奇的能力。
|
|
16
18
|
如果你在使用诸如 Antigravity Ultra 等工具时觉得不够灵活或难以扩展,现在通过 OpenCLI 把他 CLI 化,轻松打破界限。
|
|
17
19
|
现在,**AI 可以自己控制自己**!结合 cc/openclaw 就可以远程控制任何 electron 应用!无限玩法!!
|
|
@@ -120,7 +122,7 @@ npm install -g @jackwener/opencli@latest
|
|
|
120
122
|
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `save` `comment` `subscribe` `saved` `upvoted` | 浏览器 |
|
|
121
123
|
| **cursor** | `status` `send` `read` `new` `dump` `composer` `model` `extract-code` `ask` `screenshot` `history` `export` | 桌面端 |
|
|
122
124
|
| **bilibili** | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `dynamic` `ranking` `following` `user-videos` `download` | 浏览器 |
|
|
123
|
-
| **codex** | `status` `send` `read` `new` `extract-diff` `model` `ask` `screenshot` `history` `export` | 桌面端 |
|
|
125
|
+
| **codex** | `status` `send` `read` `new` `dump` `extract-diff` `model` `ask` `screenshot` `history` `export` | 桌面端 |
|
|
124
126
|
| **chatwise** | `status` `new` `send` `read` `ask` `model` `history` `export` `screenshot` | 桌面端 |
|
|
125
127
|
| **notion** | `status` `search` `read` `new` `write` `sidebar` `favorites` `export` | 桌面端 |
|
|
126
128
|
| **discord-app** | `status` `send` `read` `channels` `servers` `search` `members` | 桌面端 |
|
|
@@ -128,14 +130,15 @@ npm install -g @jackwener/opencli@latest
|
|
|
128
130
|
| **xueqiu** | `feed` `hot-stock` `hot` `search` `stock` `watchlist` | 浏览器 |
|
|
129
131
|
| **antigravity** | `status` `send` `read` `new` `dump` `extract-code` `model` `watch` | 桌面端 |
|
|
130
132
|
| **chatgpt** | `status` `new` `send` `read` `ask` | 桌面端 |
|
|
131
|
-
| **xiaohongshu** | `search` `notifications` `feed` `
|
|
133
|
+
| **xiaohongshu** | `search` `notifications` `feed` `user` `download` `creator-notes` `creator-note-detail` `creator-notes-summary` `creator-profile` `creator-stats` | 浏览器 |
|
|
132
134
|
| **apple-podcasts** | `search` `episodes` `top` | 公开 |
|
|
133
135
|
| **xiaoyuzhou** | `podcast` `podcast-episodes` `episode` | 公开 |
|
|
134
136
|
| **zhihu** | `hot` `search` `question` `download` | 浏览器 |
|
|
135
137
|
| **youtube** | `search` `video` `transcript` | 浏览器 |
|
|
136
|
-
| **boss** | `search` `detail` | 浏览器 |
|
|
138
|
+
| **boss** | `search` `detail` `recommend` `joblist` `greet` `batchgreet` `send` `chatlist` `chatmsg` `invite` `mark` `exchange` `resume` `stats` | 浏览器 |
|
|
137
139
|
| **coupang** | `search` `add-to-cart` | 浏览器 |
|
|
138
140
|
| **bbc** | `news` | 公共 API |
|
|
141
|
+
| **bloomberg** | `main` `markets` `economics` `industries` `tech` `politics` `businessweek` `opinions` `feeds` `news` | 公共 API / 浏览器 |
|
|
139
142
|
| **ctrip** | `search` | 浏览器 |
|
|
140
143
|
| **github** | `search` | 公共 API |
|
|
141
144
|
| **arxiv** | `search` `paper` | 公开 |
|
|
@@ -147,6 +150,18 @@ npm install -g @jackwener/opencli@latest
|
|
|
147
150
|
| **weibo** | `hot` | 浏览器 |
|
|
148
151
|
| **yahoo-finance** | `quote` | 浏览器 |
|
|
149
152
|
| **sinafinance** | `news` | 🌐 公开 |
|
|
153
|
+
| **barchart** | `quote` `options` `greeks` `flow` | 浏览器 |
|
|
154
|
+
| **chaoxing** | `assignments` `exams` | 浏览器 |
|
|
155
|
+
| **grok** | `ask` | 桌面端 |
|
|
156
|
+
| **hf** | `top` | 公开 |
|
|
157
|
+
| **jike** | `feed` `search` `create` `like` `comment` `repost` `notifications` `post` `topic` `user` | 浏览器 |
|
|
158
|
+
| **jimeng** | `generate` `history` | 浏览器 |
|
|
159
|
+
| **linux-do** | `hot` `latest` `search` `categories` `category` `topic` | 公开 |
|
|
160
|
+
| **stackoverflow** | `hot` `search` `bounties` `unanswered` | 公开 |
|
|
161
|
+
| **steam** | `top-sellers` | 公开 |
|
|
162
|
+
| **weread** | `shelf` `search` `book` `highlights` `notes` `notebooks` `ranking` | 浏览器 |
|
|
163
|
+
|
|
164
|
+
> **Bloomberg 说明**:Bloomberg 的 RSS 列表命令(`main`、各栏目 feed、`feeds`)无需浏览器即可使用。`bloomberg news` 适用于当前 Chrome 会话本身就能访问的标准 Bloomberg 文章页。音频页和部分非标准页面可能失败,OpenCLI 也不会绕过 Bloomberg 的付费墙、登录或权限校验。
|
|
150
165
|
|
|
151
166
|
### 桌面应用适配器
|
|
152
167
|
|
|
@@ -193,23 +208,23 @@ brew install yt-dlp
|
|
|
193
208
|
|
|
194
209
|
```bash
|
|
195
210
|
# 下载小红书笔记中的图片/视频
|
|
196
|
-
opencli xiaohongshu download --
|
|
211
|
+
opencli xiaohongshu download --note-id abc123 --output ./xhs
|
|
197
212
|
|
|
198
213
|
# 下载B站视频(需要 yt-dlp)
|
|
199
214
|
opencli bilibili download --bvid BV1xxx --output ./bilibili
|
|
200
215
|
opencli bilibili download --bvid BV1xxx --quality 1080p # 指定画质
|
|
201
216
|
|
|
202
217
|
# 下载 Twitter 用户的媒体
|
|
203
|
-
opencli twitter download
|
|
218
|
+
opencli twitter download elonmusk --limit 20 --output ./twitter
|
|
204
219
|
|
|
205
220
|
# 下载单条推文的媒体
|
|
206
221
|
opencli twitter download --tweet-url "https://x.com/user/status/123" --output ./twitter
|
|
207
222
|
|
|
208
223
|
# 导出知乎文章为 Markdown
|
|
209
|
-
opencli zhihu download
|
|
224
|
+
opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --output ./zhihu
|
|
210
225
|
|
|
211
|
-
#
|
|
212
|
-
opencli zhihu download
|
|
226
|
+
# 导出并下载图片
|
|
227
|
+
opencli zhihu download "https://zhuanlan.zhihu.com/p/xxx" --download-images
|
|
213
228
|
```
|
|
214
229
|
|
|
215
230
|
### Pipeline Step(用于 YAML 适配器)
|
package/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: opencli
|
|
3
|
-
description: "OpenCLI — Make any website or Electron App your CLI. Zero risk, AI-powered, reuse Chrome login.
|
|
3
|
+
description: "OpenCLI — Make any website or Electron App your CLI. Zero risk, AI-powered, reuse Chrome login. 150+ commands across 30+ sites."
|
|
4
4
|
version: 1.1.0
|
|
5
5
|
author: jackwener
|
|
6
6
|
tags: [cli, browser, web, chrome-extension, cdp, bilibili, zhihu, twitter, github, v2ex, hackernews, reddit, xiaohongshu, xueqiu, youtube, boss, coupang, AI, agent]
|
|
@@ -48,7 +48,7 @@ Public API commands (`hackernews`, `github search`, `v2ex`) need no browser.
|
|
|
48
48
|
```bash
|
|
49
49
|
# Bilibili (browser)
|
|
50
50
|
opencli bilibili hot --limit 10 # B站热门视频
|
|
51
|
-
opencli bilibili search
|
|
51
|
+
opencli bilibili search "rust" # 搜索视频 (query positional)
|
|
52
52
|
opencli bilibili me # 我的信息
|
|
53
53
|
opencli bilibili favorite # 我的收藏
|
|
54
54
|
opencli bilibili history --limit 20 # 观看历史
|
|
@@ -61,15 +61,19 @@ opencli bilibili following --limit 20 # 我的关注列表 (支持 --uid 查
|
|
|
61
61
|
|
|
62
62
|
# 知乎 (browser)
|
|
63
63
|
opencli zhihu hot --limit 10 # 知乎热榜
|
|
64
|
-
opencli zhihu search
|
|
65
|
-
opencli zhihu question
|
|
64
|
+
opencli zhihu search "AI" # 搜索 (query positional)
|
|
65
|
+
opencli zhihu question 34816524 # 问题详情和回答 (id positional)
|
|
66
66
|
|
|
67
67
|
# 小红书 (browser)
|
|
68
|
-
opencli xiaohongshu search
|
|
68
|
+
opencli xiaohongshu search "美食" # 搜索笔记 (query positional)
|
|
69
69
|
opencli xiaohongshu notifications # 通知(mentions/likes/connections)
|
|
70
70
|
opencli xiaohongshu feed --limit 10 # 推荐 Feed
|
|
71
|
-
opencli xiaohongshu
|
|
72
|
-
opencli xiaohongshu
|
|
71
|
+
opencli xiaohongshu user xxx # 用户主页 (id positional)
|
|
72
|
+
opencli xiaohongshu creator-notes --limit 10 # 创作者笔记列表
|
|
73
|
+
opencli xiaohongshu creator-note-detail --note-id xxx # 笔记详情
|
|
74
|
+
opencli xiaohongshu creator-notes-summary # 笔记数据概览
|
|
75
|
+
opencli xiaohongshu creator-profile # 创作者资料
|
|
76
|
+
opencli xiaohongshu creator-stats # 创作者数据统计
|
|
73
77
|
|
|
74
78
|
# 雪球 Xueqiu (browser)
|
|
75
79
|
opencli xueqiu hot-stock --limit 10 # 雪球热门股票榜
|
|
@@ -77,15 +81,15 @@ opencli xueqiu stock --symbol SH600519 # 查看股票实时行情
|
|
|
77
81
|
opencli xueqiu watchlist # 获取自选股/持仓列表
|
|
78
82
|
opencli xueqiu feed # 我的关注 timeline
|
|
79
83
|
opencli xueqiu hot --limit 10 # 雪球热榜
|
|
80
|
-
opencli xueqiu search
|
|
84
|
+
opencli xueqiu search "特斯拉" # 搜索 (query positional)
|
|
81
85
|
|
|
82
86
|
# GitHub (public)
|
|
83
|
-
opencli github search
|
|
87
|
+
opencli github search "cli" # 搜索仓库 (query positional)
|
|
84
88
|
|
|
85
89
|
# Twitter/X (browser)
|
|
86
90
|
opencli twitter trending --limit 10 # 热门话题
|
|
87
91
|
opencli twitter bookmarks --limit 20 # 获取收藏的书签推文
|
|
88
|
-
opencli twitter search
|
|
92
|
+
opencli twitter search "AI" # 搜索推文 (query positional)
|
|
89
93
|
opencli twitter profile elonmusk # 用户资料
|
|
90
94
|
opencli twitter timeline --limit 20 # 时间线
|
|
91
95
|
opencli twitter thread 1234567890 # 推文 thread(原文 + 回复)
|
|
@@ -100,15 +104,15 @@ opencli reddit hot --limit 10 # 热门帖子
|
|
|
100
104
|
opencli reddit hot --subreddit programming # 指定子版块
|
|
101
105
|
opencli reddit frontpage --limit 10 # 首页 /r/all
|
|
102
106
|
opencli reddit popular --limit 10 # /r/popular 热门
|
|
103
|
-
opencli reddit search
|
|
104
|
-
opencli reddit subreddit
|
|
105
|
-
opencli reddit read --
|
|
106
|
-
opencli reddit user
|
|
107
|
-
opencli reddit user-posts
|
|
108
|
-
opencli reddit user-comments
|
|
109
|
-
opencli reddit upvote --
|
|
110
|
-
opencli reddit save --
|
|
111
|
-
opencli reddit comment --
|
|
107
|
+
opencli reddit search "AI" --sort top --time week # 搜索(支持排序+时间过滤)
|
|
108
|
+
opencli reddit subreddit rust --sort top --time month # 子版块浏览(支持时间过滤)
|
|
109
|
+
opencli reddit read --post-id 1abc123 # 阅读帖子 + 评论
|
|
110
|
+
opencli reddit user spez # 用户资料(karma、注册时间)
|
|
111
|
+
opencli reddit user-posts spez # 用户发帖历史
|
|
112
|
+
opencli reddit user-comments spez # 用户评论历史
|
|
113
|
+
opencli reddit upvote --post-id xxx --direction up # 投票(up/down/none)
|
|
114
|
+
opencli reddit save --post-id xxx # 收藏帖子
|
|
115
|
+
opencli reddit comment --post-id xxx "Great!" # 发表评论 (text positional)
|
|
112
116
|
opencli reddit subscribe --subreddit python # 订阅子版块
|
|
113
117
|
opencli reddit saved --limit 10 # 我的收藏
|
|
114
118
|
opencli reddit upvoted --limit 10 # 我的赞
|
|
@@ -116,7 +120,7 @@ opencli reddit upvoted --limit 10 # 我的赞
|
|
|
116
120
|
# V2EX (public + browser)
|
|
117
121
|
opencli v2ex hot --limit 10 # 热门话题
|
|
118
122
|
opencli v2ex latest --limit 10 # 最新话题
|
|
119
|
-
opencli v2ex topic
|
|
123
|
+
opencli v2ex topic 1024 # 主题详情 (id positional)
|
|
120
124
|
opencli v2ex daily # 每日签到 (browser)
|
|
121
125
|
opencli v2ex me # 我的信息 (browser)
|
|
122
126
|
opencli v2ex notifications --limit 10 # 通知 (browser)
|
|
@@ -131,14 +135,26 @@ opencli bbc news --limit 10 # BBC News RSS headlines
|
|
|
131
135
|
opencli weibo hot --limit 10 # 微博热搜
|
|
132
136
|
|
|
133
137
|
# BOSS直聘 (browser)
|
|
134
|
-
opencli boss search
|
|
135
|
-
opencli boss detail --
|
|
138
|
+
opencli boss search "AI agent" # 搜索职位 (query positional)
|
|
139
|
+
opencli boss detail --security-id xxx # 职位详情
|
|
140
|
+
opencli boss recommend --limit 10 # 推荐职位
|
|
141
|
+
opencli boss joblist --limit 10 # 职位列表
|
|
142
|
+
opencli boss greet --security-id xxx # 打招呼
|
|
143
|
+
opencli boss batchgreet --job-id xxx # 批量打招呼
|
|
144
|
+
opencli boss send --uid xxx "消息内容" # 发消息 (text positional)
|
|
145
|
+
opencli boss chatlist --limit 10 # 聊天列表
|
|
146
|
+
opencli boss chatmsg --security-id xxx # 聊天记录
|
|
147
|
+
opencli boss invite --security-id xxx # 邀请沟通
|
|
148
|
+
opencli boss mark --security-id xxx # 标记管理
|
|
149
|
+
opencli boss exchange --security-id xxx # 交换联系方式
|
|
150
|
+
opencli boss resume # 简历管理
|
|
151
|
+
opencli boss stats # 数据统计
|
|
136
152
|
|
|
137
153
|
# YouTube (browser)
|
|
138
|
-
opencli youtube search
|
|
139
|
-
opencli youtube video
|
|
140
|
-
opencli youtube transcript
|
|
141
|
-
opencli youtube transcript
|
|
154
|
+
opencli youtube search "rust" # 搜索视频 (query positional)
|
|
155
|
+
opencli youtube video "https://www.youtube.com/watch?v=xxx" # 视频元数据
|
|
156
|
+
opencli youtube transcript "https://www.youtube.com/watch?v=xxx" # 获取视频字幕/转录
|
|
157
|
+
opencli youtube transcript "xxx" --lang zh-Hans --mode raw # 指定语言 + 原始时间戳模式
|
|
142
158
|
|
|
143
159
|
# Yahoo Finance (browser)
|
|
144
160
|
opencli yahoo-finance quote --symbol AAPL # 股票行情
|
|
@@ -147,13 +163,13 @@ opencli yahoo-finance quote --symbol AAPL # 股票行情
|
|
|
147
163
|
opencli sinafinance news --limit 10 --type 1 # 7x24实时快讯 (0=全部 1=A股 2=宏观 3=公司 4=数据 5=市场 6=国际 7=观点 8=央行 9=其它)
|
|
148
164
|
|
|
149
165
|
# Reuters (browser)
|
|
150
|
-
opencli reuters search
|
|
166
|
+
opencli reuters search "AI" # 路透社搜索 (query positional)
|
|
151
167
|
|
|
152
168
|
# 什么值得买 (browser)
|
|
153
|
-
opencli smzdm search
|
|
169
|
+
opencli smzdm search "耳机" # 搜索好价 (query positional)
|
|
154
170
|
|
|
155
171
|
# 携程 (browser)
|
|
156
|
-
opencli ctrip search
|
|
172
|
+
opencli ctrip search "三亚" # 搜索目的地 (query positional)
|
|
157
173
|
|
|
158
174
|
# Antigravity (Electron/CDP)
|
|
159
175
|
opencli antigravity status # 检查 CDP 连接
|
|
@@ -163,6 +179,54 @@ opencli antigravity new # 清空聊天、开启新对话
|
|
|
163
179
|
opencli antigravity extract-code # 自动抽取 AI 回复中的代码块
|
|
164
180
|
opencli antigravity model claude # 切换底层模型
|
|
165
181
|
opencli antigravity watch # 流式监听增量消息
|
|
182
|
+
|
|
183
|
+
# Barchart (browser)
|
|
184
|
+
opencli barchart quote --symbol AAPL # 股票行情
|
|
185
|
+
opencli barchart options --symbol AAPL # 期权链
|
|
186
|
+
opencli barchart greeks --symbol AAPL # 期权 Greeks
|
|
187
|
+
opencli barchart flow --limit 20 # 异常期权活动
|
|
188
|
+
|
|
189
|
+
# Jike 即刻 (browser)
|
|
190
|
+
opencli jike feed --limit 10 # 动态流
|
|
191
|
+
opencli jike search "AI" # 搜索 (query positional)
|
|
192
|
+
opencli jike create "内容" # 发布动态 (text positional)
|
|
193
|
+
opencli jike like xxx # 点赞 (id positional)
|
|
194
|
+
opencli jike comment xxx "评论" # 评论 (id + text positional)
|
|
195
|
+
opencli jike repost xxx # 转发 (id positional)
|
|
196
|
+
opencli jike notifications # 通知
|
|
197
|
+
|
|
198
|
+
# Linux.do (public)
|
|
199
|
+
opencli linux-do hot --limit 10 # 热门话题
|
|
200
|
+
opencli linux-do latest --limit 10 # 最新话题
|
|
201
|
+
opencli linux-do search "rust" # 搜索 (query positional)
|
|
202
|
+
opencli linux-do topic 1024 # 主题详情 (id positional)
|
|
203
|
+
|
|
204
|
+
# StackOverflow (public)
|
|
205
|
+
opencli stackoverflow hot --limit 10 # 热门问题
|
|
206
|
+
opencli stackoverflow search "typescript" # 搜索 (query positional)
|
|
207
|
+
opencli stackoverflow bounties --limit 10 # 悬赏问题
|
|
208
|
+
|
|
209
|
+
# WeRead 微信读书 (browser)
|
|
210
|
+
opencli weread shelf --limit 10 # 书架
|
|
211
|
+
opencli weread search "AI" # 搜索图书 (query positional)
|
|
212
|
+
opencli weread book xxx # 图书详情 (book-id positional)
|
|
213
|
+
opencli weread highlights xxx # 划线笔记 (book-id positional)
|
|
214
|
+
opencli weread notes xxx # 想法笔记 (book-id positional)
|
|
215
|
+
opencli weread ranking --limit 10 # 排行榜
|
|
216
|
+
|
|
217
|
+
# Jimeng 即梦 AI (browser)
|
|
218
|
+
opencli jimeng generate --prompt "描述" # AI 生图
|
|
219
|
+
opencli jimeng history --limit 10 # 生成历史
|
|
220
|
+
|
|
221
|
+
# Grok (Desktop)
|
|
222
|
+
opencli grok ask "问题" # 提问 Grok (text positional)
|
|
223
|
+
|
|
224
|
+
# HuggingFace (public)
|
|
225
|
+
opencli hf top --limit 10 # 热门模型
|
|
226
|
+
|
|
227
|
+
# 超星学习通 (browser)
|
|
228
|
+
opencli chaoxing assignments # 作业列表
|
|
229
|
+
opencli chaoxing exams # 考试列表
|
|
166
230
|
```
|
|
167
231
|
|
|
168
232
|
### Management Commands
|
|
@@ -300,7 +364,7 @@ cli({
|
|
|
300
364
|
site: 'mysite',
|
|
301
365
|
name: 'search',
|
|
302
366
|
strategy: Strategy.INTERCEPT, // Or COOKIE
|
|
303
|
-
args: [{ name: '
|
|
367
|
+
args: [{ name: 'query', required: true, positional: true }],
|
|
304
368
|
columns: ['rank', 'title', 'url'],
|
|
305
369
|
func: async (page, kwargs) => {
|
|
306
370
|
await page.goto('https://www.mysite.com/search');
|
|
@@ -351,7 +415,7 @@ cli({
|
|
|
351
415
|
|
|
352
416
|
```yaml
|
|
353
417
|
# Arguments with defaults
|
|
354
|
-
${{ args.
|
|
418
|
+
${{ args.query }}
|
|
355
419
|
${{ args.limit | default(20) }}
|
|
356
420
|
|
|
357
421
|
# Current item (in map/filter)
|
package/dist/browser/cdp.js
CHANGED
|
@@ -137,12 +137,17 @@ class CDPPage {
|
|
|
137
137
|
this.bridge = bridge;
|
|
138
138
|
}
|
|
139
139
|
/** Navigate with proper load event waiting (P1 fix #3) */
|
|
140
|
-
async goto(url) {
|
|
140
|
+
async goto(url, options) {
|
|
141
141
|
await this.bridge.send('Page.enable');
|
|
142
142
|
const loadPromise = this.bridge.waitForEvent('Page.loadEventFired', 30_000)
|
|
143
143
|
.catch(() => { }); // Don't fail if event times out
|
|
144
144
|
await this.bridge.send('Page.navigate', { url });
|
|
145
145
|
await loadPromise;
|
|
146
|
+
// Post-load settle: SPA frameworks need extra time to render after load event
|
|
147
|
+
if (options?.waitUntil !== 'none') {
|
|
148
|
+
const settleMs = options?.settleMs ?? 1000;
|
|
149
|
+
await new Promise(resolve => setTimeout(resolve, settleMs));
|
|
150
|
+
}
|
|
146
151
|
}
|
|
147
152
|
async evaluate(js) {
|
|
148
153
|
const expression = wrapForEval(js);
|