Clawdbot 安裝指南
在 macOS、Linux 和 Windows 上安裝 Clawdbot AI 助手的完整指南。一鍵快速安裝或手動設定選項。
Clawdbot 安裝概述
除非有特殊原因,否則請使用 Clawdbot 安裝程式。它會自動設定 CLI 並執行初始設定。
快速安裝(推薦)
使用單一命令安裝 Clawdbot:
curl -fsSL https://clawd.bot/install.sh | bashWindows (PowerShell):
iwr -useb https://clawd.bot/install.ps1 | iex下一步(如果您跳過了初始設定):
clawdbot onboard --install-daemon系統需求
| 需求 | 詳細資訊 |
|---|---|
| Node.js | 版本 22 或更高 |
| 作業系統 | macOS、Linux 或透過 WSL2 的 Windows |
| pnpm | 僅在從原始碼建構時需要 |
選擇您的安裝方式
1. 安裝腳本(推薦)
Clawdbot 安裝程式會透過 npm 全域安裝並執行初始設定:
curl -fsSL https://clawd.bot/install.sh | bash安裝程式參數:
curl -fsSL https://clawd.bot/install.sh | bash -s -- --help非互動模式(跳過初始設定):
curl -fsSL https://clawd.bot/install.sh | bash -s -- --no-onboard2. 全域安裝(手動)
如果您已安裝 Node.js:
npm install -g clawdbot@latest如果您已全域安裝 libvips 且 sharp 失敗:
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g clawdbot@latest使用 pnpm:
pnpm add -g clawdbot@latest
pnpm approve-builds -g # 批准 clawdbot、node-llama-cpp、sharp 等然後執行初始設定:
clawdbot onboard --install-daemon3. 從原始碼安裝(貢獻者/開發者)
git clone https://github.com/clawdbot/clawdbot.git
cd clawdbot
pnpm install
pnpm ui:build
pnpm build
clawdbot onboard --install-daemon4. 其他安裝選項
- Docker:請參閱 Docker 安裝
- Nix:請參閱 Nix 安裝
- Ansible:請參閱 Ansible 安裝
安裝後
執行以下命令來驗證您的 Clawdbot 安裝:
# 執行初始設定
clawdbot onboard --install-daemon
# 快速檢查
clawdbot doctor
# 檢查閘道器健康狀態
clawdbot status
clawdbot health
# 開啟控制面板
clawdbot dashboard安裝方式:npm vs git
Clawdbot 安裝程式支援兩種方式:
| 方式 | 說明 |
|---|---|
npm(預設) | npm install -g clawdbot@latest |
git | 從 GitHub 原始碼簽出克隆/建構 |
CLI 參數:
# 明確使用 npm
curl -fsSL https://clawd.bot/install.sh | bash -s -- --install-method npm
# 從 GitHub 安裝(原始碼簽出)
curl -fsSL https://clawd.bot/install.sh | bash -s -- --install-method git常用參數:
| 參數 | 說明 |
|---|---|
--install-method npm|git | 選擇安裝方式 |
--git-dir <path> | Git 目錄(預設:~/clawdbot) |
--no-git-update | 跳過現有簽出的 git pull |
--no-prompt | 停用提示(用於 CI/自動化) |
--dry-run | 顯示將執行的操作 |
--no-onboard | 跳過初始設定 |
環境變數
用於自動化,請使用以下環境變數:
CLAWDBOT_INSTALL_METHOD=git|npm
CLAWDBOT_GIT_DIR=...
CLAWDBOT_GIT_UPDATE=0|1
CLAWDBOT_NO_PROMPT=1
CLAWDBOT_DRY_RUN=1
CLAWDBOT_NO_ONBOARD=1
SHARP_IGNORE_GLOBAL_LIBVIPS=0|1疑難排解:找不到 clawdbot(PATH)
快速診斷:
node -v
npm -v
npm prefix -g
echo "$PATH"如果 $(npm prefix -g)/bin 不在您的 PATH 中,請將其新增到您的 shell 啟動檔案:
macOS / Linux (~/.zshrc 或 ~/.bashrc):
export PATH="$(npm prefix -g)/bin:$PATH"Windows: 將 npm prefix -g 的輸出新增到您的 PATH 環境變數中。
然後開啟新終端或執行 hash -r(bash)/ rehash(zsh)。
更新 / 解除安裝
- 更新:請參閱更新 Clawdbot
- 解除安裝:請參閱解除安裝 Clawdbot
下一步
- Clawdbot 設定指南 - 完整設定指南
- Clawdbot 閘道器 - 閘道器設定
- Clawdbot WhatsApp - 連接到 WhatsApp