{"id":604,"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-completion\/"},"modified":"2026-03-21T23:08:56","modified_gmt":"2026-03-21T15:08:56","slug":"cli-completion","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/cli-completion\/","title":{"rendered":"completion"},"content":{"rendered":"<h1>completion<\/h1>\n<h1><code>openclaw completion<\/code><\/h1>\n<p>Generate shell completion scripts and optionally install them into your shell profile.<\/p>\n<h2>Usage<\/h2>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw completion<br \/>\nopenclaw completion --shell zsh<br \/>\nopenclaw completion --install<br \/>\nopenclaw completion --shell fish --install<br \/>\nopenclaw completion --write-state<br \/>\nopenclaw completion --shell bash --write-state<\/code><\/p>\n<h2>Options<\/h2>\n<ul>\n<li><code>-s, --shell &lt;shell&gt;<\/code>: shell target (<code>zsh<\/code>, <code>bash<\/code>, <code>powershell<\/code>, <code>fish<\/code>; default: <code>zsh<\/code>)<\/li>\n<li><code>-i, --install<\/code>: install completion by adding a source line to your shell profile<\/li>\n<li><code>--write-state<\/code>: write completion script(s) to <code>$OPENCLAW_STATE_DIR\/completions<\/code> without printing to stdout<\/li>\n<li><code>-y, --yes<\/code>: skip install confirmation prompts<\/li>\n<\/ul>\n<h2>Notes<\/h2>\n<ul>\n<li><code>--install<\/code> writes a small &#8220;OpenClaw Completion&#8221; block into your shell profile and points it at the cached script.<\/li>\n<li>Without <code>--install<\/code> or <code>--write-state<\/code>, the command prints the script to stdout.<\/li>\n<li>Completion generation eagerly loads command trees so nested subcommands are included.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>completion openclaw completion Generate shell completio [&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-604","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/604","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=604"}],"version-history":[{"count":1,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/604\/revisions"}],"predecessor-version":[{"id":689,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/604\/revisions\/689"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=604"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=604"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=604"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}