OpenClawSkills
GitHub
CLI 参考 • 5 分钟阅读

设备

“openclaw devices”的 CLI 参考(设备配对 + 令牌轮换/撤销)

管理设备配对请求和设备范围的令牌。

Tutorial.step

命令

#

Tutorial.step

`openclaw devices list`

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

Terminal
openclaw devices list
openclaw devices list --json

#

Tutorial.step

`openclaw devices approve <requestId>`

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

Terminal
openclaw devices approve <requestId>

#

Tutorial.step

`openclaw devices reject &lt;requestId&gt;`

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

Terminal
openclaw devices reject <requestId>

#

Tutorial.step

`openclaw devices rotate --device &lt;id&gt; --role &lt;role&gt; [--scope &lt;scope...&gt;]`

为特定角色轮换设备令牌(可以选择更新范围)。

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

#

Tutorial.step

`openclaw devices revoke --device &lt;id&gt; --role &lt;role&gt;`

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

Terminal
openclaw devices revoke --device <deviceId> --role node
Tutorial.step

常用选项

- ''--url <url>'': Gateway WebSocket URL (defaults to ''gateway.remote.url'' when configured).

- ''--token <token>'': Gateway token (if required).

- ''--password <password>'': Gateway password (password auth).

- ''--timeout <ms>'': RPC timeout.

- ''--json'':JSON 输出(建议用于脚本编写)。

Tutorial.step

注释

- 令牌轮换返回一个新令牌(敏感)。把它当作一个秘密。

- 这些命令需要 ''operator.pairing'' (或 ''operator.admin'')范围。