Manage multiple versions of Yarn
Branch: master
Clone or download
eastenluis feat: fish shell support (#273)
* Add fish shell script file

* does not rely on interactive mode in fish shell

* use fish_user_paths to store yarn paths

* Add new command to retrieve fish shell specfic path

* wip: add support to last used yarn version

* wip: use default version instead

* wip: update install scripts to copy

* style: missing semicolon

* cr: combine path retrieval functions for different shells; add unit test for getNewFishUserPath

* cr: fix unit test

* cr: fix update-self
Latest commit b58057a Feb 11, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci infra: unpin version Jan 22, 2019
.github ci: fix release deploy (#210) Dec 9, 2018
docs Revert "Revert "BREAKING_CHANGE: lowest support node version is 8.0"" ( Jan 22, 2019
scripts feat: fish shell support (#273) Feb 11, 2019
src feat: fish shell support (#273) Feb 11, 2019
test feat: fish shell support (#273) Feb 11, 2019
webpack feat: fish shell support (#273) Feb 11, 2019
website infra: greenkeeper/default/docusaurus 1.7.1 (#298) Jan 24, 2019
.all-contributorsrc Install archived yarn versions (#275) Jan 5, 2019
.bundlewatch.config.js feat: GPG signature validation (and yvm 1.0.0 🎉) (#131) Dec 23, 2018
.codecov.yml Update .codecov.yml (#95) Jun 25, 2018
.eslintignore Clean up creation of prod node_modules (#217) Dec 10, 2018
.eslintrc.json Use shared eslint config (#168) Nov 22, 2018
.gitignore feat: GPG signature validation (and yvm 1.0.0 🎉) (#131) Dec 23, 2018
.nvmrc freeze lockfile, and bump ndoe to support eslint top hat config on pr… Dec 2, 2018
.releaserc.js fix: publish as asset Jan 22, 2019
.yvmrc Use webpack (#48) Jun 20, 2018 feat: GPG signature validation (and yvm 1.0.0 🎉) (#131) Dec 23, 2018
CNAME docs: setup (#87) Jun 22, 2018
LICENSE Create LICENSE (#113) Jul 4, 2018
Makefile feat: GPG signature validation (and yvm 1.0.0 🎉) (#131) Dec 23, 2018 BREAKING_CHANGE: minimum supported node version is now 8 Jan 22, 2019
greenkeeper.json Update dependencies to enable Greenkeeper 🌴 (#164) Nov 22, 2018
package.json feat: remove shelljs dependency (#302) Jan 29, 2019
yarn.lock feat: remove shelljs dependency (#302) Jan 29, 2019

Yarn Version Manager (yvm)


YVM Latest Version Minimum Node Version Builds codecov semantic-release
Deps Dev Deps Green Keeper
All Contributors Slack workspace Maturity badge - level 3 Pull Reminders


Yarn Version Manager

Pesky yarn versions got you down? Automatically and easilly manage those versions.

YVM will automatically use the correct yarn version when you run any yarn commands in any folder with a .yvmrc file. Otherwise, it will use you a globally set version of yarn.


Manually managing different yarn versions across projects is a pain. This fixes that.


Node: >=8.0.0

Installation script

Execute the following in your terminal:

curl -fsSL | bash

Or to install a specific version:

curl -fsSL | INSTALL_VERSION="v0.9.26" bash

Manual installation

Navigate to and download the file for the latest release to your home directory.

Next, unzip that file to the .yvm dir in your home directory and make extracted executable

unzip -d $HOME/.yvm
chmod a+x $HOME/.yvm/

Finally, add the following lines to your $HOME/.zshrc or $HOME/.bashrc, depending on the shell you use

export YVM_DIR=/home/joe_user/.yvm
[ -r $YVM_DIR/ ] && source $YVM_DIR/


To upgrade yvm to the lastes version either install as normal, or run

yvm update-self


Automatic magic

Run any yarn command and watch it magically use the correct version of yarn


To download and install a version of yarn, run:

yvm install <version>

To get the latest version of Yarn, run:

yvm install --latest

Execute an arbitrary command using a specific version of yarn:

yvm exec <version> <command>

Additional commands

Switch the current yarn versions, using:

yvm use <version>
yarn --version

List Versions

yvm list

Check Current Version

yvm which

Full list of available commands

yvm help

Using a .yvmrc File

You can create a .yvmrc file containing the version number of yarn in your project's root directory. Afterwards, yvm use, yvm install and yvm exec will use the version specified in the .yvmrc file if no version number is supplied to the command. You can also declare the version using other configuration files

Additional reference

A full list of commands is on the api reference page

Have questions? List of common questions and answers


To remove yvm simply execute

rm -rf $YVM_DIR

Next, edit $HOME/.bashrc and $HOME/.zshrc and remove those lines:

export YVM_DIR=/home/joe_user/.yvm
[ -r $YVM_DIR/ ] && source $YVM_DIR/

In case you had older version of yvm installed, there could also be a line like

source /home/joe_user/.yvm/

or those lines could be in $HOME/.bash_profile instead of $HOME/.bashrc.

Technologies to Familiarize Yourself with


We welcome contributions from the community, Top Hatters and non-Top Hatters alike. Here are some guidelines to help you get started!

Basic development flow

  1. Ensure the problem you are solving is an issue or you've created one
  2. Clone the repo
  3. We use make. make help will show you a list of development commands
  4. make install-watch will install yvm on your shell, update when you make changes, and automatically source Make sure to only run this in the root yvm directory. It will fail elsewhere.
  5. make test and make lint are also commonly helpful

Make sure all changes are well documented. Our documentation can be found inside the docs section of this repo. Be sure to read it carefully and make modifications wherever necessary. You can also access the documentation on our website

Please make sure to look over our Code of Conduct as well!

Manual testing command contributions

make install
yvm <your-command-here>


Thanks goes to these wonderful people (emoji key):

Francois Campbell


Jake Bolam

📖 💻 🚇

Brandon Baksh


Milan Milojic


Umar Ahmed


Nicholas Dujay


Aser Eldamaty


Michael Rose


Sanchit Gera




Siavash Mahmoudian




Jay Crumb


Michael Lunøe


Yash Shah


Wacław Schiller




Emmanuel Ogbizi

💻 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!


Thanks to Carol Skelly for donating the github organization!