WinGet.CommandNotFound

We are pleased to announce the release of WinGet.CommandNotFound! This PowerShell module is a feedback provider plugin for PowerShell that leverages the Windows Package Manager to provide suggestions for packages to install when a native command cannot be found. The command-line predictor feature in PowerShell enables this module to display WinGet packages as predictive suggestions.

This module was originally incubated as a utility in PowerToys. Thanks to the help of the PowerShell and PowerToys community, we got lots of positive feedback to turn this PowerToys utility into a real PowerShell module! 1f642.png

Microsoft.WinGet.CommandNotFound.png

Requirements​


The Microsoft.WinGet.CommandNotFound module is built on the IFeedbackProvider interface, which is available with PowerShell 7.4.0-preview.2 or above. To display prediction suggestions, you need PSReadLine 2.2.6 or above.

You will also need Microsoft.WinGet.Client version 1.8.1133 or higher to receive suggestions.

If PSFeedbackProvider and PSCommandNotFoundSuggestion are not yet enabled, then you can run the following commands in PowerShell:

Code:
Enable-ExperimentalFeature PSFeedbackProvider
Enable-ExperimentalFeature PSCommandNotFoundSuggestion

You will only need to run these commands once and they will enable PSFeedbackProvider and PSCommandNotFoundSuggestion in your next session.

Installation​


To install the WinGet CommandNotFound module, enter the following in PowerShell 7.4+:

Code:
Install-PSResource -Name Microsoft.WinGet.CommandNotFound

Setup​


To load this module whenever a PowerShell session loads, you will need to add the following to your PowerShell profile:

Code:
Import-Module Microsoft.WinGet.CommandNotFound

You can enter code $profile or notepad $profile in PowerShell to open up your PowerShell profile in Visual Studio Code or Notepad respectively.

Thank you!​


We would like to give a huge thanks to everyone that helped us incubate this feature in PowerToys and the PowerShell team for helping us push this to the PowerShell Gallery.

This module is also open-source so if you find any bugs or have an idea for a feature suggestion, then please visit GitHub - microsoft/winget-command-not-found: WinGet Command Not Found is a PowerShell 7 module to help you install missing packages. With this module, you will be recommended relevant WinGet packages whenever an unrecognized command is entered.

The post WinGet.CommandNotFound appeared first on Windows Command Line.

Continue reading...
 

Similar threads

D
Replies
0
Views
136
Demitrius Nelon
D
F
Replies
0
Views
16
fares elattar
F
C
Replies
0
Views
50
Christopher Nguyen
C
K
Replies
0
Views
36
Kayla Cinnamon
K
A
Replies
0
Views
39
Amanda Langowski
A
Back
Top Bottom