yarn workspaces foreach — Yarn CLI reference
Run a command in multiple workspaces
yarn workspaces foreach
Run a command in multiple workspaces
This command selects workspaces from the project and runs the given command in each of them. Workspaces can be selected explicitly, by dependency relationship, by change detection, or by include/exclude patterns.
By default commands run sequentially. Use -p,--parallel to run them concurrently, and --topological to respect workspace dependency order.
Run the command in every workspace
Start selection from workspaces matching these patterns
Select workspaces changed since a ref, or since the configured base refs when no ref is provided
Include workspace dependencies of the selected workspaces
Follow dependencies when expanding the workspace selection
Follow dependents when expanding the workspace selection
Dependency kinds followed by --follow-dependencies
Include only workspaces matching these patterns
Exclude workspaces matching these patterns
Run commands in parallel
Print output from parallel commands as it is produced
Maximum number of parallel jobs, or unlimited
Run workspaces in topological order
Increase output verbosity; can be repeated
Include private workspaces