Skip to Content
👋 欢迎来到 HowToUseMoltbot 快速入门
CLI 参考Devices 设备

moltbot devices

管理设备配对请求与设备级令牌。

命令

moltbot devices list

列出待处理配对请求与已配对设备。

moltbot devices list moltbot devices list --json

moltbot devices approve <requestId>

批准待处理的设备配对请求。

moltbot devices approve <requestId>

moltbot devices reject <requestId>

拒绝待处理的设备配对请求。

moltbot devices reject <requestId>

moltbot devices rotate --device <id> --role <role> [--scope <scope...>]

为指定角色轮换设备令牌(可选更新 scope)。

moltbot devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write

moltbot devices revoke --device <id> --role <role>

撤销指定角色的设备令牌。

moltbot devices revoke --device <deviceId> --role node

通用选项

  • --url <url>: 网关 WebSocket URL(配置了 gateway.remote.url 时默认使用)。
  • --token <token>: 网关令牌(如需)。
  • --password <password>: 网关密码(密码认证)。
  • --timeout <ms>: RPC 超时。
  • --json: JSON 输出(建议用于脚本)。

说明

  • 令牌轮换会返回新令牌(敏感)。请按密钥对待。
  • 这些命令需要 operator.pairing(或 operator.admin)权限。
最后更新于: