返回顶部
o

opencli-rsOpenCLI枢纽

基于Rust的通用命令行枢纽 - 将任何网站、桌面应用、本地CLI工具转变为命令行接口,专为AI Agent和自动化工作流设计。支持55+网站、Electron应用控制和外部CLI集成,单二进制文件4.7MB,性能提升12倍。

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
326
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

opencli-rs

SKILL.md - OpenCLI-RS (Rust版本) 通用命令行枢纽

概述

OpenCLI-RS 是基于 Rust 重写的通用 CLI 枢纽工具,能够将任何网站、本地工具、Electron 应用转变为命令行接口,专为 AI Agent 和自动化工作流设计。

核心优势:

  • - 🚀 性能: 相比TypeScript版本提升12倍,内存使用减少10倍
  • 📦 轻量: 单二进制文件4.7MB,零运行时依赖
  • 🔒 安全: Rust内存安全,无GC停顿
  • 🤖 AI原生: 自动发现所有可用工具,支持AI Agent无缝调用

GitHub仓库: https://github.com/nashsu/opencli-rs

使用场景

当以下情况时使用此技能

  1. 1. AI Agent 自动化 - 需要让 AI 控制网站或桌面应用
  2. 数据提取 - 从55+网站定时提取结构化数据
  3. 桌面应用控制 - 控制 Electron 应用如 Cursor、Codex、ChatGPT、Notion、Discord 等
  4. 外部 CLI 管理 - 统一管理 gh、docker、kubectl、obsidian 等 CLI 工具
  5. 内容下载 - 下载图片、视频、文章等内容
  6. 平台操作 - 在微博、B站、知乎、小红书等平台执行操作
  7. 实时信息获取 - 获取新闻、趋势、社交媒体动态

快速开始

安装方法

自动安装 (推荐)

bash

使用官方安装脚本

curl -fsSL https://raw.githubusercontent.com/nashsu/opencli-rs/main/scripts/install.sh | sh

手动安装

bash

1. 下载对应平台的二进制文件

Linux x86_64

wget https://github.com/nashsu/opencli-rs/releases/latest/download/opencli-rs-x86_64-unknown-linux-musl.tar.gz tar -xzf opencli-rs-x86_64-unknown-linux-musl.tar.gz sudo mv opencli-rs /usr/local/bin/

2. 验证安装

opencli-rs --version

从源码编译

bash

需要 Rust 工具链

git clone https://github.com/nashsu/opencli-rs.git cd opencli-rs cargo build --release sudo cp target/release/opencli-rs /usr/local/bin/

Chrome 扩展安装 (用于浏览器命令)

  1. 1. 从 GitHub Releases 下载 opencli-rs-chrome-extension.zip
  2. 解压到任意目录
  3. 打开 Chrome 并访问 chrome://extensions
  4. 启用开发者模式(右上角开关)
  5. 点击加载已解压的扩展程序并选择解压的文件夹
  6. 扩展会自动连接到 opencli-rs 守护进程

注意: 公开API命令(如 hackernews、devto)无需扩展即可工作。

核心命令

基本使用

bash

查看所有可用命令

opencli-rs --help

查看特定网站的命令帮助

opencli-rs hackernews --help opencli-rs bilibili --help

获取Hacker News热门故事(无需浏览器)

opencli-rs hackernews top --limit 10

JSON格式输出

opencli-rs hackernews top --limit 5 --format json

获取B站热门视频(需要浏览器+Cookie)

opencli-rs bilibili hot --limit 20

搜索Twitter(需要浏览器+登录)

opencli-rs twitter search rust lang --limit 10

运行诊断

opencli-rs doctor

生成Shell自动补全

opencli-rs completion bash >> ~/.bashrc opencli-rs completion zsh >> ~/.zshrc opencli-rs completion fish > ~/.config/fish/completions/opencli-rs.fish

桌面应用控制

bash

控制Cursor编辑器

opencli-rs cursor status opencli-rs cursor send 分析这段代码

控制Codex编辑器

opencli-rs codex status opencli-rs codex send 实现排序算法

控制ChatGPT桌面版

opencli-rs chatgpt status opencli-rs chatgpt send 解释量子计算

控制Notion

opencli-rs notion search 项目文档

控制Discord

opencli-rs discord-app channels

外部CLI集成

bash

GitHub CLI

opencli-rs gh repo list opencli-rs gh pr list --limit 5

Docker CLI

opencli-rs docker ps opencli-rs docker images

Kubernetes CLI

opencli-rs kubectl get pods opencli-rs kubectl get nodes

其他工具

opencli-rs obsidian search 笔记 opencli-rs readwise highlights

输出格式控制

bash

ASCII表格(默认)

opencli-rs hackernews top --format table

JSON格式

opencli-rs hackernews top --format json

YAML格式

opencli-rs hackernews top --format yaml

CSV格式

opencli-rs hackernews top --format csv

Markdown表格

opencli-rs hackernews top --format md

支持的网站和应用

公开API网站(无需浏览器)

  • - Hacker News: top, new, best, ask, show, jobs, search, user
  • Dev.to: top, tag, user
  • Lobsters: hot, newest, active, tag
  • Stack Overflow: hot, search, bounties, unanswered
  • Steam: top-sellers
  • arXiv: search, paper
  • Wikipedia: search, summary, random, trending
  • BBC: news

需要浏览器的网站(55+站点)

  • - Bilibili: hot, search, me, favorite, history, feed, subtitle, dynamic, ranking, following, user-videos, download
  • Twitter/X: trending, bookmarks, profile, search, timeline, thread, following, followers, notifications, post, reply, delete, like, article, follow, unfollow, bookmark, unbookmark, download, accept, reply-dm, block, unblock, hide-reply
  • Reddit: hot, frontpage, popular, search, subreddit, read, user, user-posts, user-comments, upvote, save, comment, subscribe, saved, upvoted
  • 知乎: hot, search, question, download
  • 小红书: search, notifications, feed, user, download, publish, creator-notes, creator-note-detail, creator-notes-summary, creator-profile, creator-stats
  • 微博: hot, search
  • 豆瓣: search, top250, subject, marks, reviews, movie-hot, book-hot
  • YouTube: search, video, transcript
  • Facebook: feed, profile, search, friends, groups, events, notifications, memories, add-friend, join-group
  • Instagram: explore, profile, search, user, followers, following, follow, unfollow, like, unlike, comment, save, unsave, saved

桌面应用控制

  • - Cursor: status, send, read, new, dump, composer, model, extract-code, ask, screenshot, history, export
  • Codex: status, send, read, new, dump, extract-diff, model, ask, screenshot, history, export
  • ChatGPT: status, new, send, read, ask
  • Notion: status, search, read, new, write, sidebar, favorites, export
  • Discord: status, send, read, channels, servers, search, members
  • Antigravity: status, send, read, new, dump, extract-code, model, watch

AI Agent 集成

自动发现工具

bash

AI可以自动发现所有可用工具

opencli-rs --help | grep -A5 Available commands

配置在AGENT.md中

echo tools: opencli-rs list >> AGENT.md

注册本地CLI工具

bash

注册自定义CLI工具

opencli-rs register mycli --path /usr/local/bin/mycli

AI可以无缝调用注册的工具

opencli-rs mycli --help

AI原生功能

bash

探索网站API

opencli-rs explore https://example.com

自动检测认证策略

opencli-rs cascade https://api.example.com/data

一键生成适配器

opencli-rs generate https://example.com --goal hot posts

高级功能

YAML流水线定义

在 ~/.opencli-rs/adapters/ 创建自定义适配器:

yaml

~/.opencli-rs/

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 opencli-rs-1776024009 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 opencli-rs-1776024009 技能

通过命令行安装

skillhub install opencli-rs-1776024009

下载

⬇ 下载 opencli-rs v1.0.0(免费)

文件大小: 21.65 KB | 发布时间: 2026-4-13 11:21

v1.0.0 最新 2026-4-13 11:21
opencli-rs 1.0.0 — 首个 Rust 版本发布,带来极大性能和体验提升:

- 全新基于 Rust 重写,单一4.7MB二进制,零外部依赖。
- 性能较 TypeScript/Node.js 版本提升12倍,内存消耗减少10倍。
- 支持 55+ 网站和 Electron 桌面应用命令行集成,涵盖数据抓取、自动化和内容下载。
- 新增 AI Agent 自动工具发现、注册外部CLI、自定义YAML流水线等高级功能。
- 丰富输出格式(表格、JSON、YAML、Markdown、CSV)和 Chrome 扩展配合使用。
- 详尽中文版文档及排障指南。

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部