{"id":82,"date":"2026-03-21T22:47:16","date_gmt":"2026-03-21T14:47:16","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-update\/"},"modified":"2026-03-21T23:08:51","modified_gmt":"2026-03-21T15:08:51","slug":"cli-update","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-update\/","title":{"rendered":"update"},"content":{"rendered":"<h1>update<\/h1>\n<h1><code>openclaw update<\/code><\/h1>\n<p>\u5b89\u5168\u66f4\u65b0 OpenClaw \u5e76\u5728 stable\/beta\/dev \u6e20\u9053\u4e4b\u95f4\u5207\u6362\u3002<\/p>\n<p>\u5982\u679c\u4f60\u901a\u8fc7 <strong>npm\/pnpm<\/strong> \u5b89\u88c5\uff08\u5168\u5c40\u5b89\u88c5\uff0c\u65e0 git \u5143\u6570\u636e\uff09\uff0c\u66f4\u65b0\u901a\u8fc7 <a href=\"\/install\/updating\">\u66f4\u65b0<\/a> \u4e2d\u7684\u5305\u7ba1\u7406\u5668\u6d41\u7a0b\u8fdb\u884c\u3002<\/p>\n<h2>\u7528\u6cd5<\/h2>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw update<br \/>\nopenclaw update status<br \/>\nopenclaw update wizard<br \/>\nopenclaw update &#8211;channel beta<br \/>\nopenclaw update &#8211;channel dev<br \/>\nopenclaw update &#8211;tag beta<br \/>\nopenclaw update &#8211;no-restart<br \/>\nopenclaw update &#8211;json<br \/>\nopenclaw &#8211;update<\/p>\n<pre><code>\n## \u9009\u9879\n\n* `--no-restart`\uff1a\u6210\u529f\u66f4\u65b0\u540e\u8df3\u8fc7\u91cd\u542f Gateway \u7f51\u5173\u670d\u52a1\u3002\n* `--channel &lt;stable|beta|dev&gt;`\uff1a\u8bbe\u7f6e\u66f4\u65b0\u6e20\u9053\uff08git + npm\uff1b\u6301\u4e45\u5316\u5230\u914d\u7f6e\u4e2d\uff09\u3002\n* `--tag &lt;dist-tag|version&gt;`\uff1a\u4ec5\u4e3a\u672c\u6b21\u66f4\u65b0\u8986\u76d6 npm dist-tag \u6216\u7248\u672c\u3002\n* `--json`\uff1a\u6253\u5370\u673a\u5668\u53ef\u8bfb\u7684 `UpdateRunResult` JSON\u3002\n* `--timeout &lt;seconds&gt;`\uff1a\u6bcf\u6b65\u8d85\u65f6\u65f6\u95f4\uff08\u9ed8\u8ba4 1200 \u79d2\uff09\u3002\n\n\u6ce8\u610f\uff1a\u964d\u7ea7\u9700\u8981\u786e\u8ba4\uff0c\u56e0\u4e3a\u65e7\u7248\u672c\u53ef\u80fd\u4f1a\u7834\u574f\u914d\u7f6e\u3002\n\n## `update status`\n\n\u663e\u793a\u5f53\u524d\u66f4\u65b0\u6e20\u9053 + git \u6807\u7b7e\/\u5206\u652f\/SHA\uff08\u5bf9\u4e8e\u6e90\u7801\u68c0\u51fa\uff09\uff0c\u4ee5\u53ca\u66f4\u65b0\u53ef\u7528\u6027\u3002\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw update status\nopenclaw update status --json\nopenclaw update status --timeout 10\n<\/code><\/pre>\n<p>\u9009\u9879\uff1a<\/p>\n<ul>\n<li><code>--json<\/code>\uff1a\u6253\u5370\u673a\u5668\u53ef\u8bfb\u7684\u72b6\u6001 JSON\u3002<\/li>\n<li><code>--timeout &lt;seconds&gt;<\/code>\uff1a\u68c0\u67e5\u8d85\u65f6\u65f6\u95f4\uff08\u9ed8\u8ba4 3 \u79d2\uff09\u3002<\/li>\n<\/ul>\n<h2><code>update wizard<\/code><\/h2>\n<p>\u4ea4\u4e92\u5f0f\u6d41\u7a0b\uff0c\u7528\u4e8e\u9009\u62e9\u66f4\u65b0\u6e20\u9053\u5e76\u786e\u8ba4\u662f\u5426\u5728\u66f4\u65b0\u540e\u91cd\u542f Gateway \u7f51\u5173\uff08\u9ed8\u8ba4\u91cd\u542f\uff09\u3002\u5982\u679c\u4f60\u9009\u62e9 <code>dev<\/code> \u4f46\u6ca1\u6709 git \u68c0\u51fa\uff0c\u5b83\u4f1a\u63d0\u4f9b\u521b\u5efa\u4e00\u4e2a\u7684\u9009\u9879\u3002<\/p>\n<h2>\u5de5\u4f5c\u539f\u7406<\/h2>\n<p>\u5f53\u4f60\u663e\u5f0f\u5207\u6362\u6e20\u9053\uff08<code>--channel ...<\/code>\uff09\u65f6\uff0cOpenClaw \u4e5f\u4f1a\u4fdd\u6301\u5b89\u88c5\u65b9\u5f0f\u4e00\u81f4\uff1a<\/p>\n<ul>\n<li><code>dev<\/code> \u2192 \u786e\u4fdd\u5b58\u5728 git \u68c0\u51fa\uff08\u9ed8\u8ba4\uff1a<code>~\/openclaw<\/code>\uff0c\u53ef\u901a\u8fc7 <code>OPENCLAW_GIT_DIR<\/code> \u8986\u76d6\uff09\uff0c\u66f4\u65b0\u5b83\uff0c\u5e76\u4ece\u8be5\u68c0\u51fa\u5b89\u88c5\u5168\u5c40 CLI\u3002<\/li>\n<li><code>stable<\/code>\/<code>beta<\/code> \u2192 \u4f7f\u7528\u5339\u914d\u7684 dist-tag \u4ece npm \u5b89\u88c5\u3002<\/li>\n<\/ul>\n<h2>Git \u68c0\u51fa\u6d41\u7a0b<\/h2>\n<p>\u6e20\u9053\uff1a<\/p>\n<ul>\n<li><code>stable<\/code>\uff1a\u68c0\u51fa\u6700\u65b0\u7684\u975e beta \u6807\u7b7e\uff0c\u7136\u540e\u6784\u5efa + doctor\u3002<\/li>\n<li><code>beta<\/code>\uff1a\u68c0\u51fa\u6700\u65b0\u7684 <code>-beta<\/code> \u6807\u7b7e\uff0c\u7136\u540e\u6784\u5efa + doctor\u3002<\/li>\n<li><code>dev<\/code>\uff1a\u68c0\u51fa <code>main<\/code>\uff0c\u7136\u540e fetch + rebase\u3002<\/li>\n<\/ul>\n<p>\u9ad8\u5c42\u6982\u8ff0\uff1a<\/p>\n<ol>\n<li>\u9700\u8981\u5e72\u51c0\u7684\u5de5\u4f5c\u6811\uff08\u65e0\u672a\u63d0\u4ea4\u7684\u66f4\u6539\uff09\u3002<\/li>\n<li>\u5207\u6362\u5230\u6240\u9009\u6e20\u9053\uff08\u6807\u7b7e\u6216\u5206\u652f\uff09\u3002<\/li>\n<li>\u83b7\u53d6\u4e0a\u6e38\uff08\u4ec5 dev\uff09\u3002<\/li>\n<li>\u4ec5 dev\uff1a\u5728\u4e34\u65f6\u5de5\u4f5c\u6811\u4e2d\u9884\u68c0 lint + TypeScript \u6784\u5efa\uff1b\u5982\u679c\u6700\u65b0\u63d0\u4ea4\u5931\u8d25\uff0c\u56de\u9000\u6700\u591a 10 \u4e2a\u63d0\u4ea4\u4ee5\u627e\u5230\u6700\u65b0\u7684\u5e72\u51c0\u6784\u5efa\u3002<\/li>\n<li>Rebase \u5230\u6240\u9009\u63d0\u4ea4\uff08\u4ec5 dev\uff09\u3002<\/li>\n<li>\u5b89\u88c5\u4f9d\u8d56\uff08\u4f18\u5148\u4f7f\u7528 pnpm\uff1bnpm \u4f5c\u4e3a\u5907\u9009\uff09\u3002<\/li>\n<li>\u6784\u5efa + \u6784\u5efa\u63a7\u5236\u754c\u9762\u3002<\/li>\n<li>\u8fd0\u884c <code>openclaw doctor<\/code> \u4f5c\u4e3a\u6700\u7ec8\u7684&#8221;\u5b89\u5168\u66f4\u65b0&#8221;\u68c0\u67e5\u3002<\/li>\n<li>\u5c06\u63d2\u4ef6\u540c\u6b65\u5230\u5f53\u524d\u6e20\u9053\uff08dev \u4f7f\u7528\u6346\u7ed1\u7684\u6269\u5c55\uff1bstable\/beta \u4f7f\u7528 npm\uff09\u5e76\u66f4\u65b0 npm \u5b89\u88c5\u7684\u63d2\u4ef6\u3002<\/li>\n<\/ol>\n<h2><code>--update<\/code> \u7b80\u5199<\/h2>\n<p><code>openclaw --update<\/code> \u4f1a\u91cd\u5199\u4e3a <code>openclaw update<\/code>\uff08\u4fbf\u4e8e shell \u548c\u542f\u52a8\u811a\u672c\u4f7f\u7528\uff09\u3002<\/p>\n<h2>\u53e6\u8bf7\u53c2\u9605<\/h2>\n<ul>\n<li><code>openclaw doctor<\/code>\uff08\u5728 git \u68c0\u51fa\u4e0a\u4f1a\u63d0\u4f9b\u5148\u8fd0\u884c\u66f4\u65b0\u7684\u9009\u9879\uff09<\/li>\n<li><a href=\"\/install\/development-channels\">\u5f00\u53d1\u6e20\u9053<\/a><\/li>\n<li><a href=\"\/install\/updating\">\u66f4\u65b0<\/a><\/li>\n<li><a href=\"\/cli\">CLI \u53c2\u8003<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>update openclaw update \u5b89\u5168\u66f4\u65b0 OpenClaw \u5e76\u5728 stable\/beta\/dev [&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-82","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/82","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=82"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/82\/revisions\/377"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}