qiaomu-opencli-usage

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenCLI Usage Guide

OpenCLI 使用指南

Make any website or Electron App your CLI. Reuse Chrome login, zero risk, AI-powered discovery.
让任何网站或Electron App都成为你的CLI。复用Chrome登录凭证,零风险,AI驱动的接口发现能力。

Install & Run

安装与运行

bash
undefined
bash
undefined

npm global install (recommended)

npm 全局安装(推荐)

npm install -g @jackwener/opencli opencli <command>
npm install -g @jackwener/opencli opencli <command>

Or from source

或者从源码运行

cd ~/code/opencli && npm install npx tsx src/main.ts <command>
cd ~/code/opencli && npm install npx tsx src/main.ts <command>

Update to latest

更新到最新版本

npm update -g @jackwener/opencli
undefined
npm update -g @jackwener/opencli
undefined

Prerequisites

前提条件

Browser commands require:
  1. Chrome browser running (logged into target sites)
  2. opencli Browser Bridge Chrome extension installed (load
    extension/
    as unpacked in
    chrome://extensions
    )
  3. No further setup needed — the daemon auto-starts on first browser command
Note: You must be logged into the target website in Chrome before running commands. Tabs opened during command execution are auto-closed afterwards.
Public API commands (
hackernews
,
v2ex
) need no browser.
浏览器相关命令需要满足:
  1. Chrome浏览器正在运行 (已登录目标站点)
  2. 已安装 opencli Browser Bridge Chrome扩展(在
    chrome://extensions
    页面加载
    extension/
    目录作为已解压的扩展程序)
  3. 无需额外设置 —— 首次运行浏览器命令时守护进程会自动启动
注意:运行命令前你必须已经在Chrome中登录目标网站。命令执行过程中打开的标签页会在执行结束后自动关闭。
公开API命令(
hackernews
v2ex
)不需要浏览器。

Quick Lookup by Capability

按功能快速查询

CapabilityPlatforms (partial list)
searchBilibili, Twitter, Reddit, Xiaohongshu, Zhihu, YouTube, Google, arXiv, LinkedIn, Pixiv, etc.
hot/trendingBilibili, Twitter, Weibo, HackerNews, Reddit, V2EX, Xueqiu, Lobsters, Douban
feed/timelineTwitter, Reddit, Xiaohongshu, Xueqiu, Jike, Facebook, Instagram, Medium
user/profileTwitter, Reddit, Instagram, TikTok, Facebook, Bilibili, Pixiv
post/createTwitter, Jike, Douyin, Weibo
AI chatGrok, Doubao, ChatGPT, Gemini, Cursor, Codex, NotebookLM
finance/stockXueqiu, Yahoo Finance, Barchart, Sina Finance, Bloomberg
web scraping
opencli web read --url <url>
— any URL to Markdown
GitHub/DevOps
opencli gh
,
opencli docker
,
opencli vercel
— external CLI passthrough
collaboration
opencli lark-cli
,
opencli dws
,
opencli wecom-cli
— external CLI passthrough
功能支持平台(部分列表)
搜索Bilibili、Twitter、Reddit、小红书、知乎、YouTube、Google、arXiv、LinkedIn、Pixiv等
热门/趋势Bilibili、Twitter、微博、HackerNews、Reddit、V2EX、雪球、Lobsters、豆瓣
动态/时间线Twitter、Reddit、小红书、雪球、即刻、Facebook、Instagram、Medium
用户/资料Twitter、Reddit、Instagram、TikTok、Facebook、Bilibili、Pixiv
发帖/创建Twitter、即刻、抖音、微博
AI聊天Grok、豆包、ChatGPT、Gemini、Cursor、Codex、NotebookLM
金融/股票雪球、Yahoo Finance、Barchart、新浪财经、彭博
网页抓取
opencli web read --url <url>
— 任意URL转Markdown
GitHub/DevOps
opencli gh
opencli docker
opencli vercel
— 外部CLI透传
协作
opencli lark-cli
opencli dws
opencli wecom-cli
— 外部CLI透传

Command Quick Reference

命令快速参考

Usage:
opencli <site> <command> [args] [--limit N] [-f json|yaml|md|csv|table]
Type legend: 🌐 = Browser (needs Chrome login) · ✅ = Public API (no browser) · 🖥️ = Desktop (Electron/CDP) · 🔧 = External CLI (passthrough)
用法:
opencli <site> <command> [args] [--limit N] [-f json|yaml|md|csv|table]
类型说明:🌐 = 浏览器(需要Chrome登录)· ✅ = 公开API(无需浏览器)· 🖥️ = 桌面端(Electron/CDP)· 🔧 = 外部CLI(透传调用)

Website Adapters

网站适配器

SiteTypeCommands
1688🌐
search
item
download
store
36kr🌐
hot
news
search
article
amazon🌐
bestsellers
search
product
offer
discussion
movers-shakers
new-releases
apple-podcasts
top
search
episodes
arxiv
search
paper
band🌐
bands
posts
post
mentions
barchart🌐
quote
options
greeks
flow
bbc
news
bilibili🌐
hot
search
me
favorite
history
feed
user-videos
subtitle
dynamic
ranking
following
bloomberg✅🌐RSS:
main
markets
tech
politics
economics
opinions
industries
businessweek
feeds
· Browser:
news
(full article)
bluesky🌐
search
profile
user
feeds
followers
following
thread
trending
starter-packs
boss🌐
search
detail
recommend
joblist
greet
batchgreet
send
chatlist
chatmsg
invite
mark
exchange
resume
stats
chaoxing🌐
assignments
exams
coupang🌐
search
add-to-cart
ctrip🌐
search
devto
top
tag
user
dictionary
search
synonyms
examples
doubao🌐
status
new
send
read
ask
detail
history
meeting-summary
meeting-transcript
douban🌐
search
top250
subject
photos
download
marks
reviews
movie-hot
book-hot
douyin🌐
profile
videos
user-videos
activities
collections
hashtag
location
stats
publish
draft
drafts
delete
update
facebook🌐
feed
profile
search
friends
groups
events
notifications
memories
add-friend
join-group
gemini🌐
ask
new
image
deep-research
deep-research-result
google
news
search
suggest
trends
grok🌐
ask
hackernews
top
new
best
ask
show
jobs
search
user
hf
top
hupu🌐
hot
search
detail
like
unlike
reply
mentions
imdb
top
trending
search
title
person
reviews
instagram🌐
explore
profile
search
user
followers
following
follow
unfollow
like
unlike
comment
save
unsave
saved
jd🌐
item
jianyu🌐
search
jike🌐
feed
search
create
like
comment
repost
notifications
post
topic
user
jimeng🌐
generate
history
lesswrong
frontpage
curated
new
top
top-week
top-month
top-year
shortform
read
comments
user
user-posts
sequences
tags
tag
linkedin🌐
search
timeline
linux-do🌐
hot
latest
feed
search
categories
category
tags
topic
topic-content
user-posts
user-topics
lobsters
hot
newest
active
tag
medium🌐
feed
search
user
notebooklm🌐
status
list
open
current
get
history
summary
note-list
notes-get
source-list
source-get
source-fulltext
source-guide
ones🌐
login
logout
me
tasks
task
my-tasks
worklog
token-info
paperreview
submit
review
feedback
pixiv🌐
ranking
search
user
illusts
detail
download
producthunt
today
hot
browse
posts
quark🌐
ls
mkdir
mv
rename
rm
save
share-tree
reddit🌐
hot
frontpage
popular
search
subreddit
read
user
user-posts
user-comments
upvote
save
comment
subscribe
saved
upvoted
reuters🌐
search
sinablog🌐
hot
search
article
user
sinafinance
news
smzdm🌐
search
spotify
auth
status
play
pause
next
prev
volume
search
queue
shuffle
repeat
stackoverflow
hot
search
bounties
unanswered
steam
top-sellers
substack🌐
feed
search
publication
tieba🌐
hot
search
posts
read
tiktok🌐
explore
search
profile
user
following
follow
unfollow
like
unlike
comment
save
unsave
live
notifications
friends
twitter🌐
trending
bookmarks
search
profile
timeline
thread
article
follow
unfollow
bookmark
unbookmark
post
like
likes
reply
delete
block
unblock
followers
following
notifications
hide-reply
download
accept
reply-dm
v2ex✅🌐Public:
hot
latest
topic
node
nodes
member
user
replies
· Browser:
daily
me
notifications
web🌐
read
— any URL to Markdown
weibo🌐
hot
search
feed
user
me
post
comments
weixin🌐
download
— 公众号 article to Markdown
weread🌐
shelf
search
book
highlights
notes
notebooks
ranking
wikipedia
search
summary
random
trending
xianyu🌐
search
item
chat
xiaoe🌐
courses
catalog
content
detail
play-url
xiaohongshu🌐
search
notifications
feed
user
note
comments
download
publish
creator-notes
creator-note-detail
creator-notes-summary
creator-profile
creator-stats
xiaoyuzhou
podcast
podcast-episodes
episode
xueqiu🌐
hot-stock
stock
watchlist
feed
hot
search
comments
earnings-date
fund-holdings
fund-snapshot
yahoo-finance🌐
quote
yollomi🌐
models
generate
video
upload
remove-bg
edit
background
face-swap
object-remover
restore
try-on
upscale
youtube🌐
search
video
transcript
yuanbao🌐
new
ask
zhihu🌐
hot
search
question
zsxq🌐
groups
dynamics
topics
topic
search
站点类型支持命令
1688🌐
search
item
download
store
36kr🌐
hot
news
search
article
亚马逊🌐
bestsellers
search
product
offer
discussion
movers-shakers
new-releases
apple-podcasts
top
search
episodes
arxiv
search
paper
band🌐
bands
posts
post
mentions
barchart🌐
quote
options
greeks
flow
BBC
news
bilibili🌐
hot
search
me
favorite
history
feed
user-videos
subtitle
dynamic
ranking
following
彭博✅🌐RSS:
main
markets
tech
politics
economics
opinions
industries
businessweek
feeds
· 浏览器:
news
(全文)
bluesky🌐
search
profile
user
feeds
followers
following
thread
trending
starter-packs
BOSS直聘🌐
search
detail
recommend
joblist
greet
batchgreet
send
chatlist
chatmsg
invite
mark
exchange
resume
stats
超星🌐
assignments
exams
coupang🌐
search
add-to-cart
携程🌐
search
devto
top
tag
user
词典
search
synonyms
examples
豆包🌐
status
new
send
read
ask
detail
history
meeting-summary
meeting-transcript
豆瓣🌐
search
top250
subject
photos
download
marks
reviews
movie-hot
book-hot
抖音🌐
profile
videos
user-videos
activities
collections
hashtag
location
stats
publish
draft
drafts
delete
update
Facebook🌐
feed
profile
search
friends
groups
events
notifications
memories
add-friend
join-group
gemini🌐
ask
new
image
deep-research
deep-research-result
Google
news
search
suggest
trends
grok🌐
ask
hackernews
top
new
best
ask
show
jobs
search
user
hf
top
虎扑🌐
hot
search
detail
like
unlike
reply
mentions
imdb
top
trending
search
title
person
reviews
instagram🌐
explore
profile
search
user
followers
following
follow
unfollow
like
unlike
comment
save
unsave
saved
京东🌐
item
闲鱼🌐
search
即刻🌐
feed
search
create
like
comment
repost
notifications
post
topic
user
即梦🌐
generate
history
lesswrong
frontpage
curated
new
top
top-week
top-month
top-year
shortform
read
comments
user
user-posts
sequences
tags
tag
LinkedIn🌐
search
timeline
linux-do🌐
hot
latest
feed
search
categories
category
tags
topic
topic-content
user-posts
user-topics
lobsters
hot
newest
active
tag
medium🌐
feed
search
user
notebooklm🌐
status
list
open
current
get
history
summary
note-list
notes-get
source-list
source-get
source-fulltext
source-guide
ones🌐
login
logout
me
tasks
task
my-tasks
worklog
token-info
paperreview
submit
review
feedback
pixiv🌐
ranking
search
user
illusts
detail
download
producthunt
today
hot
browse
posts
夸克🌐
ls
mkdir
mv
rename
rm
save
share-tree
reddit🌐
hot
frontpage
popular
search
subreddit
read
user
user-posts
user-comments
upvote
save
comment
subscribe
saved
upvoted
路透社🌐
search
新浪博客🌐
hot
search
article
user
新浪财经
news
什么值得买🌐
search
spotify
auth
status
play
pause
next
prev
volume
search
queue
shuffle
repeat
stackoverflow
hot
search
bounties
unanswered
steam
top-sellers
substack🌐
feed
search
publication
贴吧🌐
hot
search
posts
read
tiktok🌐
explore
search
profile
user
following
follow
unfollow
like
unlike
comment
save
unsave
live
notifications
friends
Twitter🌐
trending
bookmarks
search
profile
timeline
thread
article
follow
unfollow
bookmark
unbookmark
post
like
likes
reply
delete
block
unblock
followers
following
notifications
hide-reply
download
accept
reply-dm
v2ex✅🌐公开:
hot
latest
topic
node
nodes
member
user
replies
· 浏览器:
daily
me
notifications
web🌐
read
— 任意URL转Markdown
微博🌐
hot
search
feed
user
me
post
comments
微信🌐
download
— 公众号文章转Markdown
微信读书🌐
shelf
search
book
highlights
notes
notebooks
ranking
维基百科
search
summary
random
trending
闲鱼🌐
search
item
chat
小鹅通🌐
courses
catalog
content
detail
play-url
小红书🌐
search
notifications
feed
user
note
comments
download
publish
creator-notes
creator-note-detail
creator-notes-summary
creator-profile
creator-stats
小宇宙
podcast
podcast-episodes
episode
雪球🌐
hot-stock
stock
watchlist
feed
hot
search
comments
earnings-date
fund-holdings
fund-snapshot
Yahoo Finance🌐
quote
yollomi🌐
models
generate
video
upload
remove-bg
edit
background
face-swap
object-remover
restore
try-on
upscale
youtube🌐
search
video
transcript
元宝🌐
new
ask
知乎🌐
hot
search
question
知识星球🌐
groups
dynamics
topics
topic
search

Desktop Apps (CDP/Electron)

桌面应用(CDP/Electron)

AppCommands
antigravity
status
send
read
new
dump
extract-code
model
watch
chatgpt
status
new
send
read
ask
model
chatwise
status
new
send
read
ask
model
history
export
screenshot
codex
status
send
read
new
dump
extract-diff
model
ask
screenshot
history
export
cursor
status
send
read
new
dump
composer
model
extract-code
ask
screenshot
history
export
discord-app
status
send
read
channels
servers
search
members
doubao-app
status
new
send
read
ask
screenshot
dump
notion
status
search
read
new
write
sidebar
favorites
export
应用支持命令
antigravity
status
send
read
new
dump
extract-code
model
watch
chatgpt
status
new
send
read
ask
model
chatwise
status
new
send
read
ask
model
history
export
screenshot
codex
status
send
read
new
dump
extract-diff
model
ask
screenshot
history
export
cursor
status
send
read
new
dump
composer
model
extract-code
ask
screenshot
history
export
discord-app
status
send
read
channels
servers
search
members
doubao-app
status
new
send
read
ask
screenshot
dump
notion
status
search
read
new
write
sidebar
favorites
export

External CLI (passthrough)

外部CLI(透传)

OpenCLI can discover, auto-install, and passthrough commands to external CLI tools. Use
opencli install <name>
to auto-install, or
opencli register <name>
to register a local CLI.
CLIDescriptionCommands
ghGitHub CLI — repos, PRs, issues, releases
repo
pr
issue
(all gh subcommands)
obsidianObsidian vault — notes, search, tagsAll obsidian subcommands
dockerDocker CLIAll docker subcommands
lark-cliLark/Feishu — messages, docs, calendar, tasks (200+ commands)All lark-cli subcommands
dwsDingTalk Workspace — messages, docs, calendar, contactsAll dws subcommands
wecom-cliWeCom/企业微信 — contacts, todos, meetings, messagesAll wecom-cli subcommands
vercelVercel — deploy, domains, env vars, logsAll vercel subcommands
bash
opencli install gh              # Auto-install gh CLI
opencli register my-tool        # Register a local custom CLI
opencli gh pr list --limit 5    # Passthrough to gh
opencli docker ps               # Passthrough to docker
opencli lark-cli msg send ...   # Passthrough to lark-cli
OpenCLI可以发现、自动安装并透传命令到外部CLI工具。使用
opencli install <name>
自动安装,或使用
opencli register <name>
注册本地CLI。
CLI描述支持命令
ghGitHub CLI — 仓库、PR、Issue、发布
repo
pr
issue
(所有gh子命令)
obsidianObsidian知识库 — 笔记、搜索、标签所有obsidian子命令
dockerDocker CLI所有docker子命令
lark-cli飞书 — 消息、文档、日历、任务(200+命令)所有lark-cli子命令
dws钉钉 workspace — 消息、文档、日历、联系人所有dws子命令
wecom-cli企业微信 — 联系人、待办、会议、消息所有wecom-cli子命令
vercelVercel — 部署、域名、环境变量、日志所有vercel子命令
bash
opencli install gh              # 自动安装gh CLI
opencli register my-tool        # 注册本地自定义CLI
opencli gh pr list --limit 5    # 透传调用gh
opencli docker ps               # 透传调用docker
opencli lark-cli msg send ...   # 透传调用lark-cli

Management

管理命令

bash
opencli list [-f json|yaml]     # List all commands
opencli validate [site]         # Validate adapter definitions
opencli doctor                  # Diagnose browser bridge
opencli explore <url>           # AI-powered API discovery
opencli record <url>            # Record API calls manually
All commands support:
--format
/
-f
with
table
json
yaml
md
csv
bash
opencli list [-f json|yaml]     # 列出所有命令
opencli validate [site]         # 校验适配器定义
opencli doctor                  # 诊断浏览器桥接状态
opencli explore <url>           # AI驱动的API发现
opencli record <url>            # 手动录制API调用
所有命令都支持:
--format
/
-f
参数,可选值为
table
json
yaml
md
csv

Self-Repair

自修复功能

If a command fails due to a site change (selector, API, or response schema), automatically fix the adapter and retry instead of reporting failure. Re-run the command with
OPENCLI_DIAGNOSTIC=1
to get structured diagnostic context, then fix the adapter file at
RepairContext.adapter.sourcePath
and retry. Max 3 repair rounds. See the
opencli-autofix
skill for the full workflow.
如果命令因为站点变更(选择器、API或响应结构变更)执行失败,会自动修复适配器并重试,而不是直接返回失败。添加
OPENCLI_DIAGNOSTIC=1
参数重新运行命令可以获取结构化诊断上下文,之后修复
RepairContext.adapter.sourcePath
路径下的适配器文件并重试即可。最多支持3轮修复。完整工作流请参考
opencli-autofix
skill。

Related Skills

相关技能

  • opencli-browser — Browser automation for AI agents (navigate, click, type, extract via Chrome)
  • opencli-explorer — Full guide for creating new adapters (API discovery, auth strategy, TS writing)
  • opencli-oneshot — Quick 4-step template for adding a single command from a URL
  • opencli-autofix — Automatically fix broken adapters when commands fail
  • opencli-browser — 面向AI Agent的浏览器自动化能力(通过Chrome实现导航、点击、输入、提取)
  • opencli-explorer — 创建新适配器的完整指南(API发现、鉴权策略、TS编写)
  • opencli-oneshot — 从URL添加单个命令的4步快速模板
  • opencli-autofix — 命令失败时自动修复损坏的适配器