openclaw nodes

Quản lý các node đã pairing (thiết bị) và gọi các khả năng của node.

Liên quan:

Các tùy chọn thường dùng:

  • --url, --token, --timeout, --json

Các lệnh thường dùng

openclaw nodes list
openclaw nodes list --connected
openclaw nodes list --last-connected 24h
openclaw nodes pending
openclaw nodes approve <requestId>
openclaw nodes status
openclaw nodes status --connected
openclaw nodes status --last-connected 24h

Lệnh nodes list sẽ hiển thị bảng pending/paired. Các dòng đã paired sẽ bao gồm thời gian kết nối gần nhất (Last Connect). Dùng --connected để chỉ hiển thị các node đang kết nối. Dùng --last-connected <duration> để lọc các node đã kết nối trong khoảng thời gian nhất định (ví dụ 24h, 7d).

Invoke / run

openclaw nodes invoke --node <id|name|ip> --command <command> --params <json>
openclaw nodes run --node <id|name|ip> <command...>
openclaw nodes run --raw "git status"
openclaw nodes run --agent main --node <id|name|ip> --raw "git status"

Các flag của invoke:

  • --params <json>: chuỗi JSON object (mặc định {}).
  • --invoke-timeout <ms>: thời gian timeout khi invoke node (mặc định 15000).
  • --idempotency-key <key>: idempotency key tùy chọn.

Exec-style defaults

Lệnh nodes run hoạt động giống như exec behavior của model (defaults + approvals):

  • Đọc tools.exec.* (cộng với các override từ agents.list[].tools.exec.*).
  • Sử dụng exec approvals (exec.approval.request) trước khi invoke system.run.
  • --node có thể bỏ qua khi tools.exec.node đã được thiết lập.
  • Yêu cầu một node có hỗ trợ system.run (macOS companion app hoặc headless node host).

Các flag:

  • --cwd <path>: thư mục làm việc.
  • --env <key=val>: override biến môi trường (có thể lặp lại).
  • --command-timeout <ms>: thời gian timeout của lệnh.
  • --invoke-timeout <ms>: thời gian timeout khi invoke node (mặc định 30000).
  • --needs-screen-recording: yêu cầu quyền screen recording.
  • --raw <command>: chạy một chuỗi shell (/bin/sh -lc hoặc cmd.exe /c).
  • --agent <id>: approvals/allowlists theo phạm vi agent (mặc định là agent đã cấu hình).
  • --ask <off|on-miss|always>, --security <deny|allowlist|full>: các override.