winget-cli
Copilot instructions26k starsChanged 58 days agoMITView on GitHub
This is the Windows Package Manager (WinGet) CLI client - a native Windows application for discovering and installing packages. The codebase consists of: Use a configuration file in .config as in winget configure .config/configuration.winget (alternatives provided for other VS SKUs). Manual steps: Open src\AppInstallerCLI.sln in Visual Studio and build the solution (Ctrl+Shift+B) or use msbuild.exe to build from the command line. The solution uses: - MSBuild - vcpkg for C++ dependencies - NuGet for C++ and .NET dependencies CI uses…
Trending
More talk lately.about the whole repository
Who's talking about microsoft/winget-cli
- A Hacker News story“Windows package manager does not permit opting out of telemetry”Hacker News · May 21, 2020 · 428 points
- ansible-collections/community.windows“Ansible module to support the Windows package manager (winget)”GitHub · May 19, 2020 · 106 reactions
- microsoft/winget-pkgs“Package Request: ffmpeg”GitHub · May 23, 2020 · 72 reactions
- ansible-collections/community.windows“winget support”GitHub · Feb 28, 2025 · 49 reactions
- microsoft/cascadia-code“Winget package”GitHub · May 27, 2020 · 37 reactions
The biggest 5 of 41 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 41
Talked about on GitHub, Hacker News and Bluesky (41 times).
On GitHub · 28
- May 19, 2020Ansible module to support the Windows package manager (winget) — ansible-collections/community.windows106 reactions · 16 comments
- May 23, 2020Package Request: ffmpeg — microsoft/winget-pkgs72 reactions · 9 comments
- Feb 28, 2025winget support — ansible-collections/community.windows49 reactions · 10 comments
- May 27, 2020Winget package — microsoft/cascadia-code37 reactions · 8 comments
- Jun 6, 2020Add in winget Package Manager — starship/starship34 reactions · 16 comments
23 more on GitHub
- May 31, 2023Dev Home Service — microsoft/devhome20 reactions · 3 comments
- Jan 8, 2026[Package Issue]: Microsoft.AppInstaller fails update to 12.27.440.0 — microsoft/winget-pkgs18 reactions · 14 comments
- Nov 22, 2021Add hugo to winget — gohugoio/hugo18 reactions · 7 comments
- May 19, 2020Add WinGet — microsoft/winget-pkgs17 reactions · 19 comments
- Jun 14, 2021Package Request: Nerdfonts — microsoft/winget-pkgs15 reactions · 3 comments
- Mar 8, 2023Publish to WinGet — fwdcloudsec/granted14 reactions · 1 comment
- May 22, 2020Create SandboxTest script — microsoft/winget-pkgs11 reactions · 59 comments
- Apr 2, 2021Update YamlCreate to Manifest v1.0.0 — microsoft/winget-pkgs4 reactions · 6 comments
- Mar 28, 2025Bump manifest schema version to 1.10.0 — microsoft/winget-create3 reactions · 11 comments
- Jun 30, 2021Add Scoop — microsoft/winget-pkgs3 reactions · 38 comments
- Jul 2, 2020Initial winget module — ansible-collections/community.windows3 reactions · 4 comments
- Jun 11, 2020New module: win_winget — ansible-collections/community.windows3 reactions · 1 comment
- May 22, 2020Add Scoop — microsoft/winget-pkgs3 reactions · 17 comments
- Oct 7, 2026New package: Readwise.Reader version 0.1.3269 — microsoft/winget-pkgs2 reactions · 10 comments
- Jul 9, 2025Set User-Agent for HTTP requests — microsoft/winget-create2 reactions · 3 comments
- Apr 5, 2025Add `.winget` as an associated extension for YAML — github-linguist/linguist2 reactions · 2 comments
- Nov 4, 2024Refactor SandboxTest — microsoft/winget-pkgs2 reactions · 2 comments
- May 23, 2020Correct casing in Id and Name — microsoft/winget-pkgs2 reactions · 4 comments
- Oct 10, 2026Changed ProductName in tauri.conf.json: Reader (which is very short/generic) → "Reader by hadc188" — hadc188/reader1 reaction · 1 comment
- Sep 21, 2026fix(install): recover Windows Node setup after package-manager failures — openclaw/openclaw1 reaction · 2 comments
- Jul 22, 2026feat: manifest validation — pl4nty/winget-extras1 reaction · 1 comment
- Apr 6, 2026Add dev environment setup with WinGet Configuration — microsoft/WSL1 reaction · 3 comments
- Feb 8, 2026New package: EPSON.PhotoPlus version 4.0.4.0 — microsoft/winget-pkgs1 reaction · 7 comments
On Hacker News · 9
- May 21, 2020Windows package manager does not permit opting out of telemetry428 points · 316 comments
- Oct 28, 2025Windows package manager is down13 points
- May 19, 2020Windows Package Manager (Winget)7 points · 1 comment
- Nov 7, 2022Failed in attempting to update the source: winget3 points
- May 28, 2020Microsoft issue: please donate to AppGet3 points
4 more on Hacker News
- May 21, 2021Windows Package Manager v0.4.11391 Preview2 points
- Jun 17, 2020Windows Package Manager CLI (a.k.a. Winget)2 points · 1 comment
- May 20, 2020Why is that called “package manager”?2 points · 1 comment
- May 20, 2020Winget – Windows Package Manager CLI1 point
On Bluesky · 4
- Feb 1, 2024did you know that there are Linux- and Homebrew-style package management solutions for Windows? Here are a few I have had positive… — @slightlyflightyone.bsky.social10 likes and reposts · 1 reply
- Dec 6, 2024Terminal is a very powerful CLI for Windows. Has tabs, each tab can run a different interpreter (PowerShell, cmd.exe, bash, etc)… — @dustin.nz4 likes and reposts · 1 reply
- Jul 13, 2026It's come stock since windows 10. It's also one of Microsoft's open source projects like PowerShell. github.com/microsoft/wi... And since… — @jeff.bsky.higgy.social1 likes and repost · 1 reply
- Sep 12, 2024winget has improved heaps over the past 12 months. Ongoing development. For browsers, MS & FOSS stuff it's awesome. There are a LOT of… — @marcoostini.bsky.social1 likes and repost
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this copilot-instructions.md into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Use a configuration file in .config as in winget configure .config/configuration.winget (alternatives provided for other VS SKUs).
- Very specific: line 23
Run vcpkg integrate install from Developer Command Prompt
- Very specific: line 39
Run from command line: wingetdev
- Distinctive: line 84
Search, match, and correlation logic
- Very specific: line 152
Use Windows-style paths with backslashes (\)
- Very specific: line 163
Follow existing code style (see stylecop.json)
- Distinctive: line 168
Before filing an issue, search existing open and closed issues for duplicates.
- Very specific: line 169
Use the GitHub issue forms in .github/ISSUE_TEMPLATE/.
- Distinctive: line 172
Keep issue bodies concise and evidence-based.
- Very specific: line 173
Before opening a pull request, review CONTRIBUTING.md, follow the PR template, keep the change focused, and summarize validation performed.
- Very specific: line 198
Every string that could be misunderstood without context should have a <comment>.
- Very specific: line 203
Changing only a
<comment>: does NOT trigger retranslation.
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
WinGet CLI Development Guide
Project Overview
This is the Windows Package Manager (WinGet) CLI client - a native Windows application for discovering and installing packages. The codebase consists of:
- C++/WinRT client (
src/AppInstallerCLI*) - The main CLI and core logic - COM API (
src/Microsoft.Management.Deployment) - Public Windows Runtime API for programmatic access - PowerShell modules (
src/PowerShell) - Microsoft.WinGet.Client and Microsoft.WinGet.Configuration cmdlets - Configuration system - DSC-based system configuration using WinGet
Building, Testing, and Running
Initial Setup
Use a configuration file in .config as in winget configure .config/configuration.winget (alternatives provided for other VS SKUs).
Manual steps:
- Install Visual Studio 2022 with required workloads (see
.vsconfig) - Install Windows SDK 10.0.26100:
winget install Microsoft.WindowsSDK.10.0.26100 - Enable developer mode in Windows
- Run
vcpkg integrate installfrom Developer Command Prompt
Building
Open src\AppInstallerCLI.sln in Visual Studio and build the solution (Ctrl+Shift+B) or use msbuild.exe to build from the command line.
The solution uses:
- MSBuild
- vcpkg for C++ dependencies
- NuGet for C++ and .NET dependencies
CI uses /p:PreferredToolArchitecture=x64 to avoid 32-bit linker memory limits without changing the target architecture. Use the same setting for command-line Release builds.
Running/Debugging
- Deploy solution: Build > Deploy Solution
- Run from command line:
wingetdev - For debugging:
- Right-click
AppInstallerCLIPackage> Properties > Debug tab - Set Debugger type to "Native Only" for both Application and Background task processes
- Select "Do not launch, but debug my code when it starts"
- Press F5 and run
wingetdevin a separate terminal
- Right-click
Entry point: src/AppInstallerCLI/main.cpp
Testing
C++ Unit Tests (Catch2)
Located in AppInstallerCLITests project. After building:
# Run all tests
src\<ARCH>\<Debug|Release>\AppInstallerCLITests\AppInstallerCLITests.exe
# Run specific test
src\<ARCH>\<Debug|Release>\AppInstallerCLITests\AppInstallerCLITests.exe TestName
# Available options
AppInstallerCLITests.exe --help.NET Tests
Microsoft.WinGet.UnitTests- PowerShell module testsMicrosoft.Management.Configuration.UnitTests- Configuration system testsWinGetUtilInterop.UnitTests- Interop layer tests
E2E Tests
AppInstallerCLIE2ETests project contains end-to-end integration tests.
Architecture
Core Components
AppInstallerCLICore - Core CLI logic organized around:
- ExecutionContext: State container that flows through workflows. Contains arguments, reporter, flags, and data (ExecutionContextData.h)
- Workflows: Composable functions that take ExecutionContext and perform operations (e.g., InstallFlow, UpdateFlow, SearchFlow)
- Commands: Parse arguments and orchestrate workflows
- Reporter: Handles all user output (ExecutionReporter.h)
AppInstallerRepositoryCore - Package source abstraction:
- Interfaces for different source types (REST, SQLite index, Microsoft Store, composite)
- Search, match, and correlation logic
- Package version selection and dependencies
AppInstallerCommonCore - Shared utilities:
- Manifest parsing (YAML/JSON)
- Settings and group policy
- Telemetry and logging
- HTTP client, downloader, archive handling
Microsoft.Management.Deployment - COM API surface:
- IDL definitions in
PackageManager.idl - WinRT projections for external consumption
- Used by PowerShell modules and third-party integrations
AppInstallerCLIPackage - Dev MSIX package definition:
- Models the release package definition as closely as possible.
- Contains localized string resources at src\AppInstallerCLIPackage\Shared\Strings\en-us\winget.resw
Key Patterns
Workflow Pattern: Functions that operate on ExecutionContext:
void WorkflowTask(Execution::Context& context)
{
// Check if already terminated
AICLI_RETURN_IF_TERMINATED(context);
// Access data
auto& data = context.Get<Data::Installer>();
// Report to user
context.Reporter.Info() << "Doing something";
// Store data for next workflow
context.Add<Data::SomeResult>(result);
// Terminate on error
if (failed)
{
AICLI_TERMINATE_CONTEXT(HRESULT);
}
}Source Composition: Multiple package sources can be composed:
- CompositeSource combines multiple sources with conflict resolution
- Installed source tracks locally installed packages
- Available sources provide packages to install
Manifest Schema: Package manifests use versioned YAML schemas:
- Schema definitions in
schemas/JSON/manifests/ - Parsing in
AppInstallerCommonCore/Manifest/ - Multi-file manifests: installer, locale, version, defaultLocale
Naming Conventions
- Namespace structure:
AppInstaller::<Area>[::<Subarea>]AppInstaller::CLI::Execution- CLI execution contextAppInstaller::CLI::Workflow- Workflow functionsAppInstaller::Repository- Repository/source logicAppInstaller::Manifest- Manifest typesAppInstaller::Settings- User/admin settings
- Macros: Prefixed with
AICLI_for CLI,WINGET_for general - Data keys: ExecutionContextData uses enum keys to type-safely store/retrieve data
Windows-Specific Considerations
- Use Windows-style paths with backslashes (
\) - Leverage WinRT APIs via C++/WinRT projections
- COM threading models matter - client uses multi-threaded apartment (MTA)
- Package deployment uses Windows App SDK / MSIX infrastructure
- Requires Windows 10 1809+ (build 17763)
Contributing
- Review
CONTRIBUTING.mdfor workflow - File/discuss issues before starting work
- Specs required for features (stored in
doc/specs/); see.github/instructions/specs.instructions.mdfor detailed guidance - Follow existing code style (see
stylecop.json) - CI runs on Azure Pipelines (
azure-pipelines.yml)
Issues and Pull Requests
- Before filing an issue, search existing open and closed issues for duplicates.
- Use the GitHub issue forms in
.github/ISSUE_TEMPLATE/; do not file a blank issue unless a maintainer explicitly asks for one. - Bug reports should include the form fields for relevant area, command if applicable, brief description, steps to reproduce, expected behavior, actual behavior, and environment.
- Feature requests should include the form fields for relevant area, feature or enhancement description, and proposed technical implementation details when known.
- Keep issue bodies concise and evidence-based. Do not paste large speculative patches into issue bodies; open a pull request or link a branch when code is available.
- Before opening a pull request, review
CONTRIBUTING.md, follow the PR template, keep the change focused, and summarize validation performed. - AI assistance is allowed, but contributors are fully accountable for AI-assisted output as if they wrote it themselves.
- Unless explicitly directed otherwise, confirm with the user that they have reviewed the submission.
Useful Commands
# Get WinGet client info
wingetdev --info
# Show experimental features
wingetdev features
# Check sources
wingetdev source listLocalization
Source of truth
The English resource file src\AppInstallerCLIPackage\Shared\Strings\en-us\winget.resw is the only file contributors should edit for string changes. It feeds the Microsoft localization pipeline.
The files under Localization\Resources\<locale>\ are automatically synced from Microsoft's internal localization system and must not be edited. Any manual edits will be overwritten on the next sync.
Every string that could be misunderstood without context should have a <comment>.
Triggering retranslation
- Changing a string's
<value>automatically queues it for retranslation on the next localization sync. - Changing only a
<comment>does NOT trigger retranslation. Comments improve future translations but do not fix existing ones.
To fix an existing bad translation, a bug has to be filed internally with the localization team.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

