opencli-reader
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseopencli 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 (, , , , ) are always preferred when the request matches one of them.
twitter-readerlinkedin-readerdiscord-readertelegram-readeryc-readerThis 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-readerlinkedin-readerdiscord-readertelegram-readeryc-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 | |
| |
| Discord | |
| Telegram | |
| Y Combinator | |
| 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 | |
| |
| Discord | |
| Telegram | |
| Y Combinator | |
| 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_INSTALLEDbash
npm install -g @jackwener/opencliIf , guide the user through Browser Bridge setup (only required for adapters whose strategy is , , , or — and adapters work without a browser):
SETUP_NEEDEDCOOKIEHEADERINTERCEPTUIPUBLICLOCAL- Download the latest from the GitHub Releases page
opencli-extension-v{version}.zip - Unzip it, open in Chrome, enable Developer mode
chrome://extensions - Click Load unpacked and select the unzipped folder
- 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_INSTALLEDbash
npm install -g @jackwener/opencli如果显示,引导用户完成浏览器桥接设置(仅适用于策略为、、或的适配器——和适配器无需浏览器即可工作):
SETUP_NEEDEDCOOKIEHEADERINTERCEPTUIPUBLICLOCAL- 从GitHub发布页面下载最新的压缩包
opencli-extension-v{version}.zip - 解压压缩包,在Chrome中打开,启用开发者模式
chrome://extensions - 点击加载已解压的扩展程序,选择解压后的文件夹
- 确保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
undefinedFull 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| Source | Site slug | Common commands |
|---|---|---|
| Yahoo Finance | | |
| Bloomberg | | |
| Reuters | | |
| Eastmoney (东方财富) | | |
| Xueqiu (雪球) | | |
| Sinafinance | | (see |
| TDX / THS | | (see |
| Barchart (options) | | |
| | |
| HackerNews | | |
| Substack | | |
| Medium | | (see |
| arXiv | | (see |
| Google Scholar | | (see |
| (see | |
| Bilibili | | |
| Xiaohongshu (小红书) | | (see |
| Zhihu | | (see |
| 36kr | | (see |
| Jike | | (see |
| Bluesky | | (see |
| Apple Podcasts | | (see |
| Xiaoyuzhou (podcasts) | | (see |
| Spotify | | (see |
| YouTube | | (see |
| Weixin Official Account | | (see |
| Toutiao | | |
| Government policy / law | | (see |
| Web download / reader | | |
For anything not listed, run and filter.
opencli list -f json以下表格为精选列表,并非全部——始终通过确认。
opencli <site> --help| 平台 | 站点标识 | 常用命令 |
|---|---|---|
| Yahoo Finance | | |
| Bloomberg | | |
| Reuters | | |
| 东方财富(Eastmoney) | | |
| 雪球(Xueqiu) | | |
| 新浪财经 | | 详见 |
| TDX / 同花顺 | | 详见 |
| Barchart(期权) | | |
| | |
| HackerNews | | |
| Substack | | |
| Medium | | 详见 |
| arXiv | | 详见 |
| Google Scholar | | 详见 |
| 微博 | | 详见 |
| 哔哩哔哩 | | |
| 小红书(Xiaohongshu) | | 详见 |
| 知乎 | | 详见 |
| 36氪 | | 详见 |
| 即刻 | | 详见 |
| Bluesky | | 详见 |
| Apple Podcasts | | 详见 |
| 小宇宙(播客) | | 详见 |
| Spotify | | 详见 |
| YouTube | | 详见 |
| 微信公众号 | | 详见 |
| 头条 | | |
| 政府政策/法规 | | 详见 |
| 网页下载/阅读器 | | |
对于未列出的平台,请运行并筛选。
opencli list -f jsonStep 4: Check the Adapter's Strategy Before Running
步骤4:运行前检查适配器策略
Run (or ) and read the field:
opencli list -f jsonopencli <site> <command> --helpstrategy| Strategy | What it means | Preconditions |
|---|---|---|
| Pure HTTP; no browser needed | None |
| Talks to a local endpoint | Local service running |
| Reuses your Chrome login for the site | Chrome logged into the site + Browser Bridge extension loaded |
| Opens an automation window to capture a signed request | Same as COOKIE; be patient — may take several seconds |
| Full DOM interaction | Same 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 / , tell them they need to log into the site in Chrome before retrying.
PUBLICLOCAL运行(或)并查看字段:
opencli list -f jsonopencli <site> <command> --helpstrategy| 策略 | 含义 | 前置条件 |
|---|---|---|
| 纯HTTP请求;无需浏览器 | 无 |
| 连接本地端点 | 本地服务已运行 |
| 复用Chrome中目标站点的登录状态 | Chrome已登录目标站点且已加载Browser Bridge扩展 |
| 打开自动化窗口捕获签名请求 | 与COOKIE要求相同;请耐心等待——可能需要数秒 |
| 完整DOM交互 | 与COOKIE要求相同;速度最慢;结果取决于站点当前布局 |
如果用户未登录且适配器策略不是/,请告知用户需要先在Chrome中登录目标站点后重试。
PUBLICLOCALStep 5: Execute the Command
步骤5:执行命令
General pattern
通用格式
bash
opencli <site> <command> [positional-args] [flags] -f jsonbash
opencli <site> <command> [positional-args] [flags] -f jsonUniversal flags
通用参数
| Flag | Effect |
|---|---|
| Structured JSON — always prefer this for agent processing |
| Other formats |
| Verbose logging (also sets |
| Keep the automation window open after the command (browser-backed adapters only) |
| Open the automation window in the foreground (browser-backed adapters only) |
Command-specific flags (, , , etc.) are not universal — always check .
--limit--filter--typeopencli <site> <command> --help| 参数 | 作用 |
|---|---|
| 结构化JSON格式——始终优先用于Agent处理 |
| 其他格式 |
| 详细日志(同时设置 |
| 命令执行后保持自动化窗口打开(仅适用于浏览器驱动的适配器) |
| 将自动化窗口置于前台打开(仅适用于浏览器驱动的适配器) |
命令专属参数(、、等)不通用——始终通过确认。
--limit--filter--typeopencli <site> <command> --helpExamples
示例
bash
undefinedbash
undefinedYahoo 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
undefinedopencli web read "https://example.com/article" -f json
undefinedKey rules
核心规则
- Always use before constructing a command you haven't run this session — don't assume flag names.
opencli <site> <command> --help - Use for programmatic processing.
-f json - Start with a small (10–20) to validate the shape before pulling more.
--limit - Check before running a browser-backed adapter — if the user isn't logged in, a
strategy/COOKIEadapter will fail.UI - 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. If you're unsure whether a command is read or write, check theacceptindescription; if it suggests a mutation, skip it.opencli list -f json
- 执行未运行过的命令前,务必使用——不要假设参数名称。
opencli <site> <command> --help - 使用格式用于程序化处理。
-f json - 初始使用较小的值(10–20),在获取更多数据前验证输出格式。
--limit - 运行浏览器驱动的适配器前检查——如果用户未登录,
strategy/COOKIE适配器将执行失败。UI - 绝不执行写入操作。各适配器中需避免的常见写入命令名称包括:、
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
undefinedRe-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:展示结果
- Summarize the data for the user's actual question, don't just dump the raw JSON.
- Include source attribution — site name + URL for each item where available.
- For market data, surface price / % change / volume / market cap and flag anomalies.
- For news/posts, highlight headlines, timestamps, and key quotes.
- For research (arXiv, Scholar), include title, authors, abstract, and link.
- Treat browser sessions as private — never echo CDP endpoints, cookies, or auth tokens.
- 针对用户实际问题总结数据,不要直接输出原始JSON。
- 包含来源归属——每个条目需标注站点名称及可用的URL。
- 对于市场数据,突出显示价格/涨跌幅/成交量/市值,并标记异常值。
- 对于新闻/帖子,突出标题、时间戳和关键引用内容。
- 对于研究内容(arXiv、Scholar),包含标题、作者、摘要和链接。
- 将浏览器会话视为隐私内容——绝不输出CDP端点、Cookie或认证令牌。
Reference Files
参考文档
- — How to navigate
references/discovery.md,opencli list, and the JSON schema of registry entriesopencli <site> --help - — Detailed notes on the finance-heavy adapters (Yahoo Finance, Bloomberg, Eastmoney, Xueqiu, Barchart, Reuters, Reddit, HackerNews) and which commands are read vs write
references/finance-sources.md
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以及注册表条目的JSON schemaopencli <site> --help - — 金融类适配器(Yahoo Finance、Bloomberg、东方财富、雪球、Barchart、Reuters、Reddit、HackerNews)的详细说明,以及哪些命令为只读/写入
references/finance-sources.md
当需要特定站点的具体示例,或用户请求的功能未被专用阅读器覆盖时,请查阅这些参考文档。