Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
86238d4
refactor: extract getErrorMessage and DEFAULT_DAEMON_PORT to shared m…
shouldnotappearcalm Mar 23, 2026
ff162ad
docs(skill): reorganize architecture by domain taxonomy
shouldnotappearcalm Mar 25, 2026
a7dddfb
docs(skill): align skill-architecture to Anthropic skill spec
shouldnotappearcalm Mar 25, 2026
fc05b79
feat(skill): add standalone platform-based opencli skill
shouldnotappearcalm Mar 25, 2026
22a9999
refactor(skill): move to skills dir and complete platform command docs
shouldnotappearcalm Mar 25, 2026
1aefd7b
docs(skill): generate full platform command docs from source
shouldnotappearcalm Mar 25, 2026
afdfb1d
docs(skill): simplify command docs to usage and args only
shouldnotappearcalm Mar 25, 2026
d352205
docs(skill): normalize all command docs to usage and parameter meanings
shouldnotappearcalm Mar 25, 2026
68a16d5
docs(skill): align SKILL frontmatter and remove workflow references
shouldnotappearcalm Mar 25, 2026
71b8356
docs(skill): add supported capability summary to description
shouldnotappearcalm Mar 25, 2026
f324311
docs(skill): add setup prerequisites and manual extension install guide
shouldnotappearcalm Mar 25, 2026
787919f
docs(skill): add install bootstrap and doctor/extension guidance in S…
shouldnotappearcalm Mar 25, 2026
361bf72
docs(skill): clarify chrome extension install location from README
shouldnotappearcalm Mar 25, 2026
030ba84
docs: add skill install guide to READMEs and enhance root SKILL recor…
shouldnotappearcalm Mar 25, 2026
1891dea
docs(skill): remove skill README and add record workflow to SKILL
shouldnotappearcalm Mar 25, 2026
df00f92
Merge branch 'jackwener:main' into main
shouldnotappearcalm Mar 25, 2026
4281aa5
rename opencli skill and refresh README integration docs
shouldnotappearcalm Mar 25, 2026
875d9f8
chore: remove skill-architecture docs and restore root SKILL.md
shouldnotappearcalm Mar 25, 2026
32efe10
docs(skills): convert opencli-skill command references to English
shouldnotappearcalm Mar 25, 2026
f3b0f31
Merge branch 'jackwener:main' into main
shouldnotappearcalm Mar 26, 2026
164ed7d
docs(skills): add missing command references for dictionary, douyin, …
shouldnotappearcalm Mar 26, 2026
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
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,70 @@ opencli list # Now you can use it anywhere!
npm install -g @jackwener/opencli@latest
```

## Install the OpenCLI Skill (opencli-skill)

Skill location in this repo:

```bash
skills/opencli-skill/
```

### Codex

Install to Codex user skills directory:

```bash
mkdir -p ~/.codex/skills
cp -R skills/opencli-skill ~/.codex/skills/opencli-skill
```

Then restart Codex.

### Cursor

You can use either legacy `.cursorrules` or project rules (`.cursor/rules/*.mdc`):

```bash
mkdir -p .cursor/rules
cat > .cursor/rules/opencli-skill.mdc <<'EOF'
# OpenCLI Skill

When user requests OpenCLI command usage:
1. Read `skills/opencli-skill/SKILL.md`
2. Read `skills/opencli-skill/references/commands/<platform>.md`
3. Prefer command examples with `-f json`
4. If browser command fails, run `opencli doctor`
EOF
```

### Claude Code

Add project memory and optional slash command:

```bash
# Project memory
cat > CLAUDE.md <<'EOF'
For OpenCLI command requests:
1. Read `skills/opencli-skill/SKILL.md`
2. Read `skills/opencli-skill/references/commands/<platform>.md`
3. Use exact command + required args and prefer `-f json`
4. Run `opencli doctor` before first browser command
EOF

# Optional slash command: /opencli <platform and intent>
mkdir -p .claude/commands
cat > .claude/commands/opencli.md <<'EOF'
Use OpenCLI skill docs for: $ARGUMENTS
1. Read `skills/opencli-skill/SKILL.md`
2. Read platform file under `skills/opencli-skill/references/commands/`
3. Return concrete commands and args only
EOF
```

Skill prerequisites:
- installed `opencli` binary
- manually installed Chrome Browser Bridge extension (`chrome://extensions`)

## Built-in Commands

Run `opencli list` for the live registry.
Expand Down
64 changes: 64 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,70 @@ opencli list # 可以在任何地方使用了!
npm install -g @jackwener/opencli@latest
```

## 安装 OpenCLI Skill(opencli-skill)

本仓库内 Skill 路径:

```bash
skills/opencli-skill/
```

### Codex

安装到 Codex 用户技能目录:

```bash
mkdir -p ~/.codex/skills
cp -R skills/opencli-skill ~/.codex/skills/opencli-skill
```

安装后重启 Codex。

### Cursor

可使用旧版 `.cursorrules`,也可使用项目规则(`.cursor/rules/*.mdc`):

```bash
mkdir -p .cursor/rules
cat > .cursor/rules/opencli-skill.mdc <<'EOF'
# OpenCLI Skill

当用户询问 OpenCLI 命令时:
1. 读取 `skills/opencli-skill/SKILL.md`
2. 读取 `skills/opencli-skill/references/commands/<platform>.md`
3. 优先给出带 `-f json` 的命令示例
4. 浏览器命令失败时先执行 `opencli doctor`
EOF
```

### Claude Code

添加项目记忆,并可选配置 slash command:

```bash
# 项目记忆
cat > CLAUDE.md <<'EOF'
For OpenCLI command requests:
1. Read `skills/opencli-skill/SKILL.md`
2. Read `skills/opencli-skill/references/commands/<platform>.md`
3. Use exact command + required args and prefer `-f json`
4. Run `opencli doctor` before first browser command
EOF

# 可选 slash command:/opencli <平台与意图>
mkdir -p .claude/commands
cat > .claude/commands/opencli.md <<'EOF'
Use OpenCLI skill docs for: $ARGUMENTS
1. Read `skills/opencli-skill/SKILL.md`
2. Read platform file under `skills/opencli-skill/references/commands/`
3. Return concrete commands and args only
EOF
```

该 Skill 依赖:
- 已安装 `opencli` 命令
- 已手动安装 Chrome Browser Bridge 扩展(`chrome://extensions`)

## 内置命令

运行 `opencli list` 查看完整注册表。
Expand Down
12 changes: 11 additions & 1 deletion SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ Browser commands require:
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

## Skill Package in Repo

OpenCLI platform command skill is located at:

- `skills/opencli-platform-router/SKILL.md`
- `skills/opencli-platform-router/references/commands/*.md`

Use this skill when an agent needs per-platform command usage + args reference.

> **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.
Expand Down Expand Up @@ -542,7 +551,8 @@ opencli synthesize <site>
# Generate: one-shot explore → synthesize → register
opencli generate <url> --goal "hot"

# Record: YOU operate the page, opencli captures every API call → YAML candidates
# Record Workflow (critical for dynamic/auth-heavy sites)
# YOU operate the page, opencli captures every API call and generates YAML candidates.
# Opens the URL in automation window, injects fetch/XHR interceptor into ALL tabs,
# polls every 2s, auto-stops after 60s (or press Enter to stop early).
opencli record <url> # 录制,site name 从域名推断
Expand Down
42 changes: 42 additions & 0 deletions skills/opencli-skill/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: opencli-skill
description: Make any website or Electron app your CLI — reuse Chrome login to search, post, download, publish, follow, automate, and more across 60+ platforms (bilibili, zhihu, twitter, xiaohongshu, douyin, youtube, reddit, linkedin, pixiv, jd, weibo, xueqiu, notion, discord, etc.) with zero credential risk. Covers browser-based, public API, and desktop (CDP/Electron) adapters, plus AI-powered API discovery and record workflows for new sites.
---

Use this skill as a platform command router.

Prerequisites and bootstrap:

- Ensure `opencli` is available. If missing, install:
- `npm install -g @jackwener/opencli`
- verify: `opencli --version`
- Before first real command, run:
- `opencli doctor`
- If doctor reports extension/browser connectivity issue, prompt user to install Chrome Browser Bridge extension manually (same as README):
- Install location: Chrome extension management page `chrome://extensions`
- Option A (recommended): download `opencli-extension.zip` from OpenCLI Releases and install
- Option B (dev mode): open `chrome://extensions` → enable Developer mode → click "Load unpacked" → select OpenCLI repo `extension/` directory
- After install: keep Chrome open and logged into target platforms, then rerun `opencli doctor`

1. Detect target platform from user request.
2. Load `references/commands/<platform>.md`.
3. Select the command and fill required args.
4. Prefer `-f json` for parseable output.
5. If platform/command is unclear, ask one minimal clarification or run `opencli list` / `opencli <site> --help`.

All command docs live in:
- `references/commands/*.md`

Record workflow (for dynamic/auth-heavy pages):

- Start recording: `opencli record <url>`
- Optional args:
- `--site <name>` specify site name
- `--timeout <ms>` recording timeout (default 60000)
- `--poll <ms>` polling interval (default 2000)
- `--out <dir>` output directory
- During recording, manually operate the page in browser to trigger API calls.
- Output files:
- `.opencli/record/<site>/captured.json`
- `.opencli/record/<site>/candidates/*.yaml`
- Use record when `explore` cannot fully discover requests due to login state, SPA routing, or interaction-dependent APIs.
46 changes: 46 additions & 0 deletions skills/opencli-skill/references/commands/antigravity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# antigravity

## Commands

### dump
- Purpose: Dump the DOM to help AI understand the UI
- Args: None
- Usage: `opencli antigravity dump [options] -f json`

### extract-code
- Purpose: Extract multi-line code blocks from the current Antigravity conversation
- Args: None
- Usage: `opencli antigravity extract-code [options] -f json`

### model
- Purpose: Switch the active LLM model in Antigravity
- Args:
- `name`(required): Target model name (e.g. claude, gemini, o1)
- Usage: `opencli antigravity model [options] -f json`

### new
- Purpose: Start a new conversation / clear context in Antigravity
- Args: None
- Usage: `opencli antigravity new [options] -f json`

### read
- Purpose: Read the latest chat messages from Antigravity AI
- Args:
- `last`(optional): Number of recent messages to read (not fully implemented due to generic structure, currently returns full history text or latest chunk)
- Usage: `opencli antigravity read [options] -f json`

### send
- Purpose: Send a message to Antigravity AI via the internal Lexical editor
- Args:
- `message`(required): The message text to send
- Usage: `opencli antigravity send [options] -f json`

### status
- Purpose: Check Antigravity CDP connection and get current page state
- Args: None
- Usage: `opencli antigravity status [options] -f json`

### watch
- Purpose: Stream new chat messages from Antigravity in real-time
- Args: None
- Usage: `opencli antigravity watch [options] -f json`
24 changes: 24 additions & 0 deletions skills/opencli-skill/references/commands/apple-podcasts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# apple-podcasts

## Commands

### episodes
- Purpose: List recent episodes of an Apple Podcast (use ID from search)
- Args:
- `id`(required): Podcast ID (collectionId from search output)
- `limit`(optional): type: int; default: 15; Max episodes to show
- Usage: `opencli apple-podcasts episodes [options] -f json`

### search
- Purpose: Search Apple Podcasts
- Args:
- `query`(required): Search keyword
- `limit`(optional): type: int; default: 10; Max results
- Usage: `opencli apple-podcasts search [options] -f json`

### top
- Purpose: Top podcasts chart on Apple Podcasts
- Args:
- `limit`(optional): type: int; default: 20; Number of podcasts (max 100)
- `country`(optional): default: 'us'; Country code (e.g. us, cn, gb, jp)
- Usage: `opencli apple-podcasts top [options] -f json`
16 changes: 16 additions & 0 deletions skills/opencli-skill/references/commands/arxiv.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# arxiv

## Commands

### paper
- Purpose: Get arXiv paper details by ID
- Args:
- `id`(required): arXiv paper ID (e.g. 1706.03762)
- Usage: `opencli arxiv paper [options] -f json`

### search
- Purpose: Search arXiv papers
- Args:
- `query`(required): Search keyword (e.g. "transformer")
- `limit`(optional): type: int; default: 10; Max results (max 25)
- Usage: `opencli arxiv search [options] -f json`
32 changes: 32 additions & 0 deletions skills/opencli-skill/references/commands/barchart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# barchart

## Commands

### flow
- Purpose: Barchart unusual options activity / options flow
- Args:
- `type`(optional): type: str; default: 'all'; Filter: all, call, or put
- `limit`(optional): type: int; default: 20; Number of results
- Usage: `opencli barchart flow [options] -f json`

### greeks
- Purpose: Barchart options greeks overview (IV, delta, gamma, theta, vega)
- Args:
- `symbol`(required): Stock ticker (e.g. AAPL)
- `expiration`(optional): type: str; Expiration date (YYYY-MM-DD). Defaults to the nearest available expiration.
- `limit`(optional): type: int; default: 10; Number of near-the-money strikes per type
- Usage: `opencli barchart greeks [options] -f json`

### options
- Purpose: Barchart options chain with greeks, IV, volume, and open interest
- Args:
- `symbol`(required): Stock ticker (e.g. AAPL)
- `type`(optional): type: str; default: 'Call'; Option type: Call or Put
- `limit`(optional): type: int; default: 20; Max number of strikes to return
- Usage: `opencli barchart options [options] -f json`

### quote
- Purpose: Barchart stock quote with price, volume, and key metrics
- Args:
- `symbol`(required): Stock ticker (e.g. AAPL, MSFT, TSLA)
- Usage: `opencli barchart quote [options] -f json`
9 changes: 9 additions & 0 deletions skills/opencli-skill/references/commands/bbc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# bbc

## Commands

### news
- Purpose: BBC News headlines (RSS)
- Args:
- `limit`(optional): type: int; default: 20; Number of headlines (max 50)
- Usage: `opencli bbc news [options] -f json`
Loading