opencli-reader

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

opencli Reader (Generic Fallback, Read-Only)

opencli 阅读器(通用回退,只读)

Generic fallback for any source opencli supports via its adapter registry (90+ sites, growing). Use this skill only when no dedicated finance-skill covers the source — the specialized skills (
twitter-reader
,
linkedin-reader
,
discord-reader
,
telegram-reader
,
yc-reader
) are always preferred when the request matches one of them.
This skill is read-only. Write commands that opencli exposes (post, like, comment, send, save, upvote, subscribe, follow, delete, reply-dm, etc.) must not be invoked.

这是opencli通过其适配器注册表支持的任意来源的通用回退方案(支持90+站点,数量持续增加)。仅当没有专用技能覆盖目标来源时才使用本技能——当请求匹配特定技能(
twitter-reader
linkedin-reader
discord-reader
telegram-reader
yc-reader
)时,始终优先使用这些专用技能。
本技能为只读模式。不得调用opencli提供的写入命令(发布、点赞、评论、发送、保存、投票、订阅、关注、删除、私信回复等)。

Step 1: Decide Whether to Use This Skill

步骤1:判断是否使用本技能

Only use this skill if the request cannot be handled by a more specific skill.
If the user asks about…Use this skill instead
Twitter/X
twitter-reader
LinkedIn
linkedin-reader
Discord
discord-reader
Telegram
telegram-reader
Y Combinator
yc-reader
Anything else opencli supports (Yahoo Finance, Bloomberg, Reuters, Reddit, HackerNews, Eastmoney, Xueqiu, Substack, arXiv, etc.)this skill
If the source is not in opencli's registry either, stop and tell the user the request isn't covered — don't fall back to ad-hoc scraping.

仅当请求无法由更具体的技能处理时,才使用本技能。
用户询问的平台…应使用的技能
Twitter/X
twitter-reader
LinkedIn
linkedin-reader
Discord
discord-reader
Telegram
telegram-reader
Y Combinator
yc-reader
opencli支持的其他平台(Yahoo Finance、Bloomberg、Reuters、Reddit、HackerNews、东方财富、雪球、Substack、arXiv等)本技能
如果目标来源不在opencli的注册表中,请直接告知用户请求无法处理——不要回退到临时爬虫方案。

Step 2: Ensure opencli Is Ready

步骤2:确保opencli已准备就绪

Current environment status:
!`(command -v opencli && opencli doctor 2>&1 | head -5 && echo "READY" || echo "SETUP_NEEDED") 2>/dev/null || echo "NOT_INSTALLED"`
If
NOT_INSTALLED
:
bash
npm install -g @jackwener/opencli
If
SETUP_NEEDED
, guide the user through Browser Bridge setup (only required for adapters whose strategy is
COOKIE
,
HEADER
,
INTERCEPT
, or
UI
PUBLIC
and
LOCAL
adapters work without a browser):
  1. Download the latest
    opencli-extension-v{version}.zip
    from the GitHub Releases page
  2. Unzip it, open
    chrome://extensions
    in Chrome, enable Developer mode
  3. Click Load unpacked and select the unzipped folder
  4. Make sure Chrome is logged into the target site, then re-run
    opencli doctor
Requires Node.js >= 21 (or Bun >= 1.0).

当前环境状态:
!`(command -v opencli && opencli doctor 2>&1 | head -5 && echo "READY" || echo "SETUP_NEEDED") 2>/dev/null || echo "NOT_INSTALLED"`
如果显示
NOT_INSTALLED
bash
npm install -g @jackwener/opencli
如果显示
SETUP_NEEDED
,引导用户完成浏览器桥接设置(仅适用于策略为
COOKIE
HEADER
INTERCEPT
UI
的适配器——
PUBLIC
LOCAL
适配器无需浏览器即可工作):
  1. GitHub发布页面下载最新的
    opencli-extension-v{version}.zip
    压缩包
  2. 解压压缩包,在Chrome中打开
    chrome://extensions
    ,启用开发者模式
  3. 点击加载已解压的扩展程序,选择解压后的文件夹
  4. 确保Chrome已登录目标站点,然后重新运行
    opencli doctor
要求Node.js版本 >=21(或Bun版本 >=1.0)。

Step 3: Discover the Right Command

步骤3:查找正确的命令

Do not guess command names or flags — the registry has 500+ commands and changes weekly. Instead:
bash
undefined
请勿猜测命令名称或参数——注册表包含500+命令且每周更新。请使用以下方式查询:
bash
undefined

Full registry (grouped by site), machine-readable JSON

完整注册表(按站点分组),机器可读JSON格式

opencli list -f json
opencli list -f json

Filter to a site

筛选特定站点

opencli list | grep -i <site>
opencli list | grep -i <site>

Site-level help (all commands + flags)

站点级帮助(所有命令及参数)

opencli <site> --help
opencli <site> --help

Command-level help (positional args + flags + defaults)

命令级帮助(位置参数、参数及默认值)

opencli <site> <command> --help

The `opencli list -f json` entry for each command includes:
- `site` — adapter namespace (e.g., `yahoo-finance`)
- `name` — subcommand (e.g., `quote`)
- `strategy` — `PUBLIC` / `COOKIE` / `HEADER` / `INTERCEPT` / `UI` / `LOCAL` — tells you if a browser login is needed
- `description`, `args`, `columns` — canonical metadata

Use `opencli list -f json` as the source of truth. Never paste a site list into the plan from memory; adapters are added every week.
opencli <site> <command> --help

每个命令的`opencli list -f json`条目包含:
- `site` — 适配器命名空间(例如:`yahoo-finance`)
- `name` — 子命令(例如:`quote`)
- `strategy` — `PUBLIC` / `COOKIE` / `HEADER` / `INTERCEPT` / `UI` / `LOCAL` — 指示是否需要浏览器登录
- `description`、`args`、`columns` — 标准元数据

请以`opencli list -f json`为权威来源。切勿凭记忆粘贴站点列表——适配器每周都会新增。

Quick map of the most common finance / research sources

常见金融/研究来源快速指南

The table below is a shortlist, not exhaustive — always confirm with
opencli <site> --help
.
SourceSite slugCommon commands
Yahoo Finance
yahoo-finance
quote
Bloomberg
bloomberg
markets
,
economics
,
industries
,
tech
,
politics
,
opinions
,
news
,
businessweek
,
feeds
,
main
Reuters
reuters
search
Eastmoney (东方财富)
eastmoney
quote
,
rank
,
kline
,
sectors
,
etf
,
holders
,
money-flow
,
northbound
,
longhu
,
kuaixun
,
convertible
,
index-board
,
announcement
,
hot-rank
Xueqiu (雪球)
xueqiu
stock
,
hot-stock
,
hot
,
feed
,
comments
,
watchlist
,
search
,
groups
,
fund-snapshot
,
fund-holdings
,
earnings-date
,
kline
Sinafinance
sinafinance
(see
--help
)
TDX / THS
tdx
,
ths
(see
--help
)
Barchart (options)
barchart
quote
,
options
,
flow
,
greeks
Reddit
reddit
hot
,
popular
,
frontpage
,
search
,
subreddit
,
read
,
user
,
user-posts
,
user-comments
,
saved
HackerNews
hackernews
top
,
best
,
new
,
ask
,
show
,
jobs
,
user
,
search
Substack
substack
feed
,
publication
,
search
Medium
medium
(see
--help
)
arXiv
arxiv
(see
--help
)
Google Scholar
google-scholar
(see
--help
)
Weibo
weibo
(see
--help
)
Bilibili
bilibili
hot
,
video
+ more
Xiaohongshu (小红书)
xiaohongshu
(see
--help
)
Zhihu
zhihu
(see
--help
)
36kr
36kr
(see
--help
)
Jike
jike
(see
--help
)
Bluesky
bluesky
(see
--help
)
Apple Podcasts
apple-podcasts
(see
--help
)
Xiaoyuzhou (podcasts)
xiaoyuzhou
(see
--help
)
Spotify
spotify
(see
--help
)
YouTube
youtube
(see
--help
)
Weixin Official Account
weixin
(see
--help
drafts
is read;
create-draft
is write)
Toutiao
toutiao
articles
Government policy / law
gov-policy
,
gov-law
(see
--help
)
Web download / reader
web
read
,
download
For anything not listed, run
opencli list -f json
and filter.

以下表格为精选列表,并非全部——始终通过
opencli <site> --help
确认。
平台站点标识常用命令
Yahoo Finance
yahoo-finance
quote
Bloomberg
bloomberg
markets
,
economics
,
industries
,
tech
,
politics
,
opinions
,
news
,
businessweek
,
feeds
,
main
Reuters
reuters
search
东方财富(Eastmoney)
eastmoney
quote
,
rank
,
kline
,
sectors
,
etf
,
holders
,
money-flow
,
northbound
,
longhu
,
kuaixun
,
convertible
,
index-board
,
announcement
,
hot-rank
雪球(Xueqiu)
xueqiu
stock
,
hot-stock
,
hot
,
feed
,
comments
,
watchlist
,
search
,
groups
,
fund-snapshot
,
fund-holdings
,
earnings-date
,
kline
新浪财经
sinafinance
详见
--help
TDX / 同花顺
tdx
,
ths
详见
--help
Barchart(期权)
barchart
quote
,
options
,
flow
,
greeks
Reddit
reddit
hot
,
popular
,
frontpage
,
search
,
subreddit
,
read
,
user
,
user-posts
,
user-comments
,
saved
HackerNews
hackernews
top
,
best
,
new
,
ask
,
show
,
jobs
,
user
,
search
Substack
substack
feed
,
publication
,
search
Medium
medium
详见
--help
arXiv
arxiv
详见
--help
Google Scholar
google-scholar
详见
--help
微博
weibo
详见
--help
哔哩哔哩
bilibili
hot
,
video
及更多
小红书(Xiaohongshu)
xiaohongshu
详见
--help
知乎
zhihu
详见
--help
36氪
36kr
详见
--help
即刻
jike
详见
--help
Bluesky
bluesky
详见
--help
Apple Podcasts
apple-podcasts
详见
--help
小宇宙(播客)
xiaoyuzhou
详见
--help
Spotify
spotify
详见
--help
YouTube
youtube
详见
--help
微信公众号
weixin
详见
--help
——
drafts
为只读;
create-draft
为写入
头条
toutiao
articles
政府政策/法规
gov-policy
,
gov-law
详见
--help
网页下载/阅读器
web
read
,
download
对于未列出的平台,请运行
opencli list -f json
并筛选。

Step 4: Check the Adapter's Strategy Before Running

步骤4:运行前检查适配器策略

Run
opencli list -f json
(or
opencli <site> <command> --help
) and read the
strategy
field:
StrategyWhat it meansPreconditions
PUBLIC
Pure HTTP; no browser neededNone
LOCAL
Talks to a local endpointLocal service running
COOKIE
/
HEADER
Reuses your Chrome login for the siteChrome logged into the site + Browser Bridge extension loaded
INTERCEPT
Opens an automation window to capture a signed requestSame as COOKIE; be patient — may take several seconds
UI
Full DOM interactionSame as COOKIE; slowest; results depend on the site's current layout
If the user doesn't have a login and the adapter's strategy is not
PUBLIC
/
LOCAL
, tell them they need to log into the site in Chrome before retrying.

运行
opencli list -f json
(或
opencli <site> <command> --help
)并查看
strategy
字段:
策略含义前置条件
PUBLIC
纯HTTP请求;无需浏览器
LOCAL
连接本地端点本地服务已运行
COOKIE
/
HEADER
复用Chrome中目标站点的登录状态Chrome已登录目标站点且已加载Browser Bridge扩展
INTERCEPT
打开自动化窗口捕获签名请求与COOKIE要求相同;请耐心等待——可能需要数秒
UI
完整DOM交互与COOKIE要求相同;速度最慢;结果取决于站点当前布局
如果用户未登录且适配器策略不是
PUBLIC
/
LOCAL
,请告知用户需要先在Chrome中登录目标站点后重试。

Step 5: Execute the Command

步骤5:执行命令

General pattern

通用格式

bash
opencli <site> <command> [positional-args] [flags] -f json
bash
opencli <site> <command> [positional-args] [flags] -f json

Universal flags

通用参数

FlagEffect
-f json
Structured JSON — always prefer this for agent processing
-f yaml
/
-f csv
/
-f md
/
-f table
/
-f plain
Other formats
-v
Verbose logging (also sets
OPENCLI_VERBOSE=1
)
--live
Keep the automation window open after the command (browser-backed adapters only)
--focus
Open the automation window in the foreground (browser-backed adapters only)
Command-specific flags (
--limit
,
--filter
,
--type
, etc.) are not universal — always check
opencli <site> <command> --help
.
参数作用
-f json
结构化JSON格式——始终优先用于Agent处理
-f yaml
/
-f csv
/
-f md
/
-f table
/
-f plain
其他格式
-v
详细日志(同时设置
OPENCLI_VERBOSE=1
--live
命令执行后保持自动化窗口打开(仅适用于浏览器驱动的适配器)
--focus
将自动化窗口置于前台打开(仅适用于浏览器驱动的适配器)
命令专属参数(
--limit
--filter
--type
等)不通用——始终通过
opencli <site> <command> --help
确认。

Examples

示例

bash
undefined
bash
undefined

Yahoo Finance quote (PUBLIC)

Yahoo Finance行情查询(PUBLIC)

opencli yahoo-finance quote AAPL -f json
opencli yahoo-finance quote AAPL -f json

Reddit hot posts in a subreddit (COOKIE or PUBLIC depending on subreddit)

Reddit子版块热门帖子(根据子版块不同,可能为COOKIE或PUBLIC)

opencli reddit subreddit wallstreetbets --limit 20 -f json opencli reddit search "SPY options" --limit 15 -f json
opencli reddit subreddit wallstreetbets --limit 20 -f json opencli reddit search "SPY options" --limit 15 -f json

HackerNews top (PUBLIC)

HackerNews热门内容(PUBLIC)

opencli hackernews top --limit 20 -f json
opencli hackernews top --limit 20 -f json

Eastmoney hot rank (PUBLIC)

东方财富热门排行(PUBLIC)

opencli eastmoney hot-rank -f json
opencli eastmoney hot-rank -f json

Xueqiu hot stocks (PUBLIC or COOKIE)

雪球热门股票(PUBLIC或COOKIE)

opencli xueqiu hot-stock -f json opencli xueqiu stock SH600519 -f json
opencli xueqiu hot-stock -f json opencli xueqiu stock SH600519 -f json

Bloomberg markets headlines (COOKIE)

Bloomberg市场头条(COOKIE)

opencli bloomberg markets -f json
opencli bloomberg markets -f json

arXiv paper search (PUBLIC)

arXiv论文搜索(PUBLIC)

opencli arxiv search "volatility surface" --limit 10 -f json
opencli arxiv search "volatility surface" --limit 10 -f json

Substack feed

Substack订阅源

opencli substack feed --limit 20 -f json
opencli substack feed --limit 20 -f json

Web page → readable markdown (PUBLIC)

网页转可读Markdown(PUBLIC)

opencli web read "https://example.com/article" -f json
undefined
opencli web read "https://example.com/article" -f json
undefined

Key rules

核心规则

  1. Always use
    opencli <site> <command> --help
    before constructing a command you haven't run this session — don't assume flag names.
  2. Use
    -f json
    for programmatic processing.
  3. Start with a small
    --limit
    (10–20) to validate the shape before pulling more.
  4. Check
    strategy
    before running a browser-backed adapter
    — if the user isn't logged in, a
    COOKIE
    /
    UI
    adapter will fail.
  5. NEVER execute write operations. Common write command names to avoid across adapters:
    post
    ,
    reply
    ,
    comment
    ,
    like
    ,
    unlike
    ,
    upvote
    ,
    save
    ,
    subscribe
    ,
    unsubscribe
    ,
    follow
    ,
    unfollow
    ,
    block
    ,
    unblock
    ,
    delete
    ,
    bookmark
    ,
    unbookmark
    ,
    send
    ,
    create-draft
    ,
    reply-dm
    ,
    accept
    . If you're unsure whether a command is read or write, check the
    description
    in
    opencli list -f json
    ; if it suggests a mutation, skip it.

  1. 执行未运行过的命令前,务必使用
    opencli <site> <command> --help
    ——不要假设参数名称。
  2. 使用
    -f json
    格式
    用于程序化处理。
  3. 初始使用较小的
    --limit
    (10–20),在获取更多数据前验证输出格式。
  4. 运行浏览器驱动的适配器前检查
    strategy
    ——如果用户未登录,
    COOKIE
    /
    UI
    适配器将执行失败。
  5. 绝不执行写入操作。各适配器中需避免的常见写入命令名称包括:
    post
    reply
    comment
    like
    unlike
    upvote
    save
    subscribe
    unsubscribe
    follow
    unfollow
    block
    unblock
    delete
    bookmark
    unbookmark
    send
    create-draft
    reply-dm
    accept
    。如果不确定命令是只读还是写入,请查看
    opencli list -f json
    中的
    description
    字段;如果描述涉及修改操作,请跳过该命令。

Step 6: Handle Failures

步骤6:处理执行失败

If a command returns empty or errors out, the site may have changed its selectors / API. opencli has a built-in self-repair loop:
bash
undefined
如果命令返回空结果或报错,可能是目标站点修改了选择器/API。opencli内置了自修复循环:
bash
undefined

Re-run with diagnostic context

带诊断信息重新运行

OPENCLI_DIAGNOSTIC=1 opencli <site> <command> <args>

This emits a structured `RepairContext` that identifies the failing adapter's source path. Possible responses:

1. If the user has the `opencli-autofix` skill installed, tell them to run that skill.
2. If not, suggest they file an issue at https://github.com/jackwener/opencli/issues with the `RepairContext` output.
3. Don't silently fall back to hand-rolled scraping — that hides the bug from the upstream registry.

Rate limits on the target site can also cause empty results; wait and retry.

---
OPENCLI_DIAGNOSTIC=1 opencli <site> <command> <args>

这会输出结构化的`RepairContext`,标识失败适配器的源路径。可采取以下应对措施:

1. 如果用户已安装`opencli-autofix`技能,告知用户运行该技能。
2. 如果未安装,建议用户将`RepairContext`输出内容提交到https://github.com/jackwener/opencli/issues创建问题。
3. 不要静默回退到手动编写的爬虫——这会隐藏上游注册表的bug。

目标站点的速率限制也可能导致空结果;请等待后重试。

---

Step 7: Present the Results

步骤7:展示结果

  1. Summarize the data for the user's actual question, don't just dump the raw JSON.
  2. Include source attribution — site name + URL for each item where available.
  3. For market data, surface price / % change / volume / market cap and flag anomalies.
  4. For news/posts, highlight headlines, timestamps, and key quotes.
  5. For research (arXiv, Scholar), include title, authors, abstract, and link.
  6. Treat browser sessions as private — never echo CDP endpoints, cookies, or auth tokens.

  1. 针对用户实际问题总结数据,不要直接输出原始JSON。
  2. 包含来源归属——每个条目需标注站点名称及可用的URL。
  3. 对于市场数据,突出显示价格/涨跌幅/成交量/市值,并标记异常值。
  4. 对于新闻/帖子,突出标题、时间戳和关键引用内容。
  5. 对于研究内容(arXiv、Scholar),包含标题、作者、摘要和链接。
  6. 将浏览器会话视为隐私内容——绝不输出CDP端点、Cookie或认证令牌。

Reference Files

参考文档

  • references/discovery.md
    — How to navigate
    opencli list
    ,
    opencli <site> --help
    , and the JSON schema of registry entries
  • references/finance-sources.md
    — Detailed notes on the finance-heavy adapters (Yahoo Finance, Bloomberg, Eastmoney, Xueqiu, Barchart, Reuters, Reddit, HackerNews) and which commands are read vs write
Read these reference files when you need concrete examples for a specific site, or when the user asks for a capability not covered by one of the dedicated readers.
  • references/discovery.md
    — 如何使用
    opencli list
    opencli <site> --help
    以及注册表条目的JSON schema
  • references/finance-sources.md
    — 金融类适配器(Yahoo Finance、Bloomberg、东方财富、雪球、Barchart、Reuters、Reddit、HackerNews)的详细说明,以及哪些命令为只读/写入
当需要特定站点的具体示例,或用户请求的功能未被专用阅读器覆盖时,请查阅这些参考文档。