Important: This documentation covers Yarn 2. For the 1.x doc, check
yarn addyarn binyarn cache cleanyarn config getyarn config setyarn configyarn constraints queryyarn constraints sourceyarn constraintsyarn dlxyarn inityarn installyarn linkyarn nodeyarn npm infoyarn npm loginyarn npm publishyarn npm whoamiyarn packyarn patch-commityarn patchyarn plugin importyarn plugin listyarn plugin runtimeyarn rebuildyarn removeyarn runyarn set resolutionyarn set version from sourcesyarn set versionyarn stageyarn unplugyarn upyarn upgrade-interactiveyarn version applyyarn version checkyarn versionyarn whyyarn workspaceyarn workspaces foreachyarn workspaces list

yarn plugin import

Download a plugin.


$> yarn plugin import <name>


Download and activate the "@yarnpkg/plugin-exec" plugin :

yarn plugin import @yarnpkg/plugin-exec

Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand) :

yarn plugin import exec

Download and activate a community plugin :

yarn plugin import

Activate a local plugin :

yarn plugin import ./path/to/plugin.js


This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations.

Three types of plugin references are accepted:

  • If the plugin is stored within the Yarn repository, it can be referenced by name.

  • Third-party plugins can be referenced directly through their public urls.

  • Local plugins can be referenced by their path on the disk.

Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the @yarnpkg/builder package).