Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ A CLI tool that turns **any website**, **Electron app**, or **local CLI tool** i
- **Dynamic Loader** — Simply drop `.ts` or `.yaml` adapters into the `clis/` folder for auto-registration.
- **Zero LLM cost** — No tokens consumed at runtime. Run 10,000 times and pay nothing.
- **Deterministic** — Same command, same output schema, every time. Pipeable, scriptable, CI-friendly.
- **Broad coverage** — 73+ sites across global and Chinese platforms (Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, and more), plus desktop Electron apps via CDP.
- **Broad coverage** — 79+ sites across global and Chinese platforms (Bilibili, Zhihu, Xiaohongshu, Reddit, HackerNews, and more), plus desktop Electron apps via CDP.

---

Expand Down Expand Up @@ -131,17 +131,17 @@ git clone git@github.com:jackwener/opencli.git && cd opencli && npm install && n
| **tieba** | `hot` `posts` `search` `read` |
| **hupu** | `hot` `search` `detail` `reply` `like` `unlike` |
| **twitter** | `trending` `search` `timeline` `bookmarks` `post` `download` `profile` `article` `like` `likes` `notifications` `reply` `reply-dm` `thread` `follow` `unfollow` `followers` `following` `block` `unblock` `bookmark` `unbookmark` `delete` `hide-reply` `accept` |
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `user` `user-posts` `user-comments` `read` `save` `saved` `subscribe` `upvote` `upvoted` `comment` |
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` |
| **reddit** | `hot` `frontpage` `popular` `search` `subreddit` `read` `user` `user-posts` `user-comments` `upvote` `upvoted` `save` `saved` `comment` `subscribe` |
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` |
| **1688** | `search` `item` `store` |
| **gemini** | `new` `ask` `image` |
| **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` |
| **yuanbao** | `new` `ask` |
| **notebooklm** | `status` `list` `open` `select` `current` `get` `metadata` `source-list` `source-get` `source-fulltext` `source-guide` `history` `note-list` `notes-list` `notes-get` `summary` |
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `rpc` `source-list` `source-get` `source-fulltext` `source-guide` |
| **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` |
| **xianyu** | `search` `item` `chat` |
| **xiaoe** | `courses` `detail` `catalog` `play-url` `content` |

73+ adapters in total — **[→ see all supported sites & commands](./docs/adapters/index.md)**
79+ adapters in total — **[→ see all supported sites & commands](./docs/adapters/index.md)**

## CLI Hub

Expand Down
16 changes: 8 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ CLI all electron!现在支持把所有 electron 应用 CLI 化,从而组合

- **CLI All Electron** — 支持把所有 electron 应用(如 Antigravity Ultra)CLI 化,让 AI 控制自己!
- **浏览器自动化** — `operate` 赋予 AI Agent 直接操控浏览器的能力:点击、输入、提取、截图,任意交互皆可脚本化
- **网页转 CLI** — 将任意网站变成确定性命令行工具:73+ 预置适配器,或用 `opencli record` 沉淀自己的操作
- **多站点覆盖** — 73+ 站点,横跨全球与中国平台(B站、知乎、小红书、Reddit、HackerNews 等),并支持通过 CDP 控制桌面 Electron 应用
- **网页转 CLI** — 将任意网站变成确定性命令行工具:79+ 预置适配器,或用 `opencli record` 沉淀自己的操作
- **多站点覆盖** — 79+ 站点,横跨全球与中国平台(B站、知乎、小红书、Reddit、HackerNews 等),并支持通过 CDP 控制桌面 Electron 应用
- **零风控** — 复用 Chrome/Chromium 登录态,无需存储任何凭证
- **外部 CLI 枢纽** — 统一发现、自动安装、透传执行 `gh`、`docker` 等本地 CLI
- **自修复配置** — `opencli doctor` 自动启动 daemon,诊断扩展和浏览器连接状态
Expand Down Expand Up @@ -168,7 +168,7 @@ npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参
| **reuters** | `search` | 浏览器 |
| **smzdm** | `search` | 浏览器 |
| **web** | `read` | 浏览器 |
| **weibo** | `hot` `search` | 浏览器 |
| **weibo** | `hot` `search` `feed` `user` `me` `post` `comments` | 浏览器 |
| **yahoo-finance** | `quote` | 浏览器 |
| **sinafinance** | `news` | 🌐 公开 |
| **barchart** | `quote` `options` `greeks` `flow` | 浏览器 |
Expand All @@ -178,18 +178,18 @@ npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参
| **jike** | `feed` `search` `create` `like` `comment` `repost` `notifications` `post` `topic` `user` | 浏览器 |
| **jimeng** | `generate` `history` | 浏览器 |
| **yollomi** | `generate` `video` `edit` `upload` `models` `remove-bg` `upscale` `face-swap` `restore` `try-on` `background` `object-remover` | 浏览器 |
| **linux-do** | `feed` `categories` `tags` `search` `topic` `user-topics` `user-posts` | 浏览器 |
| **linux-do** | `hot` `latest` `feed` `search` `categories` `category` `tags` `topic` `user-posts` `user-topics` | 浏览器 |
| **stackoverflow** | `hot` `search` `bounties` `unanswered` | 公开 |
| **steam** | `top-sellers` | 公开 |
| **weread** | `shelf` `search` `book` `highlights` `notes` `notebooks` `ranking` | 浏览器 |
| **douban** | `search` `top250` `subject` `photos` `download` `marks` `reviews` `movie-hot` `book-hot` | 浏览器 |
| **facebook** | `feed` `profile` `search` `friends` `groups` `events` `notifications` `memories` `add-friend` `join-group` | 浏览器 |
| **google** | `news` `search` `suggest` `trends` | 公开 |
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` | 浏览器 |
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` | 浏览器 |
| **1688** | `search` `item` `store` | 浏览器 |
| **gemini** | `new` `ask` `image` | 浏览器 |
| **gemini** | `new` `ask` `image` `deep-research` `deep-research-result` | 浏览器 |
| **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` | OAuth API |
| **notebooklm** | `status` `list` `open` `select` `current` `get` `metadata` `source-list` `source-get` `source-fulltext` `source-guide` `history` `note-list` `notes-list` `notes-get` `summary` | 浏览器 |
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `rpc` `source-list` `source-get` `source-fulltext` `source-guide` | 浏览器 |
| **36kr** | `news` `hot` `search` `article` | 公开 / 浏览器 |
| **imdb** | `search` `title` `top` `trending` `person` `reviews` | 公开 |
| **producthunt** | `posts` `today` `hot` `browse` | 公开 / 浏览器 |
Expand All @@ -205,7 +205,7 @@ npx skills add jackwener/opencli --skill opencli-oneshot # 快速命令参
| **douyin** | `videos` `publish` `drafts` `draft` `delete` `stats` `profile` `update` `hashtag` `location` `activities` `collections` | 浏览器 |
| **yuanbao** | `new` `ask` | 浏览器 |

73+ 适配器 — **[→ 查看完整命令列表](./docs/adapters/index.md)**
79+ 适配器 — **[→ 查看完整命令列表](./docs/adapters/index.md)**

### 外部 CLI 枢纽

Expand Down
4 changes: 2 additions & 2 deletions clis/xiaohongshu/comments.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ describe('xiaohongshu comments', () => {

const result = (await command!.func!(page, { 'note-id': '69aadbcb000000002202f131', limit: 5 })) as any[];

expect((page.goto as any).mock.calls[0][0]).toContain('/explore/69aadbcb000000002202f131');
expect((page.goto as any).mock.calls[0][0]).toContain('/search_result/69aadbcb000000002202f131');
expect(result).toHaveLength(2);
expect(result[0]).toMatchObject({ rank: 1, author: 'Alice', text: 'Great note!', likes: 10 });
expect(result[1]).toMatchObject({ rank: 2, author: 'Bob', text: 'Very helpful', likes: 0 });
});

it('strips /explore/ prefix from full URL input', async () => {
it('preserves full /explore/ URL as-is for navigation', async () => {
const page = createPageMock({
loginWall: false,
results: [{ author: 'Alice', text: 'Nice', likes: 1, time: '2024-01-01', is_reply: false, reply_to: '' }],
Expand Down
8 changes: 4 additions & 4 deletions clis/xiaohongshu/note.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ describe('buildNoteUrl', () => {
expect(buildNoteUrl(url)).toBe(url);
});

it('constructs /explore/ URL for bare note ID', () => {
expect(buildNoteUrl('abc123')).toBe('https://www.xiaohongshu.com/explore/abc123');
it('constructs /search_result/ URL for bare note ID', () => {
expect(buildNoteUrl('abc123')).toBe('https://www.xiaohongshu.com/search_result/abc123');
});
});

Expand All @@ -85,7 +85,7 @@ describe('xiaohongshu note', () => {

const result = (await command!.func!(page, { 'note-id': '69c131c9000000002800be4c' })) as any[];

expect((page.goto as any).mock.calls[0][0]).toContain('/explore/69c131c9000000002800be4c');
expect((page.goto as any).mock.calls[0][0]).toContain('/search_result/69c131c9000000002800be4c');
expect(result).toEqual([
{ field: 'title', value: '尚界Z7实车体验' },
{ field: 'author', value: '小红薯用户' },
Expand Down Expand Up @@ -154,7 +154,7 @@ describe('xiaohongshu note', () => {
} catch (error) {
expect(error).toMatchObject({
code: 'EMPTY_RESULT',
hint: expect.stringMatching(/xsec_token|full url|search_result/i),
hint: expect.stringContaining('loaded without visible content'),
});
}
});
Expand Down
12 changes: 6 additions & 6 deletions skills/opencli-usage/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
name: opencli-usage
description: "Use when running OpenCLI commands to interact with websites (Bilibili, Twitter, Reddit, Xiaohongshu, etc.), desktop apps (Cursor, Notion), or public APIs (HackerNews, arXiv). Covers installation, command reference, and output formats for 73+ adapters."
version: 1.6.1
description: "Use when running OpenCLI commands to interact with websites (Bilibili, Twitter, Reddit, Xiaohongshu, etc.), desktop apps (Cursor, Notion), or public APIs (HackerNews, arXiv). Covers installation, command reference, and output formats for 79+ adapters."
version: 1.6.2
author: jackwener
tags: [opencli, cli, browser, web, chrome-extension, cdp, bilibili, twitter, reddit, xiaohongshu, github, youtube, AI, agent, automation]
---
Expand Down Expand Up @@ -85,7 +85,7 @@ Usage: `opencli <site> <command> [args] [--limit N] [-f json|yaml|md|csv|table]`
| **barchart** | `quote` `options` `greeks` `flow` |
| **sinafinance** | `news` |
| **reuters** | `search` |
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` |
| **amazon** | `bestsellers` `search` `product` `offer` `discussion` `movers-shakers` `new-releases` `rankings` |
| **coupang** | `search` `add-to-cart` |
| **jd** | `item` |
| **smzdm** | `search` |
Expand All @@ -103,8 +103,8 @@ Usage: `opencli <site> <command> [args] [--limit N] [-f json|yaml|md|csv|table]`
| **bloomberg** (browser) | `news` — full article reader |
| **grok** | `ask` |
| **doubao** | `status` `new` `send` `read` `ask` `detail` `history` `meeting-summary` `meeting-transcript` |
| **gemini** | `ask` `new` `image` |
| **notebooklm** | `status` `list` `open` `get` `current` `history` `summary` `note-list` `notes-get` `source-list` `source-get` `source-fulltext` `source-guide` |
| **gemini** | `ask` `new` `image` `deep-research` `deep-research-result` |
| **notebooklm** | `status` `list` `open` `current` `get` `history` `summary` `note-list` `notes-get` `rpc` `source-list` `source-get` `source-fulltext` `source-guide` |

### Desktop (CDP/Electron)

Expand Down Expand Up @@ -141,7 +141,7 @@ Usage: `opencli <site> <command> [args] [--limit N] [-f json|yaml|md|csv|table]`
| **wikipedia** | `search` `summary` `random` `trending` |
| **producthunt** | `today` `hot` `browse` `posts` |
| **imdb** | `top` `trending` `search` `title` `person` `reviews` |
| **spotify** | `auth` `status` `play` |
| **spotify** | `auth` `status` `play` `pause` `next` `prev` `volume` `search` `queue` `shuffle` `repeat` |
| **paperreview** | `submit` `review` `feedback` |

### Management
Expand Down