campaign 公告

嚴重

我們與 openagen/zeroclaw 或 zeroclaw.org 沒有任何關聯。請僅以官方儲存庫和經過驗證的 ZeroClaw 社群帳號作為資訊來源。

重要

目前沒有啟動任何官方募資/投資計畫。請忽略冒充行為和非官方聲明。

重要

Anthropic OAuth 條款已變更(2026-02-19)。暫時避免使用 Claude Code OAuth 整合,等待政策風險釐清。

info 簡介

ZeroClaw 是一個用 Rust 建構的快速、輕量、完全自主的 AI 助手基礎設施。單一靜態二進位在 10 美元的硬體上執行,記憶體不到 5MB——比基於 Node 的方案少 99%。每個子系統都是 trait:改一行設定就能替換 Provider、頻道、工具、記憶後端和隧道。

memory
單一二進位
3.4MB Release 建構,0.8GHz 下 <10ms 冷啟動
swap_horiz
Trait 驅動
Provider、Channel、Tool、Memory、Tunnel——全部可替換
shield
預設安全
僅本機閘道、配對 OTP、工作區隔離
developer_board
隨處部署
ARM、x86、RISC-V——從樹莓派到雲端

download 安裝

ZeroClaw 以單一 Rust 二進位發布。透過 Homebrew、引導腳本或手動原始碼建構安裝。

前置條件: Rust stable 工具鏈(rustup)、Git、一個 AI Provider API Key(OpenRouter、Anthropic、OpenAI、Ollama 等)

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 hardwareUSB 探索/檢查/資訊命令
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
Security: 閘道預設繫結 127.0.0.1。使用隧道(Cloudflare、Tailscale、ngrok)對外公開。

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。

向量資料庫
SQLite BLOB + 餘弦相似度
關鍵字搜尋
FTS5 + BM25 評分
混合合併
自訂加權合併
快取
LRU 淘汰策略
[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多模型路由(推薦)
anthropicClaude 模型
openaiGPT 模型
ollama本機或遠端 Ollama
geminiGoogle 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_KEYOpenRouter API Key
ANTHROPIC_API_KEYAnthropic API Key
OPENAI_API_KEYOpenAI API Key
OLLAMA_API_KEYOllama 遠端端點 Key
ZEROCLAW_LUCID_CMDlucid 二進位路徑
ZEROCLAW_LUCID_BUDGETLucid 記憶預算(預設 200)

shield 安全

ZeroClaw 在每一層都強制執行安全策略,通過了社群安全檢查清單的所有項目。

僅本機閘道
繫結 127.0.0.1。沒有隧道或 allow_public_bind 時拒絕 0.0.0.0
需要配對
啟動時產生 6 位 OTP。透過 POST /pair 交換 Bearer Token
檔案系統隔離
預設 workspace_only。封鎖 14 個系統目錄 + 4 個敏感點檔案
符號連結逃逸偵測
正規化 + 解析路徑工作區檢查
加密金鑰
API Key 使用本機金鑰檔案靜態加密
預設拒絕頻道
空白名單 = 拒絕所有。"*" = 允許所有(需明確啟用)
[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 模型Provider28 個內建 + 自訂端點
頻道ChannelCLI、Telegram、Discord、Slack、WhatsApp、iMessage、Matrix、Signal、Email、IRC、飛書、釘釘、QQ、Webhook
記憶系統MemorySQLite 混合、PostgreSQL、Lucid、Markdown、無
工具Toolshell、file、memory、cron、git、browser、http、composio、delegate、hardware
可觀測性ObserverNoop、Log、Multi
執行時期RuntimeAdapterNative、Docker(沙箱)
安全SecurityPolicy配對、沙箱、白名單、速率限制、檔案系統隔離
身分IdentityConfigOpenClaw(Markdown)、AIEOS v1.1(JSON)
隧道Tunnel無、Cloudflare、Tailscale、ngrok、自訂
心跳EngineHEARTBEAT.md 週期性任務
列出/安裝/移除 SkillLoaderTOML 清單 + SKILL.md 說明
整合Registry9 個分類下 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/whatsappWhatsApp 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

準備好執行了嗎?

brew install zeroclaw && zeroclaw onboard --interactive