vscode+wsl2配置claude code
本文最后更新于124 天前,其中的信息可能已经过时,如有错误请发送邮件到898599301@qq.com

环境准备

  1. 安装好wsl2
  2. 下载好Ubuntu系统

具体操作

安装claude code

  • 安装nvm
    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
  • 安装node
    nvm install 20
    nvm use 20
    node -v  # 验证一下,应该显示 v20.x.x

2 使用pnpm安装claude code

# 安装 pnpm
npm install -g pnpm --registry=https://registry.npmmirror.com

# 初始化pnpm环境
pnpm setup

# 使用 pnpm 安装 claude-code
pnpm add -g @anthropic-ai/claude-code --registry=https://registry.npmmirror.com

3 检查安装是否成功
<code>claude --version</code>

vscode配置

vscode远程连接wsl2

打开vscode设置界面,搜索<code>terminal.integrated.env</code>使用wsl2的话只要配置Linux即可

七牛云参考配置

&quot;terminal.integrated.env.linux&quot;: {
        &quot;TEST_ENV&quot;: &quot;qiniuyun&quot;,
        &quot;BASH_DEFAULT_TIMEOUT_MS&quot;: &quot;300000&quot;,
        &quot;CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC&quot;: &quot;1&quot;,
        &quot;DISABLE_COST_WARNINGS&quot;: &quot;1&quot;,
        &quot;DISABLE_NON_ESSENTIAL_MODEL_CALLS&quot;: &quot;1&quot;,
        &quot;DISABLE_TELEMETRY&quot;: &quot;1&quot;,
        &quot;USE_BUILTIN_RIPGREP&quot;: &quot;1&quot;,
        &quot;ANTHROPIC_BASE_URL&quot;: &quot;https://api.qnaigc.com&quot;,
        &quot;ANTHROPIC_AUTH_TOKEN&quot;: &quot;xxxxxxxxxxxxxxxxx&quot;,
        //模型配置
        &quot;ANTHROPIC_MODEL&quot;: &quot;claude-4.5-sonnet&quot;,
        &quot;ANTHROPIC_DEFAULT_OPUS_MODEL&quot;: &quot;claude-4.5-sonnet&quot;,
        &quot;ANTHROPIC_DEFAULT_SONNET_MODEL&quot;: &quot;claude-4.5-sonnet&quot;,
        &quot;ANTHROPIC_DEFAULT_HAIKU_MODEL&quot;: &quot;claude-4.5-sonnet&quot;,
        &quot;CLAUDE_CODE_SUBAGENT_MODEL&quot;: &quot;claude-4.5-sonnet&quot;
    }

参考:Claude Code 第三方供应商使用指南 - 深度解析与最佳实践 | jqknono Blogs
七牛云官网介绍

文末附加内容
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇