yarn init
yarn
yarn add [package]
yarn add [package]@[version]
yarn add [package]@[tag]
yarn add [package] --dev
yarn add [package] --peer
yarn add [package] --optional
yarn upgrade [package]
yarn upgrade [package]@[version]
yarn upgrade [package]@[tag]
yarn remove [package]
For Yarn v1.x and v2.x:
curl --compressed -o- -L https://yarnpkg.com/install.sh | bash
yarn cache clean