Claude Code 已支持原生运行 Powershell 命令

2026-04-11 15:250阅读0评论SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐
问题描述:
x.com

Felix Rieseberg

@felixrieseberg A little feature drop I'm excited about: Claude Code now natively run PowerShell! code.claude.com/docs/en/tools-… 6:04 PM - 27 Mar 2026 390 21

官方文档:Tools reference - Claude Code Docs

按以下方式设置即可

{ "env": { "CLAUDE_CODE_USE_POWERSHELL_TOOL": "1" } }

image760×630 50.4 KB

但需要注意的是,现在是预览期间,还有以下问题:

  • 不支持 auto mode
  • 不支持沙盒
  • 仅支持原生windows WSL不支持
  • 仍需要 git bash 来启动 CC

[!quote] The Bash tool remains registered alongside the PowerShell tool, so you may need to ask Claude to use PowerShell.

所以可能还需要手动强调一下让它去用 Powershell 命令


ovo[1]

Claude Code 已支持原生运行 Powersh