id = "npm"
name = "npm"
homepage = "https://docs.npmjs.com/cli/v10/configuring-npm/npmrc"
description = "The package manager for Node.js, and the client for its registry."
icon = "theSVG:npm"
executables = ["npm", "npx"]
[dotfiles]
paths = ["~/.npmrc"]
exclude = ["~/.npm/_cacache/", "~/.npm/_logs/"]
secret = []
[[dotfiles.secret_paths]]
file = "~/.npmrc"
match = { prefix = ["//"] }
[[dotfiles.machine_lines]]
file = "~/.npmrc"
match = { prefix = ["prefix=", "cache="] }
scope = "backup"
[commands]
format = 1
label = "npm"
description = "Global options only; use the Install, Run, Outdated and Publish subcommands."
quality = "ai-draft"
base = "fig:npm"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/npm.ts"
license = "MIT"
[[commands.subcommand]]
path = ["install"]
label = "Install packages"
description = "Install dependencies or add packages. Dependency-layout and legacy flags are left out."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/npm.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "packages"
label = "Packages"
type = "string"
position = 0
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "save_dev"
label = "Save to devDependencies"
type = "boolean"
option = ["--save-dev", "-D"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "save_optional"
label = "Save to optionalDependencies"
type = "boolean"
option = ["--save-optional", "-O"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "save_exact"
label = "Save exact version"
type = "boolean"
option = ["--save-exact", "-E"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_save"
label = "Do not save"
type = "boolean"
option = ["--no-save"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "global"
label = "Global"
type = "boolean"
option = ["--global", "-g"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "ignore_scripts"
label = "Ignore scripts"
type = "boolean"
option = ["--ignore-scripts"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "legacy_peer_deps"
label = "Legacy peer deps"
type = "boolean"
option = ["--legacy-peer-deps"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_audit"
label = "Skip audit"
type = "boolean"
option = ["--no-audit"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "no_fund"
label = "Hide funding message"
type = "boolean"
option = ["--no-fund"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "registry"
label = "Registry"
type = "string"
option = ["--registry"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspace"
label = "Workspace"
type = "string"
option = ["-w", "--workspace"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspaces"
label = "All workspaces"
type = "boolean"
option = ["-ws", "--workspaces"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "install"
label = "Install project"
fields = ["ignore_scripts", "no_audit", "no_fund"]
required = []
[[commands.subcommand.task]]
id = "add"
label = "Add package"
fields = ["packages", "save_exact"]
required = ["packages"]
[[commands.subcommand.task]]
id = "add-dev"
label = "Add dev package"
fields = ["packages", "save_exact"]
required = ["packages"]
set = { save_dev = [true] }
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["packages", "save_dev", "save_optional", "save_exact"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["no_save", "global", "ignore_scripts", "legacy_peer_deps", "no_audit", "no_fund", "dry_run", "registry", "workspace", "workspaces"]
[[commands.subcommand]]
path = ["run"]
label = "Run script"
description = "Run a script from package.json. Extra arguments after -- are not covered."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/npm.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "script"
label = "Script"
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "if_present"
label = "Ignore missing script"
type = "boolean"
option = ["--if-present"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "ignore_scripts"
label = "Ignore pre/post scripts"
type = "boolean"
option = ["--ignore-scripts"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "script_shell"
label = "Script shell"
type = "string"
option = ["--script-shell"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspace"
label = "Workspace"
type = "string"
option = ["-w", "--workspace"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspaces"
label = "All workspaces"
type = "boolean"
option = ["-ws", "--workspaces"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "run"
label = "Run script"
fields = ["script", "if_present"]
required = ["script"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["script", "if_present"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["ignore_scripts", "script_shell", "workspace", "workspaces"]
[[commands.subcommand]]
path = ["outdated"]
label = "Check outdated"
description = "List outdated packages."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/npm.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "packages"
label = "Packages"
type = "string"
position = 0
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "all"
label = "Show all"
type = "boolean"
option = ["-a", "-all"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "json"
label = "JSON output"
type = "boolean"
option = ["--json"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "long"
label = "Extended info"
type = "boolean"
option = ["--long", "-l"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "parseable"
label = "Parseable output"
type = "boolean"
option = ["--parseable", "-p"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "global"
label = "Global"
type = "boolean"
option = ["-g"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspace"
label = "Workspace"
type = "string"
option = ["-w", "--workspace"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspaces"
label = "All workspaces"
type = "boolean"
option = ["-ws", "--workspaces"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "outdated"
label = "Check outdated"
fields = ["packages", "long"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["packages", "long"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["all", "json", "parseable", "global", "workspace", "workspaces"]
[[commands.subcommand]]
path = ["publish"]
label = "Publish package"
description = "Publish a package to the registry. Prefer a dry run first."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/npm.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "target"
label = "Tarball or folder"
type = "path"
position = 0
path = { kind = "any", role = "input" }
sources = ["fig"]
[[commands.subcommand.field]]
id = "tag"
label = "Dist-tag"
type = "string"
option = ["--tag"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "access"
label = "Access"
type = "enum"
option = ["--access"]
choices = [{ value = "restricted", label = "restricted" }, { value = "public", label = "public" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "dry_run"
label = "Dry run"
type = "boolean"
option = ["--dry-run"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "otp"
label = "One-time password"
type = "string"
option = ["--otp"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspace"
label = "Workspace"
type = "string"
option = ["-w", "--workspace"]
multiple = true
sources = ["fig"]
[[commands.subcommand.field]]
id = "workspaces"
label = "All workspaces"
type = "boolean"
option = ["-ws", "--workspaces"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "dry"
label = "Dry run"
fields = ["target", "tag", "access"]
required = []
set = { dry_run = [true] }
[[commands.subcommand.task]]
id = "publish"
label = "Publish"
fields = ["target", "tag", "access", "otp"]
required = []
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["target", "tag", "access", "dry_run"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["otp", "workspace", "workspaces"]