Microsoft has released version 1.0 of the Windows Package Manager (winget), providing tools for installing applications via the command line. The code is written in C++ and distributed under the MIT license. Packages are installed from a repository supported with community involvement. Unlike installing programs from the Microsoft Store, winget allows applications to be installed without unnecessary marketing and advertisements.
Windows Package Manager 1.0 is positioned as the first fully functional release, featuring input autocomplete support, builds for different architectures, installation in the context of the entire system and individual users, group policies, a REST API for repository access, delta updates, a manifest generation interface, and application distribution for control panel. Future plans include support for various release categories (releases, beta versions), package sets, dependency management, installation files in zip format (in addition to msi), installation from the Microsoft Store, integration with PowerShell, installation of web applications (PWA), and fonts. The command syntax and logic of winget are similar to package managers like apt and dnf.
The first release includes the following commands:
- install — install packages;
- show — display package information;
- source — manage package download sources;
- search — search for packages;
- list — show a list of installed packages;
- upgrade — update specified packages;
- uninstall — remove installed packages;
- hash — work with verification hashes;
- validate — check the integrity of the manifest;
- settings — modify settings;
- features — show the status of experimental features;
- export — export the list of installed packages;
- import — import the list of installed packages.
Package parameters are defined through manifest files in YAML format. To simplify the creation of manifest files, the winget-create toolkit is provided. The executable files themselves are stored in the Microsoft Store or directly on servers the main projects; the repository serves merely as an index, and the manifest points to an external msi file (such as hosted on Microsoft Store, GitHub, or the project site). SHA256 hash is used for integrity control and protection against tampering.
Currently, more than 1400 packages are available in the repository, including projects like 7Zip, OpenJDK, iTunes, Chrome, Blender, DockerDesktop, Dropbox, Evernote, FreeCAD, GIMP, Git, Maxima, Inkscape, Nmap, Firefox, Thunderbird, Skype, Edge, VisualStudio, KiCad, LibreOffice, Minecraft, Opera, Putty, TelegramDesktop, Steam, WhatsApp, Wireguard, and Wireshark, as well as a large number of Microsoft applications. The creation of private repositories is supported, and interaction with them is done through the REST API.
Using winget requires a Windows Insider build with Developer Mode enabled. Soon, winget will be delivered by default for users of Windows 10 version 1809 and newer releases. By default, telemetry is enabled when installing ready builds in the package manager, collecting data about user interaction with the package manager and any errors that occur. To disable telemetry, you can select the 'Basic' option in 'Settings > Privacy > Diagnostics & feedback' or build winget from source.
Source: opennet.ru
