Jump to content
Microsoft Windows Bulletin Board

WinGet.CommandNotFound


Recommended Posts

Guest Christopher Nguyen
Posted

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! 1f642.png.c29534acffcfa2d72f57297ab8ec9256.png

 

Microsoft.WinGet.CommandNotFound.thumb.png.6f1d9c62044e516f60e1924dff389ca2.png

 

[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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...