Yarn Workspaces

Yarn was the first package manager built specifically around workspaces. `yarn workspace`, `yarn workspaces foreach`, `yarn workspaces focus`, and `yarn workspaces list` provide first-class monorepo coordination — running commands inside a specific workspace, fanning out commands across all workspaces, installing a single workspace and its dependencies, and listing the workspace tree.

API entry from apis.yml

apis.yml Raw ↑
aid: yarn-pkg:yarn-workspaces
name: Yarn Workspaces
tags:
- Workspaces
- Monorepo
- JavaScript
- Package Manager
humanURL: https://yarnpkg.com/features/workspaces
properties:
- url: https://yarnpkg.com/features/workspaces
  type: Documentation
- url: https://yarnpkg.com/cli/workspaces/foreach
  type: Documentation
- url: https://github.com/yarnpkg/berry/tree/master/packages/plugin-workspace-tools
  type: SourceCode
- url: json-schema/yarn-pkg-workspace-schema.json
  type: JSONSchema
description: Yarn was the first package manager built specifically around workspaces. `yarn workspace`,
  `yarn workspaces foreach`, `yarn workspaces focus`, and `yarn workspaces list` provide first-class monorepo
  coordination — running commands inside a specific workspace, fanning out commands across all workspaces,
  installing a single workspace and its dependencies, and listing the workspace tree.