chore: 项目已迁移至 Gitee/GitHub,仅保留迁移说明 (tombstone)

This commit is contained in:
shuiyuPyLab committed 2026-08-09 10:03:54 +08:00
1 parent 70e81b208a
commit 339df4f491
1 file changed
+13 -201
+13 -201
View File
@@ -1,206 +1,18 @@
# xiaoli-cli-plugins
# 项目已迁移 ✨
🔌 **小狸 CLI 官方插件仓库**
你好呀~这个仓库已经搬到更好用的地方啦。
为 [xiaoli-cli](https://gitee.com/shuiyu1123/xiaoli-cli) 提供可一键安装的扩展插件。
为了让代码管理更清爽、多平台同步更省心,我们把原先分散的镜像统一收拢到
**Gitee** 与 **GitHub** 主仓维护,这里就只保留这张"迁移小纸条"咯。
## 快速安装
📦 新家在这里:
- Gitee:https://gitee.com/shuiyu1123/xiaoli-cli-plugins
- GitHub:https://github.com/shuiyu67/xiaoli-cli-plugins
在 xiaoli-cli 中使用 `/plugin` 命令:
📋 内部评估:
- 镜像分散在多个平台,重复维护成本高、容易漏更;
- 自托管 Gitea 实例为个人非管理员环境,长期可用性与备份缺乏保障;
- 代码已稳定收拢至 Gitee / GitHub 主仓,原镜像不再承载更新职责;
- 统一主仓后便于协作、CI 与备份,减少多端同步负担。
```
/plugin list 查看所有可用插件
/plugin install <插件码> 一键安装
/plugin remove <插件名> 卸载
```
示例:
```
> /plugin list
🔌 可用插件列表:
dglab ○ 未安装 DG-Lab 郊狼 WebSocket 控制
onebot ○ 未安装 OneBot v11 QQ 机器人
> /plugin install dglab
📥 正在安装: DG-Lab 郊狼 WebSocket 控制
✓ 文件已保存
✓ 已启用: ENABLE_DGLAB_WS = True
✓ 插件已加载
🎉 安装完成!
```
## 插件列表
### dglab — DG-Lab 郊狼控制
> 插件码: `dglab`
基于 [DG-LAB-OPENSOURCE](https://github.com/DG-LAB-OPENSOURCE/DG-LAB-OPENSOURCE) 官方 Socket V2 协议,通过 WebSocket 远程控制郊狼 3.0 脉冲主机。
- A/B 双通道强度控制(增加/减少/设置)
- 波形生成与发送
- APP 扫码配对
- 附带模拟器,无需真机即可测试
```bash
# 自然语言控制(AI 自动调用)
> 帮我把通道A强度调到50
> 发个波形,频率30强度50持续5秒
# 或直接命令
/dglab connect ws://192.168.1.100:9999
/dglab strength a + 10
/dglab pulse a 30 50 5
```
📄 [详细文档](./dglab_ws/README.md) | [DG-LAB 官方开源](https://github.com/DG-LAB-OPENSOURCE)
---
### onebot — QQ 机器人
> 插件码: `onebot`
让 xiaoli-cli 成为 QQ 机器人,通过 OneBot v11 协议连接 QQ 消息平台。
- 支持 go-cqhttp / Lagrange / LLOneBot / NapCat
- 正向/反向 WebSocket 连接
- @机器人 / 前缀 / 全部消息 三种触发
- 群白名单、管理员配置
- QQ 消息 → AI 处理 → 自动回复
```bash
# 启动
/onebot connect ws://127.0.0.1:8080
/onebot config trigger_mode at
# 之后 QQ 里 @机器人 发消息即可,AI 自动回复
```
📄 [详细文档](./onebot/README.md) | [OneBot 标准](https://github.com/botuniverse/onebot)
---
## 目录结构
```
xiaoli-cli-plugins/
├── README.md ← 本文件
├── plugin_registry.json ← 插件码注册表(/plugin 命令读取)
├── .gitignore
│
├── dglab_ws/
│ ├── dglab_ws.py ← 插件代码
│ ├── dglab_app_simulator.py ← APP 模拟器(测试用)
│ └── README.md ← 使用教程
│
└── onebot/
├── onebot.py ← 插件代码
└── README.md ← 使用教程
```
每个插件一个文件夹,包含插件代码和人读的教程。
## 插件码注册表
`plugin_registry.json` 是 `/plugin` 命令的数据源。格式:
```json
{
"plugins": {
"插件码": {
"name": "显示名称",
"description": "一句话描述",
"version": "1.0.0",
"file": "插件文件名.py",
"url": "下载地址",
"docs": "文档地址",
"deps": ["必须依赖"],
"optional_deps": ["可选依赖"],
"keywords": ["搜索关键词"]
}
}
}
```
添加远程源:
```
/plugin add-source https://example.com/plugin_registry.json
```
## 开发插件
### 1. 创建插件文件
```python
class Liugin:
"""插件主类(兼容 Plugin 类名)"""
def get_tool_info(self):
"""返回插件元信息(必须)"""
return {
"name": "my_plugin",
"description": "我的插件",
"keywords": ["关键词"],
"usage": "使用说明"
}
def handle(self, args):
"""处理命令(必须),返回结果字符串"""
return "结果"
def set_cli(self, cli):
"""注册 CLI 斜杠命令(可选)"""
if hasattr(cli, 'register_liugin_command'):
cli.register_liugin_command('my', self._cmd)
def get_mcp_definition(self):
"""MCP 工具定义(可选)"""
return {}
def convert_mcp_args(self, arguments):
"""MCP 参数转换(可选)"""
return ""
```
### 2. 编写教程
在插件文件夹内创建 `README.md`,包含:
- 功能说明
- 安装依赖
- 使用示例
- 命令速查
- 常见问题
### 3. 注册到注册表
在 `plugin_registry.json` 中添加条目,提交推送即可。
### 4. AI 如何调用插件
xiaoli-cli 的 AI 会自动发现已安装的插件:
```
用户: "帮我把通道A强度调到50"
↓
AI 看到系统提示词中的 dglab_ws 工具
↓
AI 返回: {"action": "use_tool", "tool": "dglab_ws", "args": "strength a = 50"}
↓
插件执行,结果返回 AI
↓
AI 回复: "已将通道A强度设为50"
```
用户不需要手动输入命令,自然语言即可。
## 相关仓库
| 仓库 | 说明 |
|------|------|
| [xiaoli-cli](https://gitee.com/shuiyu1123/xiaoli-cli) | 小狸 CLI 主程序 |
| [xiaoli-cli-plugins](https://gitee.com/shuiyu1123/xiaoli-cli-plugins) | 本仓库 — 插件集合 |
## License
MIT
旧镜像不再更新,但代码都好好的在新家继续生长。感谢你一路的关注与陪伴 💛