diff --git a/README.md b/README.md index 0c001b2..04b004d 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,31 @@ -# opencli-rs-skill +# 🌐 opencli-rs-skill -> The perfect companion for ClaudeCode/OpenClaw/Agent, Give your AI Agent the ability to reach information across the entire web, fetching real-time data from Bilibili, Zhihu, Twitter/X, YouTube, Weibo, Reddit, Facebook, Instagram, TikTok, Notion, Cursor and 55+ platforms with natural language — reusing your Chrome login session, no API keys needed. Blazing fast Rust binary. -> +> *The perfect companion for Claude, OpenClaw & AI agents. Give your AI Agent the ability to reach information across the entire web, fetching real-time data from 55+ platforms with natural language — reusing your Chrome login session, no API keys needed. Blazing fast Rust binary.* -**[English](#english) | [中文](#中文) | [日本語](#日本語)** +[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square)](LICENSE) +[![GitHub](https://img.shields.io/badge/GitHub-ebothegreat%2Fopenrcli--rs--skill-black?style=flat-square&logo=github)](https://github.com/ebothegreat/opencli-rs-skill) +[![Built on](https://img.shields.io/badge/Built%20on-nashsu%2Fopenrcli--rs-orange?style=flat-square)](https://github.com/nashsu/opencli-rs) +[![Platforms](https://img.shields.io/badge/Platforms-55%2B-green?style=flat-square)](https://github.com/ebothegreat/opencli-rs-skill) --- - -## English +## Table of Contents -### What is this? +- [What is This?](#what-is-this) +- [Prerequisites](#prerequisites) +- [Quick Start](#quick-start) +- [Supported Platforms](#supported-platforms-55) +- [Core Features](#core-features) +- [Usage Examples](#usage-examples) +- [Command Reference](#command-reference) +- [Troubleshooting](#troubleshooting) +- [Contributing & License](#contributing--license) -Have you ever wanted OpenClaw/Claude/AI to: +--- + +## What is This? + +Have you ever wanted Claude/OpenClaw/AI to: - Browse **Bilibili** trending, search **Zhihu**, check **Weibo** hot topics - Search **YouTube**, get **Reddit** posts, read **HackerNews** - Check **stock prices** on Yahoo Finance or Xueqiu @@ -20,409 +33,125 @@ Have you ever wanted OpenClaw/Claude/AI to: - Control **Cursor**, **Notion**, **ChatGPT**, **Discord** desktop apps from CLI - Integrate **GitHub CLI**, **Docker**, **kubectl** through a unified interface -...but OpenClaw/Claude/AI has no access to these platforms? +...but Claude/AI had no access to these platforms? **This skill bridges that gap.** It wraps [opencli-rs](https://github.com/nashsu/opencli-rs) — a blazing fast Rust CLI tool that turns **55+ major platforms into command-line interfaces** by **reusing your existing Chrome login sessions**. No API keys. No re-authentication. Single 4.7MB binary with zero runtime dependencies. Just download and go. +--- -### Prerequisites +## Prerequisites -Before installation, check that you have all of these: +Before installation, ensure you have: - [ ] **Chrome browser** open and logged in to your target platforms -- [ ] **opencli-rs Chrome Extension** installed (for browser commands) — [Download from GitHub Releases](https://github.com/nashsu/opencli-rs/releases/latest) - - -**Step 1 — Install the opencli-rs CLI tool** - -See: https://github.com/nashsu/opencli-rs - -**Step 2 — Install this skill** - -**Method 1: Let Claude/OpenClaw/Any AI agent install for you** - -``` -Help me install this skill: https://github.com/nashsu/opencli-rs-skill -``` - -**Method 2: Manual Install** -```bash -npx skills add https://github.com/nashsu/opencli-rs-skill -``` - -That's it! Restart Claude Code to activate the skill. - -### Supported Platforms (55+) - -| Platform | Mode | Key Commands | -|----------|------|-------------| -| HackerNews | Public | `top` `new` `best` `ask` `show` `jobs` `search` `user` | -| Dev.to | Public | `top` `tag` `user` | -| Lobsters | Public | `hot` `newest` `active` `tag` | -| StackOverflow | Public | `hot` `search` `bounties` `unanswered` | -| Wikipedia | Public | `search` `summary` `random` `trending` | -| Arxiv | Public | `search` `paper` | -| BBC | Public | `news` | -| Twitter/X | Browser | `trending` `bookmarks` `profile` `search` `timeline` `post` `reply` `like` `follow` `article` ... (24 cmds) | -| Bilibili (B站) | Browser | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `download` ... (12 cmds) | -| Reddit | Browser | `hot` `frontpage` `popular` `search` `subreddit` `upvote` `save` `comment` ... (15 cmds) | -| Zhihu (知乎) | Browser | `hot` `search` `question` `download` | -| Xiaohongshu (小红書) | Browser | `search` `feed` `user` `publish` `creator-notes` ... (11 cmds) | -| YouTube | Browser | `search` `video` `transcript` | -| Weibo (微博) | Browser | `hot` `search` | -| Douban (豆瓣) | Browser | `search` `top250` `subject` `movie-hot` `book-hot` ... (7 cmds) | -| WeRead (微信読書) | Browser | `shelf` `search` `book` `highlights` `notes` `ranking` ... (7 cmds) | -| Xueqiu (雪球) | Browser | `feed` `hot-stock` `hot` `search` `stock` `watchlist` ... (7 cmds) | -| BOSS直聘 | Browser | `search` `detail` `recommend` `greet` `batchgreet` ... (14 cmds) | -| Facebook | Browser | `feed` `profile` `search` `friends` `groups` `events` ... (10 cmds) | -| Instagram | Browser | `explore` `profile` `search` `follow` `like` `comment` ... (14 cmds) | -| TikTok | Browser | `explore` `search` `profile` `follow` `like` `comment` ... (15 cmds) | -| Jike (即刻) | Browser | `feed` `search` `create` `like` `comment` `repost` ... (10 cmds) | -| Google | Public/Browser | `news` `search` `suggest` `trends` | -| V2EX | Public/Browser | `hot` `latest` `topic` `node` `user` `daily` `me` ... (11 cmds) | -| Bloomberg | Public/Browser | `main` `markets` `economics` `tech` `politics` ... (10 cmds) | -| Medium | Browser | `feed` `search` `user` | -| Substack | Browser | `feed` `search` `publication` | -| LinkedIn | Browser | `search` | -| Yahoo Finance | Browser | `quote` | -| Cursor | Desktop | `status` `send` `read` `new` `dump` `composer` `model` `ask` ... (12 cmds) | -| Notion | Desktop | `status` `search` `read` `new` `write` `sidebar` `favorites` `export` | -| ChatGPT | Desktop | `status` `new` `send` `read` `ask` | -| Discord | Desktop | `status` `send` `read` `channels` `servers` `search` `members` | -| Codex | Desktop | `status` `send` `read` `new` `dump` `model` `ask` ... (11 cmds) | -| Other 20+ sites | Various | See `opencli-rs --help` | - -> **Mode legend:** Public = No browser needed, calls API directly; Browser = Requires Chrome + extension; Desktop = Requires the desktop app to be running - - -### Usage - -Make sure Chrome is open and you're logged in to the target platforms, then talk to Claude naturally: - -``` -"Search YouTube for LLM tutorials" -"Get the top 20 stories on HackerNews" -"What's trending on Twitter right now?" -"Search Reddit r/MachineLearning for transformer papers" -"Get BBC news headlines" -"Check AAPL stock price" -"Post a tweet: Just discovered Claude Code skills!" -"What's hot on Bilibili?" -"Search Douban for top-rated movies" -"Check my WeRead highlights" -"Ask Cursor to refactor this function" -"Search Notion for meeting notes" -``` - -Claude automatically picks the right opencli-rs command, runs it, and displays results in a clean table with translated titles. - -### Command Reference - -```bash -# Bilibili -opencli-rs bilibili hot --limit 10 --format json -opencli-rs bilibili search --keyword "AI" - -# Twitter/X -opencli-rs twitter timeline --format json -opencli-rs twitter post --text "Hello from Claude!" -opencli-rs twitter search "claude AI" --limit 10 - -# YouTube -opencli-rs youtube search --query "LLM tutorial" - -# HackerNews -opencli-rs hackernews top --limit 20 --format json - -# Reddit -opencli-rs reddit hot --subreddit MachineLearning - -# Yahoo Finance -opencli-rs yahoo-finance quote --symbol AAPL - -# Douban -opencli-rs douban top250 --format json - - -``` - - -### Troubleshooting - -| Problem | Fix | -|---------|-----| -| `opencli-rs: command not found` | Re-run the install script; check your PATH | -| Chrome not being controlled | Make sure Chrome is open; verify opencli-rs Chrome extension is loaded | -| Login state not recognized | In Chrome, manually log in to the target site first | -| Browser commands timeout | Check `opencli-rs doctor` for diagnostics | - -### Credits - -Built on **[nashsu/opencli-rs](https://github.com/nashsu/opencli-rs)** — a complete Rust rewrite of opencli, up to 12x faster with 10x less memory. +- [ ] **opencli-rs Chrome Extension** installed (for browser commands) + → [Download from GitHub Releases](https://github.com/nashsu/opencli-rs/releases/latest) +- [ ] **Node.js** (for skill installation via `npx`) +- [ ] **Claude Code** or compatible AI agent --- - -## 中文 - -### 这是什么? - -你有没有遇到过这种情况: - -- 想让 Claude 帮你**查 B站热门**、**搜知乎**、**看微博热搜**,但 Claude 根本没有这些平台的访问权限 -- 想让 Claude **控制 Cursor、Notion、ChatGPT** 等桌面应用 -- 用 Playwright 自动化太麻烦,还要单独处理登录态 -- 各平台 API 要申请资质,普通用户根本用不了 - -**这个 Skill 解决了这个问题。** - -它把 [opencli-rs](https://github.com/nashsu/opencli-rs) 封装成 Claude Code 的能力——opencli-rs 是一个**用 Rust 重写**的极速 CLI 工具,把 **55+ 个主流平台**变成命令行接口,**直接复用你 Chrome 浏览器里已有的登录态**。零配置,零 API Key,零运行时依赖。单个 4.7MB 二进制文件,下载即用。 - -### 前置条件 +## Quick Start -安装前,请逐一确认以下条件都已满足: +### Step 1 - Install opencli-rs CLI tool -- [ ] **Chrome 浏览器** 已打开,并已登录目标网站 -- [ ] **opencli-rs Chrome 扩展** 已安装(浏览器命令需要)— [从 GitHub Releases 下载](https://github.com/nashsu/opencli-rs/releases/latest) +Visit: https://github.com/nashsu/opencli-rs -### 安装配置 - -**第一步:安装 opencli-rs CLI 工具** - -参考:https://github.com/nashsu/opencli-rs - -**第二步:安装本 Skill** - -**方法一:让 Claude/OpenClaw/任意 AI Agent 帮你安装** +### Step 2 - Install this skill +**Option A: Let Claude install for you** ``` -帮我安装这个 skill:https://github.com/nashsu/opencli-rs-skill +Help me install this skill: https://github.com/ebothegreat/opencli-rs-skill ``` -**方法二:手动安装** +**Option B: Manual install** ```bash -npx skills add https://github.com/nashsu/opencli-rs-skill -``` - -安装完成后重启 Claude Code,Skill 即可生效。 - -### 使用方法 - -确保 Chrome 已打开且已登录目标网站,然后在 Claude Code 中用自然语言说: - +npx skills add https://github.com/ebothegreat/opencli-rs-skill ``` -查下B站今天的热门 -搜知乎上关于AI大模型的讨论 -看微博热搜前10条 -帮我发一条推文:今天天气真好 -查一下茅台的股票行情 -搜YouTube上的LLM教程 -看豆瓣电影Top250 -查看我微信读书的笔记 -让Cursor帮我重构这段代码 -搜Notion里的会议记录 -``` - -Claude 会自动调用 opencli-rs 完成操作,结果以表格形式展示,英文标题附带中文翻译。 -### 命令速查 +### Step 3 - Verify installation ```bash -# B站 -opencli-rs bilibili hot --limit 10 --format json -opencli-rs bilibili search --keyword "AI" - -# Twitter/X -opencli-rs twitter timeline --format json -opencli-rs twitter post --text "Hello from Claude!" -opencli-rs twitter search "claude AI" --limit 10 - -# 雪球 -opencli-rs xueqiu stock --symbol SH600519 # 茅台行情 -opencli-rs xueqiu watchlist # 我的自选股 - -# HackerNews -opencli-rs hackernews top --limit 20 --format json - -# 豆瓣 -opencli-rs douban top250 --format json - -# 桌面应用 -opencli-rs cursor status -opencli-rs notion search "会议记录" +opencli-rs --version ``` -### 常见问题 - -| 问题 | 解决方法 | -|------|----------| -| `opencli-rs: command not found` | 重新运行安装脚本,检查 PATH 配置 | -| Chrome 无法被控制 | 确保 Chrome 已打开,且 opencli-rs Chrome 扩展已加载 | -| 登录态未识别 | 在 Chrome 中手动登录目标网站后再试 | -| 浏览器命令超时 | 运行 `opencli-rs doctor` 进行诊断 | - -### 致谢 - -本 Skill 基于 **[nashsu/opencli-rs](https://github.com/nashsu/opencli-rs)** 构建——基于 opencli 的 Rust 完全重写版本,速度提升最高 12 倍,内存减少 10 倍。 +Restart Claude Code to activate the skill. --- - -## 日本語 - -### これは何ですか? - -こんな経験はありませんか? +## Supported Platforms (55+) -- Claudeに**Bilibiliのトレンド確認**、**知乎の検索**、**微博のホットトピック確認**をさせたいが、Claudeにはこれらのプラットフォームへのアクセス権限がない -- Claudeで**Cursor、Notion、ChatGPT**などのデスクトップアプリを操作したい -- Playwrightの自動化は面倒で、ログイン状態の管理も別途必要 -- 各プラットフォームのAPIは申請資格が必要で、一般ユーザーには使えない +### Public APIs (No browser required) +HackerNews, Dev.to, StackOverflow, Wikipedia, BBC News, Google -**このSkillがその問題を解決します。** +### Browser-based (Requires Chrome + extension) +Twitter/X, YouTube, Reddit, Bilibili, Zhihu, Weibo, Instagram, TikTok, Facebook, Douban, WeRead, Yahoo Finance, Xueqiu, BOSS Zhipin, and 20+ more -[opencli-rs](https://github.com/nashsu/opencli-rs)をClaude Codeの能力として統合します。opencli-rsは**Rustで完全に書き直された**超高速CLIツールで、**55以上の主要プラットフォーム**をコマンドラインインターフェースに変換し、**Chromeブラウザの既存のログイン状態をそのまま再利用**します。設定不要、APIキー不要、ランタイム依存なし。たった4.7MBのバイナリファイル1つで、ダウンロードしてすぐに使えます。 +### Desktop Apps (Requires app to be running) +Cursor, Notion, ChatGPT, Discord -### 前提条件 - -インストール前に、以下の条件を確認してください: - -- [ ] **Chromeブラウザ** が起動済みで、対象サイトにログイン済み -- [ ] **opencli-rs Chrome拡張機能** がインストール済み(ブラウザコマンド用)— [GitHub Releasesからダウンロード](https://github.com/nashsu/opencli-rs/releases/latest) - -### インストール - -**ステップ1:opencli-rs CLIツールをインストール** - -参照:https://github.com/nashsu/opencli-rs +--- -**ステップ2:このSkillをインストール** +## Core Features -**方法1:Claude/OpenClaw/任意のAI Agentにインストールさせる** +| Feature | Description | +|---------|-------------| +| **55+ Platform Support** | Access Twitter, YouTube, Reddit, Bilibili, Zhihu, and many more | +| **Chrome Session Reuse** | No API keys, no OAuth hassles — uses your existing Chrome login | +| **Desktop App Control** | Control Cursor, Notion, ChatGPT, Discord from CLI | +| **Natural Language** | Talk to Claude naturally; it picks the right command | +| **High Speed** | Single 4.7MB Rust binary, zero dependencies | +| **Public API Fallback** | Many platforms work without browser | -``` -このskillをインストールしてください:https://github.com/nashsu/opencli-rs-skill -``` +--- -**方法2:手動インストール** -```bash -npx skills add https://github.com/nashsu/opencli-rs-skill -``` +## Usage Examples -インストール完了後、Claude Codeを再起動するとSkillが有効になります。 - -### 対応プラットフォーム(55以上) - -| プラットフォーム | モード | 主なコマンド | -|----------------|--------|-------------| -| HackerNews | Public | `top` `new` `best` `ask` `show` `jobs` `search` `user` | -| Dev.to | Public | `top` `tag` `user` | -| Lobsters | Public | `hot` `newest` `active` `tag` | -| StackOverflow | Public | `hot` `search` `bounties` `unanswered` | -| Wikipedia | Public | `search` `summary` `random` `trending` | -| Arxiv | Public | `search` `paper` | -| BBC | Public | `news` | -| Twitter/X | Browser | `trending` `bookmarks` `profile` `search` `timeline` `post` `reply` `like` `follow` `article` ... (24コマンド) | -| Bilibili (B站) | Browser | `hot` `search` `me` `favorite` `history` `feed` `subtitle` `download` ... (12コマンド) | -| Reddit | Browser | `hot` `frontpage` `popular` `search` `subreddit` `upvote` `save` `comment` ... (15コマンド) | -| Zhihu (知乎) | Browser | `hot` `search` `question` `download` | -| Xiaohongshu (小紅書) | Browser | `search` `feed` `user` `publish` `creator-notes` ... (11コマンド) | -| YouTube | Browser | `search` `video` `transcript` | -| Weibo (微博) | Browser | `hot` `search` | -| Douban (豆瓣) | Browser | `search` `top250` `subject` `movie-hot` `book-hot` ... (7コマンド) | -| WeRead (微信読書) | Browser | `shelf` `search` `book` `highlights` `notes` `ranking` ... (7コマンド) | -| Xueqiu (雪球) | Browser | `feed` `hot-stock` `hot` `search` `stock` `watchlist` ... (7コマンド) | -| BOSS直聘 | Browser | `search` `detail` `recommend` `greet` `batchgreet` ... (14コマンド) | -| Facebook | Browser | `feed` `profile` `search` `friends` `groups` `events` ... (10コマンド) | -| Instagram | Browser | `explore` `profile` `search` `follow` `like` `comment` ... (14コマンド) | -| TikTok | Browser | `explore` `search` `profile` `follow` `like` `comment` ... (15コマンド) | -| Jike (即刻) | Browser | `feed` `search` `create` `like` `comment` `repost` ... (10コマンド) | -| Google | Public/Browser | `news` `search` `suggest` `trends` | -| V2EX | Public/Browser | `hot` `latest` `topic` `node` `user` `daily` `me` ... (11コマンド) | -| Bloomberg | Public/Browser | `main` `markets` `economics` `tech` `politics` ... (10コマンド) | -| Medium | Browser | `feed` `search` `user` | -| Substack | Browser | `feed` `search` `publication` | -| LinkedIn | Browser | `search` | -| Yahoo Finance | Browser | `quote` | -| Cursor | Desktop | `status` `send` `read` `new` `dump` `composer` `model` `ask` ... (12コマンド) | -| Notion | Desktop | `status` `search` `read` `new` `write` `sidebar` `favorites` `export` | -| ChatGPT | Desktop | `status` `new` `send` `read` `ask` | -| Discord | Desktop | `status` `send` `read` `channels` `servers` `search` `members` | -| Codex | Desktop | `status` `send` `read` `new` `dump` `model` `ask` ... (11コマンド) | -| その他20以上 | 各種 | `opencli-rs --help` を参照 | - -> **モード説明:** Public = ブラウザ不要、APIを直接呼び出し; Browser = Chrome + 拡張機能が必要; Desktop = デスクトップアプリの起動が必要 - -### 使い方 - -Chromeが起動していて対象サイトにログイン済みであることを確認し、Claudeに自然言語で話しかけてください: +With Chrome open and logged in: ``` -「YouTubeでLLMチュートリアルを検索して」 -「HackerNewsのトップ20記事を取得して」 -「Twitterで今何がトレンドか教えて」 -「Reddit r/MachineLearningでtransformerの論文を検索して」 -「BBCのニュースヘッドラインを取得して」 -「AAPLの株価を確認して」 -「ツイートを投稿して:Claude Code skillsを発見した!」 -「Bilibiliの人気動画は何?」 -「豆瓣で高評価の映画を検索して」 -「微信読書のハイライトを確認して」 -「Cursorにこの関数をリファクタリングさせて」 -「Notionで議事録を検索して」 +"Search YouTube for LLM tutorials" +"Get the top 20 stories on HackerNews" +"What's trending on Twitter right now?" +"Search Reddit r/MachineLearning for transformer papers" +"Check AAPL stock price" +"What's hot on Bilibili?" +"Search Douban for top-rated movies" +"Ask Cursor to refactor this function" ``` -Claudeが自動的に適切なopencli-rsコマンドを選択・実行し、結果を見やすいテーブル形式で表示します。 +--- -### コマンドリファレンス +## Command Reference ```bash -# Bilibili -opencli-rs bilibili hot --limit 10 --format json -opencli-rs bilibili search --keyword "AI" - -# Twitter/X -opencli-rs twitter timeline --format json -opencli-rs twitter post --text "Hello from Claude!" -opencli-rs twitter search "claude AI" --limit 10 - -# YouTube -opencli-rs youtube search --query "LLM tutorial" - -# HackerNews -opencli-rs hackernews top --limit 20 --format json - -# Reddit +opencli-rs hackernews top --limit 20 +opencli-rs twitter timeline +opencli-rs youtube search --query "AI tutorial" opencli-rs reddit hot --subreddit MachineLearning - -# Yahoo Finance +opencli-rs bilibili hot opencli-rs yahoo-finance quote --symbol AAPL - -# Douban -opencli-rs douban top250 --format json - -# デスクトップアプリ -opencli-rs cursor status -opencli-rs notion search "議事録" ``` -### トラブルシューティング - -| 問題 | 解決方法 | -|------|----------| -| `opencli-rs: command not found` | インストールスクリプトを再実行し、PATHを確認 | -| Chromeが制御できない | Chromeが起動中で、opencli-rs Chrome拡張機能がロードされているか確認 | -| ログイン状態が認識されない | Chromeで対象サイトに手動ログインしてから再試行 | -| ブラウザコマンドがタイムアウト | `opencli-rs doctor` で診断を実行 | +--- -### クレジット +## Troubleshooting -**[nashsu/opencli-rs](https://github.com/nashsu/opencli-rs)** をベースに構築——opencliのRust完全書き直し版で、最大12倍高速、メモリ使用量10分の1。 +| Issue | Solution | +|-------|----------| +| Browser commands timeout | Ensure Chrome is running; check `opencli-rs doctor` | +| Login state not recognized | Manually log in to site in Chrome first | +| Command not found | Verify installation: `which opencli-rs` | +| Chrome not being controlled | Verify extension is enabled | --- ## License Apache 2.0 + +--- + +**Questions?** Open an issue on [GitHub](https://github.com/ebothegreat/opencli-rs-skill/issues)