doctor 命令
健康检查和快速修复工具,诊断配置、网关和服务问题。
用法
bash
moltbot doctor [选项]选项
| 选项 | 描述 |
|---|---|
--no-workspace-suggestions | 禁用工作区记忆提示 |
--yes | 接受默认值(无头模式) |
--non-interactive | 仅应用安全迁移,跳过提示 |
--deep | 扫描系统服务,查找额外网关安装 |
--json | JSON 格式输出 |
示例
基本健康检查
bash
# 运行标准健康检查
moltbot doctor深度诊断
bash
# 深度扫描系统服务
moltbot doctor --deep无头模式
bash
# 自动应用建议的修复
moltbot doctor --yes --non-interactive检查项目
doctor 命令会检查以下项目:
配置检查
- 配置文件语法和完整性
- 模型配置有效性
- 工具配置是否合理
- 通道配置状态
网关检查
- 网关服务运行状态
- 端口可用性
- 认证配置
- Tailscale 配置
系统检查
- Node.js/Bun 运行时
- 依赖包状态
- 磁盘空间
- 内存使用
输出示例
🔍 Running health checks...
✅ Configuration
- Config file: valid
- Models: configured (3 models)
- Tools: 8 allowed, 2 denied
✅ Gateway
- Service: running
- Port: 18789 (available)
- Auth: token
⚠️ Suggestions
- Consider running 'moltbot memory index' to update search index
- Browser profile 'chrome' is stale, run 'moltbot browser reset-profile'
Run 'moltbot doctor --yes' to apply fixes.常见问题修复
工作区建议
bash
# 应用工作区建议
moltbot doctor --yes额外网关检测
bash
# 检测系统中的额外网关安装
moltbot doctor --deep