Skip to main content

pnpm CLI reference

ModularPipelines.Node provides strongly typed access to the pnpm CLI.

Executable prerequisite​

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

Follow the executable's official documentation for installation instructions.

Package installation​

dotnet add package ModularPipelines.Node

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

Module example​

using ModularPipelines;
using ModularPipelines.Node.Enums;
using ModularPipelines.Node.Options;

public class RunCommandModule : Module<CommandResult>
{
protected override async Task<CommandResult> ExecuteAsync(
IModuleContext context,
CancellationToken cancellationToken)
{
return await context.Tools.Pnpm.AuditAsync(
new PnpmAuditOptions()
{
AuditLevel = PnpmAuditAuditLevel.High,
},
cancellationToken: cancellationToken);
}
}

Global options​

Global options are rendered after the selected subcommand.

CLI optionPropertyAvailabilityDescription
--colorColorAll editionsForce colored output
--dirDirAll editionsSet working directory. Accepted anywhere on the command line, before or after the subcommand, like every other rc-option [default: .]
--http-proxyHttpProxyAll editionsProxy for HTTP registry and tarball requests
--https-proxyHttpsProxyAll editionsProxy for HTTPS registry and tarball requests
--ignore-workspaceIgnoreWorkspaceAll editionsRun as if the project were standalone, ignoring any pnpm-workspace.yaml above it
--loglevelLoglevelAll editionsWhat level of logs to print. silent selects the silent reporter over any --reporter choice; the other levels cap the default reporter's output
--no-progressNoProgressAll editionsDisable dependency and download progress output
--no-proxyNoProxyAll editionsHosts that bypass configured proxies
--npmrc-auth-fileNpmrcAuthFileAll editionsPath to an .npmrc to read auth settings from, overriding the default ~/.npmrc [alias: --userconfig]
--registryRegistryAll editionsBase URL of the npm registry to resolve and fetch packages from. Universal rc-option: accepted on every command and layered onto the config like --config.registry=&lt;url&gt;. Commands that expose their own --registry still read the same value
--reporterReporterAll editionsReporter output format
--state-dirStateDirAll editionsDirectory in which pnpm persists machine-local state
--store-dirStoreDirAll editionsDirectory in which the package store is created. Relative paths are resolved from the workspace root, or from --dir outside a workspace
--use-stderrUseStderrAll editionsDivert the reporter's output to stderr, leaving stdout for the command's own result
--workspace-packagesWorkspacePackagesAll editionsGlob patterns selecting the workspace's projects, overriding the packages field of pnpm-workspace.yaml. Repeat to add more
--workspace-rootWorkspaceRootAll editionsRun the command on the root workspace project
--yesYesAll editionsAutomatically answer yes to prompts

Intentionally excluded commands​

CLI commandReason
pnpm audit signaturespnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.
pnpm stage approvepnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.
pnpm stage downloadpnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.
pnpm stage listpnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.
pnpm stage publishpnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.
pnpm stage rejectpnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.
pnpm stage viewpnpm 12.4.1 no longer lists this path in a Commands section or exposes a distinct child synopsis. The parent command documents [PARAMS]... instead; use its generated Params operand.

Commands​

CLI commandOptions record
pnpm accessPnpmAccessOptions
pnpm addPnpmAddOptions
pnpm approvePnpmApproveOptions
pnpm approve-buildsPnpmApproveBuildsOptions
pnpm auditPnpmAuditOptions
pnpm bugsPnpmBugsOptions
pnpm cachePnpmCacheOptions
pnpm cache deletePnpmCacheDeleteOptions
pnpm cache listPnpmCacheListOptions
pnpm cache list-registriesPnpmCacheListRegistriesOptions
pnpm cache pathPnpmCachePathOptions
pnpm cache prunePnpmCachePruneOptions
pnpm cache viewPnpmCacheViewOptions
pnpm cat-filePnpmCatFileOptions
pnpm cat-indexPnpmCatIndexOptions
pnpm changePnpmChangeOptions
pnpm ciPnpmCiOptions
pnpm cleanPnpmCleanOptions
pnpm configPnpmConfigOptions
pnpm config deletePnpmConfigDeleteOptions
pnpm config getPnpmConfigGetOptions
pnpm config listPnpmConfigListOptions
pnpm config setPnpmConfigSetOptions
pnpm createPnpmCreateOptions
pnpm dedupePnpmDedupeOptions
pnpm deployPnpmDeployOptions
pnpm deprecatePnpmDeprecateOptions
pnpm dist-tagPnpmDistTagOptions
pnpm dlxPnpmDlxOptions
pnpm docsPnpmDocsOptions
pnpm doctorPnpmDoctorOptions
pnpm editPnpmEditOptions
pnpm execPnpmExecOptions
pnpm fetchPnpmFetchOptions
pnpm find-hashPnpmFindHashOptions
pnpm getPnpmGetOptions
pnpm ignored-buildsPnpmIgnoredBuildsOptions
pnpm importPnpmImportOptions
pnpm initPnpmInitOptions
pnpm installPnpmInstallOptions
pnpm install-testPnpmInstallTestOptions
pnpm lanePnpmLaneOptions
pnpm licensesPnpmLicensesOptions
pnpm linkPnpmLinkOptions
pnpm listPnpmListOptions
pnpm llPnpmLlOptions
pnpm loginPnpmLoginOptions
pnpm logoutPnpmLogoutOptions
pnpm outdatedPnpmOutdatedOptions
pnpm ownerPnpmOwnerOptions
pnpm packPnpmPackOptions
pnpm pack-appPnpmPackAppOptions
pnpm patchPnpmPatchOptions
pnpm patch-commitPnpmPatchCommitOptions
pnpm patch-removePnpmPatchRemoveOptions
pnpm peersPnpmPeersOptions
pnpm permissionsPnpmPermissionsOptions
pnpm permissions approvePnpmPermissionsApproveOptions
pnpm permissions listPnpmPermissionsListOptions
pnpm pingPnpmPingOptions
pnpm pipelinePnpmPipelineOptions
pnpm pkgPnpmPkgOptions
pnpm pkg deletePnpmPkgDeleteOptions
pnpm pkg fixPnpmPkgFixOptions
pnpm pkg getPnpmPkgGetOptions
pnpm pkg setPnpmPkgSetOptions
pnpm prefixPnpmPrefixOptions
pnpm profilePnpmProfileOptions
pnpm prunePnpmPruneOptions
pnpm publishPnpmPublishOptions
pnpm purgePnpmPurgeOptions
pnpm rbPnpmRbOptions
pnpm rebuildPnpmRebuildOptions
pnpm recursivePnpmRecursiveOptions
pnpm removePnpmRemoveOptions
pnpm repoPnpmRepoOptions
pnpm restartPnpmRestartOptions
pnpm runPnpmRunOptions
pnpm runtimePnpmRuntimeOptions
pnpm sbomPnpmSbomOptions
pnpm searchPnpmSearchOptions
pnpm self-updatePnpmSelfUpdateOptions
pnpm setPnpmSetOptions
pnpm set-scriptPnpmSetScriptOptions
pnpm setupPnpmSetupOptions
pnpm shimPnpmShimOptions
pnpm stagePnpmStageOptions
pnpm starPnpmStarOptions
pnpm starsPnpmStarsOptions
pnpm startPnpmStartOptions
pnpm stopPnpmStopOptions
pnpm storePnpmStoreOptions
pnpm store addPnpmStoreAddOptions
pnpm store pathPnpmStorePathOptions
pnpm store prunePnpmStorePruneOptions
pnpm store statusPnpmStoreStatusOptions
pnpm tasksPnpmTasksOptions
pnpm tasks statusPnpmTasksStatusOptions
pnpm teamPnpmTeamOptions
pnpm testPnpmTestOptions
pnpm tokenPnpmTokenOptions
pnpm undeprecatePnpmUndeprecateOptions
pnpm unlinkPnpmUnlinkOptions
pnpm unpublishPnpmUnpublishOptions
pnpm unstarPnpmUnstarOptions
pnpm updatePnpmUpdateOptions
pnpm versionPnpmVersionOptions
pnpm viewPnpmViewOptions
pnpm whoamiPnpmWhoamiOptions
pnpm whyPnpmWhyOptions
pnpm withPnpmWithOptions
pnpm xmasPnpmXmasOptions