## zowe › plugins › install

Install plug-ins to an application.

#### Usage

zowe plugins install [plugin...] [options]

#### Positional Arguments

- `plugin...` (string)

  - A space-separated list of plug-ins to install. A plug-in can be any format that is accepted by the `npm install` command (local directory, TAR file, git URL, public package, private package, etc...).

    To use a relative local directory, at least one '/' or '\' must exist in the plug-in path. For example, you have a local plug-in in a folder called 'test-plugin' that you want to install. Specify the relative local directory by issuing the following command:

    zowe plugins install ./test-plugin

    If you omit the './', then the install command looks for 'test-plugin' in an npm registry.

    If the plugin argument is omitted, the plugins.json file will determine which plug-ins are installed. For more information on the plugins.json file, see the --file option.

#### Options

- `--file` (local file path)

  - Specifies the location of a plugins.json file that contains the plug-ins you want to install.

    All plug-ins specified in plugins.json will be installed to the base CLI and the contents will be placed into /home/<user>/.zowe/plugins/plugins.json.

    If you do not specify a plugins.json file and do not specify a plug-in, the default plugin.json file (/home/<user>/.zowe/plugins/plugins.json) will be used. This provides a way to install plug-ins that were lost or corrupted after reinstalling or updating Zowe CLI.

- `--registry` (string)

  - The npm registry that is used when installing remote packages. When this value is omitted, the value returned by `npm config get registry` is used.

    For more information about npm registries, see: https://docs.npmjs.com/misc/registry

- `--login` (boolean)

  - The flag to add a registry user account to install from secure registry. It saves credentials to the .npmrc file using `npm login`. When this value is omitted, credentials from .npmrc file is used. If you used this flag once for specific registry, you don't have to use it again, it uses credentials from .npmrc file.

    For more information about npm registries, see:
    https://docs.npmjs.com/cli/login for NPM >= 9
    https://docs.npmjs.com/cli/adduser for NPM < 9

#### Examples

- Install plug-ins saved in /home/<user>/.zowe/plugins/plugins.json:

  - `zowe plugins install`

- Install plug-ins saved in a properly formatted config file:

  - `zowe plugins install --file /some/file/path/file_name.json`

- Install a remote plug-in:

  - `zowe plugins install my-plugin`

- Install a remote plug-in using semver:

  - `zowe plugins install my-plugin@"^1.2.3"`

- Install a remote plug-in from the specified registry:

  - `zowe plugins install my-plugin --registry https://registry.npmjs.org/`

- Install a local folder, local TAR file, and a git URL:

  - `zowe plugins install ./local-file /root/tar/some-tar.tgz git://github.com/project/repository.git#v1.0.0`

- Install a remote plug-in from the registry which requires authorization(don't need to use this flag if you have already logged in before):

  - `zowe plugins install my-plugin --registry https://registry.npmjs.org/ --login`