Use Windows' official package manager winget to search, install, upgrade, and manage applications. Similar to Homebrew on macOS, it is a command-line tool built into Windows 10 (1709+) / 11.
Use Cases
- The user says "Help me install XX software" or "See if XX is available to install"
- Need to batch install/upgrade applications
- View the list of installed software and versions
- Automatically invoked when software that other Skills depend on needs to be installed
Command Reference
Search Applications
# 搜索应用
winget search "Visual Studio Code"
Exact ID Match
winget search --id "Microsoft.VisualStudioCode"
Filter by Source (winget / msstore)winget search "Python" --source winget
### 安装应用
```powershell
# 安装应用(静默模式)
winget install --id "Microsoft.VisualStudioCode" --silent --accept-package-agreements --accept-source-agreements
# 安装指定版本
winget install --id "Python.Python.3.12" --version "3.12.4"
# 安装到自定义路径
winget install --id "Git.Git" --location "D:\Tools\Git"
# 从 Microsoft Store 安装
winget install --id "9NBLGGH4NNS1" --source msstore # EarTrumpet
List Installed
# 列出所有已安装应用
winget list
# 按名称过滤
winget list "Python"
# 检查可升级的应用
winget upgrade
Upgrade Applications
# 升级特定应用
winget upgrade --id "Microsoft.VisualStudioCode"
# 升级所有可升级的应用
winget upgrade --all --silent --accept-package-agreements
# 升级并忽略版本限制
winget upgrade --id "Git.Git" --include-unknown
Uninstall Applications
# 卸载应用
winget uninstall --id "Mozilla.Firefox"
Export/Import Application List
# 导出当前已安装应用到 JSON
winget export -o "$env:USERPROFILE\Desktop\apps.json"
# 从 JSON 批量安装(换机迁移)
winget import -i "$env:USERPROFILE\Desktop\apps.json" --accept-package-agreements
View Application Details
# 查看应用详细信息
winget show --id "Microsoft.VisualStudioCode"
Common Installation Commands Quick Reference
| Application | Installation Command |
|---|---|
| VS Code | winget install Microsoft.VisualStudioCode |
| Git | winget install Git.Git |
| Python 3.12 | winget install Python.Python.3.12 |
| Node.js LTS | winget install OpenJS.NodeJS.LTS |
| 7-Zip | winget install 7zip.7zip |
| Everything | winget install voidtools.Everything |
| PowerToys | winget install Microsoft.PowerToys |
| Windows Terminal | winget install Microsoft.WindowsTerminal |
| Chrome | winget install Google.Chrome |
| Firefox | winget install Mozilla.Firefox |
| VLC | winget install VideoLAN.VLC |
| Obsidian | winget install Obsidian.Obsidian |
| Notion | winget install Notion.Notion |
Integration with Other Skills
When another Skill indicates "XX needs to be installed," automatically use winget to install:
用户: "帮我用 Everything 搜索文件"
→ 检测 Everything 未安装
→ 提示: "Everything 未安装,需要安装吗?"
→ 用户确认
→ winget install voidtools.Everything --silent
→ 安装完成,继续执行搜索
Output Specification
- Show the application name, version, source, and size before installation
- Show progress during installation (in silent mode, show "Installing...")
- Confirm the result after installation is complete
- Format list output as a table
Security Rules
- HITL confirmation is required before installation: Show information about the application to be installed
- HITL confirmation is required before uninstallation
- Always use
--silentand--accept-package-agreementsto avoid pop-up blocking - Do not automatically execute
upgrade --all: Confirm one by one - Prefer the official winget source and avoid untrusted sources