opencli
通用 CLI 框架——79+ 适配器把网站/App 转为 CLI。Use when 需要把新外部服务(GitHub/Notion/Slack/X 以外)包成 CLI、或查已有适配器能力。X/Twitter 场景改走 x-twitter skill。
- License 许可
- MIT
- 所属仓库
- KarryViber/Orb
- 最近更新
- 2026-05-14
- Stars
- ★ 66
- Forks
- 8
01 前言 Front Matter
- name
- opencli
- provenance
- user-authored
- description
- 通用 CLI 框架——79+ 适配器把网站/App 转为 CLI。Use when 需要把新外部服务(GitHub/Notion/Slack/X 以外)包成 CLI、或查已有适配器能力。X/Twitter 场景改走 x-twitter skill。
03 SKILL.md 正文
opencli
When to Use
需要通过 CLI 读取/操作网站数据时(非 X 写入场景)。
安装状态
- 版本: v1.7.3 (
npm install -g @jackwener/opencli) - Daemon: port 19825
- 路径: /opt/homebrew/bin/opencli
常用命令
opencli list # 所有可用命令
opencli twitter timeline # X 时间线
opencli twitter tweet <id> # 读推文
opencli twitter search "query" # 搜索
opencli twitter post "内容" # 发帖
opencli hackernews top --limit 5 # HN 热榜
适配器分类
| 类型 | 示例 | 需要 Extension |
|---|---|---|
| 纯 API | HackerNews, GitHub | ❌ |
| 浏览器 | Bilibili, 小红书, Spotify | ✅ Chrome Bridge |
| Electron | Cursor, Notion, Discord | ✅ CDP |
Daemon API 直调
无预置 adapter 时,通过 HTTP API 让 Extension 在真实 Chrome 执行 JS:
import requests
# 导航
r = requests.post("http://localhost:19825/command",
headers={"X-OpenCLI": "1", "Content-Type": "application/json"},
json={"id": "nav1", "action": "navigate", "url": url, "waitMs": 5000})
# 执行 JS
r = requests.post("http://localhost:19825/command",
headers={"X-OpenCLI": "1", "Content-Type": "application/json"},
json={"id": "exec1", "action": "exec", "tabId": tab_id, "code": js_code})
约束
- X/Twitter 写入统一走脚本层 (
~/Orb/profiles/<your-profile>/scripts/x-*.sh),不直接调 opencli - 浏览器适配器在 cron/服务端不适用
04 同仓库更多 Skills
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
vendor-doc-actionability
对外合作文档(交付文档 / POC 文档 / Solution Doc / 提案书)必须为每个「需对方执行」的动作写清具体操作入口(URL / 工单系统 / 脚本路径 / 联系人 + 联系方式 / 步骤编号)。Use when 给客户、vendor、合作方写交付文档、POC 文档、Solution Doc、提案书;或检视已有对外文档是否抽象到无法执行。
vendor-api-param-validation
第三方 API / SDK 集成开工前,强制先列参数 checklist 并对照官方文档逐项验证(名称 / 类型 / 必填 / 默认 / 上限),通过后再编码——不是「写完再调通」。Use when 新接 vendor API/SDK(Slack / LongPort / freee / LLM API 等)、既有集成追加新 endpoint 或新字段、用户说「调通某接口」「接入 X」「集成 X」。
truth-ladder
状态放行三层阶梯(attempted / observed / confirmed)—— 汇报任务、API、命令、消息或外部动作状态时强制分层,避免把"动作已发起"误写成"结果已达成"。Use when 准备写「任务已完成」「API 返回成功」「exit code 0」「用户已收到」「ok:true」类状态汇报;或在 cron 报告 / Slack 回报 / project status / receipt 中表达完成度时。
thread-object-realignment
长 thread 切题后的对象重定协议——thread 历史 ≥5 条且检测到切题信号时,回复前必做「用户最后显式问题对象 vs 待发回复对象」一致性校验,不一致则改写或反问。Use when Slack thread 历史 ≥5 条且当前用户消息出现切题信号(主题词突变、问句指向新实体、时间线跳跃、出现「另外」「话说」「回到 X」「换个话题」等切题语,或 ≥3 turn 后用户显式问题对象与最近 assistant 回复对象不同)。
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.