WindowsDeveloperConfig README

项目的 README,来自 github.com/microsoft/WindowsDeveloperConfig。合并为一个 markdown 文件:README.md。

Windows Developer Config logo

Windows Developer Config

Opinionated setups for Windows dev boxes. Idempotent. CI-tested.

Windows Dev Config · WSL Comfort · Workloads · AI tooling · Troubleshooting


Set up a new Windows dev box in minutes, not hours. Pick a setup, run one command, get back to building. Everything here is safe to re-run.

🎯 Pick your setup

You want... Go to
A full dev workstation: tools, Windows settings, WSL, and terminal. One command, one restart. Windows Dev Config
A nicer WSL shell: zsh/bash, Starship, CLI tools, and a themed terminal profile. WSL Comfort
One language or toolchain. Workloads
Local AI: PyTorch for your GPU, plus Ollama, llama.cpp, or Foundry Local. AI tooling

🖥️ Windows Dev Config

Installs dev tools, applies opinionated Windows settings, and sets up WSL + Ubuntu — restart included. Nothing to clone, nothing to install first.

Open any PowerShell window — elevated or not — and run:

What you get

Standard Experience

  • Dev tools: Windows Terminal, PowerShell 7, Git, GitHub CLI, GitHub Copilot CLI, VS Code, .NET SDK 10, Python 3.14 + uv, Node.js LTS + nvm, Coreutils for Windows, Windows App CLI, Oh My Posh, and PowerToys.
  • Terminal: PowerShell 7 as the default profile, Oh My Posh in your prompt, Cascadia Mono NF as the default font, and a GitHub Copilot profile in the dropdown.
  • Windows settings: Dark theme, long paths, File Explorer defaults, Start/Search settings, and Do Not Disturb
  • WSL: WSL platform + Ubuntu, including the restart and the automatic resume afterwards.

Full Experience

  • Everything from standard
  • Windows settings: Developer Mode, Sudo, widgets off, and Edge policies, additional Start/Search/System Tray settings
  • Remote Desktop: Enabled and firewall settings set

Standard Experience

irm https://aka.ms/devconfig/standard/setup.ps1 | iex

Full Experience

irm https://aka.ms/devconfig/full/setup.ps1 | iex

⚠️ Heads up — it may restart your PC. WSL needs virtualization turned on, so save your work first. Setup picks up where it left off after the reboot.

Every tool and setting, how to undo them, and troubleshooting: Windows Dev Config README.


🐧 WSL Comfort

Also known as Comfort Shell. A polished Windows + WSL shell setup — zsh/bash, Starship prompt, modern CLI tools, themed terminal.

Open any PowerShell window and run:

irm https://aka.ms/devconfig/wsl-comfort/setup.ps1 | iex

Interactive by default — pick and choose components as it runs. For unattended installs, pass -NonInteractive:

& ([scriptblock]::Create((irm https://aka.ms/devconfig/wsl-comfort/setup.ps1))) -NonInteractive

Nothing to clone: it downloads the signed scripts, verifies them, and installs WSL first if it's missing. Already have a clone? .\wsl-comfort\install.ps1 works too. The Linux half (comfort-shell-bootstrap.sh) is standalone, so you can also copy it onto any Ubuntu host and run it directly.

What you can pick
  • Your choice of shell: zsh or bash.
  • Optional Starship prompt.
  • Optional modern CLI tools: fzf, rg, fd, bat, eza, zoxide, jq.
  • Optional clipboard and open shims (pbcopy, pbpaste, open).
  • Optional Homebrew.
  • Optional Git defaults.
  • A themed Windows Terminal profile using Cascadia Code Nerd Font.

Full details: wsl-comfort/readme.md.


🧪 Workloads

Just want one toolchain? Each of these is a single command.

Workload Run via IRM Powershell call
WinUI 3 irm https://aka.ms/devconfig/winui/setup.ps1 | iex
WinForms irm https://aka.ms/devconfig/winforms/setup.ps1 | iex
WinAppCLI irm https://aka.ms/devconfig/winappcli/setup.ps1 | iex
.NET irm https://aka.ms/devconfig/dotnet/setup.ps1 | iex
Go irm https://aka.ms/devconfig/go/setup.ps1 | iex
Rust irm https://aka.ms/devconfig/rust/setup.ps1 | iex
PHP irm https://aka.ms/devconfig/php/setup.ps1 | iex
Workload Run via Winget configure
TypeScript winget configure -f .\Workloads\typescript\configuration.winget --accept-configuration-agreements --disable-interactivity
Java winget configure -f .\Workloads\java\configuration.winget --accept-configuration-agreements --disable-interactivity
Python winget configure -f .\Workloads\python\configuration.winget --accept-configuration-agreements --disable-interactivity
SQL winget configure -f .\Workloads\sql\configuration.winget --accept-configuration-agreements --disable-interactivity
PowerShell winget configure -f .\Workloads\powershell\configuration.winget --accept-configuration-agreements --disable-interactivity

The winget configure will soon move to one-line style. Currently, to run them from a clone of this repo. What each one installs: Workloads.


🤖 AI tooling

Detects your GPU, installs the matching PyTorch build (CUDA, ROCm, Intel XPU, or CPU), and proves it works. Add a local model runtime if you want one.

Workload Run
Local AI (PyTorch for your hardware) irm https://aka.ms/devconfig/local-ai/setup.ps1 | iex
Local AI + Ollama irm https://aka.ms/devconfig/local-ai/ollama/setup.ps1 | iex
Local AI + llama.cpp irm https://aka.ms/devconfig/local-ai/llama.cpp/setup.ps1 | iex
Local AI + Foundry Local irm https://aka.ms/devconfig/local-ai/foundry/setup.ps1 | iex

Individual pieces (CUDA, ROCm, Intel AI, PyTorch, llama.cpp, Ollama, Foundry Local), hardware support, and options: AI tooling workloads.


🩺 Troubleshooting

"Unrecognized command: configure"

Run winget configure --enable. If winget configure is still not recognized after that, Workloads/_common/assert-winget-configure.ps1 tells you whether App Installer is too old, policy has disabled configuration, or something else needs fixing.

winget configure fails with "internal error" / error code -2146233079

The Visual C++ Redistributable is missing. Install it, then re-run:

# x64:
winget install Microsoft.VCRedist.2015+.x64

# ARM64:
winget install Microsoft.VCRedist.2015+.arm64

Workloads/_common/enable-winget-configure.ps1 installs it automatically as part of enabling winget configure.

A workload says it succeeded but python / node / the tool isn't on PATH

Open a new terminal, or run the matching install.ps1 shim to refresh PATH in the current session.

Windows Dev Config rebooted the machine and looks stuck

A scheduled task resumes the run about 30 seconds after you sign back in and finishes the WSL setup. Nothing after a couple of minutes? Run the one-liner again — it's safe to re-run and skips everything already done. More detail in windows-dev-config/README.md.

Comfort Shell bootstrap fails because WSL is missing

Run the WSL Comfort one-liner from PowerShell on the Windows side instead. It installs WSL first.

WSL install fails with wsl --install ... failed with exit code -1

WSL needs hardware virtualization available to the OS. Two common root causes:

  • On bare metal: virtualization (VT-x / AMD-V) is disabled in BIOS/UEFI. Reboot into firmware settings, enable it, save, and reboot back into Windows. The exact label varies by vendor — check your motherboard or laptop manufacturer's documentation if you can't find it.

  • Inside a VM: the host hasn't exposed nested virtualization to the guest. For a Hyper-V host, run this from an elevated PowerShell session on the host (with the guest VM powered off):

    Set-VMProcessor -VMName <VM_NAME> -ExposeVirtualizationExtensions $true
    

    Other hypervisors have their own equivalent settings — check your hypervisor's documentation.


🐛 Reporting issues

Hit a bug, a stale doc, or a setup that fails on your machine? Open an issue at github.com/microsoft/WindowsDeveloperConfig/issues. Include your Windows build (winver), the exact command you ran, and the failing output. This helps us triage faster.


❤️ Contributing

Contributions of all kinds are welcome: bug reports, doc fixes, new workloads, voice-and-tone tweaks. Start with CONTRIBUTING.md, then read src/docs/development.md for the CI matrix, the "how to add a language" walkthrough, and how the sign pipeline works.

Note on the repo layout: the src/ tree is the source of truth. The top-level windows-dev-config/, Workloads/, and wsl-comfort/ folders are Authenticode-signed release copies regenerated by the sign pipeline, so please don't edit them directly. Full details in src/docs/development.md.

The single source of truth for every flow (paths, build/run commands, ids, language metadata) is src/manifest.yml. The Command Palette extension, the CI harness, and the per-flow shims all read from it, so keep it in sync when you add or rename a flow.

WindowsDeveloperConfig (microsoft/WindowsDeveloperConfig)

正在搜索数据库…

这是什么?这是微软的一个仓库,提供三套各有主见的 PowerShell 配置方案,用于配置 Windows 开发机:一个完整的开发工作站安装器、一个名为 WSL Comfort 的 WSL/Linux shell 美化工具,以及各语言单独的工具链安装器。
这是需要安装的应用,还是直接运行的脚本?这是一组直接运行的 PowerShell 脚本(另有一个用于 Linux 侧的独立 bash 脚本)——无需克隆或预先安装任何东西。
具体怎么运行?打开任意 PowerShell 窗口(提权与否均可),运行 Windows Dev Config 单行命令完成完整的工作站配置,或运行 WSL Comfort 脚本(支持 -NonInteractive 和 --minimal),或运行 'winget configure -f .\Workloads\ \configuration.winget --accept-configuration-agreements --disable-interactivity' 只安装一个工具链。
单语言工作负载需要先做哪些准备吗?大多数工作负载依赖 'winget configure',需要先用 'winget configure --enable' 启用一次;如果你在非提权的 shell 中运行,还需要先安装 Microsoft Visual C++ Redistributable,否则 winget configure 会报内部错误。
运行它会重启我的电脑,或者改动我意料之外的东西吗?完整运行 Windows Dev Config 会重启一次电脑以启用 WSL,先给出 10 秒警告,登录后通过计划任务自动继续;它还会更改主题、开发者模式和远程桌面等 Windows 设置,WinForms/WinUI 3 工作负载会下载数 GB 的 Visual Studio 组件。
它只动 Windows,还是也会配置 Linux/WSL 那边?两者都有:Windows Dev Config 和 WSL Comfort 会从 Windows 侧安装 WSL 和 Ubuntu,Comfort Shell 引导脚本也可以在发行版内独立运行,配置那里的 zsh/bash、Starship 和命令行工具——你甚至可以把它复制到任何 Ubuntu 主机上。
脚本重复运行安全吗?安全,这些脚本具有幂等性并通过了 CI 测试,重新运行中断或已完成的配置只会跳过已完成的步骤。
WSL Comfort 里可以自定义哪些东西?你可以选择 shell(zsh 或 bash)、可选的 Starship 提示符、可选的命令行工具(fzf、rg、fd、bat、eza、zoxide、jq)、剪贴板/打开命令的 shim、Homebrew 和 Git 默认配置,外加一个带主题、使用 Cascadia Code Nerd Font 的 Windows Terminal 配置文件。
Standard 和 Full 两种 Windows Dev Config 体验有什么区别?Standard 安装核心开发工具(Terminal、PowerShell 7、Git、VS Code、.NET SDK、Python、Node.js、Oh My Posh、PowerToys)、终端主题、Windows 设置以及 WSL/Ubuntu。Full 包含 Standard 的全部内容,另外添加开发者模式、Sudo、额外的开始菜单/搜索/系统托盘调整,以及带防火墙规则的远程桌面。
有哪些单语言工作负载?TypeScript、PHP、.NET、Go、Java、Rust、Python、SQL、PowerShell、WinForms、WinAppCLI 和 WinUI 3——每个都附带一个 winget 配置文件和一个 install.ps1 shim,安装后用于刷新 PATH。
有哪些类似的项目?ansible, WindTerm, oh-my-posh, eza, Scoop, asdf, NodePilot, cheat
作者
microsoft
大小
3.9 MB
星标
3.6K
更新
提交Nov 06
时长
6个月
提交 · 90 天