Important: This documentation covers Yarn 2. For the 1.x doc, check classic.yarnpkg.com.
Yarn
yarn addyarn binyarn cache cleanyarn config getyarn config setyarn configyarn constraints queryyarn constraints sourceyarn constraintsyarn dlxyarn inityarn installyarn linkyarn nodeyarn npm infoyarn npm loginyarn npm publishyarn npm whoamiyarn packyarn patch-commityarn patchyarn plugin importyarn plugin listyarn plugin runtimeyarn rebuildyarn removeyarn runyarn set resolutionyarn set version from sourcesyarn set versionyarn stageyarn unplugyarn upyarn upgrade-interactiveyarn version applyyarn version checkyarn versionyarn whyyarn workspaceyarn workspaces foreachyarn workspaces list

yarn config

Display the current configuration.

Usage

$> yarn config [-v,--verbose] [--why] [--json]

Examples

Print the active configuration settings :

yarn config

Details

This command prints the current active configuration settings.

When used together with the -v,--verbose option, the output will contain the settings description on top of the regular key/value information.

When used together with the --why flag, the output will also contain the reason why a settings is set a particular way.

If the --json flag is set the output will follow a JSON-stream output also known as NDJSON (https://github.com/ndjson/ndjson-spec).

Note that the paths settings will be normalized - especially on Windows. It means that paths such as C:\project will be transparently shown as /mnt/c/project.