Skip to main content
Version: Next

winget CLI reference

ModularPipelines.WinGet provides strongly typed access to the winget CLI.

Executable prerequisite

This package does not install the winget executable. Install it separately and ensure winget is available on PATH.

Follow the executable's official documentation for installation instructions.

Package installation

dotnet add package ModularPipelines.WinGet

Resolve the service with context.Tools.Winget. Projects using C# 13 or another .NET language can use context.Tools.Get<ModularPipelines.WinGet.Services.IWinget>() instead.

Module example

Resolve the service in a module, then select a command from the table below. A runnable example is omitted when no command has complete safety metadata:

var winget = context.Tools.Winget;

Commands

CLI commandOptions record
winget configureWingetConfigureOptions
winget configure exportWingetConfigureExportOptions
winget configure listWingetConfigureListOptions
winget configure showWingetConfigureShowOptions
winget configure testWingetConfigureTestOptions
winget configure validateWingetConfigureValidateOptions
winget downloadWingetDownloadOptions
winget dscv3WingetDscv3Options
winget dscv3 admin-settingsWingetDscv3AdminSettingsOptions
winget dscv3 packageWingetDscv3PackageOptions
winget dscv3 sourceWingetDscv3SourceOptions
winget dscv3 user-settings-fileWingetDscv3UserSettingsFileOptions
winget exportWingetExportOptions
winget featuresWingetFeaturesOptions
winget hashWingetHashOptions
winget importWingetImportOptions
winget installWingetInstallOptions
winget listWingetListOptions
winget mcpWingetMcpOptions
winget pinWingetPinOptions
winget pin addWingetPinAddOptions
winget pin listWingetPinListOptions
winget pin removeWingetPinRemoveOptions
winget pin resetWingetPinResetOptions
winget repairWingetRepairOptions
winget searchWingetSearchOptions
winget settingsWingetSettingsOptions
winget settings exportWingetSettingsExportOptions
winget settings resetWingetSettingsResetOptions
winget settings setWingetSettingsSetOptions
winget showWingetShowOptions
winget sourceWingetSourceOptions
winget source addWingetSourceAddOptions
winget source editWingetSourceEditOptions
winget source exportWingetSourceExportOptions
winget source listWingetSourceListOptions
winget source removeWingetSourceRemoveOptions
winget source resetWingetSourceResetOptions
winget source updateWingetSourceUpdateOptions
winget uninstallWingetUninstallOptions
winget upgradeWingetUpgradeOptions
winget validateWingetValidateOptions