yarn workspaces list — Yarn CLI reference

List the workspaces in the project

Docs/Reference/CLI/workspaces/list

yarn workspaces list

List the workspaces in the project

yarn workspaces list

This command prints the list of workspaces in the project.

  • If --since is set, Yarn only lists workspaces modified since the specified ref. Without an explicit ref, Yarn uses the changesetBaseRefs configuration.

  • If -R,--recursive is set along with --since, Yarn will also list workspaces that depend on workspaces that have been changed since the specified ref, recursively following dependencies and devDependencies fields.

  • If --no-private is set, Yarn omits workspaces whose manifest has private: true.

If both -v,--verbose and --json are set, Yarn also returns cross-dependencies between workspaces (useful when you wish to automatically generate Bazel rules).

#--verbose, -vboolean

Also return the cross-dependencies between workspaces

#--privateboolean

Also list private workspaces

#--sincestring

Only include workspaces that have been changed since the specified ref

#--recursive, -Rboolean

Include dependents of changed workspaces when used with --since

#--jsonboolean

Format the output as an NDJSON stream

#--tree-hashboolean

Include a hash of each workspace dependency tree (requires --json)