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 |