yarn info — Yarn CLI reference

Inspect packages in the project dependency tree

Docs/Reference/CLI/info

yarn info

Inspect packages in the project dependency tree

yarn info <PATTERNS…>

This command prints information about packages matching the specified patterns.

By default, if the locator reference is missing, Yarn prints information about matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any workspace, use the -A,--all flag. Add -R,--recursive to also report transitive dependencies.

Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (--dependents, --manifest, --virtuals, …) described in the option descriptions.

This command only prints information directly related to selected packages. To understand why a package is installed, use yarn why.

#--all, -Aboolean

Print versions of a package from the whole project

#--recursive, -Rboolean

Print information for all packages, including transitive dependencies

#--extra, -Xboolean

Extra data sections to include

#--cacheboolean

Print information about the cache entry of a package (path, size, checksum)

#--dependentsboolean

Print all dependents for each matching package

#--manifestboolean

Print data obtained by looking at the package archive (license, homepage, …)

#--name-onlyboolean

Only print the name for the matching packages

#--virtualsboolean

Print each instance of the virtual packages

#--jsonboolean

Format the output as an NDJSON stream