Skip to main content

entari-plugin-webui

基于 Vite + Vue 3 + Element Plus 的 Entari 可视化管理面板。

功能特性

  • 仪表盘 — 消息统计、运行状态一览(ECharts)
  • 配置管理 — 可视化编辑所有插件配置,支持 YAML 源码与表单双模式
  • 插件管理 — 查看/启用/停用/重载插件
  • 插件市场 — 浏览、安装、卸载社区插件
  • 实时日志 — WebSocket 流式日志查看,支持 ANSI 转义渲染
  • 在线聊天 — 基于 Satori 协议的浏览器内聊天界面
  • 扩展机制 — 其他插件可通过 webui_extend 注册菜单、页面、路由、国际化、权限
  • 主题切换 — 明暗主题一键切换
  • 会话管理 — 基于 Cookie 的登录会话,自动过期
  • 登录限流 — 防暴力破解

安装

pip

pip install entari-plugin-webui

pdm

pdm add entari-plugin-webui

配置示例

在 entari.yml 中启用插件:

plugins:
  server:
    port: 8765              # WebUI 服务端口
    path: "satori"
    direct_adapter: true
  database:
    name: .entari/database.db   # 统计数据用 SQLite
  webui: {}                     # 启动 WebUI 面板

完整字段说明:

字段 默认值 说明
password "" 登录密码(远程部署必填,本地可省略)
registry_url "" 插件市场地址
package_manager "" 包管理器(自动探测 pip/pdm/uv/poetry/rye/pipenv)
session_ttl 43200 会话过期时间(秒,默认 12 小时)
log_buffer_lines 5000 日志缓冲区行数
login_rate_limit 5/60s 登录频率限制

认证说明

  • 本地部署(host=127.0.0.1/localhost/::1):自动免认证,无需密码即可登录
  • 远程部署:首次启动时自动生成随机 16 位密码并输出到控制台日志

故障恢复

忘记密码时,删除配置中的 plugins.webui.password 字段(或置空),重启后即重新生成新密码:

plugins:
  webui: {}
  # password 字段可删除或留空

扩展开发

其他 Entari 插件可通过 webui_extend 注册前端扩展,无需修改本插件源码。

from entari_plugin_webui.core.extension import webui_extend

ext = webui_extend("my_plugin")

# 注册侧栏菜单
ext.add_menu("my_plugin.name", "mdi:account", "/extension/my_plugin")

# 注册 iframe 页面
ext.add_page("my_plugin", "my_plugin.name", "mdi:account",
             "http://127.0.0.1:3000/", permission="my_plugin.access")

# 注册后端 API 路由
ext.add_route("/api/my-plugin/hello", ["GET"], my_handler, permission="my_plugin.access")

# 注册国际化文案
ext.add_i18n("zh-CN", "my_plugin.name", "我的插件")
ext.add_i18n("en-US", "my_plugin.name", "My Plugin")

# 注册权限项
ext.add_permission("my_plugin.access", "my_plugin.permission.access")

WebUIExtension 方法总览:

方法 参数 说明
add_menu label_key, icon, path, order, badge_key, children 添加侧栏菜单项
add_page key, label_key, icon, component_url, permission 添加 iframe 页面
add_route path, methods, handler, permission 添加后端 HTTP 路由
add_websocket_route path, handler, permission 添加后端 WebSocket 路由
add_i18n locale, key, value 添加国际化翻译
add_permission key, label_key 添加权限定义

风险须知

Metadata

Release files for entari-plugin-webui 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for entari-plugin-webui 1.1.0
File Size Uploaded Provenance
entari_plugin_webui-1.1.0.tar.gz 2.4 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for entari-plugin-webui 1.1.0
File Interpreter ABI Platform
entari_plugin_webui-1.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.0 MB

Release files / entari_plugin_webui-1.1.0.tar.gz

Download URL entari_plugin_webui-1.1.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
add1a9f55ca4e26cec8a90f4d834305860c44f2ffb945937b58a24b5c3926060
BLAKE2b-256 checksum
How to use checksums
d3e236ead7d77beefdcd3d155a045a85d507c5e926d76c4cdb98cd1b114c77b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.3 CPython/3.11.17 Linux/6.17.0-1022-azure

Release files / entari_plugin_webui-1.1.0-py3-none-any.whl

Download URL entari_plugin_webui-1.1.0-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8353a98a58e34f3dd77f2660c097eb28615d5466fd6f5747d302aff5b4229973
BLAKE2b-256 checksum
How to use checksums
4c0ab36b6fd7ddb211263c0aba937cf1d106667b48e02255971547747d01e2da
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via pdm/2.29.3 CPython/3.11.17 Linux/6.17.0-1022-azure

Security for entari-plugin-webui 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page