Yarn Plugin API

Yarn ships with a full plugin API exposed by `@yarnpkg/core`. Plugins can register commands, resolvers, fetchers, linkers, and lifecycle hooks. Plugins are installed with `yarn plugin import` and listed/verified with `yarn plugin list`, `yarn plugin check`, and `yarn plugin runtime`. The default distribution bundles 20+ plugins including plugin-npm, plugin-pnp, plugin-workspace-tools, plugin-constraints, plugin-typescript, plugin-interactive-tools, and plugin-stage.

API entry from apis.yml

apis.yml Raw ↑
aid: yarn-pkg:yarn-plugin-api
name: Yarn Plugin API
tags:
- Plugins
- Extensibility
- JavaScript
- SDK
humanURL: https://yarnpkg.com/advanced/plugin-tutorial
properties:
- url: https://yarnpkg.com/advanced/plugin-tutorial
  type: Documentation
- url: https://yarnpkg.com/api
  type: Documentation
- url: https://github.com/yarnpkg/berry/tree/master/packages/yarnpkg-core
  type: SourceCode
- url: https://yarnpkg.com/cli/plugin/import
  type: Documentation
- url: https://yarnpkg.com/cli/plugin/list
  type: Documentation
description: Yarn ships with a full plugin API exposed by `@yarnpkg/core`. Plugins can register commands,
  resolvers, fetchers, linkers, and lifecycle hooks. Plugins are installed with `yarn plugin import` and
  listed/verified with `yarn plugin list`, `yarn plugin check`, and `yarn plugin runtime`. The default
  distribution bundles 20+ plugins including plugin-npm, plugin-pnp, plugin-workspace-tools, plugin-constraints,
  plugin-typescript, plugin-interactive-tools, and plugin-stage.