add

Install a plugin and initialize it.

Usage

โฏ

nx add <packageSpecifier>

Install nx globally to invoke the command directly using nx, or use npx nx, yarn nx, or pnpm nx.

Examples

Install the latest version of the @nx/react package and run its @nx/react:init generator:

Install version 17.0.0 of the @nx/react package and run its @nx/react:init generator:

โฏ

nx add @nx/react@17.0.0

Nx 15 and lower use @nrwl/ instead of @nx/

Options

help

Type: boolean

Show help

packageSpecifier

Type: string

The package name and optional version (e.g. @nx/react or @nx/react@latest) to install and initialize

verbose

Type: boolean

Prints additional information about the commands (e.g., stack traces)

version

Type: boolean

Show version number