campaign 公告
我们与 openagen/zeroclaw 或 zeroclaw.org 没有任何关联。请仅以官方仓库和经过验证的 ZeroClaw 社交账号作为信息来源。
目前没有启动任何官方募资/投资计划。请忽略冒充行为和非官方声明。
Anthropic OAuth 条款已变更(2026-02-19)。暂时避免使用 Claude Code OAuth 集成,等待政策风险明确。
info 简介
ZeroClaw 是一个用 Rust 构建的快速、轻量、完全自主的 AI 助手基础设施。单个静态二进制在 10 美元的硬件上运行,内存不到 5MB——比基于 Node 的方案少 99%。每个子系统都是 trait:改一行配置就能替换 Provider、频道、工具、记忆后端和隧道。
download 安装
ZeroClaw 以单个 Rust 二进制发布。通过 Homebrew、引导脚本或手动源码构建安装。
Homebrew(macOS / Linuxbrew)
# macOS / Linuxbrew
brew install zeroclaw 一键引导安装(推荐)
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
./bootstrap.sh
# With system deps + Rust install on fresh machines
./bootstrap.sh --install-system-deps --install-rust
# With onboarding in the same flow
./bootstrap.sh --onboard --api-key "sk-..." --provider openrouter
# Remote one-liner
curl -fsSL https://raw.githubusercontent.com/zeroclaw-labs/zeroclaw/main/scripts/bootstrap.sh | bash 手动构建与安装
git clone https://github.com/zeroclaw-labs/zeroclaw.git
cd zeroclaw
cargo build --release --locked
cargo install --path . --force --locked
# Ensure ~/.cargo/bin is in PATH
export PATH="$HOME/.cargo/bin:$PATH" 开发备选:在命令前加 cargo run --release -- 可跳过全局安装。
rocket_launch 快速上手
运行一次 onboard 设置配置,然后开始对话。
# Interactive onboarding wizard
zeroclaw onboard --interactive
# Or quick setup (no prompts)
zeroclaw onboard --api-key sk-... --provider openrouter --model "openrouter/auto"
# Quickly repair channels/allowlists only
zeroclaw onboard --channels-only
# Chat with the agent
zeroclaw agent -m "Hello, ZeroClaw!"
# Interactive mode
zeroclaw agent
# Start gateway + daemon
zeroclaw gateway
zeroclaw daemon
# Check status
zeroclaw status
zeroclaw doctor
zeroclaw channel doctor
# Bind Telegram identity into allowlist
zeroclaw channel bind-telegram 123456789
# Service + migration helpers
zeroclaw service install
zeroclaw config schema
zeroclaw migrate openclaw --dry-run
zeroclaw migrate openclaw 配置位置:~/.zeroclaw/config.toml——由 zeroclaw onboard 自动创建。
terminal 命令
ZeroClaw 是一个单二进制,每个工作流都有对应的子命令。
| 命令 | 说明 |
|---|---|
zeroclaw onboard | 交互式或快速设置——创建配置、设置 API Key |
zeroclaw onboard --channels-only | 仅重新配置频道凭据/白名单 |
zeroclaw agent | 对话模式(交互式 REPL 或单条 -m 消息) |
zeroclaw gateway | 启动 Webhook 服务器(默认 127.0.0.1:3000) |
zeroclaw daemon | 启动完整自主长期运行时 |
zeroclaw status | 显示完整系统状态 |
zeroclaw auth status | 查看当前认证 Profile 和 Token 状态 |
zeroclaw doctor | 诊断守护进程/调度器/频道健康状态 |
zeroclaw channel list | 列出已配置的频道及状态 |
zeroclaw channel doctor | 检查频道健康状态和就绪情况 |
zeroclaw channel bind-telegram <id> | 将 Telegram 用户 ID 加入白名单 |
zeroclaw service install | 安装用户级后台服务 |
zeroclaw service start/stop/status | 管理后台服务生命周期 |
zeroclaw cron | 管理定时任务(列出/添加/删除/暂停/恢复) |
zeroclaw providers | 列出支持的 Provider 和别名 |
zeroclaw models | 刷新 Provider 模型目录 |
zeroclaw auth login | 使用订阅认证 Profile 登录 |
zeroclaw skills | 列出/安装/删除 Skill |
zeroclaw config schema | 输出完整配置契约 JSON Schema |
zeroclaw migrate openclaw | 从 OpenClaw 运行时导入数据 |
zeroclaw integrations info <name> | 获取集成设置指引 |
zeroclaw hardware | USB 发现/检查/信息命令 |
zeroclaw peripheral | 管理和刷写硬件外设 |
smart_toy Agent 模式
zeroclaw agent 命令运行一个可以使用工具、调用记忆和执行任务的 AI 助手。
# Single message
zeroclaw agent -m "List files in the current directory"
# Interactive REPL
zeroclaw agent
# Use a specific provider/model
zeroclaw agent --provider anthropic --model claude-sonnet-4-6 -m "Hello"
# Use a subscription auth profile
zeroclaw agent --provider openai-codex --auth-profile openai-codex:work -m "Hello" dns 网关与守护进程
网关为频道集成提供 Webhook 服务器。守护进程运行完整的自主运行时,包括心跳、定时任务和频道。
# Start the gateway (webhook server, default 127.0.0.1:3000)
zeroclaw gateway
zeroclaw gateway --port 0 # random port (security hardened)
# Start full autonomous runtime
zeroclaw daemon
# Manage as a background service
zeroclaw service install
zeroclaw service status forum 频道
频道让 ZeroClaw 接收和回复来自 Telegram、Discord、Slack、Mattermost、iMessage、Matrix、Signal、WhatsApp、Email、IRC、飞书、钉钉等的消息。所有频道使用默认拒绝的白名单。
# Telegram
[channels_config.telegram]
bot_token = "123456:ABC..."
allowed_users = ["your_username"] # or ["*"] for all
# Discord
[channels_config.discord]
bot_token = "..."
allowed_users = ["your-discord-id"]
# Slack
[channels_config.slack]
bot_token = "xoxb-..."
allowed_users = ["UMEMBERID"]
# Start channels via daemon
zeroclaw daemon 提示:运行 zeroclaw onboard --channels-only 可仅重新配置频道,不影响其他设置。
build 工具
工具是 Agent 在对话中可以调用的能力。所有内置工具默认在沙箱中运行,并限定在工作区范围内。
# Built-in tools:
# shell, file_read, file_write, memory, cron,
# git, http_request, browser (opt-in), composio (opt-in),
# delegate, hardware, screenshot, pushover
# Enable browser tools
[browser]
enabled = true
allowed_domains = ["docs.rs", "github.com"]
# Enable Composio (1000+ OAuth integrations)
[composio]
enabled = true
api_key = "cmp_..." database 记忆系统
零外部依赖的全栈搜索引擎——不需要 Pinecone,不需要 Elasticsearch,不需要 LangChain。
[memory]
backend = "sqlite" # sqlite | lucid | postgres | markdown | none
auto_save = true
embedding_provider = "none" # none | openai | custom:https://...
vector_weight = 0.7
keyword_weight = 0.3
# PostgreSQL remote backend
# [storage.provider.config]
# provider = "postgres"
# db_url = "postgres://user:pass@host:5432/zeroclaw" settings 配置文件
配置位于 ~/.zeroclaw/config.toml——由 zeroclaw onboard 创建。
api_key = "sk-..."
default_provider = "openrouter"
default_model = "anthropic/claude-sonnet-4-6"
default_temperature = 0.7
[memory]
backend = "sqlite"
auto_save = true
[gateway]
port = 3000
host = "127.0.0.1"
require_pairing = true
allow_public_bind = false
[autonomy]
level = "supervised"
workspace_only = true
allowed_commands = ["git", "npm", "cargo", "ls", "cat", "grep"]
[runtime]
kind = "native"
[tunnel]
provider = "none"
[secrets]
encrypt = true model_training AI Provider
ZeroClaw 支持 28+ 内置 Provider,以及任何 OpenAI 兼容或 Anthropic 兼容的自定义端点。
| Provider | 说明 |
|---|---|
openrouter | 多模型路由(推荐) |
anthropic | Claude 模型 |
openai | GPT 模型 |
ollama | 本地或远程 Ollama |
gemini | Google Gemini |
custom:https://... | 任何 OpenAI 兼容端点 |
运行 zeroclaw providers 列出所有可用 Provider 和别名。
key 环境变量
Provider API Key 和可选覆盖项。
# Provider API keys
OPENROUTER_API_KEY=sk-or-v1-...
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
# Lucid memory backend
ZEROCLAW_LUCID_CMD=/usr/local/bin/lucid
ZEROCLAW_LUCID_BUDGET=200
# Ollama remote endpoint
OLLAMA_API_KEY=your-key | 变量 | 说明 |
|---|---|
OPENROUTER_API_KEY | OpenRouter API Key |
ANTHROPIC_API_KEY | Anthropic API Key |
OPENAI_API_KEY | OpenAI API Key |
OLLAMA_API_KEY | Ollama 远程端点 Key |
ZEROCLAW_LUCID_CMD | lucid 二进制路径 |
ZEROCLAW_LUCID_BUDGET | Lucid 记忆预算(默认 200) |
shield 安全
ZeroClaw 在每一层都强制执行安全策略,通过了社区安全检查清单的所有项目。
[gateway]
require_pairing = true
allow_public_bind = false # refuse 0.0.0.0 without tunnel
[autonomy]
workspace_only = true # scoped to workspace by default account_tree 架构
每个子系统都是 Rust trait——改一行配置就能替换实现,零代码改动。
| 子系统 | Trait | 内置实现 |
|---|---|---|
| AI 模型 | Provider | 28 个内置 + 自定义端点 |
| 频道 | Channel | CLI、Telegram、Discord、Slack、WhatsApp、iMessage、Matrix、Signal、Email、IRC、飞书、钉钉、QQ、Webhook |
| 记忆系统 | Memory | SQLite 混合、PostgreSQL、Lucid、Markdown、无 |
| 工具 | Tool | shell、file、memory、cron、git、browser、http、composio、delegate、hardware |
| 可观测性 | Observer | Noop、Log、Multi |
| 运行时 | RuntimeAdapter | Native、Docker(沙箱) |
| 安全 | SecurityPolicy | 配对、沙箱、白名单、速率限制、文件系统隔离 |
| 身份 | IdentityConfig | OpenClaw(Markdown)、AIEOS v1.1(JSON) |
| 隧道 | Tunnel | 无、Cloudflare、Tailscale、ngrok、自定义 |
| 心跳 | Engine | HEARTBEAT.md 周期性任务 |
| 列出/安装/删除 Skill | Loader | TOML 清单 + SKILL.md 说明 |
| 集成 | Registry | 9 个分类下 70+ 集成 |
目前支持 runtime.kind = "native" 和 "docker"。WASM/边缘运行时已在规划中。
api 网关 API
用于频道集成和健康检查的精简 HTTP API。
| 方法 | 端点 | 说明 |
|---|---|---|
GET | /health | 健康检查(始终公开,不泄露密钥) |
POST | /pair | 用 OTP(X-Pairing-Code 头)交换 Bearer Token |
POST | /webhook | 向 Agent 发送消息(Authorization: Bearer) |
GET/POST | WhatsApp Webhook 验证 + 接收消息 |
# Health check (no auth required)
curl http://127.0.0.1:3000/health
# Exchange pairing code for bearer token
curl -X POST http://127.0.0.1:3000/pair \
-H "X-Pairing-Code: 847291"
# Send a message (requires bearer token)
curl -X POST http://127.0.0.1:3000/webhook \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"message": "Hello, ZeroClaw!"}' lock 认证与配对
订阅原生认证 Profile(多账号、静态加密),支持 OpenAI Codex 和 Anthropic。
# OpenAI Codex (device code — recommended for servers)
zeroclaw auth login --provider openai-codex --device-code
# Browser/callback flow
zeroclaw auth login --provider openai-codex --profile default
# Anthropic setup token
zeroclaw auth paste-token --provider anthropic --profile default
# Check / refresh / switch profile
zeroclaw auth status
zeroclaw auth refresh --provider openai-codex --profile default
zeroclaw auth use --provider openai-codex --profile work code 开发
标准 Rust 工作流。pre-push Git Hook 自动运行 fmt + clippy + test。
# Dev build
cargo build
# Release build (works on all devices including Raspberry Pi)
cargo build --release
# Run tests
cargo test
# Lint
cargo clippy --locked --all-targets -- -D clippy::correctness
# Format
cargo fmt
# Enable pre-push hook (fmt + clippy + test)
git config core.hooksPath .githooks menu_book 文档中心
面向任务的文档,从官方仓库的文档中心开始。
| 文档 | 路径 |
|---|---|
| 文档中心 | docs/README.md |
| 统一文档目录 | docs/SUMMARY.md |
| 命令参考 | docs/commands-reference.md |
| 配置参考 | docs/config-reference.md |
| Provider 参考 | docs/providers-reference.md |
| 频道参考 | docs/channels-reference.md |
| 运维手册 | docs/operations-runbook.md |
| 问题排查 | docs/troubleshooting.md |