{"id":606,"date":"2026-03-21T22:52:56","date_gmt":"2026-03-21T14:52:56","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-qr\/"},"modified":"2026-03-21T23:08:58","modified_gmt":"2026-03-21T15:08:58","slug":"cli-qr","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-qr\/","title":{"rendered":"qr"},"content":{"rendered":"<h1>qr<\/h1>\n<h1><code>openclaw qr<\/code><\/h1>\n<p>Generate an iOS pairing QR and setup code from your current Gateway configuration.<\/p>\n<h2>Usage<\/h2>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw qr<br \/>\nopenclaw qr --setup-code-only<br \/>\nopenclaw qr --json<br \/>\nopenclaw qr --remote<br \/>\nopenclaw qr --url wss:\/\/gateway.example\/ws<\/code><\/p>\n<h2>Options<\/h2>\n<ul>\n<li><code>--remote<\/code>: use <code>gateway.remote.url<\/code> plus remote token\/password from config<\/li>\n<li><code>--url &lt;url&gt;<\/code>: override gateway URL used in payload<\/li>\n<li><code>--public-url &lt;url&gt;<\/code>: override public URL used in payload<\/li>\n<li><code>--token &lt;token&gt;<\/code>: override which gateway token the bootstrap flow authenticates against<\/li>\n<li><code>--password &lt;password&gt;<\/code>: override which gateway password the bootstrap flow authenticates against<\/li>\n<li><code>--setup-code-only<\/code>: print only setup code<\/li>\n<li><code>--no-ascii<\/code>: skip ASCII QR rendering<\/li>\n<li><code>--json<\/code>: emit JSON (<code>setupCode<\/code>, <code>gatewayUrl<\/code>, <code>auth<\/code>, <code>urlSource<\/code>)<\/li>\n<\/ul>\n<h2>Notes<\/h2>\n<ul>\n<li><code>--token<\/code> and <code>--password<\/code> are mutually exclusive.<\/li>\n<li>The setup code itself now carries an opaque short-lived <code>bootstrapToken<\/code>, not the shared gateway token\/password.<\/li>\n<li>With <code>--remote<\/code>, if effectively active remote credentials are configured as SecretRefs and you do not pass <code>--token<\/code> or <code>--password<\/code>, the command resolves them from the active gateway snapshot. If gateway is unavailable, the command fails fast.<\/li>\n<li>Without <code>--remote<\/code>, local gateway auth SecretRefs are resolved when no CLI auth override is passed:<\/li>\n<li><code>gateway.auth.token<\/code> resolves when token auth can win (explicit <code>gateway.auth.mode=\"token\"<\/code> or inferred mode where no password source wins).<\/li>\n<li><code>gateway.auth.password<\/code> resolves when password auth can win (explicit <code>gateway.auth.mode=\"password\"<\/code> or inferred mode with no winning token from auth\/env).<\/li>\n<li>If both <code>gateway.auth.token<\/code> and <code>gateway.auth.password<\/code> are configured (including SecretRefs) and <code>gateway.auth.mode<\/code> is unset, setup-code resolution fails until mode is set explicitly.<\/li>\n<li>Gateway version skew note: this command path requires a gateway that supports <code>secrets.resolve<\/code>; older gateways return an unknown-method error.<\/li>\n<li>After scanning, approve device pairing with:<\/li>\n<li><code>openclaw devices list<\/code><\/li>\n<li><code>openclaw devices approve &lt;requestId&gt;<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>qr openclaw qr Generate an iOS pairing QR and setup cod [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-606","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/606","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=606"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/606\/revisions"}],"predecessor-version":[{"id":744,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/606\/revisions\/744"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}