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 debugJSON 輸出
clawdbot agents list --json非互動式設定
clawdbot providers setup telegram --token $BOT_TOKEN環境變數
| 變數 | 說明 |
|---|---|
CLAWDBOT_CONFIG | 配置檔案路徑 |
CLAWDBOT_LOG_LEVEL | 預設日誌等級 |
CLAWDBOT_HOME | 資料目錄 |
後續步驟
- Clawdbot 斜線命令 - 斜線命令
- Clawdbot 閘道器 - 閘道器指南
- Clawdbot 配置 - 配置參考