本项目是由 LiteyukiBot-6 延申而来的 Rust 重构项目, 在保留原有轻量化特点的同时, 又迎合 AI 时代浪潮.
- Rust 开发: 高效运行
- 多线程处理: 避免一核有难, 七核围观
- Websocket & SSE & TCP-Http 三段兼容: 总有一个接口适合你
- TUI & Docker & Tauri2-GUI: 想要什么风格都可以
- AstrBot 插件完整支持
- ADK-Rust 兼容层
- Neo-Mofox 插件完整支持
- NoneBot Runtime 兼容层
- Liteyuki Agent Flow 兼容层
- Rust 工具链 (需支持
edition = "2024") - Python 3.11+
- 建议使用最新稳定版
cargo
TUI:
cargo run首次启动会检测 config.yaml 并自动加载, 如果没有会自动在 %User%/.liteyuki/* 下创建.
配置加载顺序如下:
- 环境变量
LY_CONFIG_PATH指定路径 config.yamlrust-config.yamlrust-config.ymlrust-config.tomlconfig/rust-core.yamlconfig/rust-core.toml
- 建议将密钥放入独立
llm-config.yaml/llm-config.toml - 可通过
LY_LLM_CONFIG_PATH指定 LLM 配置文件 - 启动时会把独立文件中的
llm段覆盖到主配置
connect.websocket: 支持forward/reverse/bothconnect.tcp-http: TCP-HTTP 通道connect.sse: SSE 通道urls支持多端点, 会自动展开为多个适配器实例
- 前端 Dev Server:
http://127.0.0.1:1420/ - Tauri 内嵌 runtime / 健康接口:
http://127.0.0.1:14500/api/health - Vite 开发服务器默认绑定
0.0.0.0:1420, 便于外部浏览器访问 - Tauri 后端仍会保留
0.0.0.0:14500的 HTTP 入口, 用于健康检查和后续扩展 - Docker 测试端口参考自行设定的
-p参数
开发启动:
Tauri App:
pnpm install
pnpm run cargo dev如果本地 shell 对 pnpm run cargo dev 的参数转发有差异, 可退回:
pnpm run cargo:dev前端单独构建:
pnpm buildRust/Tauri 后端级别检查:
cargo check --manifest-path src-tauri/Cargo.tomlTUI (Terminal User Interface):
cargo run当前仓库提供的是仅 Web + 后端 形式的 image.
docker build -t liteyukibot-web .你可能需要花上五六分钟来编译
如果当前环境无法直连 docker.io, 可以直接覆写基础镜像来源, 而不用修改 Dockerfile:
docker build `
--build-arg NODE_BASE_IMAGE=docker.m.daocloud.io/library/node:22-bookworm-slim `
--build-arg RUST_BASE_IMAGE=docker.m.daocloud.io/library/rust:1-bookworm `
--build-arg RUNTIME_BASE_IMAGE=docker.m.daocloud.io/library/debian:bookworm-slim `
-t liteyukibot-web .Linux / macOS:
docker run -d \
--name liteyukibot-web \
-p 14500:14500 \
-v "$(pwd)/docker-data:/data" \
--restart unless-stopped \
liteyukibot-webPowerShell:
docker run -d `
--name liteyukibot-web `
-p 14500:14500 `
-v "${PWD}/docker-data:/data" `
--restart unless-stopped `
liteyukibot-web启动后可通过以下地址访问:
- WebUI:
http://127.0.0.1:14500/ - 健康检查:
http://127.0.0.1:14500/api/health
仓库已附带 docker-compose.yml, 可直接启动:
docker compose up -d --build停止:
docker compose down容器内所有运行时数据默认写入挂载卷 /data/.liteyuki/.
常用路径:
- 主配置:
/data/.liteyuki/configs/config.yaml - LLM 配置:
/data/.liteyuki/configs/llm-config.yaml - WebUI 密码:
/data/.liteyuki/configs/password.json - 插件目录:
/data/.liteyuki/plugins/
如果你已经有现成配置, 可在启动前放到宿主机挂载目录中:
./docker-data/.liteyuki/configs/config.yaml./docker-data/.liteyuki/configs/llm-config.yaml./docker-data/.liteyuki/plugins/
- 只启动共享 WebHost
- 默认运行目标为
docker-web - 默认对外暴露
14500端口 - 以非 root 用户运行
- 镜像内保留 Python 运行时, 便于当前 Python bridge / AstrBot 兼容层继续工作
查看日志:
docker logs -f liteyukibot-web重启容器:
docker restart liteyukibot-web删除容器:
docker rm -f liteyukibot-web如果你的 OneBot / WebSocket / SSE 适配器需要额外对外端口, 请按实际配置追加 -p, 或在 docker-compose.yml 中补充 ports 映射.
项目 Docker image 只发布到 GHCR, 不再推送 Docker Hub.
- Registry:
ghcr.io - Image:
ghcr.io/nanaloveyuki/rsliteyukibot-web - Workflow:
.github/workflows/build-image.yml
- push 到
stable时, GitHub Actions 会构建并推送latest与sha-*tag. - push
v*tag 时, GitHub Actions 会额外推送对应版本 tag, 例如v0.1.0. - 整个构建与 push 过程都在 GitHub Actions 上完成, 不依赖本地 Docker 网络环境.
拉取最新镜像:
docker pull ghcr.io/nanaloveyuki/rsliteyukibot-web:latest拉取指定版本:
docker pull ghcr.io/nanaloveyuki/rsliteyukibot-web:v0.1.0推荐使用仓库内脚本自动创建并推送 tag:
Linux / macOS:
./scripts/publish_new_version.sh 0.1.0PowerShell / CMD:
scripts\publish_new_version.bat 0.1.0脚本会执行以下流程:
- 规范化版本号为
vX.Y.Z. - 检查当前工作区是否干净.
- 检查本地和远端是否已存在同名 tag.
- 创建 annotated tag.
- 推送 tag 到
origin, 触发 GHCR 自动构建与发布.
@Snowykami: Liteyuki 文档站支持和授权
@NapcatQQ: 前端页面样式
Napcat LICENSE
Limited Redistribution License for NapCat
Copyright © 2024 Mlikiowa
-
Usage and Reproduction:
- Unauthorized use, reproduction, modification, or distribution of this code is prohibited without explicit permission from the main author of the NapCat repository.
-
Redistribution:
- Redistribution of this code is permitted, provided that the full text of this license is included, and the source and copyright information is clearly stated.
- Minor modifications and extensions are allowed for redistribution purposes, but the modified code must not be publicly released.
-
Non-Commercial Use:
- This code is not to be used for any commercial purposes.
-
Additional Permissions:
- Any rights not explicitly addressed in this license must be requested from and granted by the main author of the NapCat repository.
-
Disclaimer:
- This code is provided "as is," without any express or implied warranties, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. In no event shall the author be liable for any damages or other liability arising from, out of, or in connection with the use or distribution of this code.
本项目采用混合所有制许可:
- 前端部分:
- 部分代码 (使用 NapcatUI 源码部分) 采用
Napcat LICENSE - 部分代码 (二次创作后部分) 采用
LSO-Common.zh-CN v1.4 Modified
- 部分代码 (使用 NapcatUI 源码部分) 采用
- 后端部分:
- 插件兼容层实现:
- 按照各插件本体平台协议进行二次许可
未涉及或未明晰内容, 如字体等版权由提供方许给的许可进行授权, 受制于篇幅不再详细描述.