chore: 添加开源社区基础设施和项目文档

- 添加 README、LICENSE (MIT)、CONTRIBUTING、CHANGELOG
- 添加 GitHub Issue/PR 模板和 FUNDING 配置
- 添加 CI/CD 工作流(ci.yml + release.yml)
- 添加项目文档页面 (docs/index.html)
- 添加 logo 和社群二维码图片资源
- 添加开发和构建脚本 (dev.sh + build.sh)
- 更新 package-lock.json 依赖
This commit is contained in:
晴天
2026-02-28 03:23:39 +08:00
parent add7f1e083
commit 75e94a7560
17 changed files with 1092 additions and 0 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
github: qingchencloud

93
.github/ISSUE_TEMPLATE/bug_report.yml vendored Normal file
View File

@@ -0,0 +1,93 @@
name: Bug 报告
description: 提交一个 Bug 报告,帮助我们改进 ClawPanel
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
感谢你提交 Bug 报告!请尽量详细地填写以下信息,以便我们快速定位和修复问题。
- type: textarea
id: description
attributes:
label: 问题描述
description: 清晰简洁地描述你遇到的问题。
placeholder: 请描述你遇到了什么问题...
validations:
required: true
- type: textarea
id: reproduce
attributes:
label: 复现步骤
description: 按顺序列出复现该问题的操作步骤。
placeholder: |
1. 打开应用
2. 进入 '...' 页面
3. 点击 '...' 按钮
4. 出现错误
validations:
required: true
- type: textarea
id: expected
attributes:
label: 期望行为
description: 描述你期望应该发生什么。
placeholder: 我期望...
validations:
required: true
- type: dropdown
id: os
attributes:
label: 操作系统
description: 你使用的操作系统是什么?
options:
- macOS (Apple Silicon)
- macOS (Intel)
- Windows 11
- Windows 10
- Ubuntu / Debian
- Fedora / RHEL
- Arch Linux
- 其他 Linux 发行版
validations:
required: true
- type: input
id: os-version
attributes:
label: 系统版本
description: 操作系统的具体版本号。
placeholder: "例如: macOS 15.3, Windows 11 24H2, Ubuntu 24.04"
validations:
required: true
- type: input
id: app-version
attributes:
label: ClawPanel 版本
description: 你使用的 ClawPanel 版本号(可在「关于」页面查看)。
placeholder: "例如: v0.1.0"
validations:
required: true
- type: textarea
id: screenshots
attributes:
label: 截图或日志
description: 如果有的话,请附上截图或相关错误日志,有助于更快地定位问题。
placeholder: 拖拽图片到此处上传,或粘贴错误日志...
validations:
required: false
- type: textarea
id: additional
attributes:
label: 补充信息
description: 其他你认为可能有帮助的信息。
placeholder: 任何额外的上下文信息...
validations:
required: false

View File

@@ -0,0 +1,60 @@
name: 功能请求
description: 提出一个新功能或改进建议
title: "[功能] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
感谢你提出功能建议!请详细描述你的想法,帮助我们让 ClawPanel 变得更好。
- type: textarea
id: description
attributes:
label: 功能描述
description: 清晰简洁地描述你希望添加的功能。
placeholder: 我希望 ClawPanel 能够...
validations:
required: true
- type: textarea
id: use-case
attributes:
label: 使用场景
description: 描述这个功能会在什么场景下使用,解决什么问题。
placeholder: |
当我在使用 ClawPanel 时,经常需要...
目前的做法是...
如果有这个功能,我就可以...
validations:
required: true
- type: textarea
id: solution
attributes:
label: 可能的实现方案
description: 如果你有实现思路,请在这里描述。
placeholder: |
我认为可以通过以下方式实现:
1. ...
2. ...
validations:
required: false
- type: textarea
id: alternatives
attributes:
label: 替代方案
description: 你是否考虑过其他替代方案?
placeholder: 我也考虑过...
validations:
required: false
- type: textarea
id: additional
attributes:
label: 补充信息
description: 其他相关信息,如参考链接、截图、类似产品的实现等。
placeholder: 参考资料或额外说明...
validations:
required: false

34
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@@ -0,0 +1,34 @@
## 变更描述
<!-- 请简要描述本次 PR 的变更内容和目的 -->
## 变更类型
- [ ] 新功能 (feat)
- [ ] Bug 修复 (fix)
- [ ] 代码重构 (refactor)
- [ ] 样式调整 (style)
- [ ] 性能优化 (perf)
- [ ] 文档更新 (docs)
- [ ] 构建/CI 配置 (ci/build)
- [ ] 其他 (chore)
## 测试清单
- [ ] 本地运行 `npm run build` 前端构建通过
- [ ] 本地运行 `cargo check` Rust 编译通过
- [ ] 在 macOS 上测试通过
- [ ] 在 Windows 上测试通过
- [ ] 在 Linux 上测试通过
- [ ] 新功能已添加对应测试
- [ ] 所有现有测试通过
## 相关 Issue
<!-- 关联的 Issue 编号,例如: closes #123 -->
## 截图 (如涉及 UI 变更)
<!-- 如果有 UI 变更,请附上前后对比截图 -->

81
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,81 @@
# ClawPanel 持续集成工作流
# 在推送到 main 分支或提交 PR 到 main 分支时自动运行
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# 同一分支的新提交会取消正在运行的旧工作流
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
name: 检查 (${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
# macOS Apple Silicon
- name: macOS (ARM64)
os: macos-latest
# Linux x86_64
- name: Linux (x64)
os: ubuntu-latest
# Windows x86_64
- name: Windows (x64)
os: windows-latest
steps:
# 签出代码
- name: 签出代码
uses: actions/checkout@v4
# 安装 Node.js 22
- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
# 安装前端依赖
- name: 安装前端依赖
run: npm ci
# 安装 Rust 工具链 (stable)
- name: 安装 Rust 工具链
uses: dtolnay/rust-toolchain@stable
# Rust 编译缓存
- name: Rust 编译缓存
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# Linux 专用: 安装 Tauri v2 系统依赖
- name: 安装 Linux 系统依赖
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev
# Rust 编译检查
- name: Rust 编译检查
working-directory: src-tauri
run: cargo check
# 前端构建验证
- name: 前端构建验证
run: npm run build

87
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,87 @@
# ClawPanel 发布构建工作流
# 推送 v* 标签时自动构建跨平台产物并创建 GitHub Release
name: Release
on:
push:
tags:
- "v*"
jobs:
release:
name: 构建 (${{ matrix.platform.name }})
runs-on: ${{ matrix.platform.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
platform:
# macOS Apple Silicon (ARM64)
- name: macOS (ARM64)
os: macos-latest
args: --target aarch64-apple-darwin
# Linux x86_64
- name: Linux (x64)
os: ubuntu-latest
args: ""
# Windows x86_64
- name: Windows (x64)
os: windows-latest
args: ""
steps:
# 签出代码
- name: 签出代码
uses: actions/checkout@v4
# 安装 Node.js 22
- name: 安装 Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
# 安装前端依赖
- name: 安装前端依赖
run: npm ci
# 安装 Rust 工具链 (stable)
- name: 安装 Rust 工具链
uses: dtolnay/rust-toolchain@stable
with:
# macOS ARM64 需要指定 target
targets: ${{ matrix.platform.os == 'macos-latest' && 'aarch64-apple-darwin' || '' }}
# Rust 编译缓存
- name: Rust 编译缓存
uses: swatinem/rust-cache@v2
with:
workspaces: src-tauri -> target
# Linux 专用: 安装 Tauri v2 系统依赖
- name: 安装 Linux 系统依赖
if: matrix.platform.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libssl-dev \
libgtk-3-dev \
libayatana-appindicator3-dev
# 使用 tauri-action 构建并发布
- name: 构建 Tauri 应用
uses: tauri-apps/tauri-action@v0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tagName: ${{ github.ref_name }}
releaseName: "ClawPanel ${{ github.ref_name }}"
releaseBody: "详细变更记录请查看提交历史。"
releaseDraft: true
prerelease: false
args: ${{ matrix.platform.args }}

23
CHANGELOG.md Normal file
View File

@@ -0,0 +1,23 @@
# 更新日志
本项目的所有重要变更都将记录在此文件中。
格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/)
版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
## [0.1.0] - 2026-02-28
### 新增
- 仪表盘:系统概览、服务状态一览
- 服务管理OpenClaw 服务启停、版本检测、一键升级、Gateway 安装/卸载
- 模型配置:服务商管理、模型增删改查、主模型选择、批量测试、延迟检测、自动保存+撤销
- 网关配置:端口、运行模式、认证 Token 配置
- 日志查看:多日志源实时查看、关键词搜索
- 记忆管理记忆文件查看、编辑、分类管理、ZIP 导出
- 扩展工具cftunnel 内网穿透管理、ClawApp 状态监控
- 关于页面:版本信息、社群二维码、相关项目链接
- 配置备份:手动创建/恢复/删除备份
- 暗色/亮色主题切换
- 服务商预设OpenAI/Anthropic/DeepSeek/Google
- 模型预设(常用模型一键添加)

82
CONTRIBUTING.md Normal file
View File

@@ -0,0 +1,82 @@
# 贡献指南
感谢你对 ClawPanel 项目的关注!以下是参与贡献的相关说明。
## 开发环境要求
| 依赖 | 最低版本 | 说明 |
|------|----------|------|
| Node.js | 18+ | 前端构建 |
| Rust | stable | Tauri 后端编译 |
| Tauri CLI | v2 | `cargo install tauri-cli --version "^2"` |
### 快速开始
```bash
# 克隆仓库
git clone https://github.com/qingchencloud/clawpanel.git
cd clawpanel
# 安装前端依赖
npm install
# 启动开发模式
cargo tauri dev
```
## 分支策略
- 所有开发基于 `main` 分支
- 新功能分支:`feature/功能描述`(例如 `feature/log-export`
- 修复分支:`fix/问题描述`(例如 `fix/model-save-crash`
- 完成后发起 PR 合并回 `main`
## 提交规范
提交信息采用 [Conventional Commits](https://www.conventionalcommits.org/) 格式:
```
<类型>(可选范围): 简要描述
```
### 类型说明
| 类型 | 说明 |
|------|------|
| `feat` | 新功能 |
| `fix` | 修复 Bug |
| `docs` | 文档变更 |
| `style` | 代码格式调整(不影响逻辑) |
| `refactor` | 重构(非新功能、非 Bug 修复) |
| `test` | 测试相关 |
| `chore` | 构建/工具/依赖变更 |
### 示例
```
feat(model): 新增模型批量测试功能
fix(gateway): 修复端口配置未生效的问题
docs: 更新安装说明
```
## PR 流程
1. Fork 本仓库并克隆到本地
2.`main` 创建新分支
3. 完成开发并进行本地测试
4. 确保代码风格一致、注释完整
5. 提交并推送到你的 Fork 仓库
6. 发起 Pull Request描述清楚变更内容和测试情况
7. 等待代码审查,根据反馈修改
## 代码规范
- **前端**:使用 Vanilla JS不引入第三方框架
- **注释**:所有代码注释使用中文
- **风格**:简洁清晰,避免过度封装
- **命名**变量和函数使用驼峰命名camelCaseCSS 类名使用短横线命名kebab-case
- **资源**:静态资源本地化,禁止引用远程 CDN
## 问题反馈
如果发现 Bug 或有功能建议,欢迎通过 [GitHub Issues](https://github.com/qingchencloud/clawpanel/issues) 提交。

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 qingchencloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

123
README.md Normal file
View File

@@ -0,0 +1,123 @@
<p align="center">
<img src="public/images/logo.svg" width="120" alt="ClawPanel Logo">
</p>
<h1 align="center">ClawPanel</h1>
<p align="center">
OpenClaw 可视化管理面板 — 基于 Tauri v2 的跨平台桌面应用
</p>
<p align="center">
<a href="https://github.com/qingchencloud/clawpanel/blob/main/LICENSE">
<img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License">
</a>
<a href="https://github.com/qingchencloud/clawpanel/releases">
<img src="https://img.shields.io/github/v/release/qingchencloud/clawpanel" alt="Release">
</a>
</p>
---
ClawPanel 是 [OpenClaw](https://github.com/openclaw-labs/openclaw) AI Agent 框架的可视化管理面板,提供服务管控、模型配置、日志查看、记忆管理等核心功能,一站式管理 OpenClaw 实例。
## 功能截图
> 截图待补充
## 功能特性
- **仪表盘** — 系统概览,服务状态实时监控
- **服务管理** — OpenClaw 服务启停、版本检测、配置备份与恢复
- **模型配置** — 多服务商管理、模型增删改查、主模型选择、批量测试、延迟检测、自动保存与撤销
- **网关配置** — Gateway 端口、运行模式、认证方式配置
- **日志查看** — 多日志源实时查看与关键字搜索
- **记忆管理** — OpenClaw 记忆文件的查看、编辑、导出
- **扩展工具** — cftunnel 内网穿透管理、ClawApp 连接状态
- **关于** — 版本信息、社群入口、相关项目
## 技术架构
| 层级 | 技术 | 说明 |
|------|------|------|
| 前端 | Vanilla JS + Vite | 零框架依赖,轻量快速 |
| 后端 | Rust + Tauri v2 | 原生性能,跨平台打包 |
| 通信 | Tauri IPC + Shell Plugin | 前后端桥接,本地命令执行 |
| 样式 | 纯 CSSCSS Variables | 暗色主题,玻璃拟态风格 |
```
clawpanel/
├── src/ # 前端源码
│ ├── pages/ # 8 个页面模块
│ ├── components/ # 通用组件侧边栏、弹窗、Toast
│ ├── lib/ # 工具库Tauri API 封装、主题)
│ ├── style/ # 样式文件
│ ├── router.js # 路由
│ └── main.js # 入口
├── src-tauri/ # Rust 后端
│ ├── src/ # Tauri 命令与业务逻辑
│ ├── Cargo.toml # Rust 依赖
│ └── tauri.conf.json # Tauri 配置
├── public/ # 静态资源
├── scripts/ # 开发与构建脚本
│ ├── dev.sh # 开发模式启动
│ └── build.sh # 编译与打包
├── index.html # HTML 入口
├── vite.config.js # Vite 配置
└── package.json # 前端依赖
```
## 快速开始
### 前置条件
- [Node.js](https://nodejs.org/) >= 18
- [Rust](https://www.rust-lang.org/tools/install) (stable)
- Tauri v2 系统依赖(参考 [Tauri 官方文档](https://v2.tauri.app/start/prerequisites/)
### 安装依赖
```bash
git clone https://github.com/qingchencloud/clawpanel.git
cd clawpanel
npm install
```
### 开发
```bash
# 启动完整 Tauri 桌面应用(默认)
./scripts/dev.sh
# 仅启动 Vite 前端(浏览器调试,使用 mock 数据)
./scripts/dev.sh web
```
### 构建
```bash
# 编译 debug 版本(默认)
./scripts/build.sh
# 仅检查 Rust 编译(最快,不生成产物)
./scripts/build.sh check
# 编译正式发布版本(含打包)
./scripts/build.sh release
```
## 相关项目
| 项目 | 说明 |
|------|------|
| [OpenClaw](https://github.com/openclaw-labs/openclaw) | AI Agent 框架 |
| [ClawApp](https://github.com/qingchencloud/clawapp) | 跨平台移动聊天客户端 |
| [cftunnel](https://github.com/qingchencloud/cftunnel) | Cloudflare Tunnel 内网穿透工具 |
## 贡献
欢迎提交 Issue 和 Pull Request。贡献流程详见 [CONTRIBUTING.md](CONTRIBUTING.md)。
## 许可证
[MIT License](LICENSE)

345
docs/index.html Normal file
View File

@@ -0,0 +1,345 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ClawPanel - OpenClaw 可视化管理面板</title>
<meta name="description" content="ClawPanel 是基于 Tauri v2 构建的跨平台桌面应用,为 OpenClaw AI Agent 框架提供可视化管理界面。">
<style>
:root {
--bg: #0a0a0f;
--bg-card: #12121a;
--bg-card-hover: #1a1a25;
--border: #1e1e2e;
--text: #e4e4ec;
--text-secondary: #9898a8;
--accent: #6366f1;
--accent-soft: rgba(99, 102, 241, 0.15);
--success: #22c55e;
--radius: 12px;
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: var(--font);
background: var(--bg);
color: var(--text);
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
/* 顶部导航 */
.nav {
position: fixed; top: 0; left: 0; right: 0; z-index: 100;
background: rgba(10, 10, 15, 0.85);
backdrop-filter: blur(16px);
border-bottom: 1px solid var(--border);
padding: 0 24px;
height: 56px;
display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.nav-brand img { width: 28px; height: 28px; border-radius: 6px; }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a { color: var(--text-secondary); transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
/* Hero 区域 */
.hero {
padding: 140px 24px 80px;
text-align: center;
position: relative;
overflow: hidden;
}
.hero::before {
content: '';
position: absolute;
top: -200px; left: 50%; transform: translateX(-50%);
width: 800px; height: 600px;
background: radial-gradient(ellipse, rgba(99, 102, 241, 0.12) 0%, transparent 70%);
pointer-events: none;
}
.hero h1 { font-size: 48px; font-weight: 700; margin-bottom: 16px; position: relative; }
.hero .subtitle { font-size: 18px; color: var(--text-secondary); max-width: 600px; margin: 0 auto 32px; position: relative; }
.hero-actions { display: flex; gap: 12px; justify-content: center; position: relative; }
.btn {
display: inline-flex; align-items: center; gap: 8px;
padding: 12px 24px; border-radius: 8px;
font-size: 14px; font-weight: 500;
border: none; cursor: pointer; transition: all 0.2s;
text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary {
background: var(--accent); color: #fff;
}
.btn-primary:hover { background: #5558e6; transform: translateY(-1px); }
.btn-secondary {
background: var(--bg-card); color: var(--text);
border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); transform: translateY(-1px); }
/* 内容区域 */
.container { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
/* 功能特性 */
.features { padding: 80px 0; }
.section-title {
font-size: 28px; font-weight: 600;
text-align: center; margin-bottom: 48px;
}
.features-grid {
display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 16px;
}
.feature-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 24px;
transition: all 0.2s;
}
.feature-card:hover {
background: var(--bg-card-hover);
border-color: var(--accent);
transform: translateY(-2px);
}
.feature-card h3 { font-size: 16px; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }
/* 技术架构 */
.tech { padding: 80px 0; }
.tech-table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
.tech-table th, .tech-table td {
padding: 14px 20px;
text-align: left;
border-bottom: 1px solid var(--border);
}
.tech-table th {
font-weight: 500;
color: var(--text-secondary);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.tech-table td:first-child { font-weight: 500; }
/* 快速开始 */
.quickstart { padding: 80px 0; }
.code-block {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px 24px;
font-family: "SF Mono", "Fira Code", monospace;
font-size: 13px;
line-height: 1.8;
overflow-x: auto;
margin: 16px 0;
}
.code-block .comment { color: #6b7280; }
.code-block .cmd { color: var(--success); }
/* 相关项目 */
.projects { padding: 80px 0; }
.project-card {
display: flex; align-items: center; justify-content: space-between;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
padding: 20px 24px;
margin-bottom: 12px;
transition: all 0.2s;
}
.project-card:hover {
background: var(--bg-card-hover);
border-color: var(--accent);
}
.project-card h3 { font-size: 15px; margin-bottom: 4px; }
.project-card p { font-size: 13px; color: var(--text-secondary); }
/* 页脚 */
.footer {
padding: 40px 0;
text-align: center;
font-size: 13px;
color: var(--text-secondary);
border-top: 1px solid var(--border);
}
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--text); }
/* 响应式 */
@media (max-width: 640px) {
.hero h1 { font-size: 32px; }
.hero .subtitle { font-size: 15px; }
.hero-actions { flex-direction: column; align-items: center; }
.nav-links { display: none; }
.features-grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<!-- 导航 -->
<nav class="nav">
<div class="nav-brand">
<img src="https://raw.githubusercontent.com/qingchencloud/clawpanel/main/public/images/logo.svg" alt="Logo">
<span>ClawPanel</span>
</div>
<div class="nav-links">
<a href="#features">功能</a>
<a href="#tech">架构</a>
<a href="#quickstart">快速开始</a>
<a href="#projects">相关项目</a>
<a href="https://github.com/qingchencloud/clawpanel">GitHub</a>
</div>
</nav>
<!-- Hero -->
<section class="hero">
<h1>ClawPanel</h1>
<p class="subtitle">OpenClaw AI Agent 框架的可视化管理面板,基于 Tauri v2 构建的跨平台桌面应用。</p>
<div class="hero-actions">
<a class="btn btn-primary" href="https://github.com/qingchencloud/clawpanel/releases">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 12L3 7h3V2h4v5h3L8 12z" fill="currentColor"/><path d="M2 13h12v1H2v-1z" fill="currentColor"/></svg>
下载最新版
</a>
<a class="btn btn-secondary" href="https://github.com/qingchencloud/clawpanel">
<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
源代码
</a>
</div>
</section>
<!-- 功能特性 -->
<section id="features" class="features">
<div class="container">
<h2 class="section-title">功能特性</h2>
<div class="features-grid">
<div class="feature-card">
<h3>仪表盘</h3>
<p>系统运行概览,服务状态实时监控,一目了然掌握 OpenClaw 运行情况。</p>
</div>
<div class="feature-card">
<h3>服务管理</h3>
<p>OpenClaw 服务启停控制、版本检测与一键升级、配置备份与恢复。</p>
</div>
<div class="feature-card">
<h3>模型配置</h3>
<p>多服务商管理、模型增删改查、主模型选择、批量测试、延迟检测,支持自动保存与撤销。</p>
</div>
<div class="feature-card">
<h3>网关配置</h3>
<p>Gateway 端口、运行模式、认证方式可视化配置,即改即生效。</p>
</div>
<div class="feature-card">
<h3>日志查看</h3>
<p>多日志源实时查看与关键词搜索,快速定位运行异常。</p>
</div>
<div class="feature-card">
<h3>记忆管理</h3>
<p>OpenClaw 记忆文件的查看、编辑、分类管理与 ZIP 导出。</p>
</div>
<div class="feature-card">
<h3>扩展工具</h3>
<p>cftunnel 内网穿透管理、ClawApp 连接状态监控等扩展功能。</p>
</div>
<div class="feature-card">
<h3>主题切换</h3>
<p>支持暗色与亮色主题切换,适应不同使用环境偏好。</p>
</div>
</div>
</div>
</section>
<!-- 技术架构 -->
<section id="tech" class="tech">
<div class="container">
<h2 class="section-title">技术架构</h2>
<table class="tech-table">
<thead>
<tr><th>层级</th><th>技术</th><th>说明</th></tr>
</thead>
<tbody>
<tr><td>前端</td><td>Vanilla JS + Vite</td><td>零框架依赖,轻量快速</td></tr>
<tr><td>后端</td><td>Rust + Tauri v2</td><td>原生性能,跨平台打包</td></tr>
<tr><td>通信</td><td>Tauri IPC + Shell Plugin</td><td>前后端桥接,本地命令执行</td></tr>
<tr><td>样式</td><td>纯 CSS (CSS Variables)</td><td>暗色主题,玻璃拟态风格</td></tr>
</tbody>
</table>
</div>
</section>
<!-- 快速开始 -->
<section id="quickstart" class="quickstart">
<div class="container">
<h2 class="section-title">快速开始</h2>
<h3 style="font-size:16px;margin-bottom:8px">前置条件</h3>
<p style="font-size:14px;color:var(--text-secondary);margin-bottom:24px">
需要安装 <a href="https://nodejs.org/">Node.js</a> >= 18、<a href="https://www.rust-lang.org/tools/install">Rust</a> stable 以及 <a href="https://v2.tauri.app/start/prerequisites/">Tauri v2 系统依赖</a>
</p>
<div class="code-block">
<span class="comment"># 克隆仓库</span><br>
<span class="cmd">git clone https://github.com/qingchencloud/clawpanel.git</span><br>
<span class="cmd">cd clawpanel</span><br>
<span class="cmd">npm install</span><br>
<br>
<span class="comment"># 启动开发模式(完整 Tauri 桌面应用)</span><br>
<span class="cmd">./scripts/dev.sh</span><br>
<br>
<span class="comment"># 仅启动前端(浏览器调试,使用 mock 数据)</span><br>
<span class="cmd">./scripts/dev.sh web</span><br>
<br>
<span class="comment"># 构建发布版本</span><br>
<span class="cmd">./scripts/build.sh release</span>
</div>
</div>
</section>
<!-- 相关项目 -->
<section id="projects" class="projects">
<div class="container">
<h2 class="section-title">相关项目</h2>
<a class="project-card" href="https://github.com/openclaw-labs/openclaw" target="_blank" rel="noopener" style="text-decoration:none;color:inherit">
<div>
<h3>OpenClaw</h3>
<p>AI Agent 框架,支持多模型协作、工具调用、记忆管理</p>
</div>
<svg width="16" height="16" viewBox="0 0 16 16" fill="var(--text-secondary)"><path d="M6 3l5 5-5 5" stroke="currentColor" stroke-width="1.5" fill="none"/></svg>
</a>
<a class="project-card" href="https://github.com/qingchencloud/clawapp" target="_blank" rel="noopener" style="text-decoration:none;color:inherit">
<div>
<h3>ClawApp</h3>
<p>跨平台移动聊天客户端H5 + 代理服务器架构</p>
</div>
<svg width="16" height="16" viewBox="0 0 16 16" fill="var(--text-secondary)"><path d="M6 3l5 5-5 5" stroke="currentColor" stroke-width="1.5" fill="none"/></svg>
</a>
<a class="project-card" href="https://github.com/qingchencloud/cftunnel" target="_blank" rel="noopener" style="text-decoration:none;color:inherit">
<div>
<h3>cftunnel</h3>
<p>Cloudflare Tunnel 内网穿透工具,全协议支持</p>
</div>
<svg width="16" height="16" viewBox="0 0 16 16" fill="var(--text-secondary)"><path d="M6 3l5 5-5 5" stroke="currentColor" stroke-width="1.5" fill="none"/></svg>
</a>
</div>
</section>
<!-- 页脚 -->
<footer class="footer">
<div class="container">
<p>MIT License &copy; 2026 <a href="https://github.com/qingchencloud">qingchencloud</a></p>
</div>
</footer>
</body>
</html>

37
package-lock.json generated
View File

@@ -86,6 +86,8 @@
},
"node_modules/@esbuild/darwin-arm64": {
"version": "0.25.12",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.12.tgz",
"integrity": "sha512-N3zl+lxHCifgIlcMUP5016ESkeQjLj/959RxxNYIthIg+CQHInujFuXeWbWMgnTo4cp5XVHqFPmpyu9J65C1Yg==",
"cpu": [
"arm64"
],
@@ -486,6 +488,8 @@
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.59.0",
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz",
"integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==",
"cpu": [
"arm64"
],
@@ -806,6 +810,8 @@
},
"node_modules/@tauri-apps/api": {
"version": "2.10.1",
"resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz",
"integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==",
"license": "Apache-2.0 OR MIT",
"funding": {
"type": "opencollective",
@@ -814,6 +820,8 @@
},
"node_modules/@tauri-apps/cli": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.10.0.tgz",
"integrity": "sha512-ZwT0T+7bw4+DPCSWzmviwq5XbXlM0cNoleDKOYPFYqcZqeKY31KlpoMW/MOON/tOFBPgi31a2v3w9gliqwL2+Q==",
"dev": true,
"license": "Apache-2.0 OR MIT",
"bin": {
@@ -842,6 +850,8 @@
},
"node_modules/@tauri-apps/cli-darwin-arm64": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.10.0.tgz",
"integrity": "sha512-avqHD4HRjrMamE/7R/kzJPcAJnZs0IIS+1nkDP5b+TNBn3py7N2aIo9LIpy+VQq0AkN8G5dDpZtOOBkmWt/zjA==",
"cpu": [
"arm64"
],
@@ -1027,6 +1037,8 @@
},
"node_modules/@tauri-apps/plugin-shell": {
"version": "2.3.5",
"resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.3.5.tgz",
"integrity": "sha512-jewtULhiQ7lI7+owCKAjc8tYLJr92U16bPOeAa472LHJdgaibLP83NcfAF2e+wkEcA53FxKQAZ7byDzs2eeizg==",
"license": "MIT OR Apache-2.0",
"dependencies": {
"@tauri-apps/api": "^2.10.1"
@@ -1034,11 +1046,15 @@
},
"node_modules/@types/estree": {
"version": "1.0.8",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
"dev": true,
"license": "MIT"
},
"node_modules/esbuild": {
"version": "0.25.12",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.12.tgz",
"integrity": "sha512-bbPBYYrtZbkt6Os6FiTLCTFxvq4tt3JKall1vRwshA3fdVztsLAatFaZobhkBC8/BrPetoa0oksYoKXoG4ryJg==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
@@ -1079,6 +1095,8 @@
},
"node_modules/fdir": {
"version": "6.5.0",
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1095,7 +1113,10 @@
},
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"os": [
@@ -1107,6 +1128,8 @@
},
"node_modules/nanoid": {
"version": "3.3.11",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.11.tgz",
"integrity": "sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==",
"dev": true,
"funding": [
{
@@ -1124,11 +1147,15 @@
},
"node_modules/picocolors": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
"integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",
"dev": true,
"license": "ISC"
},
"node_modules/picomatch": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"dev": true,
"license": "MIT",
"engines": {
@@ -1140,6 +1167,8 @@
},
"node_modules/postcss": {
"version": "8.5.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.6.tgz",
"integrity": "sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==",
"dev": true,
"funding": [
{
@@ -1167,6 +1196,8 @@
},
"node_modules/rollup": {
"version": "4.59.0",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz",
"integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1210,6 +1241,8 @@
},
"node_modules/source-map-js": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",
"integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",
"dev": true,
"license": "BSD-3-Clause",
"engines": {
@@ -1218,6 +1251,8 @@
},
"node_modules/tinyglobby": {
"version": "0.2.15",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz",
"integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==",
"dev": true,
"license": "MIT",
"dependencies": {
@@ -1233,6 +1268,8 @@
},
"node_modules/vite": {
"version": "6.4.1",
"resolved": "https://registry.npmjs.org/vite/-/vite-6.4.1.tgz",
"integrity": "sha512-+Oxm7q9hDoLMyJOYfUYBuHQo+dkAloi33apOPP56pzj+vsdJDzr+j1NISE5pyaAuKL4A3UD34qd0lx5+kfKp2g==",
"dev": true,
"license": "MIT",
"dependencies": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

21
public/images/logo.svg Normal file
View File

@@ -0,0 +1,21 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" fill="none">
<!-- 背景圆角方块 -->
<rect x="8" y="8" width="112" height="112" rx="24" fill="url(#bg)"/>
<!-- 爪子:三个爪尖 -->
<path d="M40 38c0-6 4-12 8-12s8 6 8 12v16h-16V38z" fill="#fff" opacity="0.95"/>
<path d="M56 32c0-6 4-12 8-12s8 6 8 12v22H56V32z" fill="#fff"/>
<path d="M72 38c0-6 4-12 8-12s8 6 8 12v16H72V38z" fill="#fff" opacity="0.95"/>
<!-- 爪掌 -->
<path d="M34 56c0 0 4-4 30-4s30 4 30 4v12c0 16-10 28-30 32-20-4-30-16-30-32V56z" fill="#fff" opacity="0.9"/>
<!-- 面板线条 -->
<rect x="46" y="62" width="36" height="3" rx="1.5" fill="url(#bg)" opacity="0.4"/>
<rect x="46" y="70" width="28" height="3" rx="1.5" fill="url(#bg)" opacity="0.3"/>
<rect x="46" y="78" width="20" height="3" rx="1.5" fill="url(#bg)" opacity="0.2"/>
<!-- 渐变定义 -->
<defs>
<linearGradient id="bg" x1="8" y1="8" x2="120" y2="120" gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#6366f1"/>
<stop offset="1" stop-color="#8b5cf6"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

41
scripts/build.sh Executable file
View File

@@ -0,0 +1,41 @@
#!/bin/bash
# ClawPanel 编译脚本
# 用法: ./scripts/build.sh [check|debug|release]
# check - 仅检查 Rust 编译(最快,不生成产物)
# debug - 编译 debug 版本(默认)
# release - 编译正式发布版本(含打包)
set -e
cd "$(dirname "$0")/.."
MODE="${1:-debug}"
case "$MODE" in
check)
echo "🔍 检查 Rust 编译..."
cd src-tauri && cargo check
echo "✅ 编译检查通过"
;;
debug)
echo "🔨 编译 debug 版本..."
echo " 1/2 构建前端..."
npm run build
echo " 2/2 编译 Rust..."
cd src-tauri && cargo build
echo "✅ Debug 编译完成"
echo " 产物: src-tauri/target/debug/clawpanel"
;;
release)
echo "📦 编译正式发布版本..."
npm run tauri build
echo "✅ Release 编译完成"
echo " 产物目录: src-tauri/target/release/bundle/"
;;
*)
echo "用法: $0 [check|debug|release]"
echo " check - 仅检查 Rust 编译(最快)"
echo " debug - debug 版本(默认)"
echo " release - 正式发布版本"
exit 1
;;
esac

43
scripts/dev.sh Executable file
View File

@@ -0,0 +1,43 @@
#!/bin/bash
# ClawPanel 开发模式启动脚本
# 用法: ./scripts/dev.sh [web|tauri]
# web - 仅启动 Vite 前端浏览器调试mock 数据)
# tauri - 启动完整 Tauri 桌面应用(默认)
set -e
cd "$(dirname "$0")/.."
MODE="${1:-tauri}"
# 清理旧进程
cleanup() {
echo "🧹 清理旧进程..."
pkill -f "vite.*clawpanel" 2>/dev/null || true
pkill -f "target/debug/clawpanel" 2>/dev/null || true
lsof -ti:1420 | xargs kill -9 2>/dev/null || true
sleep 0.5
}
cleanup
case "$MODE" in
web)
echo "🌐 启动 Vite 前端开发服务器(浏览器模式)..."
echo " 地址: http://localhost:1420"
echo " 使用 mock 数据,适合调试前端逻辑"
echo ""
npx vite --port 1420
;;
tauri)
echo "🖥️ 启动 Tauri 桌面应用(完整模式)..."
echo " Vite + Rust 后端"
echo ""
npm run tauri dev
;;
*)
echo "用法: $0 [web|tauri]"
echo " web - 仅 Vite 前端(浏览器调试)"
echo " tauri - Tauri 桌面应用(默认)"
exit 1
;;
esac