{"id":272,"date":"2026-03-21T22:47:25","date_gmt":"2026-03-21T14:47:25","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/start-wizard-cli-automation\/"},"modified":"2026-03-21T23:23:48","modified_gmt":"2026-03-21T15:23:48","slug":"start-wizard-cli-automation","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/start-wizard-cli-automation\/","title":{"rendered":"CLI \u81ea\u52a8\u5316"},"content":{"rendered":"<h1>CLI &#33258;&#21160;&#21270;<\/h1>\n<p>&#20351;&#29992; <code>--non-interactive<\/code> &#33258;&#21160;&#21270; <code>openclaw onboard<\/code>&#12290;<\/p>\n<p>\n  <code>--json<\/code> &#24182;&#19981;&#24847;&#21619;&#30528;&#38750;&#20132;&#20114;&#27169;&#24335;&#12290;&#23545;&#20110;&#33050;&#26412;&#65292;&#35831;&#20351;&#29992; <code>--non-interactive<\/code>&#65288;&#20197;&#21450; <code>--workspace<\/code>&#65289;&#12290;\n<\/p>\n<h2>&#22522;&#30784;&#38750;&#20132;&#20114;&#24335;&#31034;&#20363;<\/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 onboard &#8211;non-interactive<br \/>\n  &#8211;mode local<br \/>\n  &#8211;auth-choice apiKey<br \/>\n  &#8211;anthropic-api-key &#8220;$ANTHROPIC_API_KEY&#8221;<br \/>\n  &#8211;secret-input-mode plaintext<br \/>\n  &#8211;gateway-port 18789<br \/>\n  &#8211;gateway-bind loopback<br \/>\n  &#8211;install-daemon<br \/>\n  &#8211;daemon-runtime node<br \/>\n  &#8211;skip-skills<\/p>\n<pre><code>\n&#28155;&#21152; `--json` &#21487;&#33719;&#24471;&#26426;&#22120;&#21487;&#35835;&#30340;&#25688;&#35201;&#12290;\n\n&#20351;&#29992; `--secret-input-mode ref` &#21487;&#22312;&#35748;&#35777;&#37197;&#32622;&#25991;&#20214;&#20013;&#23384;&#20648;&#22522;&#20110;&#29615;&#22659;&#21464;&#37327;&#30340;&#24341;&#29992;&#65292;&#32780;&#19981;&#26159;&#26126;&#25991;&#20540;&#12290;\n&#22312;&#35774;&#32622;&#21521;&#23548;&#27969;&#31243;&#20013;&#65292;&#25903;&#25345;&#22312;&#29615;&#22659;&#21464;&#37327;&#24341;&#29992;&#19982;&#24050;&#37197;&#32622;&#30340;&#25552;&#20379;&#21830;&#24341;&#29992;&#65288;`file` &#25110; `exec`&#65289;&#20043;&#38388;&#36827;&#34892;&#20132;&#20114;&#24335;&#36873;&#25321;&#12290;\n\n&#22312;&#38750;&#20132;&#20114;&#24335; `ref` &#27169;&#24335;&#19979;&#65292;&#24517;&#39035;&#22312;&#36827;&#31243;&#29615;&#22659;&#20013;&#35774;&#32622;&#25552;&#20379;&#21830;&#29615;&#22659;&#21464;&#37327;&#12290;\n&#22914;&#26524;&#20256;&#20837;&#20102;&#20869;&#32852;&#23494;&#38053;&#26631;&#24535;&#65292;&#20294;&#32570;&#23569;&#21305;&#37197;&#30340;&#29615;&#22659;&#21464;&#37327;&#65292;&#29616;&#22312;&#20250;&#24555;&#36895;&#22833;&#36133;&#12290;\n\n&#31034;&#20363;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nopenclaw onboard --non-interactive \n  --mode local \n  --auth-choice openai-api-key \n  --secret-input-mode ref \n  --accept-risk\n<\/code><\/pre>\n<h2>&#25552;&#20379;&#21830;&#19987;&#29992;&#31034;&#20363;<\/h2>\n<p>    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice gemini-api-key<br \/>\n      --gemini-api-key \"$GEMINI_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice zai-api-key<br \/>\n      --zai-api-key \"$ZAI_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice ai-gateway-api-key<br \/>\n      --ai-gateway-api-key \"$AI_GATEWAY_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice cloudflare-ai-gateway-api-key<br \/>\n      --cloudflare-ai-gateway-account-id \"your-account-id\"<br \/>\n      --cloudflare-ai-gateway-gateway-id \"your-gateway-id\"<br \/>\n      --cloudflare-ai-gateway-api-key \"$CLOUDFLARE_AI_GATEWAY_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice moonshot-api-key<br \/>\n      --moonshot-api-key \"$MOONSHOT_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice mistral-api-key<br \/>\n      --mistral-api-key \"$MISTRAL_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice synthetic-api-key<br \/>\n      --synthetic-api-key \"$SYNTHETIC_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice opencode-zen<br \/>\n      --opencode-zen-api-key \"$OPENCODE_API_KEY\"<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code><\/p>\n<pre><code>&#23545; Go &#30446;&#24405;&#65292;&#21487;&#25913;&#29992; `--auth-choice opencode-go --opencode-go-api-key \"$OPENCODE_API_KEY\"`&#12290;\n<\/code><\/pre>\n<\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice ollama<br \/>\n      --custom-model-id \"qwen3.5:27b\"<br \/>\n      --accept-risk<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code>\n  <\/p>\n<p>\n    <code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\n    openclaw onboard --non-interactive<br \/>\n      --mode local<br \/>\n      --auth-choice custom-api-key<br \/>\n      --custom-base-url \"https:\/\/llm.example.com\/v1\"<br \/>\n      --custom-model-id \"foo-large\"<br \/>\n      --custom-api-key \"$CUSTOM_API_KEY\"<br \/>\n      --custom-provider-id \"my-custom\"<br \/>\n      --custom-compatibility anthropic<br \/>\n      --gateway-port 18789<br \/>\n      --gateway-bind loopback<\/code><\/p>\n<pre><code>`--custom-api-key` &#26159;&#21487;&#36873;&#30340;&#12290;&#22914;&#26524;&#30465;&#30053;&#65292;&#26032;&#25163;&#24341;&#23548;&#20250;&#26816;&#26597; `CUSTOM_API_KEY`&#12290;\n\n`ref` &#27169;&#24335;&#21464;&#20307;&#65306;\n\n```bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}\nexport CUSTOM_API_KEY=\"your-key\"\nopenclaw onboard --non-interactive \n  --mode local \n  --auth-choice custom-api-key \n  --custom-base-url \"https:\/\/llm.example.com\/v1\" \n  --custom-model-id \"foo-large\" \n  --secret-input-mode ref \n  --custom-provider-id \"my-custom\" \n  --custom-compatibility anthropic \n  --gateway-port 18789 \n  --gateway-bind loopback\n```\n\n&#22312;&#27492;&#27169;&#24335;&#19979;&#65292;&#26032;&#25163;&#24341;&#23548;&#20250;&#23558; `apiKey` &#23384;&#20648;&#20026; `{ source: \"env\", provider: \"default\", id: \"CUSTOM_API_KEY\" }`&#12290;\n<\/code><\/pre>\n<\/p>\n<h2>&#28155;&#21152;&#21478;&#19968;&#20010;&#26234;&#33021;&#20307;<\/h2>\n<p>&#20351;&#29992; <code>openclaw agents add &lt;name&gt;<\/code> &#21019;&#24314;&#19968;&#20010;&#21333;&#29420;&#30340;&#26234;&#33021;&#20307;&#65292;&#23427;&#25317;&#26377;&#33258;&#24049;&#30340;&#24037;&#20316;&#21306;&#12289;<br \/>\n&#20250;&#35805;&#21644;&#35748;&#35777;&#37197;&#32622;&#25991;&#20214;&#12290;&#19981;&#24102; <code>--workspace<\/code> &#36816;&#34892;&#20250;&#21551;&#21160;&#21521;&#23548;&#12290;<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\nopenclaw agents add work<br \/>\n  --workspace ~\/.openclaw\/workspace-work<br \/>\n  --model openai\/gpt-5.2<br \/>\n  --bind whatsapp:biz<br \/>\n  --non-interactive<br \/>\n  --json<\/code><\/p>\n<p>&#23427;&#20250;&#35774;&#32622;&#65306;<\/p>\n<ul>\n<li><code>agents.list[].name<\/code><\/li>\n<li><code>agents.list[].workspace<\/code><\/li>\n<li><code>agents.list[].agentDir<\/code><\/li>\n<\/ul>\n<p>&#35828;&#26126;&#65306;<\/p>\n<ul>\n<li>&#40664;&#35748;&#24037;&#20316;&#21306;&#36981;&#24490; <code>~\/.openclaw\/workspace-&lt;agentId&gt;<\/code>&#12290;<\/li>\n<li>&#28155;&#21152; <code>bindings<\/code> &#20197;&#36335;&#30001;&#20837;&#31449;&#28040;&#24687;&#65288;&#21521;&#23548;&#21487;&#20197;&#23436;&#25104;&#36825;&#39033;&#25805;&#20316;&#65289;&#12290;<\/li>\n<li>&#38750;&#20132;&#20114;&#24335;&#26631;&#24535;&#65306;<code>--model<\/code>&#12289;<code>--agent-dir<\/code>&#12289;<code>--bind<\/code>&#12289;<code>--non-interactive<\/code>&#12290;<\/li>\n<\/ul>\n<h2>&#30456;&#20851;&#25991;&#26723;<\/h2>\n<ul>\n<li>&#26032;&#25163;&#24341;&#23548;&#20013;&#24515;&#65306;<a href=\"\/start\/wizard\">&#35774;&#32622;&#21521;&#23548;&#65288;CLI&#65289;<\/a><\/li>\n<li>&#23436;&#25972;&#21442;&#32771;&#65306;<a href=\"\/start\/wizard-cli-reference\">CLI &#35774;&#32622;&#21442;&#32771;<\/a><\/li>\n<li>&#21629;&#20196;&#21442;&#32771;&#65306;<a href=\"\/cli\/onboard\"><code>openclaw onboard<\/code><\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CLI &#33258;&#21160;&#21270; &#20351;&#29992; &#8211;non-int [&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-272","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/272","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=272"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/272\/revisions"}],"predecessor-version":[{"id":785,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/272\/revisions\/785"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=272"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=272"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=272"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}