Files
zclaw_openfang/README.md
iven 0d4fa96b82
Some checks failed
CI / Lint & TypeCheck (push) Has been cancelled
CI / Unit Tests (push) Has been cancelled
CI / Build Frontend (push) Has been cancelled
CI / Rust Check (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled
refactor: 统一项目名称从OpenFang到ZCLAW
重构所有代码和文档中的项目名称,将OpenFang统一更新为ZCLAW。包括:
- 配置文件中的项目名称
- 代码注释和文档引用
- 环境变量和路径
- 类型定义和接口名称
- 测试用例和模拟数据

同时优化部分代码结构,移除未使用的模块,并更新相关依赖项。
2026-03-27 07:36:03 +08:00

208 lines
6.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ZCLAW 🦞 — ZCLAW 定制版 (Tauri Desktop)
基于 [ZCLAW](https://zclaw.sh/) —— 用 Rust 构建的 Agent 操作系统,打造中文优先的 Tauri 桌面 AI 助手。
## 核心定位
```
ZCLAW Kernel (Rust 执行引擎)
↕ WebSocket / HTTP API
ZCLAW Tauri App (桌面 UI)
+ 中文模型 Provider (GLM/Qwen/Kimi/MiniMax/DeepSeek)
+ 7 个自主 Hands (Browser/Researcher/Collector 等)
+ 40+ 渠道适配器 (飞书/钉钉/Telegram/Discord 等)
+ 16 层安全防护
+ 分身(Clone) 管理
+ 自定义 Skills
```
## 为什么选择 ZCLAW?
相比 ZCLAWZCLAW 提供了更强的性能和更丰富的功能:
| 特性 | ZCLAW | ZCLAW |
|------|----------|----------|
| **开发语言** | Rust | TypeScript |
| **冷启动** | < 200ms | ~6s |
| **内存占用** | ~40MB | ~394MB |
| **安全层数** | 16 | 3 层基础 |
| **自主 Hands** | 7 个内置 | |
| **渠道适配器** | 40 | 13 |
| **LLM 提供商** | 27 | ~10 |
**详细对比**[ZCLAW 架构概览](https://wurang.net/posts/zclaw-intro/)
## 功能特色
- **基于 ZCLAW**: 生产级 Agent 操作系统16 层安全防护WASM 沙箱
- **7 个自主 Hands**: Browser/Researcher/Collector/Predictor/Lead/Clip/Twitter - 预构建的"数字员工"
- **中文模型**: 智谱 GLM-4通义千问KimiMiniMaxDeepSeek (OpenAI 兼容 API)
- **40+ 渠道**: 飞书钉钉TelegramDiscordSlack微信等
- **60+ 技能**: 内置技能包 + 自定义 SKILL.md
- **分身系统**: 多个独立 Agent 实例各有自己的角色记忆配置
- **Tauri 桌面**: Rust + React 19体积小 (~10MB)性能好
- **设置页面**: 对标 AutoClaw 通用/模型/MCP/技能/IM/工作区/隐私
## 技术栈
| 层级 | 技术 |
|------|------|
| **执行引擎** | ZCLAW Kernel (Rust, http://127.0.0.1:50051) |
| **桌面壳** | Tauri 2.0 (Rust + React 19) |
| **前端** | React 19 + TailwindCSS + Zustand + Lucide Icons |
| **通信协议** | ZCLAW API (REST/WS/SSE) + OpenAI 兼容 API |
| **安全** | WASM 沙箱 + Merkle 审计追踪 + Ed25519 签名 |
## 项目结构
```
ZClaw/
├── desktop/ # Tauri 桌面应用 (React 前端)
│ ├── src/
│ │ ├── components/ # UI 组件
│ │ ├── store/ # Zustand 状态管理
│ │ └── lib/gateway-client.ts # ZCLAW API 客户端
│ └── src-tauri/ # Rust 后端
├── skills/ # 自定义技能 (SKILL.md)
│ ├── chinese-writing/ # 中文写作
│ └── feishu-docs/ # 飞书文档操作
├── hands/ # 自定义 Hands (HAND.toml)
│ └── custom-automation/ # 自定义自动化任务
├── config/ # ZCLAW 默认配置
│ ├── config.toml # 主配置文件
│ ├── SOUL.md # Agent 人格
│ └── AGENTS.md # Agent 指令
├── docs/
│ ├── setup/ # 设置指南
│ │ ├── ZCLAW-SETUP.md # ZCLAW 配置指南
│ │ └── chinese-models.md # 中文模型配置
│ ├── architecture-v2.md # 架构设计
│ └── deviation-analysis.md # 偏离分析报告
└── scripts/setup.ts # 首次设置脚本
```
## 快速开始
### 1. 安装 ZCLAW
```bash
# Windows (PowerShell)
iwr -useb https://zclaw.sh/install.ps1 | iex
# macOS / Linux
curl -fsSL https://zclaw.sh/install.sh | bash
```
### 2. 初始化配置
```bash
zclaw init
```
### 3. 配置 API Key
```bash
# 设置智谱 API Key (推荐,有免费额度)
export ZHIPU_API_KEY="your-api-key"
# 或其他中文模型
export DASHSCOPE_API_KEY="your-dashscope-key" # 通义千问
export MOONSHOT_API_KEY="your-moonshot-key" # Kimi
export DEEPSEEK_API_KEY="your-deepseek-key" # DeepSeek
```
**获取 API Key**参考 [中文模型配置指南](docs/setup/chinese-models.md)
### 4. 启动服务
```bash
# 启动 ZCLAW Kernel
zclaw start
# 在另一个终端启动 ZCLAW 桌面应用
git clone https://github.com/xxx/ZClaw.git
cd ZClaw
pnpm install
cd desktop && pnpm tauri dev
```
### 5. 验证安装
```bash
# 检查 ZCLAW 状态
zclaw status
# 运行健康检查
zclaw doctor
```
## ZCLAW Hands (自主能力)
ZCLAW 内置 7 个预构建的自主能力包每个 Hand 都是一个具备完整工作流的"数字员工"
| Hand | 功能 | 状态 |
|------|------|------|
| **Browser** | 网页自动化Playwright 驱动 | 可用 |
| **Researcher** | 深度研究交叉验证APA 引用 | 可用 |
| **Collector** | 情报监控OSINT 级持续监控 | 可用 |
| **Predictor** | 趋势预测带置信区间的预测 | 可用 |
| **Lead** | 线索挖掘ICP 匹配评分去重 | 可用 |
| **Clip** | 视频处理下载剪辑字幕生成 | FFmpeg |
| **Twitter** | 社媒管理内容创建排期发布 | API Key |
## 支持的中文模型
| 提供商 | 模型 | 特点 | 免费额度 |
|--------|------|------|----------|
| **智谱 AI** | GLM-4-Flash | 快速响应 | 1000 tokens |
| **阿里云** | 通义千问 | 性价比高 | 有试用 |
| **月之暗面** | Kimi | 200K 长上下文 | 15 元体验金 |
| **DeepSeek** | DeepSeek-Chat | 编程能力强 | 低价 |
| **MiniMax** | 海螺 AI | 语音能力强 | 有试用 |
详细配置请参考 [中文模型配置指南](docs/setup/chinese-models.md)
## 文档
### 设置指南
- [ZCLAW Kernel 配置指南](docs/setup/ZCLAW-SETUP.md) - 安装配置常见问题
- [中文模型配置指南](docs/setup/chinese-models.md) - API Key 获取模型选择多模型配置
### 架构设计
- [架构设计](docs/architecture-v2.md) 完整的 v2 架构方案
- [偏离分析](docs/deviation-analysis.md) QClaw/AutoClaw/ZCLAW 对标分析
### 外部资源
- [ZCLAW 官方文档](https://zclaw.sh/)
- [ZCLAW GitHub](https://github.com/RightNow-AI/zclaw)
- [ZCLAW 架构概览](https://wurang.net/posts/zclaw-intro/)
## 对标参考
| 产品 | 基于 | IM 渠道 | 桌面框架 | 安全层数 |
|------|------|---------|----------|----------|
| **QClaw** (腾讯) | ZCLAW | 微信 + QQ | Electron | 3 |
| **AutoClaw** (智谱) | ZCLAW | 飞书 | 自研 | 3 |
| **ZCLAW** (本项目) | ZCLAW | 飞书 + 钉钉 + 40+ | Tauri 2.0 | 16 |
## 从 ZCLAW 迁移
如果你之前使用 ZCLAW可以一键迁移
```bash
# 迁移所有内容:代理、记忆、技能、配置
zclaw migrate --from zclaw
# 先试运行查看变更
zclaw migrate --from zclaw --dry-run
```
## License
MIT