Guest Christopher Nguyen Posted May 28 Posted May 28 We are pleased to announce the release of [iCODE]WinGet.CommandNotFound[/iCODE]! 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! [HEADING=1]Requirements[/HEADING] The [iCODE]Microsoft.WinGet.CommandNotFound[/iCODE] module is built on the [iCODE]IFeedbackProvider[/iCODE] 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 [iCODE]Microsoft.WinGet.Client[/iCODE] version 1.8.1133 or higher to receive suggestions. If [iCODE]PSFeedbackProvider[/iCODE] and [iCODE]PSCommandNotFoundSuggestion[/iCODE] are not yet enabled, then you can run the following commands in PowerShell: Enable-ExperimentalFeature PSFeedbackProvider Enable-ExperimentalFeature PSCommandNotFoundSuggestion You will only need to run these commands once and they will enable [iCODE]PSFeedbackProvider[/iCODE] and [iCODE]PSCommandNotFoundSuggestion[/iCODE] in your next session. [HEADING=1]Installation[/HEADING] To install the WinGet CommandNotFound module, enter the following in PowerShell 7.4+: Install-PSResource -Name Microsoft.WinGet.CommandNotFound [HEADING=1]Setup[/HEADING] To load this module whenever a PowerShell session loads, you will need to add the following to your PowerShell profile: Import-Module Microsoft.WinGet.CommandNotFound You can enter [iCODE]code $profile[/iCODE] or [iCODE]notepad $profile[/iCODE] in PowerShell to open up your PowerShell profile in Visual Studio Code or Notepad respectively. [HEADING=1]Thank you![/HEADING] 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... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.