这是 Karin 的官方插件仓库,用于收集和管理社区贡献的插件。
你可以在 plugins.json 中查看所有可用的插件。
- 确保你的插件符合规范要求
- 确保你的插件遵循 插件规范
- 准备好插件的相关信息
- Fork 本仓库
- 在
plugins.json
文件中添加你的插件信息 - 提交 Pull Request
- 等待自动化检查和审核
每个插件需要提供以下信息:
字段名 | 类型 | 描述 | 示例 |
---|---|---|---|
name | string | 插件包名 | "karin-plugin-basic" |
type | string | 插件类型 | "npm" | "git" | "app" |
description | string | 插件描述(限制50字符) | "karin plugin basic" |
time | string | 发布时间 (YYYY-MM-DD HH:mm:ss) | "2025-01-19 10:00:00" |
license | object | 开源协议信息 | 见下方示例 |
home | string | 插件主页 | https://github.com/sj817 |
字段名 | 类型 | 描述 | 示例 |
---|---|---|---|
name | string | 许可证名称 | "MIT" |
url | string | 许可证地址 | https://github.com/karinjs/karin-plugin-basic/blob/main/LICENSE |
作者信息是一个数组,支持多个作者:
字段名 | 类型 | 描述 | 示例 |
---|---|---|---|
name | string | 作者名称 | shijin |
home | string | 作者主页 | https://github.com/sj817 |
仓库信息是一个数组,支持多个仓库:
字段名 | 类型 | 描述 | 示例 |
---|---|---|---|
type | string | 仓库类型 ("github" | "gitee" | "gitcode" | "gitlab" | "npm") | "github" |
url | string | 仓库地址 | https://github.com/karinjs/karin-plugin-basic |
branch | string | 默认分支(npm类型为空字符串) | "main" |
字段名 | 类型 | 描述 | 示例 |
---|---|---|---|
home | string | 主页地址 | https://github.com/sj817 |
-
NPM 插件 (
type: "npm"
)- 通过 npm 包方式发布的插件
-
Git 插件 (
type: "git"
)- 通过 git 仓库方式发布的插件
-
App 插件 (
type: "app"
)- 单应用插件,需要提供文件直链地址
- 需要在配置中添加
files
字段,包含应用文件的直链地址
- 请确保将新插件添加到
plugins
数组中 - name 必须是唯一的
- description 长度限制为 50 字符
- 对于 App 类型插件,建议提供多个下载源以提高可用性
- 所有仓库源都必须提供
package.json
并且包含name
和version
字段
在 plugins.json
文件中的 plugins
数组中添加你的插件信息。以下是不同类型插件的示例:
{
"plugins": [
{
"name": "karin-plugin-basic",
"type": "npm",
"description": "karin plugin basic",
"license": {
"name": "MIT",
"url": "https://github.com/karinjs/karin-plugin-basic/blob/main/LICENSE"
},
"time": "2025-01-19 10:00:00",
"author": [
{
"name": "shijin",
"home": "https://github.com/sj817"
}
],
"repo": [
{
"type": "github",
"url": "https://github.com/karinjs/karin-plugin-basic",
"branch": "main"
},
{
"type": "npm",
"url": "https://www.npmjs.com/package/karin-plugin-basic",
"branch": ""
}
]
},
{
"name": "karin-plugin-git-example",
"type": "git",
"description": "这是一个 Git 插件示例",
"license": {
"name": "MIT",
"url": "https://github.com/username/karin-plugin-git-example/blob/main/LICENSE"
},
"time": "2024-03-19 10:00:00",
"author": [
{
"name": "作者名字",
"home": "https://github.com/username"
}
],
"repo": [
{
"type": "github",
"url": "https://github.com/username/karin-plugin-git-example",
"branch": "main"
},
{
"type": "gitee",
"url": "https://gitee.com/username/karin-plugin-git-example",
"branch": "master"
}
]
},
{
"name": "karin-plugin-app-example",
"type": "app",
"description": "这是一个 App 插件示例",
"license": {
"name": "GPL-3.0",
"url": "https://github.com/username/karin-plugin-app-example/blob/main/LICENSE"
},
"time": "2024-03-19 10:00:00",
"author": [
{
"name": "作者名字",
"home": "https://github.com/username"
}
],
"repo": [
{
"type": "github",
"url": "https://github.com/username/karin-plugin-app-example",
"branch": "main"
}
],
"files": [
"https://example.com/download/plugin-v1.0.0.js",
"https://mirror.example.com/download/plugin-v1.0.0.js"
]
}
]
}
本仓库采用 MIT 许可证
https://registry.npmjs.com/@karinjs/plugins-list/latest
https://registry.npmmirror.com/@karinjs/plugins-list/latest