Skip to main content
Version: Next

yarn CLI reference

ModularPipelines.Yarn provides strongly typed access to the yarn CLI.

Executable prerequisite

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

Follow the executable's official documentation for installation instructions.

Package installation

dotnet add package ModularPipelines.Yarn

Resolve the service with context.Tools.Yarn. For projects older than C# 14, import ModularPipelines.Yarn.Extensions and use the context.Yarn() 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 yarn = context.Tools.Yarn;

Commands

CLI commandOptions record
yarn addYarnAddOptions
yarn binYarnBinOptions
yarn cache cleanYarnCacheCleanOptions
yarn configYarnConfigOptions
yarn config getYarnConfigGetOptions
yarn config setYarnConfigSetOptions
yarn config unsetYarnConfigUnsetOptions
yarn constraintsYarnConstraintsOptions
yarn constraints queryYarnConstraintsQueryOptions
yarn constraints sourceYarnConstraintsSourceOptions
yarn dedupeYarnDedupeOptions
yarn execYarnExecOptions
yarn explainYarnExplainOptions
yarn infoYarnInfoOptions
yarn initYarnInitOptions
yarn installYarnInstallOptions
yarn linkYarnLinkOptions
yarn npm auditYarnNpmAuditOptions
yarn npm infoYarnNpmInfoOptions
yarn npm loginYarnNpmLoginOptions
yarn npm logoutYarnNpmLogoutOptions
yarn npm publishYarnNpmPublishOptions
yarn npm stage approveYarnNpmStageApproveOptions
yarn npm stage listYarnNpmStageListOptions
yarn npm stage rejectYarnNpmStageRejectOptions
yarn npm tag listYarnNpmTagListOptions
yarn npm whoamiYarnNpmWhoamiOptions
yarn packYarnPackOptions
yarn patchYarnPatchOptions
yarn patch-commitYarnPatchCommitOptions
yarn plugin checkYarnPluginCheckOptions
yarn plugin importYarnPluginImportOptions
yarn plugin import from sourcesYarnPluginImportFromSourcesOptions
yarn plugin listYarnPluginListOptions
yarn plugin runtimeYarnPluginRuntimeOptions
yarn removeYarnRemoveOptions
yarn runYarnRunOptions
yarn set versionYarnSetVersionOptions
yarn set version from sourcesYarnSetVersionFromSourcesOptions
yarn stageYarnStageOptions
yarn unlinkYarnUnlinkOptions
yarn unplugYarnUnplugOptions
yarn upYarnUpOptions
yarn upgrade-interactiveYarnUpgradeInteractiveOptions
yarn version applyYarnVersionApplyOptions
yarn version checkYarnVersionCheckOptions
yarn whyYarnWhyOptions
yarn workspaces focusYarnWorkspacesFocusOptions
yarn workspaces foreachYarnWorkspacesForeachOptions
yarn workspaces listYarnWorkspacesListOptions