winget-command-not-found
Copilot instructions61 starsChanged 7 months agoMITView on GitHub
Microsoft.WinGet.CommandNotFound is a PowerShell 7 feedback provider module that suggests WinGet packages when a native command isn't found, surfacing them via PowerShell's predictive IntelliSense (command-line predictor). If the module is already loaded in your session, start a fresh session with pwsh -NoProfile before importing a newly built copy.
The file
We split this copilot-instructions.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
Prefer the issue templates under .github/ISSUE_TEMPLATE/, which set the issue type and initial triage labels automatically.
≈ “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 Command Not Found Development Guide
Project Overview
Microsoft.WinGet.CommandNotFound is a PowerShell 7 feedback provider module that suggests WinGet packages when a native command isn't found, surfacing them via PowerShell's predictive IntelliSense (command-line predictor).
src/- C# implementation of the feedback provider/predictorWinGetCommandNotFoundFeedbackPredictor.cs- ImplementsIFeedbackProvider/predictor logic, queries WinGet for suggestions when a command isn't foundPooledPowerShellObjectPolicy.cs- Object pooling for PowerShell instances used to query WinGetValidateOS.psm1- OS/version validation helpersMicrosoft.WinGet.CommandNotFound.psd1- Module manifest
tools/helper.psm1- Build/dev helper functionsbuild.ps1/Microsoft.WinGet.CommandNotFound.build.ps1- Build entry points
Requirements
- PowerShell 7.4+ (built on the
IFeedbackProviderinterface) - PSReadLine 2.2.6+ for predictive suggestions
- Microsoft.WinGet.Client 1.11.460+
- Experimental features
PSFeedbackProviderandPSCommandNotFoundSuggestionmust be enabled (the latter is on by default in PowerShell 7.5+):Enable-ExperimentalFeature PSFeedbackProvider Enable-ExperimentalFeature PSCommandNotFoundSuggestion
Building, Testing, and Running
Setup
.\build.ps1 -BootstrapBuilding
.\build.ps1 -Configuration Debug # or -Configuration ReleaseRunning/Debugging
Import-Module .\src\bin\Debug\net8.0\Microsoft.WinGet.CommandNotFound.psd1If the module is already loaded in your session, start a fresh session with
pwsh -NoProfilebefore importing a newly built copy.
Architecture & Key Patterns
- Implements PowerShell's Subsystem Plugin Model — see How to create a feedback provider and How to create a command-line predictor.
- On a command-not-found event, the predictor shells out to WinGet (via a pooled PowerShell instance, see
PooledPowerShellObjectPolicy) to search for matching packages and surfaces install suggestions inline.
Contributing
- Prefer the issue templates under
.github/ISSUE_TEMPLATE/, which set the issue type and initial triage labels automatically. - Review the CLA requirements described in
README.md. - CI runs via Azure Pipelines (
.pipelines/).
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.

