fix(batch-install-plugins): support CRLF community plugin metadata

- support CRLF docstrings and folded YAML metadata blocks
- detect community repo plugins such as iChristGit/OpenWebui-Tools correctly
- align README, mirrored docs, and announcement wording with actual behavior

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
fujie
2026-03-15 18:14:23 +08:00
parent cea31fed38
commit c818a2ac8d
8 changed files with 725 additions and 178 deletions

View File

@@ -1,8 +1,6 @@
# Batch Install Plugins from GitHub
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 1.0.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **License:** MIT
---
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 1.0.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
One-click batch install plugins from GitHub repositories to your OpenWebUI instance.
@@ -10,7 +8,7 @@ One-click batch install plugins from GitHub repositories to your OpenWebUI insta
- **One-Click Install**: Install all plugins with a single command
- **Auto-Update**: Automatically updates previously installed plugins
- **GitHub Support**: Install plugins from any GitHub repository
- **Public GitHub Support**: Install plugins from any public GitHub repository
- **Multi-Type Support**: Supports Pipe, Action, Filter, and Tool plugins
- **Confirmation**: Shows plugin list before installing, allows selective installation
- **i18n**: Supports 11 languages
@@ -53,68 +51,91 @@ User Input
## How to Use
1. Open OpenWebUI and go to **Workspace > Tools**
2. Install **Batch Install Plugins from GitHub** from the official marketplace
2. Install **Batch Install Plugins from GitHub** from the marketplace
3. Enable this tool for your model/chat
4. Ask the model to install plugins
## Interactive Installation Workflow
Each request handles one repository. To mix repositories, send another request after the previous installation completes.
### Example Installation Sequence
1. **Start with My Collection**
```
"Install all plugins from Fu-Jie/openwebui-extensions"
```
Review the confirmation dialog, approve, and the plugins are installed.
2. **Add a Community Collection**
```
"Install all plugins from iChristGit/OpenWebui-Tools"
```
Add more plugins from a different repository. Already installed plugins are updated seamlessly.
3. **Install a Specific Type**
```
"Install only pipe plugins from Haervwe/open-webui-tools"
```
Pick specific plugin types from another repository, or exclude certain keywords.
4. **Use Your Own Repository**
```
"Install all plugins from your-username/your-collection"
```
Works with any public GitHub repository in `owner/repo` format.
## Usage Examples
Each line below is a separate request:
```
# Install from my default collection
"Install all plugins"
"Install all plugins from github.com/username/repo"
"Install only pipe plugins"
"Install action and filter plugins"
"Install all plugins, exclude_keywords=copilot"
```
## Popular Plugin Repositories
Here are some popular repositories with many plugins you can install:
### Community Collections
```
# Install all plugins from iChristGit's collection
# Add another repository in a new request
"Install all plugins from iChristGit/OpenWebui-Tools"
# Install all tools from Haervwe's tools collection
"Install all plugins from Haervwe/open-webui-tools"
# Add only tools from a different repository
"Install only tool plugins from Haervwe/open-webui-tools"
# Install all plugins from Classic298's repository
"Install all plugins from Classic298/open-webui-plugins"
# Continue building your setup with another request
"Install only action plugins from Classic298/open-webui-plugins"
# Install all functions from suurt8ll's collection
"Install all plugins from suurt8ll/open_webui_functions"
# Install only specific types (e.g., only tools)
"Install only tool plugins from iChristGit/OpenWebui-Tools"
# Exclude certain keywords while installing
# Filter out unwanted plugins
"Install all plugins from Haervwe/open-webui-tools, exclude_keywords=test,deprecated"
# Install from your own public repository
"Install all plugins from your-username/my-plugin-collection"
```
### Supported Repositories
## Popular Public Repositories
- `Fu-Jie/openwebui-extensions` - Default, official plugin collection
- `iChristGit/OpenWebui-Tools` - Comprehensive tool and plugin collection
- `Haervwe/open-webui-tools` - Specialized tools and utilities
- `Classic298/open-webui-plugins` - Various plugin implementations
The tool works with any public GitHub repository in `owner/repo` format. Popular starting points include:
- `Fu-Jie/openwebui-extensions` - My personal collection and the default source
- `iChristGit/OpenWebui-Tools` - Comprehensive tools and plugins
- `Haervwe/open-webui-tools` - Utility-focused extensions
- `Classic298/open-webui-plugins` - Mixed community plugins
- `suurt8ll/open_webui_functions` - Function-based plugins
- `rbb-dev/Open-WebUI-OpenRouter-pipe` - OpenRouter pipe integration
To combine repositories, run the tool again with a different `repo` after the previous installation completes.
## Default Repository
When no repository is specified, defaults to `Fu-Jie/openwebui-extensions`.
When no repository is specified, the tool uses `Fu-Jie/openwebui-extensions` (my personal collection).
## Plugin Detection Rules
### Fu-Jie/openwebui-extensions (Strict)
For the default repository, plugins must have:
For the default repository, the tool applies stricter filtering:
1. A `.py` file containing `class Tools:`, `class Filter:`, `class Pipe:`, or `class Action:`
2. A docstring with `title:`, `description:`, and **`openwebui_id:`** fields
2. A docstring with `title:`, `description:`, and **`openwebui_id:`** metadata
3. Filename must not end with `_cn`
### Other GitHub Repositories
### Other Public GitHub Repositories
For other repositories:
1. A `.py` file containing `class Tools:`, `class Filter:`, `class Pipe:`, or `class Action:`

View File

@@ -1,21 +1,19 @@
# Batch Install Plugins from GitHub - 从 GitHub 批量安装插件
# Batch Install Plugins from GitHub
**作者:** [Fu-Jie](https://github.com/Fu-Jie) | **版本:** 1.0.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **许可:** MIT
**作者:** [Fu-Jie](https://github.com/Fu-Jie) | **版本:** 1.0.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions)
---
一键将 GitHub 仓库中的插件批量安装到你的 OpenWebUI 实例。
一键从 GitHub 仓库批量安装插件到你的 OpenWebUI 实例。
## 主要功能
## ✨ 主要特性
- 一键安装:单个命令安装所有插件
- 自动更新:自动更新之前安装过的插件
- 公开 GitHub 支持:支持从任何公开 GitHub 仓库安装插件
- 多类型支持:支持 Pipe、Action、Filter 和 Tool 插件
- 安装确认:安装前显示插件列表,支持选择性安装
- 国际化:支持 11 种语言
- **一键安装**: 一条命令安装所有插件
- **自动更新**: 自动更新之前已安装的插件
- **GitHub 支持**: 支持从任何 GitHub 仓库安装插件
- **多类型支持**: 支持 Pipe、Action、Filter 和 Tool 插件
- **确认机制**: 安装前显示插件列表,允许选择性安装
- **国际化**: 支持 11 种语言
## 工作流
## 流程
```
用户输入
@@ -23,13 +21,13 @@
┌─────────────────────────────────────┐
│ 从 GitHub 发现插件 │
│ (获取文件树 + 解析 .py)
│ (获取文件树 + 解析 .py 文件)
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ 按类型和关键词过滤 │
│ (tool/filter/pipe/action)
│ (tool/filter/pipe/action) │
└─────────────────────────────────────┘
@@ -42,90 +40,113 @@
┌─────────────────────────────────────┐
│ 安装到 OpenWebUI
│ (更新或创建每个插件) │
│ 安装到 OpenWebUI │
│ (更新或创建每个插件)
└─────────────────────────────────────┘
完成
```
## 🚀 使用方法
## 使用方法
1. 打开 OpenWebUI进入 **工作区 > 工具**
2.官方市场安装 **Batch Install Plugins from GitHub**
3. 为你的模型/聊天启用此工具
4. 让模型安装插件
1. 打开 OpenWebUI进入 **Workspace > Tools**
2. 从市场安装 **Batch Install Plugins from GitHub**
3. 为你的模型/对话启用此工具
4. 让模型调用工具来安装插件
## 交互式安装工作流
每次请求处理一个仓库。如需混合多个来源,请在上一次安装完成后再发起下一次请求。
### 安装序列示例
1. **先从我的合集开始**
```
"安装 Fu-Jie/openwebui-extensions 中的所有插件"
```
查看确认对话框,批准后插件开始安装。
2. **再添加社区合集**
```
"从 iChristGit/OpenWebui-Tools 安装所有插件"
```
从不同仓库添加更多插件。已安装的插件会无缝更新。
3. **按类型继续安装**
```
"从 Haervwe/open-webui-tools 仅安装 pipe 插件"
```
从另一个仓库选择特定类型的插件,或排除某些关键词。
4. **使用你自己的仓库**
```
"从 your-username/your-collection 安装所有插件"
```
支持任何公开的 GitHub 仓库,格式为 `owner/repo`。
## 使用示例
下面每一行都是一次独立请求:
```
# 从默认合集安装
"安装所有插件"
"从 github.com/username/repo 安装所有插件"
"仅安装 pipe 插件"
"安装 action 和 filter 插件"
"安装所有插件exclude_keywords=copilot"
```
## 热门插件仓库
这些是包含大量插件的热门仓库,你可以从中安装插件:
### 社区合集
```
# 从 iChristGit 的集合安装所有插件
# 在下一次请求中加入其他仓库
"从 iChristGit/OpenWebui-Tools 安装所有插件"
# 从 Haervwe 的工具集合只安装工具
"从 Haervwe/open-webui-tools 安装所有插件"
# 从其他仓库只安装工具
"从 Haervwe/open-webui-tools 安装 tool 插件"
# 从 Classic298 的仓库安装所有插件
"从 Classic298/open-webui-plugins 安装所有插件"
# 再继续补充另一类插件
"从 Classic298/open-webui-plugins 安装仅 action 插件"
# 从 suurt8ll 的集合安装所有函数
"从 suurt8ll/open_webui_functions 安装所有插件"
# 过滤不想安装的插件
"从 Haervwe/open-webui-tools 安装所有插件, exclude_keywords=test,deprecated"
# 仅安装特定类型的插件(比如只安装工具)
"从 iChristGit/OpenWebui-Tools 仅安装 tool 插件"
# 安装时排除特定关键词
"从 Haervwe/open-webui-tools 安装所有插件exclude_keywords=test,deprecated"
# 从你自己的公开仓库安装
"从 your-username/my-plugin-collection 安装所有插件"
```
### 支持的仓库
## 热门公开仓库
- `Fu-Jie/openwebui-extensions` - 默认的官方插件集合
该工具支持任何公开 GitHub 仓库,格式为 `owner/repo`。这些都是不错的起点:
- `Fu-Jie/openwebui-extensions` - 我的个人合集,也是默认来源
- `iChristGit/OpenWebui-Tools` - 全面的工具和插件集合
- `Haervwe/open-webui-tools` - 专业的工具和实用程序
- `Classic298/open-webui-plugins` - 各种插件实现
- `suurt8ll/open_webui_functions` - 基于函数的插件
- `Haervwe/open-webui-tools` - 偏工具型的扩展集合
- `Classic298/open-webui-plugins` - 混合型社区插件集合
- `suurt8ll/open_webui_functions` - 基于函数的插件集合
- `rbb-dev/Open-WebUI-OpenRouter-pipe` - OpenRouter pipe 集成
如需混合多个来源,请在上一次安装完成后,换一个 `repo` 再调用一次工具。
## 默认仓库
未指定仓库时,默认使用 `Fu-Jie/openwebui-extensions`
未指定仓库时,工具会使用 `Fu-Jie/openwebui-extensions`(我的个人合集)
## 插件检测规则
### Fu-Jie/openwebui-extensions严格模式
对于默认仓库,插件必须有
对于默认仓库,工具会采用更严格的筛选规则
1. 包含 `class Tools:`、`class Filter:`、`class Pipe:` 或 `class Action:` 的 `.py` 文件
2. 包含 `title:``description:`**`openwebui_id:`** 字段的文档字符串
2. Docstring 中包含 `title:`、`description:` 和 **`openwebui_id:`** 元数据
3. 文件名不能以 `_cn` 结尾
### 其他 GitHub 仓库
### 其他公开 GitHub 仓库
对于其他仓库:
其他仓库的插件必须满足
1. 包含 `class Tools:`、`class Filter:`、`class Pipe:` 或 `class Action:` 的 `.py` 文件
2. 包含 `title:``description:` 字段的文档字符串
2. Docstring 中包含 `title:` 和 `description:` 字段
## 配置 (Valves)
## 配置Valves
| 参数 | 默认值 | 描述 |
| --- | --- | --- |
| `SKIP_KEYWORDS` | `test,verify,example,template,mock` | 跳过关键词,用逗号分隔 |
| `TIMEOUT` | `20` | 请求超时时间(秒) |
| `SKIP_KEYWORDS` | `test,verify,example,template,mock` | 逗号分隔的跳过关键词 |
| `TIMEOUT` | `20` | 请求超时时间(秒)|
## 确认超时时间