{"id":1965,"date":"2026-06-19T13:25:46","date_gmt":"2026-06-19T05:25:46","guid":{"rendered":"https:\/\/blog.ttwow.top\/?p=1965"},"modified":"2026-06-19T16:50:28","modified_gmt":"2026-06-19T08:50:28","slug":"claude-code-%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2%e4%b8%8e%e4%bd%bf%e7%94%a8%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/blog.ttwow.top\/?p=1965","title":{"rendered":"Claude Code \u5b89\u88c5\u90e8\u7f72\u4e0e\u4f7f\u7528\u6307\u5357"},"content":{"rendered":"<blockquote>\n<p>\u9002\u7528\u5bf9\u8c61\uff1a\u60f3\u5728\u7ec8\u7aef\u3001VS Code \u4e2d\u4f7f\u7528 Claude Code \u7684\u5f00\u53d1\u8005\u3002<br \/>\n\u8bf4\u660e\uff1a\u672c\u6587\u4ee5\u5b98\u65b9\u6587\u6863\u4e3a\u57fa\u7840\u6574\u7406\uff0c\u8986\u76d6\u5b89\u88c5\u3001\u767b\u5f55\u3001VS Code \u96c6\u6210\u3001\u5e38\u89c1\u547d\u4ee4\u3001\u66f4\u65b0\u4e0e\u6392\u9519\u3002<\/p>\n<\/blockquote>\n<h2>1. Claude Code \u662f\u4ec0\u4e48<\/h2>\n<p>Claude Code \u662f\u4e00\u4e2a\u4ee3\u7406\u5f0f\u7f16\u7801\u5de5\u5177\uff0c\u53ef\u4ee5\u8bfb\u53d6\u4ee3\u7801\u5e93\u3001\u7f16\u8f91\u6587\u4ef6\u3001\u8fd0\u884c\u547d\u4ee4\uff0c\u5e76\u96c6\u6210\u5230\u7ec8\u7aef\u548c IDE \u4e2d\u4f7f\u7528\u3002<\/p>\n<p>\u5b83\u5e38\u89c1\u7684\u4f7f\u7528\u65b9\u5f0f\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\u7ec8\u7aef CLI<\/li>\n<li>VS Code \u6269\u5c55<\/li>\n<li>Desktop App<\/li>\n<li>Web<\/li>\n<li>JetBrains \u63d2\u4ef6<\/li>\n<\/ul>\n<h2>2. \u4f7f\u7528\u524d\u63d0<\/h2>\n<p>\u5728\u5927\u591a\u6570\u573a\u666f\u4e0b\uff0c\u4f60\u9700\u8981\uff1a<\/p>\n<ul>\n<li>\u4e00\u4e2a\u53ef\u7528\u7684 Claude \/ Anthropic \u8d26\u53f7<\/li>\n<li>\u6216\u8005\u4f01\u4e1a\/\u56e2\u961f\u8d26\u53f7<\/li>\n<li>\u67d0\u4e9b\u573a\u666f\u4e0b\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546\uff0c\u4f8b\u5982 Amazon Bedrock\u3001Google Vertex AI\u3001Microsoft Foundry<\/li>\n<\/ul>\n<p>\u6ce8\u610f\uff1a\u7ec8\u7aef CLI \u548c VS Code \u4e5f\u652f\u6301\u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546\uff1b\u5982\u679c\u4f60\u662f\u76f4\u63a5\u8fde\u63a5 Anthropic \u5b98\u65b9\u8d26\u53f7\uff0c\u901a\u5e38\u9996\u6b21\u542f\u52a8\u4f1a\u8d70\u6d4f\u89c8\u5668\u767b\u5f55\u6d41\u7a0b\u3002<\/p>\n<h2>3. \u5b89\u88c5\u65b9\u5f0f<\/h2>\n<h3>3.1 \u63a8\u8350\u5b89\u88c5\u65b9\u5f0f<\/h3>\n<p>Claude Code \u5b98\u65b9\u63d0\u4f9b\u539f\u751f\u5b89\u88c5\u65b9\u5f0f\uff0c\u652f\u6301 macOS\u3001Linux\u3001WSL\u3001Windows\u3002<\/p>\n<h4>macOS \/ Linux \/ WSL<\/h4>\n<pre><code class=\"language-bash\">curl -fsSL https:\/\/claude.ai\/install.sh | bash<\/code><\/pre>\n<h4>Windows PowerShell<\/h4>\n<pre><code class=\"language-powershell\">irm https:\/\/claude.ai\/install.ps1 | iex<\/code><\/pre>\n<h4>Windows CMD<\/h4>\n<pre><code class=\"language-cmd\">curl -fsSL https:\/\/claude.ai\/install.cmd -o install.cmd &amp;&amp; install.cmd &amp;&amp; del install.cmd<\/code><\/pre>\n<h3>3.2 Homebrew<\/h3>\n<pre><code class=\"language-bash\">brew install --cask claude-code<\/code><\/pre>\n<p>\u8bf4\u660e\uff1aHomebrew \u63d0\u4f9b\u4e24\u4e2a cask\uff1a<\/p>\n<ul>\n<li><code>claude-code<\/code>\uff1a\u7a33\u5b9a\u901a\u9053<\/li>\n<li><code>claude-code@latest<\/code>\uff1a\u6700\u65b0\u901a\u9053<\/li>\n<\/ul>\n<p>Homebrew \u5b89\u88c5\u540e\u4e0d\u4f1a\u81ea\u52a8\u66f4\u65b0\uff0c\u9700\u8981\u624b\u52a8\u6267\u884c\u5347\u7ea7\u3002<\/p>\n<h3>3.3 WinGet<\/h3>\n<pre><code class=\"language-powershell\">winget install Anthropic.ClaudeCode<\/code><\/pre>\n<p>WinGet \u5b89\u88c5\u540e\u4e5f\u4e0d\u4f1a\u81ea\u52a8\u66f4\u65b0\uff0c\u9700\u8981\u624b\u52a8\u5347\u7ea7\u3002<\/p>\n<h3>3.4 npm \u5168\u5c40\u5b89\u88c5<\/h3>\n<p>\u5982\u679c\u4f60\u66f4\u4e60\u60ef Node \u751f\u6001\uff0c\u4e5f\u53ef\u4ee5\u7528 npm \u5168\u5c40\u5b89\u88c5\uff1a<\/p>\n<pre><code class=\"language-bash\">npm install -g @anthropic-ai\/claude-code<\/code><\/pre>\n<p>\u5347\u7ea7 npm \u5b89\u88c5\u5efa\u8bae\u4f7f\u7528\uff1a<\/p>\n<pre><code class=\"language-bash\">npm install -g @anthropic-ai\/claude-code@latest<\/code><\/pre>\n<p>\u4e0d\u8981\u7528 <code>npm update -g<\/code> \u6765\u671f\u671b\u76f4\u63a5\u5207\u5230\u6700\u65b0\u7248\u672c\u3002<\/p>\n<h3>3.5 \u5e73\u53f0\u8bf4\u660e<\/h3>\n<p>npm \u5b89\u88c5\u4f9d\u8d56\u53ef\u9009\u5e73\u53f0\u4e8c\u8fdb\u5236\uff0c\u5e38\u89c1\u652f\u6301\u5e73\u53f0\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>darwin-arm64<\/li>\n<li>darwin-x64<\/li>\n<li>linux-x64<\/li>\n<li>linux-arm64<\/li>\n<li>linux-x64-musl<\/li>\n<li>linux-arm64-musl<\/li>\n<li>win32-x64<\/li>\n<li>win32-arm64<\/li>\n<\/ul>\n<p>\u5982\u679c\u5b89\u88c5\u540e\u627e\u4e0d\u5230\u4e8c\u8fdb\u5236\uff0c\u901a\u5e38\u8981\u68c0\u67e5\u5305\u7ba1\u7406\u5668\u662f\u5426\u5141\u8bb8 optional dependencies\u3002<\/p>\n<h2>4. \u5b89\u88c5\u540e\u68c0\u67e5<\/h2>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u5148\u786e\u8ba4\u7248\u672c\uff1a<\/p>\n<pre><code class=\"language-bash\">claude --version<\/code><\/pre>\n<p>\u518d\u505a\u4e00\u6b21\u73af\u5883\u8bca\u65ad\uff1a<\/p>\n<pre><code class=\"language-bash\">claude doctor<\/code><\/pre>\n<p>\u5982\u679c\u51fa\u73b0 <code>command not found<\/code>\u3001\u6743\u9650\u9519\u8bef\u3001\u627e\u4e0d\u5230\u4e8c\u8fdb\u5236\u7b49\u95ee\u9898\uff0c\u4f18\u5148\u68c0\u67e5 PATH\u3001\u5b89\u88c5\u65b9\u5f0f\u3001Node\/npm \u7248\u672c\u548c\u6743\u9650\u3002<\/p>\n<h2>5. \u7b2c\u4e00\u6b21\u767b\u5f55<\/h2>\n<h3>5.1 \u5b98\u65b9\u8d26\u53f7\u767b\u5f55<\/h3>\n<p>\u9996\u6b21\u8fd0\u884c\uff1a<\/p>\n<pre><code class=\"language-bash\">claude<\/code><\/pre>\n<p>\u7136\u540e\u6309\u63d0\u793a\u767b\u5f55\u3002\u4e00\u822c\u4f1a\u81ea\u52a8\u6253\u5f00\u6d4f\u89c8\u5668\u5b8c\u6210\u8ba4\u8bc1\u3002<\/p>\n<p>\u5982\u679c\u6d4f\u89c8\u5668\u6ca1\u6709\u81ea\u52a8\u6253\u5f00\uff0c\u901a\u5e38\u53ef\u4ee5\u5728\u7ec8\u7aef\u91cc\u590d\u5236\u767b\u5f55\u94fe\u63a5\u518d\u624b\u52a8\u6253\u5f00\u3002<\/p>\n<h3>5.2 \u9000\u51fa\u767b\u5f55<\/h3>\n<p>\u5728 Claude Code \u63d0\u793a\u7b26\u91cc\u6267\u884c\uff1a<\/p>\n<pre><code class=\"language-text\">\/logout<\/code><\/pre>\n<h3>5.3 \u67e5\u770b\u767b\u5f55\u72b6\u6001<\/h3>\n<pre><code class=\"language-bash\">claude auth status<\/code><\/pre>\n<h3>5.4 \u91cd\u65b0\u767b\u5f55<\/h3>\n<pre><code class=\"language-bash\">claude auth login<\/code><\/pre>\n<p>\u4e5f\u53ef\u4ee5\u6309\u9700\u4f7f\u7528\uff1a<\/p>\n<pre><code class=\"language-bash\">claude auth login --console\nclaude auth login --sso\nclaude auth login --email your@email.com<\/code><\/pre>\n<h2>6. \u4f60\u63d0\u5230\u7684\u201cdisable login prompt\u201d<\/h2>\n<p>\u5982\u679c\u4f60\u5728 VS Code \u4e2d\u4f7f\u7528\u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546\uff0c\u5b98\u65b9\u6587\u6863\u5efa\u8bae\u5728\u6269\u5c55\u91cc\u5173\u95ed\u767b\u5f55\u63d0\u793a\u3002<\/p>\n<p>\u64cd\u4f5c\u601d\u8def\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00 VS Code \u8bbe\u7f6e<\/li>\n<li>\u641c\u7d22 <code>Claude Code login<\/code><\/li>\n<li>\u52fe\u9009 <code>Disable Login Prompt<\/code><\/li>\n<\/ol>\n<p>\u8fd9\u4e2a\u8bbe\u7f6e\u5e38\u7528\u4e8e\u4ee5\u4e0b\u60c5\u51b5\uff1a<\/p>\n<ul>\n<li>\u4f60\u4e0d\u662f\u76f4\u63a5\u767b\u5f55 Claude \u5b98\u65b9\u8d26\u53f7<\/li>\n<li>\u4f60\u8d70 Bedrock \/ Vertex AI \/ Foundry<\/li>\n<li>\u4f60\u5e0c\u671b VS Code \u6269\u5c55\u4e0d\u5f3a\u5236\u5f39\u51fa\u5b98\u65b9\u767b\u5f55\u6d41\u7a0b<\/li>\n<\/ul>\n<h2>7. VS Code \u96c6\u6210<\/h2>\n<h3>7.1 \u5b89\u88c5\u6269\u5c55<\/h3>\n<p>\u5728 VS Code \u6269\u5c55\u5e02\u573a\u641c\u7d22\u5e76\u5b89\u88c5 Claude Code\u3002<\/p>\n<p>\u4e5f\u53ef\u4ee5\u5728\u6269\u5c55\u89c6\u56fe\u4e2d\u76f4\u63a5\u641c\u7d22\uff1a<\/p>\n<ul>\n<li>Claude Code<\/li>\n<\/ul>\n<h3>7.2 \u4f7f\u7528\u5165\u53e3<\/h3>\n<p>\u5b89\u88c5\u540e\uff0c\u5e38\u89c1\u6253\u5f00\u65b9\u5f0f\u6709\uff1a<\/p>\n<ul>\n<li>\u7f16\u8f91\u5668\u53f3\u4e0a\u89d2\u7684 Spark \u56fe\u6807<\/li>\n<li>\u5de6\u4fa7 Activity Bar \u7684 Spark \u56fe\u6807<\/li>\n<li>\u547d\u4ee4\u9762\u677f\u4e2d\u641c\u7d22 <code>Claude Code<\/code><\/li>\n<li>\u53f3\u4e0b\u89d2\u72b6\u6001\u680f\u5165\u53e3<\/li>\n<\/ul>\n<h3>7.3 VS Code \u91cc\u80fd\u505a\u4ec0\u4e48<\/h3>\n<ul>\n<li>\u5185\u8054\u5dee\u5f02\u67e5\u770b<\/li>\n<li>@-mention \u5f53\u524d\u6587\u4ef6\/\u9009\u533a<\/li>\n<li>\u8ba1\u5212\u5ba1\u67e5<\/li>\n<li>\u4f1a\u8bdd\u5386\u53f2<\/li>\n<li>\u4e0e Git \u5de5\u4f5c\u6d41\u7ed3\u5408<\/li>\n<\/ul>\n<h3>7.4 VS Code \u6269\u5c55\u4e0e CLI \u7684\u5173\u7cfb<\/h3>\n<p>\u6269\u5c55\u81ea\u5e26\u4e00\u4efd CLI \u7ec4\u4ef6\u7528\u4e8e\u9762\u677f\u804a\u5929\uff1b\u5982\u679c\u4f60\u8981\u5728 VS Code \u96c6\u6210\u7ec8\u7aef\u91cc\u76f4\u63a5\u8fd0\u884c <code>claude<\/code>\uff0c\u4ecd\u7136\u5efa\u8bae\u5b89\u88c5\u72ec\u7acb CLI\u3002<\/p>\n<h3>7.5 \u5728 VS Code \u91cc\u8c03\u7528 CLI<\/h3>\n<p>\u5728 VS Code \u7ec8\u7aef\u91cc\u76f4\u63a5\u8fd0\u884c\uff1a<\/p>\n<pre><code class=\"language-bash\">claude<\/code><\/pre>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546\uff0c\u5219\u5148\u914d\u7f6e\u5bf9\u5e94\u73af\u5883\u6216\u8bbe\u7f6e\uff0c\u518d\u542f\u52a8\u3002<\/p>\n<h2>8. \u57fa\u672c\u4f7f\u7528\u65b9\u5f0f<\/h2>\n<h3>8.1 \u8fdb\u5165\u4ea4\u4e92\u4f1a\u8bdd<\/h3>\n<pre><code class=\"language-bash\">claude<\/code><\/pre>\n<h3>8.2 \u5e26\u521d\u59cb\u95ee\u9898\u542f\u52a8<\/h3>\n<pre><code class=\"language-bash\">claude &quot;explain this project&quot;<\/code><\/pre>\n<h3>8.3 \u76f4\u63a5\u67e5\u8be2\u540e\u9000\u51fa<\/h3>\n<pre><code class=\"language-bash\">claude -p &quot;explain this function&quot;<\/code><\/pre>\n<h3>8.4 \u5904\u7406\u7ba1\u9053\u8f93\u5165<\/h3>\n<pre><code class=\"language-bash\">cat logs.txt | claude -p &quot;summarize these logs&quot;<\/code><\/pre>\n<h3>8.5 \u7ee7\u7eed\u4e0a\u4e00\u6b21\u4f1a\u8bdd<\/h3>\n<pre><code class=\"language-bash\">claude -c<\/code><\/pre>\n<h3>8.6 \u6307\u5b9a\u4f1a\u8bdd\u7ee7\u7eed<\/h3>\n<pre><code class=\"language-bash\">claude -r &quot;auth-refactor&quot;<\/code><\/pre>\n<h3>8.7 \u5b89\u5168\u6a21\u5f0f \/ \u8c03\u8bd5\u6a21\u5f0f<\/h3>\n<pre><code class=\"language-bash\">claude --safe-mode\nclaude --debug<\/code><\/pre>\n<h2>9. \u5e38\u89c1\u547d\u4ee4\u901f\u67e5<\/h2>\n<h3>9.1 \u8ba4\u8bc1\u76f8\u5173<\/h3>\n<pre><code class=\"language-bash\">claude auth login\nclaude auth login --console\nclaude auth logout\nclaude auth status<\/code><\/pre>\n<h3>9.2 \u4f1a\u8bdd\u76f8\u5173<\/h3>\n<pre><code class=\"language-bash\">claude\nclaude &quot;query&quot;\nclaude -c\nclaude -r &quot;session-id-or-name&quot;\nclaude --resume &quot;session-id-or-name&quot;\nclaude --name &quot;my-feature-work&quot;<\/code><\/pre>\n<h3>9.3 \u66f4\u65b0\u4e0e\u5b89\u88c5<\/h3>\n<pre><code class=\"language-bash\">claude update\nclaude install stable\nclaude install latest<\/code><\/pre>\n<h3>9.4 \u8bca\u65ad\u76f8\u5173<\/h3>\n<pre><code class=\"language-bash\">claude doctor\nclaude --debug\nclaude --debug-file \/tmp\/claude-debug.log<\/code><\/pre>\n<h3>9.5 \u6743\u9650\u4e0e\u5de5\u5177\u63a7\u5236<\/h3>\n<pre><code class=\"language-bash\">claude --disable-slash-commands\nclaude --dangerously-skip-permissions\nclaude --allowed-tools &quot;Read&quot; &quot;Edit&quot;\nclaude --disallowed-tools &quot;Bash(rm *)&quot;<\/code><\/pre>\n<h2>10. \u5e38\u7528\u4ea4\u4e92\u547d\u4ee4<\/h2>\n<p>\u5728 Claude Code \u7684\u4ea4\u4e92\u754c\u9762\u4e2d\uff0c\u5e38\u4f1a\u7528\u5230\u8fd9\u4e9b\u547d\u4ee4\uff1a<\/p>\n<ul>\n<li><code>\/help<\/code>\uff1a\u67e5\u770b\u5e2e\u52a9<\/li>\n<li><code>\/status<\/code>\uff1a\u67e5\u770b\u5f53\u524d\u72b6\u6001<\/li>\n<li><code>\/logout<\/code>\uff1a\u9000\u51fa\u5f53\u524d\u8d26\u53f7<\/li>\n<li><code>\/rename<\/code>\uff1a\u91cd\u547d\u540d\u5f53\u524d\u4f1a\u8bdd<\/li>\n<li><code>\/mcp<\/code>\uff1a\u7ba1\u7406 MCP<\/li>\n<li><code>\/add-dir<\/code>\uff1a\u6dfb\u52a0\u989d\u5916\u5de5\u4f5c\u76ee\u5f55<\/li>\n<\/ul>\n<p>\u4e0d\u540c\u7248\u672c\u7684\u4ea4\u4e92\u547d\u4ee4\u53ef\u80fd\u7565\u6709\u5dee\u5f02\uff0c\u5efa\u8bae\u4ee5 <code>claude --help<\/code>\u3001<code>\/help<\/code> \u548c\u5b98\u65b9\u6587\u6863\u4e3a\u51c6\u3002<\/p>\n<h2>11. \u9002\u5408\u5f00\u53d1\u65f6\u7684\u5178\u578b\u5de5\u4f5c\u6d41<\/h2>\n<h3>11.1 \u4fee bug<\/h3>\n<pre><code class=\"language-bash\">claude &quot;\u5b9a\u4f4d\u8fd9\u4e2a\u62a5\u9519\u5e76\u4fee\u590d\uff0c\u987a\u4fbf\u8865\u6d4b\u8bd5&quot;<\/code><\/pre>\n<h3>11.2 \u5199\u6d4b\u8bd5<\/h3>\n<pre><code class=\"language-bash\">claude &quot;\u7ed9 auth \u6a21\u5757\u8865\u5355\u5143\u6d4b\u8bd5\u5e76\u6267\u884c&quot;<\/code><\/pre>\n<h3>11.3 \u5904\u7406 Git \u63d0\u4ea4<\/h3>\n<pre><code class=\"language-bash\">claude &quot;\u628a\u5f53\u524d\u4fee\u6539\u6574\u7406\u6210\u4e00\u4e2a\u6e05\u6670\u7684 commit&quot;<\/code><\/pre>\n<h3>11.4 \u4ee3\u7801\u5ba1\u67e5<\/h3>\n<pre><code class=\"language-bash\">claude &quot;review \u8fd9\u4e2a\u5206\u652f\u7684\u6539\u52a8\uff0c\u6307\u51fa\u98ce\u9669\u70b9&quot;<\/code><\/pre>\n<h2>12. \u66f4\u65b0\u65b9\u5f0f<\/h2>\n<h3>12.1 \u539f\u751f\u5b89\u88c5\u66f4\u65b0<\/h3>\n<p>\u539f\u751f\u5b89\u88c5\u4f1a\u81ea\u52a8\u540e\u53f0\u66f4\u65b0\u5230\u6700\u65b0\u7248\u3002<\/p>\n<h3>12.2 Homebrew \u66f4\u65b0<\/h3>\n<pre><code class=\"language-bash\">brew upgrade claude-code\n# \u6216\nbrew upgrade claude-code@latest<\/code><\/pre>\n<h3>12.3 WinGet \u66f4\u65b0<\/h3>\n<pre><code class=\"language-powershell\">winget upgrade Anthropic.ClaudeCode<\/code><\/pre>\n<h3>12.4 npm \u66f4\u65b0<\/h3>\n<pre><code class=\"language-bash\">npm install -g @anthropic-ai\/claude-code@latest<\/code><\/pre>\n<h2>13. \u5378\u8f7d\u65b9\u5f0f<\/h2>\n<h3>13.1 npm \u5378\u8f7d<\/h3>\n<pre><code class=\"language-bash\">npm uninstall -g @anthropic-ai\/claude-code<\/code><\/pre>\n<h3>13.2 Homebrew \u5378\u8f7d<\/h3>\n<pre><code class=\"language-bash\">brew uninstall --cask claude-code<\/code><\/pre>\n<h3>13.3 WinGet \u5378\u8f7d<\/h3>\n<pre><code class=\"language-powershell\">winget uninstall Anthropic.ClaudeCode<\/code><\/pre>\n<h3>13.4 VS Code \u6269\u5c55\u5378\u8f7d<\/h3>\n<p>\u5728\u6269\u5c55\u89c6\u56fe\u91cc\u5378\u8f7d Claude Code \u6269\u5c55\u5373\u53ef\u3002<\/p>\n<h2>14. \u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546\u573a\u666f<\/h2>\n<p>\u5982\u679c\u7ec4\u7ec7\u4f7f\u7528\u4ee5\u4e0b\u5e73\u53f0\u4e4b\u4e00\uff1a<\/p>\n<ul>\n<li>Amazon Bedrock<\/li>\n<li>Google Vertex AI<\/li>\n<li>Microsoft Foundry<\/li>\n<\/ul>\n<p>\u901a\u5e38\u6d41\u7a0b\u662f\uff1a<\/p>\n<ol>\n<li>\u5728 VS Code \u91cc\u5173\u95ed\u767b\u5f55\u63d0\u793a<\/li>\n<li>\u914d\u7f6e\u5bf9\u5e94\u5e73\u53f0\u51ed\u636e\u548c\u73af\u5883\u53d8\u91cf<\/li>\n<li>\u8ba9 <code>~\/.claude\/settings.json<\/code> \u7edf\u4e00\u4fdd\u5b58\u8bbe\u7f6e<\/li>\n<li>CLI \u548c VS Code \u6269\u5c55\u5171\u7528\u914d\u7f6e<\/li>\n<\/ol>\n<h3>14.1 Bedrock \/ Vertex AI \/ Foundry \u7684\u5171\u6027<\/h3>\n<ul>\n<li>\u5148\u51c6\u5907\u4e91\u7aef\u8d26\u53f7\u548c\u6743\u9650<\/li>\n<li>\u518d\u914d\u7f6e CLI \/ \u6269\u5c55<\/li>\n<li>\u6700\u540e\u5728 Claude Code \u91cc\u8d70\u7b2c\u4e09\u65b9\u767b\u5f55\u6216\u73af\u5883\u53d8\u91cf\u63a5\u5165<\/li>\n<\/ul>\n<h2>15. \u5e38\u89c1\u95ee\u9898\u6392\u67e5<\/h2>\n<h3>15.1 <code>claude<\/code> \u547d\u4ee4\u627e\u4e0d\u5230<\/h3>\n<p>\u68c0\u67e5\uff1a<\/p>\n<ul>\n<li>\u662f\u5426\u771f\u7684\u5b89\u88c5\u6210\u529f<\/li>\n<li>npm \u5168\u5c40\u76ee\u5f55\u662f\u5426\u5728 PATH<\/li>\n<li>PowerShell \/ CMD \/ Bash \u662f\u5426\u6df7\u7528<\/li>\n<li>\u662f\u5426\u9700\u8981\u91cd\u65b0\u6253\u5f00\u7ec8\u7aef<\/li>\n<\/ul>\n<h3>15.2 \u767b\u5f55\u9875\u6253\u4e0d\u5f00<\/h3>\n<p>\u68c0\u67e5\uff1a<\/p>\n<ul>\n<li>\u6d4f\u89c8\u5668\u662f\u5426\u88ab\u62e6\u622a<\/li>\n<li>\u7f51\u7edc\u662f\u5426\u6b63\u5e38<\/li>\n<li>\u4f01\u4e1a\u4ee3\u7406 \/ \u9632\u706b\u5899\u662f\u5426\u9650\u5236<\/li>\n<li>\u662f\u5426\u9700\u8981\u624b\u52a8\u590d\u5236\u767b\u5f55\u94fe\u63a5<\/li>\n<\/ul>\n<h3>15.3 VS Code \u6269\u5c55\u8fde\u4e0d\u4e0a<\/h3>\n<p>\u68c0\u67e5\uff1a<\/p>\n<ul>\n<li>VS Code \u7248\u672c\u662f\u5426\u6ee1\u8db3\u8981\u6c42<\/li>\n<li>\u6269\u5c55\u662f\u5426\u6b63\u786e\u5b89\u88c5<\/li>\n<li>\u662f\u5426\u5df2\u7ecf\u5173\u95ed\u767b\u5f55\u63d0\u793a\u5e76\u5207\u6362\u5230\u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546<\/li>\n<li>CLI \u662f\u5426\u5df2\u5728\u7cfb\u7edf\u4e2d\u53ef\u7528<\/li>\n<\/ul>\n<h3>15.4 \u5b89\u88c5\u540e\u627e\u4e0d\u5230\u4e8c\u8fdb\u5236<\/h3>\n<p>\u5e38\u89c1\u539f\u56e0\uff1a<\/p>\n<ul>\n<li>\u5305\u7ba1\u7406\u5668\u7981\u7528\u4e86 optional dependencies<\/li>\n<li>\u6743\u9650\u4e0d\u8db3<\/li>\n<li>npm \u5b89\u88c5\u672a\u6210\u529f\u5b8c\u6210<\/li>\n<li>\u5e73\u53f0\u67b6\u6784\u4e0d\u5339\u914d<\/li>\n<\/ul>\n<h3>15.5 \u6743\u9650\u95ee\u9898<\/h3>\n<p>\u4e0d\u8981\u76f4\u63a5\u4f9d\u8d56 <code>sudo npm install -g<\/code> \u4f5c\u4e3a\u9996\u9009\u65b9\u6848\u3002\u4f18\u5148\u8003\u8651\u4fee\u6b63 npm \u5168\u5c40\u76ee\u5f55\u6743\u9650\u6216\u4f7f\u7528\u66f4\u5408\u9002\u7684\u5b89\u88c5\u65b9\u5f0f\u3002<\/p>\n<h2>16. \u5b9e\u6218\u5efa\u8bae<\/h2>\n<ul>\n<li>\u7ec8\u7aef\u91cc\u5148\u628a Claude Code \u8dd1\u901a\uff0c\u518d\u63a5 VS Code<\/li>\n<li>\u9879\u76ee\u7ea7\u64cd\u4f5c\u5c3d\u91cf\u5728\u4ed3\u5e93\u6839\u76ee\u5f55\u6267\u884c<\/li>\n<li>\u957f\u4efb\u52a1\u5efa\u8bae\u5148\u8ba9\u5b83\u89c4\u5212\uff0c\u518d\u9010\u6b65\u6267\u884c<\/li>\n<li>\u4fee\u6539\u524d\u5148\u8ba9\u5b83\u8bf4\u660e\u65b9\u6848\uff0c\u4fee\u6539\u540e\u518d\u8ba9\u5b83\u590d\u67e5<\/li>\n<li>\u91cd\u8981\u9879\u76ee\u5efa\u8bae\u914d\u5408 Git worktree \/ \u5206\u652f\u9694\u79bb<\/li>\n<\/ul>\n<h2>17. \u4e00\u4e2a\u9002\u5408\u76f4\u63a5\u590d\u5236\u7684\u6700\u5c0f\u542f\u52a8\u6d41\u7a0b<\/h2>\n<pre><code class=\"language-bash\"># \u5b89\u88c5\nnpm install -g @anthropic-ai\/claude-code\n\n# \u68c0\u67e5\u7248\u672c\nclaude --version\n\n# \u8fdb\u5165\u9879\u76ee\ncd your-project\n\n# \u542f\u52a8\nclaude<\/code><\/pre>\n<h2>18. \u4e00\u4e2a\u9002\u5408 VS Code \u7684\u6700\u5c0f\u542f\u52a8\u6d41\u7a0b<\/h2>\n<ol>\n<li>\u5b89\u88c5 Claude Code \u6269\u5c55<\/li>\n<li>\u6253\u5f00\u9879\u76ee<\/li>\n<li>\u9700\u8981\u65f6\u5728\u8bbe\u7f6e\u4e2d\u5173\u95ed <code>Disable Login Prompt<\/code><\/li>\n<li>\u914d\u7f6e\u7b2c\u4e09\u65b9\u63d0\u4f9b\u5546\u6216\u76f4\u63a5\u767b\u5f55\u5b98\u65b9\u8d26\u53f7<\/li>\n<li>\u70b9\u51fb Spark \u56fe\u6807\u6216\u7528\u547d\u4ee4\u9762\u677f\u6253\u5f00 Claude Code \u9762\u677f<\/li>\n<\/ol>\n<h2>19. \u63a8\u8350\u4fdd\u7559\u7684\u547d\u4ee4\u6e05\u5355<\/h2>\n<pre><code class=\"language-bash\">claude\nclaude --version\nclaude doctor\nclaude auth status\nclaude auth login\nclaude auth logout\nclaude update\nclaude -c\nclaude -r &quot;session-name&quot;\nclaude --safe-mode<\/code><\/pre>\n<h2>20. \u5907\u6ce8<\/h2>\n<ul>\n<li>\u5b98\u65b9\u6587\u6863\u4f1a\u6301\u7eed\u66f4\u65b0\uff0c\u53c2\u6570\u548c\u83dc\u5355\u9879\u53ef\u80fd\u968f\u7248\u672c\u53d8\u5316<\/li>\n<li>\u4f60\u5728\u4e0d\u540c\u7cfb\u7edf\u91cc\u770b\u5230\u7684\u767b\u5f55\u63d0\u793a\u3001\u6309\u94ae\u540d\u79f0\u3001\u83dc\u5355\u5165\u53e3\uff0c\u53ef\u80fd\u4f1a\u7565\u6709\u4e0d\u540c<\/li>\n<li>\u5982\u679c\u4f60\u662f\u4f01\u4e1a\u73af\u5883\uff0c\u4f18\u5148\u4ee5\u7ec4\u7ec7\u7684\u767b\u5f55\u65b9\u5f0f\u3001\u6743\u9650\u7b56\u7565\u548c\u5b89\u5168\u8981\u6c42\u4e3a\u51c6<\/li>\n<\/ul>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>\u9002\u7528\u5bf9\u8c61\uff1a\u60f3\u5728\u7ec8\u7aef\u3001VS Code \u4e2d\u4f7f\u7528 Claude Code \u7684\u5f00\u53d1\u8005\u3002 \u8bf4\u660e\uff1a\u672c\u6587\u4ee5\u5b98\u65b9\u6587\u6863\u4e3a\u57fa\u7840\u6574\u7406 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[132],"tags":[],"class_list":["post-1965","post","type-post","status-publish","format-standard","hentry","category-ai-llm"],"_links":{"self":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/1965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1965"}],"version-history":[{"count":2,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/1965\/revisions"}],"predecessor-version":[{"id":1977,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=\/wp\/v2\/posts\/1965\/revisions\/1977"}],"wp:attachment":[{"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ttwow.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}