Skip to main content
Version: Next

choco CLI reference

ModularPipelines.Chocolatey provides strongly typed access to the choco CLI.

Executable prerequisite

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

Follow the executable's official documentation for installation instructions.

Package installation

dotnet add package ModularPipelines.Chocolatey

Resolve the service with context.Tools.Choco. For projects older than C# 14, import ModularPipelines.Chocolatey.Extensions and use the context.Choco() extension method as a compatibility fallback.

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 choco = context.Tools.Choco;

Commands

CLI commandOptions record
choco apikeyChocoApikeyOptions
choco cacheChocoCacheOptions
choco configChocoConfigOptions
choco exportChocoExportOptions
choco featureChocoFeatureOptions
choco featuresChocoFeaturesOptions
choco findChocoFindOptions
choco infoChocoInfoOptions
choco installChocoInstallOptions
choco licenseChocoLicenseOptions
choco listChocoListOptions
choco newChocoNewOptions
choco outdatedChocoOutdatedOptions
choco packChocoPackOptions
choco pinChocoPinOptions
choco pushChocoPushOptions
choco ruleChocoRuleOptions
choco searchChocoSearchOptions
choco setapikeyChocoSetapikeyOptions
choco sourceChocoSourceOptions
choco sourcesChocoSourcesOptions
choco supportChocoSupportOptions
choco templateChocoTemplateOptions
choco templatesChocoTemplatesOptions
choco uninstallChocoUninstallOptions
choco unpackselfChocoUnpackselfOptions
choco upgradeChocoUpgradeOptions