{"id":106725,"date":"2026-09-18T07:48:48","date_gmt":"2026-09-17T23:48:48","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/106725.html"},"modified":"2026-09-18T07:48:48","modified_gmt":"2026-09-17T23:48:48","slug":"2026%e5%85%8d%e8%b4%b9%e7%9a%84-opencode-%e4%bd%bf%e7%94%a8%e5%88%86%e4%ba%ab%ef%bc%9awindows%e7%ab%af-%e6%9c%8d%e5%8a%a1%e5%99%a8cli-%e5%ae%9e%e6%88%98%e6%80%bb%e7%bb%93","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/106725.html","title":{"rendered":"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3"},"content":{"rendered":"<h2>\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef &#043; \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3<\/h2>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef &#043; \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3<\/li>\n<li>\n<ul>\n<li>\u4e00\u3001\u524d\u8a00<\/li>\n<li>\u4e8c\u3001\u4f7f\u7528\u8bf4\u660e<\/li>\n<li>\n<ul>\n<li>1\u3001opencode \u662f\u4ec0\u4e48&#xff0c;\u51ed\u4ec0\u4e48\u514d\u8d39<\/li>\n<li>2\u3001Windows \u7aef\u4f7f\u7528<\/li>\n<li>\n<ul>\n<li>&#xff08;1&#xff09;\u5b89\u88c5<\/li>\n<li>&#xff08;2&#xff09;\u914d\u7f6e\u6a21\u578b<\/li>\n<li>&#xff08;3&#xff09;\u9879\u76ee\u521d\u59cb\u5316\u4e0e\u57fa\u672c\u4f7f\u7528<\/li>\n<\/ul>\n<\/li>\n<li>3\u3001\u514d\u8d39\u8dd1\u8d77\u6765\u7684\u51e0\u79cd\u65b9\u5f0f<\/li>\n<li>4\u3001\u670d\u52a1\u5668&#xff08;Linux&#xff09;CLI \u4f7f\u7528<\/li>\n<li>\n<ul>\n<li>&#xff08;1&#xff09;\u5b89\u88c5<\/li>\n<li>&#xff08;2&#xff09;\u6388\u6743<\/li>\n<li>&#xff08;3&#xff09;\u6a21\u578b\u67e5\u8be2\u4e0e\u6307\u5b9a<\/li>\n<li>&#xff08;4&#xff09;\u4ea4\u4e92\u6a21\u5f0f&#xff08;TUI&#xff09;<\/li>\n<li>&#xff08;5&#xff09;\u975e\u4ea4\u4e92\u6a21\u5f0f&#xff08;\u811a\u672c\u96c6\u6210&#xff09;<\/li>\n<li>&#xff08;6&#xff09;\u670d\u52a1\u5668\/\u5171\u4eab\u6a21\u5f0f<\/li>\n<\/ul>\n<\/li>\n<li>5\u3001\u5e38\u7528\u547d\u4ee4<\/li>\n<li>6\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u8e29\u5751<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u5176\u4ed6<\/li>\n<li>\n<ul>\n<li>1\u3001\u5c0f\u7ed3<\/li>\n<li>2\u3001\u5e38\u7528\u547d\u4ee4\u901f\u67e5<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u4e00\u3001\u524d\u8a00<\/h3>\n<p>opencode \u662f\u4e00\u4e2a\u5f00\u6e90&#xff08;MIT \u534f\u8bae&#xff09;\u7684 AI \u7f16\u7801\u667a\u80fd\u4f53&#xff0c;\u5b9a\u4f4d\u662f&#034;\u7ec8\u7aef\u91cc\u7684 AI \u5de5\u7a0b\u5e08&#034;&#xff0c;<\/p>\n<p>\u548c Claude Code\u3001Cursor Agent \u662f\u540c\u7c7b\u4ea7\u54c1&#xff0c;<\/p>\n<p>\u4f46\u5b83\u6709\u4e09\u4e2a\u6700\u5927\u7684\u5356\u70b9&#xff1a;\u5f00\u6e90\u514d\u8d39\u3001\u4e0d\u7ed1\u5b9a\u4efb\u4f55\u6a21\u578b\u5382\u5546\u3001\u7ec8\u7aef\u4f18\u5148\u3002<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u5bf9\u8bdd\u7684\u65b9\u5f0f\u8ba9 AI \u81ea\u52a8\u5b8c\u6210\u4ee3\u7801\u89e3\u8bfb\u3001\u529f\u80fd\u5f00\u53d1\u3001\u91cd\u6784\u3001Bug \u4fee\u590d\u7b49\u5168\u6d41\u7a0b\u5de5\u4f5c\u3002<\/p>\n<p>\u65b0\u624b\u5e38\u89c1\u7684\u51e0\u4e2a\u8bef\u533a&#xff1a;<\/p>\n<li>\n<p>\u4ee5\u4e3a\u5fc5\u987b\u5148\u82b1\u94b1\u4e70 API Key \u624d\u80fd\u7528&#xff0c;\u5b9e\u9645\u4e0a opencode \u81ea\u5e26\u514d\u8d39\u6a21\u578b&#xff08;OpenCode Zen \u514d\u8d39\u6a21\u578b&#xff09;&#xff0c;\u8fd8\u53ef\u4ee5\u63a5 GitHub Copilot\u3001OpenRouter \u514d\u8d39\u6a21\u578b\u3001\u672c\u5730 Ollama \u6a21\u578b&#xff0c;\u96f6\u6210\u672c\u5c31\u80fd\u8dd1\u8d77\u6765&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u4e3a Windows \u4e0a\u7528\u4e0d\u4e86\u6216\u8005\u53ea\u80fd\u88c5 WSL&#xff0c;\u5b9e\u9645\u4e0a\u5b98\u65b9\u63a8\u8350 WSL \u4f53\u9a8c\u6700\u4f73&#xff0c;\u4f46 Chocolatey\u3001Scoop\u3001npm \u539f\u751f\u5b89\u88c5\u90fd\u662f\u652f\u6301\u7684&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4ee5\u4e3a AI \u7f16\u7a0b\u5de5\u5177\u5c31\u662f\u804a\u5929\u7a97\u53e3&#xff0c;\u5b9e\u9645\u4e0a opencode \u9664\u4e86 TUI \u4ea4\u4e92&#xff0c;\u8fd8\u6709 opencode run \u975e\u4ea4\u4e92\u6a21\u5f0f&#xff08;\u9002\u5408\u811a\u672c\/CI&#xff09;\u548c opencode serve \u670d\u52a1\u5668\u6a21\u5f0f&#xff0c;\u5728 Linux \u670d\u52a1\u5668\u4e0a\u8ba9 AI \u76f4\u63a5\u6539\u4ee3\u7801\u3001\u8dd1\u6784\u5efa\u975e\u5e38\u987a\u624b\u3002<\/p>\n<\/li>\n<p>\u8fd9\u91cc\u628a opencode \u5728 Windows \u7aef\u7684\u4f7f\u7528\u65b9\u6cd5\u3001\u514d\u8d39\u6a21\u578b\u7684\u51e0\u79cd\u63a5\u6cd5&#xff0c;<\/p>\n<p>\u4ee5\u53ca\u5728\u670d\u52a1\u5668\u4e0a\u7528 CLI \u5f00\u53d1\u7684\u6d41\u7a0b\u505a\u4e2a\u7b80\u5355\u603b\u7ed3&#xff0c;\u65b9\u4fbf\u5927\u5bb6\u5feb\u901f\u4e0a\u624b\u3002<\/p>\n<p>openCode\u662f\u662f\u76ee\u524d\u552f\u4e00\u514d\u767b\u5f55\u514d\u8d39\u53ef\u4ee5\u4f7f\u7528\u7684AI\u5de5\u5177\u3002\u3002\u3002\u6709\u5174\u8da3\u7684\u53ef\u4ee5\u8bd5\u8bd5\u3002<\/p>\n<h3>\u4e8c\u3001\u4f7f\u7528\u8bf4\u660e<\/h3>\n<h4>1\u3001opencode \u662f\u4ec0\u4e48&#xff0c;\u51ed\u4ec0\u4e48\u514d\u8d39<\/h4>\n<p>opencode \u7531 SST \u56e2\u961f\u5f00\u6e90&#xff0c;GitHub \u661f\u6807\u5341\u4e07&#043;&#xff0c;\u6838\u5fc3\u7279\u70b9&#xff1a;<\/p>\n<table>\n<tr>\u7279\u6027\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>\u5b8c\u5168\u5f00\u6e90<\/td>\n<td>MIT \u534f\u8bae&#xff0c;\u4ee3\u7801\u900f\u660e\u53ef\u5ba1\u8ba1&#xff0c;\u53ef\u81ea\u884c\u4fee\u6539\u90e8\u7f72<\/td>\n<\/tr>\n<tr>\n<td>\u6a21\u578b\u4e0d\u9501\u5b9a<\/td>\n<td>\u652f\u6301 75&#043; \u6a21\u578b\u63d0\u4f9b\u5546&#xff1a;Claude\u3001GPT\u3001Gemini\u3001DeepSeek\u3001Kimi\u3001Ollama \u672c\u5730\u6a21\u578b\u7b49<\/td>\n<\/tr>\n<tr>\n<td>\u7ec8\u7aef\u4f18\u5148<\/td>\n<td>Go \u7f16\u5199\u7684 TUI&#xff0c;\u4e0d\u4f9d\u8d56\u7279\u5b9a IDE&#xff0c;\u4efb\u4f55\u7ec8\u7aef\u90fd\u80fd\u7528<\/td>\n<\/tr>\n<tr>\n<td>\u591a\u79cd\u5f62\u6001<\/td>\n<td>\u7ec8\u7aef TUI\u3001\u684c\u9762\u5e94\u7528\u3001IDE \u6269\u5c55\u3001\u65e0\u5934 CLI\u3001Web \u754c\u9762<\/td>\n<\/tr>\n<tr>\n<td>\u53cc\u667a\u80fd\u4f53<\/td>\n<td>\u5185\u7f6e Plan&#xff08;\u8ba1\u5212&#xff09; \u548c Build&#xff08;\u6784\u5efa&#xff09; \u4e24\u79cd\u6a21\u5f0f&#xff0c;\u4e5f\u53ef\u81ea\u5b9a\u4e49 Agent<\/td>\n<\/tr>\n<tr>\n<td>\u9690\u79c1\u4f18\u5148<\/td>\n<td>\u9ed8\u8ba4\u4e0d\u5b58\u50a8\u4ee3\u7801\u4e0e\u4f1a\u8bdd\u6570\u636e&#xff0c;\u53ef\u5168\u672c\u5730\u5316\u8fd0\u884c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#034;\u514d\u8d39&#034;\u8981\u5206\u4e24\u5c42\u7406\u89e3&#xff1a;opencode \u8f6f\u4ef6\u672c\u8eab\u514d\u8d39\u5f00\u6e90&#xff1b;\u6a21\u578b\u90e8\u5206\u4e30\u4fed\u7531\u4eba\u2014\u2014\u53ef\u4ee5\u96f6\u6210\u672c&#xff08;\u514d\u8d39\u6a21\u578b\/\u672c\u5730\u6a21\u578b&#xff09;&#xff0c;\u4e5f\u53ef\u4ee5\u6309\u9700\u63a5\u4ed8\u8d39 API \u8ffd\u6c42\u6548\u679c&#xff0c;\u540e\u9762\u7b2c 3 \u8282\u8be6\u7ec6\u8bf4\u3002<\/p>\n<h4>2\u3001Windows \u7aef\u4f7f\u7528<\/h4>\n<h5>&#xff08;1&#xff09;\u5b89\u88c5<\/h5>\n<p>\u65b9\u6848\u4e00&#xff1a;WSL&#xff08;\u5b98\u65b9\u63a8\u8350&#xff09;<\/p>\n<p>WSL \u6587\u4ef6\u7cfb\u7edf\u6027\u80fd\u66f4\u597d&#xff0c;\u517c\u5bb9 opencode \u5168\u90e8\u529f\u80fd\u3002\u5b89\u88c5\u597d WSL \u540e&#xff0c;\u6253\u5f00 WSL \u7ec8\u7aef\u6267\u884c\u901a\u7528\u811a\u672c\u5373\u53ef&#xff1a;<\/p>\n<p><span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">-fsSL<\/span> https:\/\/opencode.ai\/install <span class=\"token operator\">|<\/span> <span class=\"token function\">bash<\/span><\/p>\n<p>\u65b9\u6848\u4e8c&#xff1a;\u539f\u751f Windows \u5b89\u88c5<\/p>\n<p><span class=\"token comment\"># Chocolatey<\/span><br \/>\nchoco install opencode<\/p>\n<p><span class=\"token comment\"># \u6216 Scoop<\/span><br \/>\nscoop install opencode<\/p>\n<p><span class=\"token comment\"># \u6216 npm&#xff08;\u9700\u5148\u88c5 Node.js&#xff09;<\/span><br \/>\nnpm install <span class=\"token operator\">&#8211;<\/span>g opencode-ai<\/p>\n<p>\u5b89\u88c5\u540e\u9a8c\u8bc1&#xff1a;<\/p>\n<p>opencode <span class=\"token operator\">&#8212;<\/span>version<\/p>\n<p>\u6ce8\u610f&#xff1a;Windows \u539f\u751f\u73af\u5883\u5efa\u8bae\u642d\u914d Windows Terminal \u4f7f\u7528&#xff0c;CMD \u8001\u7ec8\u7aef\u4e0b TUI \u663e\u793a\u53ef\u80fd\u5f02\u5e38&#xff1b;Bun \u5b89\u88c5\u65b9\u5f0f\u76ee\u524d\u5bf9 Windows \u652f\u6301\u8fd8\u5728\u5f00\u53d1\u4e2d&#xff0c;\u4e0d\u5efa\u8bae\u7528\u3002<\/p>\n<h5>&#xff08;2&#xff09;\u914d\u7f6e\u6a21\u578b<\/h5>\n<li>\n<p>\u7ec8\u7aef\u6267\u884c opencode \u8fdb\u5165 TUI \u754c\u9762&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8f93\u5165 \/connect&#xff0c;\u9009\u62e9\u63d0\u4f9b\u5546\u3002\u65b0\u624b\u76f4\u63a5\u9009 opencode&#xff08;\u5b98\u65b9\u7cbe\u9009\u7684 Zen \u6a21\u578b\u96c6&#xff0c;\u542b\u514d\u8d39\u6a21\u578b&#xff09;&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6309\u63d0\u793a\u8df3\u8f6c opencode.ai\/auth&#xff0c;\u767b\u5f55\u5e76\u590d\u5236 API Key&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u56de\u5230\u7ec8\u7aef\u7c98\u8d34 Key&#xff0c;\u5b8c\u6210\u914d\u7f6e\u3002<\/p>\n<\/li>\n<p>\u4e5f\u53ef\u4ee5\u76f4\u63a5\u547d\u4ee4\u884c\u767b\u5f55&#xff1a;<\/p>\n<p>opencode auth login<\/p>\n<p>\u6216\u8005\u7528\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u7b2c\u4e09\u65b9 API Key&#xff1a;<\/p>\n<p><span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">ANTHROPIC_API_KEY<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;sk-ant-&#8230;&#034;<\/span><br \/>\n<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">OPENAI_API_KEY<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;sk-&#8230;&#034;<\/span><\/p>\n<h5>&#xff08;3&#xff09;\u9879\u76ee\u521d\u59cb\u5316\u4e0e\u57fa\u672c\u4f7f\u7528<\/h5>\n<p><span class=\"token builtin class-name\">cd<\/span> \/path\/to\/project<br \/>\nopencode<\/p>\n<p>\u8fdb\u5165 TUI \u540e\u5148\u6267\u884c \/init&#xff0c;opencode \u4f1a\u5206\u6790\u9879\u76ee\u5e76\u5728\u6839\u76ee\u5f55\u751f\u6210 AGENTS.md \u6587\u4ef6&#xff08;\u8bb0\u5f55\u9879\u76ee\u7ed3\u6784\u3001\u7f16\u7801\u89c4\u8303&#xff09;&#xff0c;\u5efa\u8bae\u628a\u5b83\u63d0\u4ea4\u5230 Git&#xff0c;\u80fd\u8ba9 AI \u957f\u671f\u8d34\u5408\u9879\u76ee\u98ce\u683c\u3002<\/p>\n<p>\u65e5\u5e38\u4f7f\u7528\u8981\u70b9&#xff1a;<\/p>\n<ul>\n<li>\n<p>Tab \u952e&#xff1a;\u5207\u6362 Plan&#xff08;\u53ea\u51fa\u65b9\u6848\u4e0d\u52a8\u4ee3\u7801&#xff09;\/ Build&#xff08;\u76f4\u63a5\u6539\u4ee3\u7801\u6267\u884c&#xff09;\u6a21\u5f0f&#xff0c;\u52a0\u65b0\u529f\u80fd\u5efa\u8bae\u5148 Plan \u518d Build&#xff1b;<\/p>\n<\/li>\n<li>\n<p>&#064; \u952e&#xff1a;\u6a21\u7cca\u641c\u7d22\u5e76\u5f15\u7528\u9879\u76ee\u6587\u4ef6&#xff0c;\u4f8b\u5982 &#064;src\/main.ts \u8fd9\u4e2a\u6587\u4ef6\u662f\u5e72\u4ec0\u4e48\u7684&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\/models&#xff1a;\u5207\u6362\u6a21\u578b&#xff1b;\/undo\u3001\/redo&#xff1a;\u64a4\u9500\/\u91cd\u505a AI \u7684\u4fee\u6539&#xff1b;\/new&#xff1a;\u65b0\u5efa\u4f1a\u8bdd&#xff1b;\/exit&#xff1a;\u9000\u51fa\u3002<\/p>\n<\/li>\n<\/ul>\n<p>\u4e0b\u9762\u90a3\u4e9b\u5b89\u88c5\u547d\u4ee4\u90fd\u662f\u9700\u8981\u4f7f\u7528\u5de5\u5177\u73af\u5883\u7684&#xff0c;\u6211\u7684\u7535\u8111\u90fd\u6ca1\u6709\u3002<\/p>\n<p>\u6211\u662f\u8ba9Trea Code \u8f6f\u4ef6\u5e2e\u6211\u5b89\u88c5\u7684\u3002\u641e\u5b8c\u540e\u4e5f\u662f\u53ef\u4ee5\u7528\u7684&#xff0c;\u5982\u4e0b\u56fe\u6240\u793a&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260917234844-6aac7c5c8858c.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<p>\u5b89\u88c5\u540e&#xff0c;cmd\u7a97\u53e3\u8f93\u5165opencode\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e86\u3002 \u73b0\u5728\u7684AI\u8f6f\u4ef6\u771f\u7684\u5389\u5bb3\u3002\u3002\u3002\u5b83\u662f\u5c1d\u8bd5\u7684\u597d\u51e0\u79cd\u65b9\u5f0f\u5e2e\u6211\u5b89\u88c5\u7684\u3002 \u6211\u7684\u9a71\u52a8\u4e0d\u884c\u4e86&#xff0c;\u8f6f\u4ef6\u6253\u4e0d\u5f00&#xff0c;\u90fd\u662f\u80fd\u89e3\u51b3\u7684\u3002<\/p>\n<p>\u4e0d\u8fc7\u9690\u79c1\u4e5f\u662f\u8981\u6ce8\u610f&#xff0c;\u4e0d\u8981\u628a\u79c1\u5bc6\u7684\u4e1c\u897f\u653e\u5230\u7535\u8111\u6216\u8005\u4f7f\u7528AI\u5de5\u5177\u5206\u6790\u3002<\/p>\n<h4>3\u3001\u514d\u8d39\u8dd1\u8d77\u6765\u7684\u51e0\u79cd\u65b9\u5f0f<\/h4>\n<table>\n<tr>\u65b9\u5f0f\u6210\u672c\u8bf4\u660e<\/tr>\n<tbody>\n<tr>\n<td>OpenCode Zen \u514d\u8d39\u6a21\u578b<\/td>\n<td>0 \u5143<\/td>\n<td>\/connect \u9009 opencode \u767b\u5f55\u5373\u7528&#xff0c;\u5b98\u65b9\u63d0\u4f9b\u514d\u8d39\u7f16\u7801\u6a21\u578b&#xff08;\u6709\u901f\u7387\u9650\u5236&#xff09;&#xff0c;\u65e5\u5e38\u4f53\u9a8c\u591f\u7528<\/td>\n<\/tr>\n<tr>\n<td>GitHub Copilot<\/td>\n<td>Copilot \u8ba2\u9605\u5185<\/td>\n<td>\u5df2\u6709 Copilot \u7684\u540c\u5b66&#xff0c;\/connect \u9009 GitHub Copilot \u63d0\u4f9b\u5546&#xff0c;\u989d\u5ea6\u4e0d\u989d\u5916\u6536\u8d39<\/td>\n<\/tr>\n<tr>\n<td>OpenRouter \u514d\u8d39\u6a21\u578b<\/td>\n<td>0 \u5143<\/td>\n<td>\u6ce8\u518c OpenRouter&#xff0c;\u9009\u5e26 :free \u540e\u7f00\u7684\u6a21\u578b<\/td>\n<\/tr>\n<tr>\n<td>Ollama \u672c\u5730\u6a21\u578b<\/td>\n<td>0 \u5143&#xff0c;\u5b8c\u5168\u79bb\u7ebf<\/td>\n<td>\u672c\u5730\u8dd1 qwen3-coder \u7b49\u5f00\u6e90\u6a21\u578b&#xff0c;\u6570\u636e\u4e0d\u51fa\u5c40\u57df\u7f51<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Ollama \u672c\u5730\u6a21\u578b\u914d\u7f6e\u793a\u4f8b&#xff08;\u9879\u76ee\u6839\u76ee\u5f55\u5efa opencode.json&#xff09;&#xff1a;<\/p>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;$schema&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;https:\/\/opencode.ai\/config.json&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;provider&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n    <span class=\"token string-property property\">&#034;ollama&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n      <span class=\"token string-property property\">&#034;npm&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;&#064;ai-sdk\/openai-compatible&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;Ollama (local)&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;options&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string-property property\">&#034;baseURL&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;http:\/\/localhost:11434\/v1&#034;<\/span> <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n      <span class=\"token string-property property\">&#034;models&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n        <span class=\"token string-property property\">&#034;qwen3-coder:30b&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token string-property property\">&#034;name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;Qwen3-Coder 30B&#034;<\/span> <span class=\"token punctuation\">}<\/span><br \/>\n      <span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token punctuation\">}<\/span><br \/>\n  <span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;model&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;ollama\/qwen3-coder:30b&#034;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u63d0\u793a&#xff1a;\u514d\u8d39\u6a21\u578b\u901a\u5e38\u6709\u901f\u7387\u9650\u5236&#xff0c;\u9ad8\u5cf0\u671f\u53ef\u80fd 429&#xff1b;\u672c\u5730\u5c0f\u6a21\u578b\u9a71\u52a8 Agent \u5de5\u5177\u8c03\u7528\u7684\u80fd\u529b\u504f\u5f31&#xff0c;\u4f18\u5148\u9009 coder \u7cfb\u5217\u6a21\u578b&#xff0c;\u6548\u679c\u5dee\u8ddd\u5f88\u660e\u663e\u3002<\/p>\n<p>\u76ee\u524d\u9ed8\u8ba4\u5c31\u6709\u514d\u8d39\u7684\u8054\u7f51\u6a21\u578b&#xff0c;\u53ef\u4ee5\u6682\u65f6\u5148\u7528\u3002<\/p>\n<h4>4\u3001\u670d\u52a1\u5668&#xff08;Linux&#xff09;CLI \u4f7f\u7528<\/h4>\n<p>\u8fd9\u662f opencode \u7684\u4e3b\u573a&#xff1a;SSH \u8fde\u4e0a\u670d\u52a1\u5668\u88c5\u4e00\u4e2a\u4e8c\u8fdb\u5236\u5c31\u80fd\u7528&#xff0c;\u4e0d\u7528\u6298\u817e Node \u73af\u5883&#xff0c;\u8ba9 AI \u76f4\u63a5\u5728\u670d\u52a1\u5668\u4e0a\u6539\u4ee3\u7801\u3001\u8dd1\u6784\u5efa\u3001\u4fee\u95ee\u9898\u3002<\/p>\n<h5>&#xff08;1&#xff09;\u5b89\u88c5<\/h5>\n<p><span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">-fsSL<\/span> https:\/\/opencode.ai\/install <span class=\"token operator\">|<\/span> <span class=\"token function\">bash<\/span><\/p>\n<p>\u5b89\u88c5\u811a\u672c\u4f1a\u4e0b\u8f7d\u72ec\u7acb\u7684 opencode \u4e8c\u8fdb\u5236&#xff08;\u653e\u5728 ~\/.opencode\/bin\/&#xff09;&#xff0c;Linux\/macOS \u901a\u7528\u3002\u4e5f\u53ef\u4ee5\u7528 npm \u65b9\u5f0f&#xff1a;<\/p>\n<p><span class=\"token function\">npm<\/span> <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-g<\/span> opencode-ai<\/p>\n<h5>&#xff08;2&#xff09;\u6388\u6743<\/h5>\n<p><span class=\"token comment\"># \u4ea4\u4e92\u5f0f\u767b\u5f55&#xff0c;\u9009\u62e9\u63d0\u4f9b\u5546\u5e76\u586b\u5165 API Key&#xff08;\u51ed\u636e\u4fdd\u5b58\u5728 ~\/.local\/share\/opencode\/auth.json&#xff09;<\/span><br \/>\nopencode auth login<\/p>\n<p><span class=\"token comment\"># \u6216\u8005\u76f4\u63a5\u7528\u73af\u5883\u53d8\u91cf<\/span><br \/>\n<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">OPENAI_API_KEY<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;sk-&#8230;&#034;<\/span><\/p>\n<p>\u7528 Zen \u514d\u8d39\u6a21\u578b\u7684\u8bdd&#xff0c;\u8fdb TUI \u6267\u884c \/connect \u6309\u63d0\u793a\u767b\u5f55\u5373\u53ef\u3002<\/p>\n<p>\u5176\u5b9e\u76ee\u524dopencode\u4e0d\u7528\u767b\u5f55\u5c31\u53ef\u4ee5\u514d\u8d39\u4f7f\u7528\u3002<\/p>\n<p>\u4e0a\u9762\u90a3\u4e9b\u4e0b\u8f7d\u547d\u4ee4\u547d\u4ee4\u5728\u56fd\u5185\u5176\u5b9e\u7528\u4e0d\u4e86&#xff0c;\u6211\u662f\u76f4\u63a5\u8ba9\u540c\u4e8b\u7ed9\u7684\u5927\u5305\u5b89\u88c5\u4f7f\u7528\u7684&#xff1a;<\/p>\n<p>\u4e0b\u8f7d\u5927\u5305\u540e\u6267\u884c\u547d\u4ee4\u5b89\u88c5\u5c31\u53ef\u4ee5\u514d\u8d39\u4f7f\u7528opencode\u4e86\u3002 \u547d\u4ee4&#xff1a;<\/p>\n<p>tar xzf node22-runtime.tar.gz -C ~\/.local &amp;&amp; export PATH&#061;&#034;$HOME\/.local\/node22\/bin:$PATH&#034; &amp;&amp; echo &#039;export PATH&#061;&#034;$HOME\/.local\/node22\/bin:$PATH&#034;&#039; &gt;&gt; ~\/.bashrc<\/p>\n<p>\u5927\u5305\u4e0b\u8f7d\u5730\u5740&#xff1a;<\/p>\n<p>https:\/\/download.csdn.net\/download\/wenzhi20102321\/93455389<\/p>\n<h5>&#xff08;3&#xff09;\u6a21\u578b\u67e5\u8be2\u4e0e\u6307\u5b9a<\/h5>\n<p>opencode \u63d0\u4f9b\u4e86\u67e5\u8be2\u6a21\u578b\u548c\u6307\u5b9a\u6a21\u578b\u7684\u547d\u4ee4&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u67e5\u8be2\u5df2\u6388\u6743\u63d0\u4f9b\u5546\u7684\u6240\u6709\u53ef\u7528\u6a21\u578b<\/span><br \/>\nopencode models<\/p>\n<p><span class=\"token comment\"># \u53ea\u67e5\u770b\u6307\u5b9a\u63d0\u4f9b\u5546\u7684\u6a21\u578b&#xff0c;\u4f8b\u5982 nvidia<\/span><br \/>\nopencode models nvidia<\/p>\n<p><span class=\"token comment\"># \u67e5\u770b\u5df2\u767b\u5f55\/\u6388\u6743\u7684\u63d0\u4f9b\u5546\u5217\u8868<\/span><br \/>\nopencode providers list<\/p>\n<p><span class=\"token comment\"># \u4e00\u6b21\u6027\u4f7f\u7528\u6307\u5b9a\u6a21\u578b\u8fdb\u5165 TUI \u4ea4\u4e92\u73af\u5883<\/span><br \/>\nopencode <span class=\"token parameter variable\">-m<\/span> anthropic\/claude-sonnet-4-5<\/p>\n<p><span class=\"token comment\"># \u4f7f\u7528\u6307\u5b9a\u6a21\u578b\u6267\u884c\u5355\u4e00\u4efb\u52a1&#xff08;\u975e\u4ea4\u4e92\u6a21\u5f0f&#xff09;<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-m<\/span> anthropic\/claude-sonnet-4-5 <span class=\"token string\">&#034;\u4f60\u90fd\u4f1a\u5565&#034;<\/span><\/p>\n<p>opencode models \u56de\u663e\u7684 provider\/model \u683c\u5f0f\u5c31\u662f -m \u540e\u9762\u8981\u586b\u7684\u503c&#xff0c;\u6362\u6a21\u578b\u53ea\u9700\u8981\u6362\u8fd9\u4e2a\u53c2\u6570\u3002TUI \u91cc\u4e5f\u53ef\u4ee5\u968f\u65f6\u7528 \/models \u547d\u4ee4\u6253\u5f00\u6a21\u578b\u5217\u8868\u5207\u6362&#xff0c;\u514d\u8d39\u6a21\u578b\u4f1a\u6807\u6ce8 Free&#xff08;\u5982 opencode\/big-pickle\u3001opencode\/nemotron-3-super-free \u7b49&#xff09;&#xff0c;\u53ef\u4ee5\u76f4\u63a5\u7b5b\u9009\u4f7f\u7528\u3002Windows \u548c Linux \u4e0b\u7528\u6cd5\u4e00\u81f4\u3002<\/p>\n<h5>&#xff08;4&#xff09;\u4ea4\u4e92\u6a21\u5f0f&#xff08;TUI&#xff09;<\/h5>\n<p><span class=\"token builtin class-name\">cd<\/span> \/home\/user\/my-project<br \/>\nopencode<\/p>\n<p>\u548c Windows \u7aef\u5b8c\u5168\u4e00\u81f4&#xff1a;\/init \u521d\u59cb\u5316\u9879\u76ee&#xff0c;Tab \u5207 Plan\/Build&#xff0c;&#064; \u5f15\u7528\u6587\u4ef6\u3002<\/p>\n<p>openCode\u4e5f\u662f\u53ef\u4ee5\u771f\u5b9e\u4f7f\u7528\u7684&#xff0c;\u6574\u4e2a\u7cfb\u7edf\u6e90\u7801\u7684\u7b80\u5355\u95ee\u9898\u5206\u6790\u89e3\u51b3\u662fOK\u7684&#xff0c;\u5982\u4e0b\u5982\u6240\u793a&#xff1a;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260917234846-6aac7c5e3491e.png\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/> \u4f60\u53ea\u8981\u629b\u51fa\u95ee\u9898&#xff0c;\u5b83\u5c31\u4f1a\u5206\u6790\u7cfb\u7edf\u6e90\u7801\u8fdb\u884c\u4fee\u6539\u3002 \u4fee\u6539\u90a3\u4e9bframework\u548c\u539f\u751fSettings\u3001\u5176\u4ed6\u5e94\u7528\u7684\u4ee3\u7801&#xff0c;\u57fa\u672c\u6ca1\u5565\u95ee\u9898&#xff1b; \u6b63\u5e38\u4eba\u4e00\u4e24\u4e2a\u5c0f\u65f6\u5206\u6790\u4fee\u6539\u7684\u4e1c\u897f&#xff0c;AI\u5de5\u5177\u51e0\u5206\u949f\u7ed9\u4f60\u641e\u5b9a\u4e86\u3002<\/p>\n<h5>&#xff08;5&#xff09;\u975e\u4ea4\u4e92\u6a21\u5f0f&#xff08;\u811a\u672c\u96c6\u6210&#xff09;<\/h5>\n<p>opencode run \u6267\u884c\u5b8c\u4efb\u52a1\u76f4\u63a5\u9000\u51fa\u3001\u7ed3\u679c\u6253\u5370\u5230 stdout&#xff0c;\u9002\u5408\u5199\u8fdb shell \u811a\u672c\u6216 CI \u6d41\u7a0b&#xff1a;<\/p>\n<p><span class=\"token comment\"># \u4e00\u6b21\u6027\u4efb\u52a1<\/span><br \/>\nopencode run <span class=\"token string\">&#034;\u5206\u6790\u5f53\u524d\u9879\u76ee\u7684\u76ee\u5f55\u7ed3\u6784&#xff0c;\u8f93\u51fa\u6a21\u5757\u8bf4\u660e&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u6307\u5b9a\u6a21\u578b\u6267\u884c<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-m<\/span> anthropic\/claude-sonnet-4-5 <span class=\"token string\">&#034;\u4fee\u590d main.py \u91cc\u7684\u7a7a\u6307\u9488\u95ee\u9898&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u9644\u5e26\u6587\u4ef6\u4e0a\u4e0b\u6587<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-f<\/span> src\/main.ts <span class=\"token string\">&#034;Review \u8fd9\u4e2a\u6587\u4ef6\u7684\u4ee3\u7801\u8d28\u91cf&#034;<\/span><\/p>\n<p><span class=\"token comment\"># \u7ee7\u7eed\u4e0a\u4e00\u4e2a\u4f1a\u8bdd<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;\u7ee7\u7eed\u521a\u624d\u7684\u4f18\u5316&#034;<\/span><\/p>\n<p>CI\/CD \u91cc\u7684\u5178\u578b\u7528\u6cd5&#xff08;GitHub Actions \u81ea\u52a8\u4ee3\u7801\u8bc4\u5ba1&#xff09;&#xff1a;<\/p>\n<p><span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> Setup OpenCode<br \/>\n  <span class=\"token key atrule\">run<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token punctuation\">|<\/span><span class=\"token scalar string\"><br \/>\n    curl -fsSL https:\/\/opencode.ai\/install | bash<br \/>\n    echo &#034;$HOME\/.opencode\/bin&#034; &gt;&gt; $GITHUB_PATH<\/span><\/p>\n<p><span class=\"token punctuation\">&#8211;<\/span> <span class=\"token key atrule\">name<\/span><span class=\"token punctuation\">:<\/span> AI Review<br \/>\n  <span class=\"token key atrule\">run<\/span><span class=\"token punctuation\">:<\/span> opencode run &#034;Review \u672c\u6b21\u6539\u52a8&#xff0c;\u6307\u51fa\u6f5c\u5728\u95ee\u9898&#034;<\/p>\n<h5>&#xff08;6&#xff09;\u670d\u52a1\u5668\/\u5171\u4eab\u6a21\u5f0f<\/h5>\n<p><span class=\"token comment\"># \u542f\u52a8\u65e0\u5934\u670d\u52a1\u5668&#xff08;\u7eaf API&#xff09;&#xff0c;\u4f9b\u811a\u672c\u6216\u56e2\u961f\u6210\u5458\u8fde\u63a5<\/span><br \/>\nopencode serve <span class=\"token parameter variable\">&#8211;port<\/span> <span class=\"token number\">4096<\/span><\/p>\n<p><span class=\"token comment\"># \u542f\u52a8\u5e26 Web \u754c\u9762\u7684\u670d\u52a1<\/span><br \/>\nopencode web<\/p>\n<p><span class=\"token comment\"># \u672c\u5730\u7ec8\u7aef\u8fde\u63a5\u8fdc\u7a0b\u670d\u52a1\u5668\u4e0a\u5df2\u542f\u52a8\u7684 opencode \u5b9e\u4f8b<\/span><br \/>\nopencode attach http:\/\/your-server:4096<\/p>\n<h4>5\u3001\u5e38\u7528\u547d\u4ee4<\/h4>\n<table>\n<tr>\u547d\u4ee4\u63cf\u8ff0<\/tr>\n<tbody>\n<tr>\n<td>opencode<\/td>\n<td>\u8fdb\u5165 TUI \u4ea4\u4e92\u5f00\u53d1\u73af\u5883<\/td>\n<\/tr>\n<tr>\n<td>opencode models [provider]<\/td>\n<td>\u5217\u51fa\u5df2\u6388\u6743\u63d0\u4f9b\u5546\u7684\u53ef\u7528\u6a21\u578b&#xff08;\u53ef\u6309\u63d0\u4f9b\u5546\u8fc7\u6ee4&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>opencode providers list<\/td>\n<td>\u5217\u51fa\u5df2\u767b\u5f55\/\u6388\u6743\u7684\u63d0\u4f9b\u5546<\/td>\n<\/tr>\n<tr>\n<td>opencode -m &lt;provider\/model&gt;<\/td>\n<td>\u4e00\u6b21\u6027\u4f7f\u7528\u6307\u5b9a\u6a21\u578b\u8fdb\u5165 TUI \u5f00\u53d1\u73af\u5883<\/td>\n<\/tr>\n<tr>\n<td>opencode run \u201cmessage\u201d<\/td>\n<td>\u975e\u4ea4\u4e92\u6a21\u5f0f\u6267\u884c\u4efb\u52a1\u540e\u9000\u51fa<\/td>\n<\/tr>\n<tr>\n<td>opencode run -m &lt;provider\/model&gt; \u201cmessage\u201d<\/td>\n<td>\u6307\u5b9a\u6a21\u578b\u6267\u884c\u4efb\u52a1<\/td>\n<\/tr>\n<tr>\n<td>opencode run -f &lt;file&gt; \u201cmessage\u201d<\/td>\n<td>\u9644\u5e26\u6587\u4ef6\u4f5c\u4e3a\u4e0a\u4e0b\u6587<\/td>\n<\/tr>\n<tr>\n<td>opencode run -c \u201cmessage\u201d<\/td>\n<td>\u7ee7\u7eed\u4e0a\u4e00\u6b21\u4f1a\u8bdd<\/td>\n<\/tr>\n<tr>\n<td>opencode auth login<\/td>\n<td>\u767b\u5f55\u914d\u7f6e\u6a21\u578b\u63d0\u4f9b\u5546<\/td>\n<\/tr>\n<tr>\n<td>opencode agent create \/ list<\/td>\n<td>\u521b\u5efa\/\u5217\u51fa\u667a\u80fd\u4f53<\/td>\n<\/tr>\n<tr>\n<td>opencode mcp add \/ list<\/td>\n<td>\u6dfb\u52a0\/\u67e5\u770b MCP \u670d\u52a1\u5668<\/td>\n<\/tr>\n<tr>\n<td>opencode github install<\/td>\n<td>\u5728\u4ed3\u5e93\u5b89\u88c5 GitHub AI Agent<\/td>\n<\/tr>\n<tr>\n<td>opencode serve \/ web \/ attach<\/td>\n<td>\u65e0\u5934\u670d\u52a1\u5668 \/ Web \u754c\u9762 \/ \u8fde\u63a5\u8fdc\u7a0b\u5b9e\u4f8b<\/td>\n<\/tr>\n<tr>\n<td>opencode &#8211;version \/ &#8211;help<\/td>\n<td>\u67e5\u770b\u7248\u672c \/ \u5e2e\u52a9<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>6\u3001\u5e38\u89c1\u95ee\u9898\u4e0e\u8e29\u5751<\/h4>\n<table>\n<tr>\u73b0\u8c61\u539f\u56e0\u5904\u7406<\/tr>\n<tbody>\n<tr>\n<td>Windows \u4e0b TUI \u663e\u793a\u9519\u4e71<\/td>\n<td>\u7528\u4e86\u8001\u5f0f CMD \u7ec8\u7aef<\/td>\n<td>\u6362 Windows Terminal&#xff0c;\u6216\u6539\u7528 WSL<\/td>\n<\/tr>\n<tr>\n<td>Windows \u4e0a\u67d0\u4e9b\u529f\u80fd\u5f02\u5e38<\/td>\n<td>\u539f\u751f\u7ec8\u7aef\u517c\u5bb9\u6027\u4e0d\u5982 WSL<\/td>\n<td>\u5b98\u65b9\u63a8\u8350 WSL&#xff0c;\u4f53\u9a8c\u6700\u5b8c\u6574<\/td>\n<\/tr>\n<tr>\n<td>opencode run &#8211;prompt &#034;xxx&#034; \u4e0d\u8bc6\u522b\u76f4\u63a5\u8fdb\u4e86 TUI<\/td>\n<td>run \u662f\u5b50\u547d\u4ee4&#xff0c;\u6ca1\u6709 &#8211;prompt \u53c2\u6570&#xff0c;\u6d88\u606f\u662f\u4f4d\u7f6e\u53c2\u6570<\/td>\n<td>\u5199\u6210 opencode run &#034;xxx&#034;<\/td>\n<\/tr>\n<tr>\n<td>\u9996\u6b21 run \u5361\u4f4f\u4e0d\u52a8<\/td>\n<td>\u5f31\u6a21\u578b\u9a71\u52a8\u4e0d\u4e86\u5de5\u5177\u8c03\u7528&#xff0c;\u6216\u9996\u6b21\u4fe1\u4efb\u95e8\u7981<\/td>\n<td>\u6362 coder \u7cfb\u5217\u5f3a\u6a21\u578b&#xff0c;\u91cd\u8dd1\u4e00\u6b21<\/td>\n<\/tr>\n<tr>\n<td>\u514d\u8d39\u6a21\u578b\u62a5 429\/\u9650\u6d41<\/td>\n<td>\u514d\u8d39\u989d\u5ea6\u6709\u901f\u7387\u9650\u5236<\/td>\n<td>\u7b49\u4e00\u4f1a\u513f\u91cd\u8bd5&#xff0c;\u6216\u5207\u6362\u5176\u4ed6\u514d\u8d39\u6a21\u578b\/\u63d0\u4f9b\u5546<\/td>\n<\/tr>\n<tr>\n<td>npm \u5b89\u88c5\u540e\u63d0\u793a command not found<\/td>\n<td>Node\/npm \u73af\u5883\u95ee\u9898\u6216 PATH \u672a\u751f\u6548<\/td>\n<td>\u68c0\u67e5 Node \u7248\u672c&#xff08;\u5efa\u8bae 18&#043;&#xff09;&#xff0c;\u91cd\u5f00\u7ec8\u7aef<\/td>\n<\/tr>\n<tr>\n<td>AI \u6539\u5b8c\u4ee3\u7801\u4e0d\u6ee1\u610f<\/td>\n<td>\u6539\u52a8\u5df2\u843d\u76d8<\/td>\n<td>\u5728 TUI \u91cc\u7528 \/undo \u64a4\u9500&#xff0c;\u6216\u9760 git \u56de\u9000<\/td>\n<\/tr>\n<tr>\n<td>\u5185\u7f51\u73af\u5883\u8fde\u4e0d\u4e0a\u6a21\u578b<\/td>\n<td>\u516c\u53f8\u7f51\u7edc\u4ee3\u7406\u62e6\u622a<\/td>\n<td>\u914d\u7f6e HTTPS_PROXY \u7b49\u4ee3\u7406\u73af\u5883\u53d8\u91cf<\/td>\n<\/tr>\n<tr>\n<td>\/init \u751f\u6210\u7684 AGENTS.md \u65f6\u7075\u65f6\u4e0d\u7075<\/td>\n<td>\u6587\u4ef6\u6ca1\u63d0\u4ea4&#xff0c;\u56e2\u961f\u6210\u5458\u5404\u7528\u5404\u7684<\/td>\n<td>\u628a AGENTS.md \u63d0\u4ea4\u5230 Git \u4ed3\u5e93<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u4e09\u3001\u5176\u4ed6<\/h3>\n<h4>1\u3001\u5c0f\u7ed3<\/h4>\n<li>\n<p>opencode \u662f\u5f00\u6e90\u514d\u8d39\u7684 AI \u7f16\u7801\u667a\u80fd\u4f53&#xff0c;MIT \u534f\u8bae\u3001\u6a21\u578b\u4e0d\u9501\u5b9a&#xff0c;\u652f\u6301 75&#043; \u63d0\u4f9b\u5546&#xff0c;\u662f Claude Code \u7684\u4e3b\u6d41\u5f00\u6e90\u5e73\u66ff&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8f6f\u4ef6\u514d\u8d39 &#043; \u6a21\u578b\u53ef\u9009\u514d\u8d39&#xff1a;Zen \u514d\u8d39\u6a21\u578b\u3001GitHub Copilot\u3001OpenRouter :free \u6a21\u578b\u3001\u672c\u5730 Ollama \u90fd\u80fd\u96f6\u6210\u672c\u8dd1\u8d77\u6765&#xff1b;<\/p>\n<\/li>\n<li>\n<p>Windows \u7aef\u5b98\u65b9\u63a8\u8350 WSL&#xff0c;\u539f\u751f\u5b89\u88c5\u7528 choco\/scoop\/npm \u4e5f\u884c&#xff0c;\u6ce8\u610f\u642d\u914d Windows Terminal \u4f7f\u7528&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e0a\u624b\u4e09\u6b65\u8d70&#xff1a;\/connect \u914d\u6a21\u578b \u2192 \/init \u751f\u6210 AGENTS.md \u2192 \u81ea\u7136\u8bed\u8a00\u4e0b\u4efb\u52a1&#xff0c;Plan \u6a21\u5f0f\u5148\u51fa\u65b9\u6848\u3001Build \u6a21\u5f0f\u518d\u52a8\u624b&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u670d\u52a1\u5668\u573a\u666f\u662f\u5b83\u7684\u4e3b\u573a&#xff1a;\u4e00\u6761 curl \u88c5\u72ec\u7acb\u4e8c\u8fdb\u5236&#xff0c;opencode \u8fdb TUI&#xff0c;opencode run \u505a\u811a\u672c\u5316\u975e\u4ea4\u4e92\u6267\u884c&#xff0c;opencode serve\/web \u8fd8\u80fd\u8d77\u670d\u52a1\u5171\u4eab&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u514d\u8d39\u6a21\u578b\u6709\u901f\u7387\u9650\u5236\u3001\u672c\u5730\u5c0f\u6a21\u578b\u5de5\u5177\u8c03\u7528\u504f\u5f31&#xff0c;\u91cd\u8981\u4efb\u52a1\u5efa\u8bae\u6362\u5f3a\u4e00\u70b9\u7684\u6a21\u578b&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u8bb0\u5f97\u628a \/init \u751f\u6210\u7684 AGENTS.md \u63d0\u4ea4\u5230 Git&#xff0c;\u914d\u5408 \/undo \u548c git \u8ba9 AI \u7684\u4fee\u6539\u59cb\u7ec8\u53ef\u63a7\u3002<\/p>\n<\/li>\n<p>\u5176\u5b9e\u6700\u9ebb\u70e6\u5c31\u662f\u5b89\u88c5&#xff0c;\u65e0\u8bba\u662fwindow\u8fd8\u662fLinux\u73af\u5883&#xff0c;\u53eb\u6211\u4e00\u4e2a\u4eba\u90fd\u641e\u4e0d\u5b9a&#xff0c;\u8fd9\u4e2a\u4e1c\u897f\u641e\u5f97\u4e0d\u591a\u3002<\/p>\n<p>window\u7248\u672c\u6211\u662f\u8ba9Trea Code AI\u5e94\u7528\u5b89\u88c5\u7684&#xff1b;Linux\u7248\u672c \u6211\u662f\u7528\u540c\u4e8b\u7684\u5927\u5305\u5b89\u88c5\u7684\u3002<\/p>\n<p>Linux \u6211\u4e5f\u5b89\u88c5\u4e86Trea Code&#xff0c;\u5176\u5b9e\u4e5f\u53ef\u4ee5\u8ba9AI\u5de5\u5177\u5e2e\u5fd9\u5b89\u88c5\u7684\u3002\u5b83\u4f1a\u5c1d\u8bd5\u5404\u79cd\u624b\u6bb5&#xff0c;\u5b89\u88c5\u5404\u79cd\u5de5\u5177\u3002<\/p>\n<p>openCode \u76ee\u524d\u662f\u514d\u8d39\u4f7f\u7528&#xff0c;\u4e0d\u7528\u767b\u5f55\u4e5f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528&#xff0c;\u81f3\u4e8e\u514d\u8d39\u5230\u4ec0\u4e48\u4ec0\u4e48\u5c31\u4e0d\u6e05\u695a\u4e86\u3002<\/p>\n<p>\u514d\u8d39\u7684\u5176\u5b9e\u662f\u6709\u989d\u5ea6\u9650\u5236\u7684&#xff0c;\u4f46\u662f\u7528\u5c0f\u9891\u7387\u4f7f\u7528\u662f\u6ca1\u5565\u95ee\u9898\u7684\u3002<\/p>\n<h4>2\u3001\u5e38\u7528\u547d\u4ee4\u901f\u67e5<\/h4>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061; \u5b89\u88c5 &#061;&#061;&#061;&#061;&#061;<\/span><br \/>\n<span class=\"token comment\"># Linux\/macOS\/WSL \u4e00\u952e\u5b89\u88c5&#xff08;\u72ec\u7acb\u4e8c\u8fdb\u5236&#xff09;<\/span><br \/>\n<span class=\"token function\">curl<\/span> <span class=\"token parameter variable\">-fsSL<\/span> https:\/\/opencode.ai\/install <span class=\"token operator\">|<\/span> <span class=\"token function\">bash<\/span><\/p>\n<p><span class=\"token comment\"># Windows \u539f\u751f\u5b89\u88c5&#xff08;\u4e09\u9009\u4e00&#xff09;<\/span><br \/>\nchoco <span class=\"token function\">install<\/span> opencode<br \/>\nscoop <span class=\"token function\">install<\/span> opencode<br \/>\n<span class=\"token function\">npm<\/span> <span class=\"token function\">install<\/span> <span class=\"token parameter variable\">-g<\/span> opencode-ai<\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061; \u914d\u7f6e &#061;&#061;&#061;&#061;&#061;<\/span><br \/>\nopencode auth login                 <span class=\"token comment\"># \u4ea4\u4e92\u5f0f\u767b\u5f55\u914d\u7f6e\u63d0\u4f9b\u5546<\/span><br \/>\n<span class=\"token builtin class-name\">export<\/span> <span class=\"token assign-left variable\">OPENAI_API_KEY<\/span><span class=\"token operator\">&#061;<\/span><span class=\"token string\">&#034;sk-&#8230;&#034;<\/span>      <span class=\"token comment\"># \u6216\u73af\u5883\u53d8\u91cf\u65b9\u5f0f<\/span><br \/>\n<span class=\"token comment\"># TUI \u5185&#xff1a;\/connect \u914d\u6a21\u578b&#xff0c;\/init \u521d\u59cb\u5316\u9879\u76ee<\/span><\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061; \u6a21\u578b\u67e5\u8be2\u4e0e\u6307\u5b9a &#061;&#061;&#061;&#061;&#061;<\/span><br \/>\nopencode models                     <span class=\"token comment\"># \u67e5\u8be2\u5df2\u6388\u6743\u63d0\u4f9b\u5546\u7684\u6240\u6709\u53ef\u7528\u6a21\u578b<\/span><br \/>\nopencode models nvidia              <span class=\"token comment\"># \u53ea\u67e5\u770b\u6307\u5b9a\u63d0\u4f9b\u5546\u7684\u6a21\u578b<\/span><br \/>\nopencode providers list             <span class=\"token comment\"># \u67e5\u770b\u5df2\u6388\u6743\u7684\u63d0\u4f9b\u5546\u5217\u8868<\/span><br \/>\nopencode <span class=\"token parameter variable\">-m<\/span> anthropic\/claude-sonnet-4-5             <span class=\"token comment\"># \u4e00\u6b21\u6027\u6307\u5b9a\u6a21\u578b\u8fdb\u5165 TUI<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-m<\/span> anthropic\/claude-sonnet-4-5 <span class=\"token string\">&#034;\u4f60\u90fd\u4f1a\u5565&#034;<\/span>  <span class=\"token comment\"># \u6307\u5b9a\u6a21\u578b\u95ee\u5355\u4e00\u95ee\u9898<\/span><br \/>\n<span class=\"token comment\"># TUI \u5185\u7528 \/models \u6253\u5f00\u6a21\u578b\u5217\u8868\u5207\u6362&#xff0c;\u514d\u8d39\u6a21\u578b\u6807\u6ce8 Free<\/span><\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061; \u65e5\u5e38\u4f7f\u7528 &#061;&#061;&#061;&#061;&#061;<\/span><br \/>\nopencode                            <span class=\"token comment\"># \u8fdb\u5165 TUI \u4ea4\u4e92\u5f00\u53d1<\/span><br \/>\nopencode run <span class=\"token string\">&#034;\u4efb\u52a1\u63cf\u8ff0&#034;<\/span>              <span class=\"token comment\"># \u975e\u4ea4\u4e92\u6267\u884c\u4efb\u52a1\u540e\u9000\u51fa<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-m<\/span> anthropic\/claude-sonnet-4-5 <span class=\"token string\">&#034;\u4efb\u52a1&#034;<\/span>  <span class=\"token comment\"># \u6307\u5b9a\u6a21\u578b<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-f<\/span> src\/main.ts <span class=\"token string\">&#034;Review \u8fd9\u4e2a\u6587\u4ef6&#034;<\/span>       <span class=\"token comment\"># \u9644\u5e26\u6587\u4ef6<\/span><br \/>\nopencode run <span class=\"token parameter variable\">-c<\/span> <span class=\"token string\">&#034;\u7ee7\u7eed&#034;<\/span>              <span class=\"token comment\"># \u7ee7\u7eed\u4e0a\u6b21\u4f1a\u8bdd<\/span><br \/>\nopencode <span class=\"token parameter variable\">&#8211;version<\/span>                  <span class=\"token comment\"># \u67e5\u770b\u7248\u672c<\/span><\/p>\n<p><span class=\"token comment\"># &#061;&#061;&#061;&#061;&#061; \u670d\u52a1\u5668\/\u81ea\u52a8\u5316 &#061;&#061;&#061;&#061;&#061;<\/span><br \/>\nopencode serve <span class=\"token parameter variable\">&#8211;port<\/span> <span class=\"token number\">4096<\/span>          <span class=\"token comment\"># \u542f\u52a8\u65e0\u5934 API \u670d\u52a1\u5668<\/span><br \/>\nopencode web                        <span class=\"token comment\"># \u542f\u52a8 Web \u754c\u9762\u670d\u52a1<\/span><br \/>\nopencode attach http:\/\/server:4096  <span class=\"token comment\"># \u8fde\u63a5\u8fdc\u7a0b\u5b9e\u4f8b<\/span><br \/>\nopencode github <span class=\"token function\">install<\/span>             <span class=\"token comment\"># \u4ed3\u5e93\u5b89\u88c5 GitHub AI Agent<\/span><br \/>\nopencode agent list                 <span class=\"token comment\"># \u67e5\u770b\u53ef\u7528\u667a\u80fd\u4f53<\/span><br \/>\nopencode mcp <span class=\"token function\">add<\/span>                    <span class=\"token comment\"># \u6dfb\u52a0 MCP \u670d\u52a1\u5668<\/span><\/p>\n<hr \/>\n<p>\u4ee5\u4e0a\u5c31\u662f\u514d\u8d39 opencode \u7684\u4f7f\u7528\u5206\u4eab&#xff0c;\u6574\u4f53\u4f53\u9a8c\u4e0b\u6765&#xff1a;\u4e0d\u82b1\u94b1\u5c31\u80fd\u8dd1\u3001\u670d\u52a1\u5668 CLI \u573a\u666f\u5f88\u80fd\u6253&#xff0c;\u914d\u5408 Ollama \u8fd8\u80fd\u5b8c\u5168\u79bb\u7ebf\u79c1\u6709\u5316\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef  \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 \u6587\u7ae0\u76ee\u5f55\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef  \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3\u4e00\u3001\u524d\u8a00\u4e8c\u3001\u4f7f\u7528\u8bf4\u660e1\u3001opencode \u662f\u4ec0\u4e48&#xff0c;\u51ed\u4ec0\u4e48\u514d\u8d392\u3001Windows \u7aef\u4f7f\u7528&#xff08;1&#xff09;\u5b89\u88c5&#xff08;2&#xff09;\u914d\u7f6e\u6a21\u578b&#xff08;3&#xff09;\u9879\u76ee\u521d\u59cb\u5316\u4e0e\u57fa\u672c\u4f7f\u75283\u3001\u514d\u8d39\u8dd1\u8d77\u6765\u7684\u51e0\u79cd\u65b9\u5f0f4\u3001\u670d\u52a1\u5668&#xff08;L<\/p>\n","protected":false},"author":2,"featured_media":106723,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11653,84,323,190],"topic":[],"class_list":["post-106725","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-11653","tag-android","tag-323","tag-190"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/106725.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 \u6587\u7ae0\u76ee\u5f55\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3\u4e00\u3001\u524d\u8a00\u4e8c\u3001\u4f7f\u7528\u8bf4\u660e1\u3001opencode \u662f\u4ec0\u4e48&#xff0c;\u51ed\u4ec0\u4e48\u514d\u8d392\u3001Windows \u7aef\u4f7f\u7528&#xff08;1&#xff09;\u5b89\u88c5&#xff08;2&#xff09;\u914d\u7f6e\u6a21\u578b&#xff08;3&#xff09;\u9879\u76ee\u521d\u59cb\u5316\u4e0e\u57fa\u672c\u4f7f\u75283\u3001\u514d\u8d39\u8dd1\u8d77\u6765\u7684\u51e0\u79cd\u65b9\u5f0f4\u3001\u670d\u52a1\u5668&#xff08;L\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/106725.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-17T23:48:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260917234844-6aac7c5c8858c.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/106725.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/106725.html\",\"name\":\"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-09-17T23:48:48+00:00\",\"dateModified\":\"2026-09-17T23:48:48+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/106725.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/106725.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/106725.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/106725.html","og_locale":"zh_CN","og_type":"article","og_title":"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 \u6587\u7ae0\u76ee\u5f55\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab&#xff1a;Windows\u7aef \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3\u4e00\u3001\u524d\u8a00\u4e8c\u3001\u4f7f\u7528\u8bf4\u660e1\u3001opencode \u662f\u4ec0\u4e48&#xff0c;\u51ed\u4ec0\u4e48\u514d\u8d392\u3001Windows \u7aef\u4f7f\u7528&#xff08;1&#xff09;\u5b89\u88c5&#xff08;2&#xff09;\u914d\u7f6e\u6a21\u578b&#xff08;3&#xff09;\u9879\u76ee\u521d\u59cb\u5316\u4e0e\u57fa\u672c\u4f7f\u75283\u3001\u514d\u8d39\u8dd1\u8d77\u6765\u7684\u51e0\u79cd\u65b9\u5f0f4\u3001\u670d\u52a1\u5668&#xff08;L","og_url":"https:\/\/www.wsisp.com\/helps\/106725.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-09-17T23:48:48+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260917234844-6aac7c5c8858c.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"6 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/106725.html","url":"https:\/\/www.wsisp.com\/helps\/106725.html","name":"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-09-17T23:48:48+00:00","dateModified":"2026-09-17T23:48:48+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/106725.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/106725.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/106725.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"2026\u514d\u8d39\u7684 opencode \u4f7f\u7528\u5206\u4eab\uff1aWindows\u7aef + \u670d\u52a1\u5668CLI \u5b9e\u6218\u603b\u7ed3"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/106725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=106725"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/106725\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/106723"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=106725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=106725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=106725"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=106725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}