aube add
- Usage:
aube add [FLAGS] [PACKAGES]… - Aliases:
a - Effect: modifies state
Add a dependency
Arguments
[PACKAGES]…— Package(s) to add
Flags
-D --save-dev— Add as dev dependency.-E --save-exact— Pin the exact resolved version (no^prefix).-g --global— Install the package globally.Installs into the aube/pnpm global directory and links its binaries into the global bin directory. Mirrors
pnpm add -g.-O --save-optional— Add as optional dependency.--allow-build=<PKG>— Pre-approve a dependency's lifecycle scripts as part of the add.Writes
allowBuilds: { <pkg>: true }into the workspace yaml (orpackage.json#aube.allowBuilds) before the install runs, so the named package'spreinstall/install/postinstallscripts execute on this invocation. Repeatable — pass the flag once per package. Mirrorspnpm add --allow-build=<pkg>.Conflicts with
--no-save, which only snapshotspackage.jsonand the lockfile and would leave an orphaned approval in the workspace yaml on restore. Also conflicts with--deny-buildfor the same package name.--allow-low-downloads— Bypass the similar-name, new-name, andlowDownloadThresholdconfirm prompts / refusals for this invocation.aube addlooks up each candidate's weekly download count and prompts (interactive) or fails (CI) when the count is belowlowDownloadThreshold, resembles a top-100,000 npm package, or is newer thanminimumPackageAge. The flag is intended for cases where you've already verified the package out-of-band. It does not affect the OSV malicious-package check, which remains a hard block.--dangerously-allow-all-builds— Allow every dependency's lifecycle scripts to run.Bypasses the
allowBuildsallowlist for this invocation. Do not use in CI. Mirrors pnpm's--dangerously-allow-all-builds.--deny-build=<PKG>— Mark a dependency's lifecycle scripts as reviewed and denied.Writes
allowBuilds: { <pkg>: false }into the workspace yaml (orpackage.json#aube.allowBuilds) before the install runs, so the named package's lifecycle scripts stay skipped without trippingstrictDepBuilds=true. Repeatable — pass the flag once per package.Conflicts with
--no-save, which only snapshotspackage.jsonand the lockfile and would leave an orphaned denial in the workspace yaml on restore. Also conflicts with--allow-buildfor the same package name and with--dangerously-allow-all-builds.--no-save— Install without persisting the dependency topackage.json.Snapshots
package.jsonand the lockfile, links the named packages intonode_modules, and then restores both files — so the dependency is usable for the current process but the project's committed state is untouched.Handy for one-off experiments and for scripts that install a tool transiently. Mirrors
pnpm add --no-save. Conflicts with-g/--global, which has to persist the install to its global manifest.--no-save-workspace-protocol— Inverse of--save-workspace-protocol.Forces the manifest specifier into a registry-style spec (
^<version>) for this invocation, even whenlinkWorkspacePackagesmatched a local sibling. The install pipeline still prefers the local workspace copy at resolve time — this flag only controls what's written topackage.json. Mirrorspnpm add --no-save-workspace-protocol.--save-catalog— Save the new dependency into the workspace's default catalog.Writes
catalog:intopackage.jsonand seeds/upserts the resolved range undercatalog:in the workspace yaml. Mirrorspnpm add --save-catalog.Workspace and aliased specs (
workspace:*,npm:,jsr:) are never catalogized — the manifest gets the original spec and the catalog yaml is left alone. If the package is already in the target catalog, the existing entry is preserved (never overwritten); the manifest then getscatalog:only when the existing entry is compatible with the user's range.Conflicts with
--no-save: catalog mutations write to the workspace yaml, which the--no-saverestore path doesn't snapshot — combining the two would silently leave an orphaned catalog entry behind.--save-catalog-name <NAME>— Save the new dependency into a named catalog.Writes the entry to
catalogs.<name>in the workspace yaml andcatalog:<name>intopackage.json. Same workspace/alias exclusions and--no-saveconflict as--save-catalog. Mirrorspnpm add --save-catalog-name=<name>.--save-peer— Add as a peer dependency (written topeerDependenciesin package.json).By convention you usually pair this with
--save-devso the peer is also installed for local development; that's what pnpm does.--save-workspace-protocol— Force the manifest specifier intoworkspace:form for this invocation, overridingsaveWorkspaceProtocolfrom the workspace yaml /.npmrc/ env.Only meaningful when
linkWorkspacePackages(or a workspace sibling already exists for the named package). With this flag the entry written topackage.jsonisworkspace:^(rolling) orworkspace:^<version>(pinned), depending on the resolvedsaveWorkspaceProtocolvalue.-w --workspace— Add the dependency to the workspace root'spackage.json.Applies regardless of the current working directory: walks up from cwd looking for
aube-workspace.yaml,pnpm-workspace.yaml, or apackage.jsonwith aworkspacesfield and runs the add against that directory.-W --ignore-workspace-root-check— Allowaddto run in a workspace root.By default aube refuses to add dependencies to the root
package.jsonof a workspace (a directory containingaube-workspace.yaml,pnpm-workspace.yaml, or apackage.jsonwith aworkspacesfield) because deps added there end up shared by every package and usually reflect a mistake. Pass this flag to opt in. Mirrorspnpm add -W.-h --help— Print help
Lockfile
--frozen-lockfile— Error if the lockfile drifts from package.json.--no-frozen-lockfile— Always re-resolve, even if the lockfile is up to date.--prefer-frozen-lockfile— Use the lockfile when fresh, re-resolve when stale.
Network
--fetch-retries <N>— Number of retry attempts for failed registry fetches.Overrides
fetchRetries/fetch-retriesfrom.npmrc/aube-workspace.yamlwhen set. Pair with--fetch-timeoutto fail fast in scripted test runs.--fetch-retry-factor <N>— Exponential backoff factor between retry attempts.Overrides
fetchRetryFactor/fetch-retry-factorfrom.npmrc/aube-workspace.yamlwhen set. Integer-only; fractional values like1.5are rejected.--fetch-retry-maxtimeout <MS>— Upper bound (ms) on the computed retry backoff.Overrides
fetchRetryMaxtimeout/fetch-retry-maxtimeoutfrom.npmrc/aube-workspace.yamlwhen set.--fetch-retry-mintimeout <MS>— Lower bound (ms) on the computed retry backoff.Overrides
fetchRetryMintimeout/fetch-retry-mintimeoutfrom.npmrc/aube-workspace.yamlwhen set.--fetch-timeout <MS>— Per-request HTTP timeout in milliseconds.Overrides
fetchTimeout/fetch-timeoutfrom.npmrc/aube-workspace.yamlwhen set. Covers the whole request (headers and body together).--registry <URL>— Override the default registry URL for this invocation.Use this npm registry URL for package metadata, tarballs, audit requests, dist-tags, and registry writes.
Virtual store
--disable-global-virtual-store— Force the shared global virtual store off for this invocation.Packages are materialized inside the project's virtual store instead of symlinked from the shared tree under
<cacheDir>/virtual-store/v1/(by default~/.cache/aube/virtual-store/v1/).Aliases:
--disable-gvs--enable-global-virtual-store— Force the shared global virtual store on for this invocation.Overrides CI's default per-project materialization and the
disableGlobalVirtualStoreForPackagesauto-disable heuristic.Aliases:
--enable-gvs