أوامر CLI
الأجهزة
إدارة طلبات اقتران الأجهزة والرموز المميزة المحددة للأجهزة.
الأوامر
openclaw devices list
عرض قائمة طلبات الاقتران المعلقة والأجهزة المقترنة.
openclaw devices list
openclaw devices list --json
openclaw devices remove <deviceId>
إزالة إدخال جهاز مقترن واحد.
openclaw devices remove <deviceId>
openclaw devices remove <deviceId> --json
openclaw devices clear --yes [--pending]
مسح الأجهزة المقترنة بشكل جماعي.
openclaw devices clear --yes
openclaw devices clear --yes --pending
openclaw devices clear --yes --pending --json
openclaw devices approve [requestId] [--latest]
الموافقة على طلب اقتران جهاز معلق. إذا تم حذف requestId، فإن OpenClaw يوافق تلقائيًا على أحدث طلب معلق.
openclaw devices approve
openclaw devices approve <requestId>
openclaw devices approve --latest
openclaw devices reject <requestId>
رفض طلب اقتران جهاز معلق.
openclaw devices reject <requestId>
openclaw devices rotate --device <id> --role <role> [--scope <scope...>]
تدوير رمز مميز لجهاز لدور محدد (مع تحديث النطاقات اختياريًا).
openclaw devices rotate --device <deviceId> --role operator --scope operator.read --scope operator.write
openclaw devices revoke --device <id> --role <role>
سحب رمز مميز لجهاز لدور محدد.
openclaw devices revoke --device <deviceId> --role node
الخيارات الشائعة
--url <url>: عنوان URL لـ WebSocket للبوابة (الافتراضي هوgateway.remote.urlعند التكوين).--token <token>: الرمز المميز للبوابة (إذا لزم الأمر).--password <password>: كلمة مرور البوابة (المصادقة بكلمة المرور).--timeout <ms>: مهلة RPC.--json: إخراج JSON (موصى به للبرمجة النصية).
ملاحظة: عند تعيين --url، لا يتراجع CLI إلى بيانات اعتماد التكوين أو البيئة. قم بتمرير --token أو --password صراحةً. يُعد عدم وجود بيانات اعتماد صريحة خطأ.
ملاحظات
- يُرجع تدوير الرمز المميز رمزًا جديدًا (حساس). عالجه كسر.
- تتطلب هذه الأوامر نطاق
operator.pairing(أوoperator.admin). - أمر
devices clearمحمي عمدًا بـ--yes. - إذا كان نطاق الاقتران غير متاح على الاتصال المحلي الدائري (ولم يتم تمرير
--urlصراحةً)، يمكن لـ list/approve استخدام تراجع اقتران محلي.