configure 命令
交互式配置向导,用于设置模型、通道、技能和网关。
用法
bash
moltbot configure运行此命令将启动交互式向导,引导您完成以下配置:
- 模型配置 - 设置 API 提供商和模型
- 通道设置 - 配置消息通道(WhatsApp、Telegram 等)
- 技能选择 - 安装和管理技能
- 网关配置 - 配置网关设置
非交互式配置
使用 config 命令进行非交互式配置:
bash
# 获取配置值
moltbot config get <path>
# 设置配置值
moltbot config set <path> <value>
# 移除配置值
moltbot config unset <path>配置路径示例
bash
# 获取当前默认模型
moltbot config get agents.defaults.model.primary
# 设置默认模型
moltbot config set agents.defaults.model.primary claude-sonnet-4-20250514
# 启用浏览器工具
moltbot config set tools.allow '["browser"]'
# 禁用特定技能
moltbot config set skills.disabled '["skill-name"]'常见配置
模型配置
bash
# 设置主模型
moltbot config set agents.defaults.model.primary claude-sonnet-4-20250514
# 设置图像模型
moltbot config set agents.defaults.imageModel.primary claude-3-5-sonnet-20241022
# 配置回退模型
moltbot config set agents.defaults.model.fallbacks '["claude-haiku-3-20250508"]'工具配置
bash
# 允许特定工具
moltbot config set tools.allow '["browser", "exec", "read"]'
# 禁止特定工具
moltbot config set tools.deny '["process"]'
# 设置工具配置文件
moltbot config set tools.profile coding网关配置
bash
# 设置网关端口
moltbot config set gateway.port 18789
# 启用认证
moltbot config set gateway.auth token
# 配置 Tailscale
moltbot config set gateway.tailscale serve配置文件
Moltbot 使用 moltbot.json 作为主配置文件:
json5
{
// 模型配置
agents: {
defaults: {
model: {
primary: "claude-sonnet-4-20250514",
fallbacks: ["claude-haiku-3-20250508"]
},
imageModel: {
primary: "claude-3-5-sonnet-20241022"
}
}
},
// 工具配置
tools: {
allow: ["browser", "exec", "read", "write", "edit"],
deny: [],
profile: "coding"
},
// 网关配置
gateway: {
port: 18789,
auth: "token",
tailscale: "off"
}
}