Convert Figma logo to code with AI

microsoft logowinget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).

22,942
1,424
22,942
1,036

Top Related Projects

10,205

Chocolatey - the package manager for Windows

20,866

A command-line installer for Windows.

The most customisable and low-latency cross platform/shell prompt renderer

94,862

The new Windows Terminal and the original Windows console host, all in the same place!

PowerShell for every system!

25,810

Lovely console emulator package for Windows

Quick Overview

The microsoft/winget-cli repository is the official source for Windows Package Manager (winget). Winget is a command-line tool that enables users to discover, install, upgrade, remove, and configure applications on Windows 10 and Windows 11 operating systems. It aims to streamline the process of managing software on Windows machines.

Pros

  • Simplifies software management on Windows systems
  • Supports a wide range of applications and package sources
  • Integrates well with existing Windows infrastructure
  • Open-source project with active community involvement

Cons

  • Limited availability on older Windows versions
  • Some advanced features may require elevated privileges
  • Package repository is still growing and may not include all desired software
  • Learning curve for users unfamiliar with command-line tools

Getting Started

To get started with winget, follow these steps:

  1. Ensure you're running Windows 10 1709 (build 16299) or later.
  2. Open PowerShell or Command Prompt as an administrator.
  3. Install winget by running:
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
  1. Verify the installation by running:
winget --version
  1. To install an application, use:
winget install <app-name>

For example, to install Visual Studio Code:

winget install Microsoft.VisualStudioCode

For more detailed instructions and usage examples, refer to the official documentation on the GitHub repository.

Competitor Comparisons

10,205

Chocolatey - the package manager for Windows

Pros of Choco

  • Mature ecosystem with a larger package repository
  • Supports creating and managing package repositories
  • More advanced scripting capabilities for package installation

Cons of Choco

  • Requires elevated privileges for installation and usage
  • Slower package installation compared to Winget
  • More complex syntax for package management commands

Code Comparison

Choco:

choco install nodejs -y
choco upgrade all
choco uninstall firefox

Winget:

winget install Node.js
winget upgrade --all
winget uninstall Mozilla.Firefox

Summary

Choco is a more established package manager with a larger ecosystem and advanced features, but it requires elevated privileges and has a steeper learning curve. Winget, being newer and integrated with Windows, offers a simpler syntax and faster installations but currently has a smaller package repository.

Both tools serve similar purposes, allowing users to install, upgrade, and manage software packages from the command line. The choice between them often depends on specific needs, such as package availability, system requirements, and desired level of control over the installation process.

20,866

A command-line installer for Windows.

Pros of Scoop

  • More mature project with a larger community and package ecosystem
  • Portable installations by default, allowing for easy backup and transfer
  • Supports creating custom package repositories (buckets)

Cons of Scoop

  • Limited to command-line interface, less user-friendly for non-technical users
  • Lacks official support from Microsoft, potentially affecting long-term stability

Code Comparison

Scoop installation command:

iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

winget-cli installation (assuming Windows 10 1709 or later):

# No installation required, built into Windows

Additional Notes

Both Scoop and winget-cli aim to simplify package management on Windows. Scoop focuses on portable installations and developer tools, while winget-cli provides a more integrated Windows experience with official Microsoft support. The choice between the two depends on user preferences, technical expertise, and specific use cases.

The most customisable and low-latency cross platform/shell prompt renderer

Pros of oh-my-posh

  • Highly customizable prompt themes for various shells
  • Cross-platform support (Windows, macOS, Linux)
  • Active community and frequent updates

Cons of oh-my-posh

  • Requires additional setup and configuration
  • May impact terminal performance on slower systems
  • Limited to prompt customization, not a package manager

Code Comparison

oh-my-posh configuration example:

{
  "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
  "blocks": [
    {
      "type": "prompt",
      "alignment": "left",
      "segments": [
        {
          "type": "path",
          "style": "powerline",
          "powerline_symbol": "\uE0B0",
          "foreground": "#100e23",
          "background": "#91ddff",
          "properties": {
            "style": "folder"
          }
        }
      ]
    }
  ]
}

winget-cli usage example:

winget install Microsoft.VisualStudioCode
winget upgrade --all
winget uninstall Mozilla.Firefox
winget search "web browser"
winget list

While oh-my-posh focuses on enhancing the command-line prompt appearance and functionality across multiple shells, winget-cli serves as a package manager for Windows, allowing users to install, upgrade, and manage software packages. oh-my-posh offers greater customization for the prompt itself, but winget-cli provides broader system-wide package management capabilities.

94,862

The new Windows Terminal and the original Windows console host, all in the same place!

Pros of Terminal

  • More feature-rich and customizable user interface
  • Supports multiple tabs and panes for improved productivity
  • Offers extensive theming and appearance options

Cons of Terminal

  • Larger project scope and potentially more complex codebase
  • May require more system resources due to its graphical nature

Code Comparison

Terminal (C++):

void TerminalPage::_HandleOpenNewTabDropdown(const IInspectable& /*sender*/, const RoutedEventArgs& /*args*/)
{
    _OpenNewTabDropdown();
}

WinGet-CLI (C++):

void Execution::Context::Reporter::Info(const std::string& message) const
{
    m_reporter.Info(message);
}

Key Differences

  • Terminal focuses on providing a modern, feature-rich terminal experience
  • WinGet-CLI is primarily a package manager and command-line tool
  • Terminal has a more extensive UI component, while WinGet-CLI is mainly backend-focused
  • Terminal uses DirectX for rendering, whereas WinGet-CLI relies on standard console output

Use Cases

Terminal:

  • Advanced command-line users requiring a customizable interface
  • Developers working with multiple shells or command prompts simultaneously

WinGet-CLI:

  • System administrators managing software installations
  • Users seeking a streamlined way to install and manage applications

Both projects contribute to improving the Windows command-line experience, but they serve different primary purposes within the ecosystem.

PowerShell for every system!

Pros of PowerShell

  • More versatile and powerful scripting capabilities
  • Cross-platform support (Windows, macOS, Linux)
  • Extensive built-in cmdlets for system administration and automation

Cons of PowerShell

  • Steeper learning curve for beginners
  • Larger installation footprint
  • Can be overkill for simple package management tasks

Code Comparison

PowerShell example:

Get-WmiObject -Class Win32_Product | Where-Object {$_.Name -like "*Adobe*"} | Select-Object Name, Version

winget-cli example:

winget search Adobe
winget install Adobe.Acrobat.Reader.64-bit

Summary

PowerShell is a powerful scripting language and shell environment, offering extensive capabilities for system administration and automation across multiple platforms. winget-cli, on the other hand, is a lightweight package manager focused specifically on software installation and management for Windows.

While PowerShell provides more flexibility and control, winget-cli offers a simpler, more streamlined approach to package management. PowerShell requires more expertise but can handle complex tasks, whereas winget-cli is easier to use for basic software installation and updates.

Choose PowerShell for comprehensive scripting and system management needs, and winget-cli for quick and easy package management on Windows systems.

25,810

Lovely console emulator package for Windows

Pros of Cmder

  • Provides a full-featured console emulator with a rich UI and customization options
  • Includes built-in support for multiple shells (CMD, PowerShell, Git Bash)
  • Offers a portable version that can be run without installation

Cons of Cmder

  • Limited to console emulation and doesn't manage software installations
  • Requires manual updates and maintenance
  • May have a steeper learning curve for users new to console environments

Code Comparison

While a direct code comparison isn't particularly relevant due to the different nature of these projects, here's a brief example of how they might be used:

Winget-cli:

winget install -e --id Microsoft.VisualStudioCode

Cmder:

cmder /start powershell

Summary

Winget-cli is a package manager for Windows, focusing on software installation and management. Cmder, on the other hand, is a console emulator that enhances the command-line experience. While Winget-cli streamlines software management, Cmder provides a more feature-rich and customizable console environment. The choice between them depends on whether you need a package manager or an improved console experience.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

WinGet Icon Windows Package Manager

WinGet Client

winget install wingetcreate

If you are new to the Windows Package Manager, you might want to Explore the Windows Package Manager tool. The client has access to packages from two default sources. The first is "msstore" the Microsoft Store (free Apps rated "e" for everyone). The second is "winget" the WinGet community repository.

[!NOTE] Group policy may be configured and modify configured sources. Run winget --info to see any configured policies.

Installing The Client

[!NOTE] The client requires Windows 10 1809 (build 17763) or later at this time. Windows Server 2019 is not supported as the Microsoft Store is not available nor are updated dependencies. It may be possible to install on Windows Server 2022, this should be considered experimental (not supported) and requires dependencies to be manually installed as well.

Microsoft Store [Recommended]

The client is distributed within the App Installer package.

Development Releases

There are two methods to get development releases:

[!NOTE] It may take a few days to get the updated App Installer after you receive e-mail confirmation from joining the Windows Package Manager Insider program. If you decide to install the latest release from GitHub, and you have successfully joined the insider program, you will receive updates when the next development release has been published in the Microsoft Store.

Once you have received the updated App Installer from the Microsoft Store you should be able to execute winget features to see experimental features. Some users have reported issues with the client not being on their PATH.

Manually Update

The same Microsoft Store package will be made available via our Releases. Note that installing this package will give you the WinGet client, but it will not enable automatic updates from the Microsoft Store if you have not joined the Windows Package Manager Insider program.

[!NOTE] You may need to install the VC++ v14 Desktop Framework Package. This should only be necessary on older builds of Windows 10 and only if you get an error about missing framework packages.

Troubleshooting

Please read our troubleshooting guide.

Administrator Considerations

Installer behavior can be different depending on whether you are running WinGet with administrator privileges.

  • When running WinGet without administrator privileges, some applications may require elevation to install. When the installer runs, Windows will prompt you to elevate. If you choose not to elevate, the application will fail to install.

  • When running WinGet in an Administrator Command Prompt, you will not see elevation prompts if the application requires it. Always use caution when running your command prompt as an administrator, and only install applications you trust.

Build your own

You can also build the client yourself. While the client should be perfectly functional, we are not ready to provide full support for clients running outside of the official distribution mechanisms yet. Feel free to file an Issue, but know that it may get lower prioritization.

Build Status

Build Status

Windows Package Manager Release Roadmap

The plan for delivering the next Windows Package Manager release is described and included in our discussions, and will be updated as the project proceeds.

Overview of the Windows Package Manager

The Windows Package Manager is a tool designed to help you quickly and easily discover and install those packages that make your PC environment special. By using the Windows Package Manager, from one command, you can install your favorite packages:

winget install <package>

Overview

Client Repository

This winget-cli repository includes the source code designed to build the client. You are encouraged to participate in the development of this client. We have plenty of backlog features in our Issues. You can upvote the ones you want, add more, or even get started on one.

Sources

The client is built around the concept of sources; a set of packages effectively. Sources provide the ability to discover and retrieve the metadata about the packages so that the client can act on it.

Building the client

  1. Clone the repository
  2. Configure your system, please use the configuration file. This can be applied by either:
    • Dev Home's machine configuration tool
    • WinGet configuration. Run winget configure .configurations/configuration.dsc.yaml from the project root so relative paths resolve correctly.
  3. Run vcpkg integrate install from the Developer Command Prompt for VS 2022. This is a one-time setup step until the configuration file in step 2 is updated to work with vcpkg setup.

Prerequisites

[!NOTE] You can also get it through winget install Microsoft.WindowsSDK --version 10.0.22000.832 (use --force if you have a newer version installed) or via Visual Studio > Get Tools and Features > Individual Components > Windows 10 SDK (10.0.22000.0)

Building

Open winget-cli\src\AppInstallerCLI.sln in Visual Studio and build. We currently only build using the solution; command-line methods of building a VS solution should work as well. After the build finishes, deploy the solution from Build > Deploy Solution. You can then run the client from the command line using wingetdev.

Credit

We would like to thank Keivan Beigi (@kayone) for his work on AppGet which helped us with the initial project direction for Windows Package Manager.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and do, actually grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. More information is available in our CONTRIBUTING.md file.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, please refer to the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Data/Telemetry

The winget.exe client is instrumented to collect usage and diagnostic (error) data and sends it to Microsoft to help improve the product.

If you build the client yourself the instrumentation will not be enabled and no data will be sent to Microsoft.

The winget.exe client respects machine-wide privacy settings and users can opt out on their device, as documented in the Microsoft Windows privacy statement here. In addition, you may also explicitly block telemetry using settings

In short, to opt out, do one of the following:

Windows 11: Go to Start, then select Settings > Privacy & Security > Diagnostics & feedback > Diagnostic data and unselect Send optional diagnostic data.

Windows 10: Go to Start, then select Settings > Privacy > Diagnostics & feedback, and select Required diagnostic data.

See the privacy statement for more details.