Clawdbot CLI 參考手冊

Clawdbot AI 助手 CLI 的完整命令參考。了解所有可用命令、選項和使用範例。

Clawdbot CLI 概述

Clawdbot CLI 提供了從終端管理您的 AI 助手、閘道器、代理和提供者的命令。

安裝

# npm
npm install -g @clawdbot/cli

# pnpm
pnpm add -g @clawdbot/cli

核心命令

閘道器命令

# Start gateway
clawdbot gateway start

# Stop gateway
clawdbot gateway stop

# Restart gateway
clawdbot gateway restart

# Check gateway status
clawdbot gateway status

# View gateway logs
clawdbot gateway logs

代理命令

# List agents
clawdbot agents list

# Add new agent
clawdbot agents add <name>

# Remove agent
clawdbot agents remove <name>

# Check agent status
clawdbot agents status

# Reset agent
clawdbot agents reset <name>

提供者命令

# List providers
clawdbot providers list

# Setup provider
clawdbot providers setup <name>

# Check provider status
clawdbot providers status

# Disconnect provider
clawdbot providers disconnect <name>

會話命令

# List sessions
clawdbot sessions list

# Get session details
clawdbot sessions get <key>

# Clear session
clawdbot sessions clear <key>

# Export session
clawdbot sessions export <key>

配置命令

# Get config value
clawdbot config get <path>

# Set config value
clawdbot config set <path> <value>

# Validate config
clawdbot config validate

# Reset config
clawdbot config reset

全域選項

選項說明
--config配置檔案路徑
--log-level日誌詳細程度
--json以 JSON 格式輸出
--help顯示幫助
--version顯示版本

命令範例

使用自訂連接埠啟動

clawdbot gateway start --port 3011

除錯模式

clawdbot gateway start --log-level debug

JSON 輸出

clawdbot agents list --json

非互動式設定

clawdbot providers setup telegram --token $BOT_TOKEN

環境變數

變數說明
CLAWDBOT_CONFIG配置檔案路徑
CLAWDBOT_LOG_LEVEL預設日誌等級
CLAWDBOT_HOME資料目錄

後續步驟