💾 Archived View for talon.computer › log › what-is-winget captured on 2023-09-28 at 15:41:48. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2023-09-08)
-=-=-=-=-=-=-
2023-08-26
One of the beautiful things about Linux operating systems is the package manager. My preferred flavor is Arch linux, because of the package manager. However, if you are not familiar with the command-line or Linux your idea of installing an application may be dramatically different.
read about pacman, the Arch linux package manager
Until recently on Windows one would find a link on the internet for the .exe installer, download that and follow the prompts until you were able to launch the application. If a new update came out that individual app might have its own way of updating itself, otherwise you have to follow the project and know when to get the latest .exe and install that.
This becomes increasingly painful as you add new software to your device. Knowing where to download that .exe usually boils down to searching for the name of the application and "download" which is way more faith in SEO and search engines at large than one should reasonably have... And having to track software projects so closely is tedious, it would be nice if every app could update itself for you when it knows there's a new release in the way that only some do. Or... there could be one application that you use to keep track of all the others which is what happened in Windows 10.
introducing the Microsft Store
You can, and people still (mostly) often do, download apps the other way but the unique advantage of the Microsoft Store is that it does all the management for you... it is a package manager. A really awful package manager. At one point it tried to sell you books you can no longer read and songs you didn't actually own. You may be thinking this sounds a lot like the Apple App Store and this is true, they are analogous to one another but Microsoft did it later and worse.
So this works and sorta makes things easier however I'm allergic to graphic user interfaces, especially when it comes to system administration. I want all my maintenance routines to be scriptable, even if it never gets scripted. But recently "on Windows 11 and modern versions of Windows 10 as a part of the App Installer" there is a new command-line tool available called winget. The App Installer is available from the Microsoft Store (install an application to install applications with your application installer, how do you get your application installer? probably another application). So if you're lucky enough to have a modern machine with the latest OS it's now possible to manage Windows packages, in a native way, from the command-line.
"winget update --all" seems to pickup on applications you may have manually downloaded as well as from the Microsoft Store, so it is completely supplemental which is rad. To find apps "winget search" is effective, and to install them "winget install" accepts --id and --source flags, by default the source is winget but msstore is another common option. The id and available sources are presented in the search results. I'm not gonna cover the whole --help menu here but a final note is that you can list all the applications you have installed with "winget list" and remove them with "winget remove". Oh, one more thing! --include-unknown can pickup on packages that are normally not touched.
Maybe you already know of the very awesome and popular command-line tool "scoop" and have been wondering how/if it remains useful as winget grows into a stronger option and adopts many of the features of scoop? I was also wondering this... They both accomplish essentially the same end-goal in deeply different ways. In my opinion the path of least resistance is winget, if you can use it. But scoop is still very cool for what it does. And due to the way scoop works you can use both at the same time! At the time of writing scoop has a more comprehensive repository so for what's not available via winget I use scoop.
This discussion on GitHub describes the differences well.
You could think of winget as "the agent to download and run the installer". That's all, everything else is the same. It just invokes the GUI installer. All of the things related to installation - like installing to the default location, creating registry keys, adding binaries and shortcuts etc. is done by the installer itself, winget plays no role.
Scoop is completely different. It offers full control, extracts and installs to a common (and configurable) location, manages persistent data etc. It is mostly self-contained - no part outside the Scoop directory is modified - and it does not touch the registry and any machine-specific settings.