{
  "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": [],
    "secret_paths": [
      {
        "file": "~/.npmrc",
        "match": {
          "prefix": [
            "//"
          ]
        }
      }
    ],
    "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
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/npm.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "install"
        ],
        "label": "Install packages",
        "description": "Install dependencies or add packages. Dependency-layout and legacy flags are left out.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/npm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "packages",
            "label": "Packages",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "save_dev",
            "label": "Save to devDependencies",
            "type": "boolean",
            "option": [
              "--save-dev",
              "-D"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "save_optional",
            "label": "Save to optionalDependencies",
            "type": "boolean",
            "option": [
              "--save-optional",
              "-O"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "save_exact",
            "label": "Save exact version",
            "type": "boolean",
            "option": [
              "--save-exact",
              "-E"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_save",
            "label": "Do not save",
            "type": "boolean",
            "option": [
              "--no-save"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "global",
            "label": "Global",
            "type": "boolean",
            "option": [
              "--global",
              "-g"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore_scripts",
            "label": "Ignore scripts",
            "type": "boolean",
            "option": [
              "--ignore-scripts"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "legacy_peer_deps",
            "label": "Legacy peer deps",
            "type": "boolean",
            "option": [
              "--legacy-peer-deps"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_audit",
            "label": "Skip audit",
            "type": "boolean",
            "option": [
              "--no-audit"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "no_fund",
            "label": "Hide funding message",
            "type": "boolean",
            "option": [
              "--no-fund"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "registry",
            "label": "Registry",
            "type": "string",
            "option": [
              "--registry"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "type": "string",
            "option": [
              "-w",
              "--workspace"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspaces",
            "label": "All workspaces",
            "type": "boolean",
            "option": [
              "-ws",
              "--workspaces"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "install",
            "label": "Install project",
            "fields": [
              "ignore_scripts",
              "no_audit",
              "no_fund"
            ],
            "required": []
          },
          {
            "id": "add",
            "label": "Add package",
            "fields": [
              "packages",
              "save_exact"
            ],
            "required": [
              "packages"
            ]
          },
          {
            "id": "add-dev",
            "label": "Add dev package",
            "fields": [
              "packages",
              "save_exact"
            ],
            "required": [
              "packages"
            ],
            "set": {
              "save_dev": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "packages",
              "save_dev",
              "save_optional",
              "save_exact"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "no_save",
              "global",
              "ignore_scripts",
              "legacy_peer_deps",
              "no_audit",
              "no_fund",
              "dry_run",
              "registry",
              "workspace",
              "workspaces"
            ]
          }
        ]
      },
      {
        "path": [
          "run"
        ],
        "label": "Run script",
        "description": "Run a script from package.json. Extra arguments after -- are not covered.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/npm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "script",
            "label": "Script",
            "type": "string",
            "position": 0,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "if_present",
            "label": "Ignore missing script",
            "type": "boolean",
            "option": [
              "--if-present"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore_scripts",
            "label": "Ignore pre/post scripts",
            "type": "boolean",
            "option": [
              "--ignore-scripts"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "script_shell",
            "label": "Script shell",
            "type": "string",
            "option": [
              "--script-shell"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "type": "string",
            "option": [
              "-w",
              "--workspace"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspaces",
            "label": "All workspaces",
            "type": "boolean",
            "option": [
              "-ws",
              "--workspaces"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "run",
            "label": "Run script",
            "fields": [
              "script",
              "if_present"
            ],
            "required": [
              "script"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "script",
              "if_present"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "ignore_scripts",
              "script_shell",
              "workspace",
              "workspaces"
            ]
          }
        ]
      },
      {
        "path": [
          "outdated"
        ],
        "label": "Check outdated",
        "description": "List outdated packages.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/npm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "packages",
            "label": "Packages",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "all",
            "label": "Show all",
            "type": "boolean",
            "option": [
              "-a",
              "-all"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "json",
            "label": "JSON output",
            "type": "boolean",
            "option": [
              "--json"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "long",
            "label": "Extended info",
            "type": "boolean",
            "option": [
              "--long",
              "-l"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "parseable",
            "label": "Parseable output",
            "type": "boolean",
            "option": [
              "--parseable",
              "-p"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "global",
            "label": "Global",
            "type": "boolean",
            "option": [
              "-g"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "type": "string",
            "option": [
              "-w",
              "--workspace"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspaces",
            "label": "All workspaces",
            "type": "boolean",
            "option": [
              "-ws",
              "--workspaces"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "outdated",
            "label": "Check outdated",
            "fields": [
              "packages",
              "long"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "packages",
              "long"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "all",
              "json",
              "parseable",
              "global",
              "workspace",
              "workspaces"
            ]
          }
        ]
      },
      {
        "path": [
          "publish"
        ],
        "label": "Publish package",
        "description": "Publish a package to the registry. Prefer a dry run first.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/npm.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "target",
            "label": "Tarball or folder",
            "type": "path",
            "position": 0,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "tag",
            "label": "Dist-tag",
            "type": "string",
            "option": [
              "--tag"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "access",
            "label": "Access",
            "type": "enum",
            "option": [
              "--access"
            ],
            "choices": [
              {
                "value": "restricted",
                "label": "restricted"
              },
              {
                "value": "public",
                "label": "public"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dry_run",
            "label": "Dry run",
            "type": "boolean",
            "option": [
              "--dry-run"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "otp",
            "label": "One-time password",
            "type": "string",
            "option": [
              "--otp"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspace",
            "label": "Workspace",
            "type": "string",
            "option": [
              "-w",
              "--workspace"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "workspaces",
            "label": "All workspaces",
            "type": "boolean",
            "option": [
              "-ws",
              "--workspaces"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "dry",
            "label": "Dry run",
            "fields": [
              "target",
              "tag",
              "access"
            ],
            "required": [],
            "set": {
              "dry_run": [
                true
              ]
            }
          },
          {
            "id": "publish",
            "label": "Publish",
            "fields": [
              "target",
              "tag",
              "access",
              "otp"
            ],
            "required": []
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "target",
              "tag",
              "access",
              "dry_run"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "otp",
              "workspace",
              "workspaces"
            ]
          }
        ]
      }
    ]
  }
}
