BVM is a version manager for Bit.
Using BVM makes it easier to install and manage multiple versions of Bit in a single environment.
- Consistent installation: All Bit dependencies are bundled together to ensure a consistent and predictable package installation that is not affected by SemVer rules.
- Fast installation: A simple and quick installation process that requires no additional time-consuming operations (post-install scripts, etc.)
- Friendly UX: Easy upgrades and version management
- Multiple Bit versions: Easily switch between Bit versions or even use multiple versions in parallel
npm i -g @teambit/bvm
pnpm add -g @teambit/bvm
yarn global add @teambit/bvm
bvm install
bvm install <bit-version>
Install the latest version and remove the version previously used.
bvm upgrade
bvm -v
bvm list --remote
Switch the currently used bit version
bvm use <bit-version>
Get the local used versions, local latest versions and remote latest versions of Bit and BVM
bvm version
bvm list
bvm remove <bit-version>
Link a command name to a Bit version (link to binaries in the PATH
variable).
bvm link <command> <bit-version>
For example, the following line will link Bit's version 0.0.315
to the bitty
command name
(this will execute Bit's version 0.0.315
whenever the bitty
command is used).
bvm link bitty 0.0.315
Validate the link by checking the version number of the new link:
$ bitty -v
0.0.315 (@teambit/legacy: 1.0.28)
:::info Auto-Link Bit's latest version to bbit
If a legacy version of Bit (Bit v14) is installed on your machine,
BVM will automatically link the latest version to bbit
(instead of bit
) to allow you to use both versions in parallel.
:::
Make sure to set an env variable named BVM_GLOBALS_DIR
.
Bvm will create its config in this folder, and will set the BVM_DIR
inside the config to this folder as well.
-
DEFAULT_LINK
- The default command name to be linked to BVM's latest version.
bit
is linked by default unless a legacy version of Bit is installed. In that case,bbit
will be linked, instead. -
BVM_DIR
- The location for BVM (this will no apply for the config of bvm itself, as it's configured inside the config) In order to change the entire folder include config, use theBVM_GLOBALS_DIR
env variable described above.
bvm config
bvm config set <property> <new-value>
For example, to change the default link for Bit, from bit
to bitty
:
bvm config set DEFAULT_LINK bitty
The error message:
global Bit install location was not found in your PATH global variable.
please add the following command to your bash/zsh profile then re-open the terminal:
export PATH=$HOME/bin:$PATH
Solution:
Run the following command:
echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc && source ~/.bashrc
Run the following command:
echo 'export PATH=$HOME/bin:$PATH' >> ~/.zshrc && source ~/.zshrc
The error message:
global Bit install location was not found in your PATH global variable.
please run the following command and then re-open the terminal:
setx path "%path%;C:\Users\USER\AppData\Local\.bvm" and re-open your terminal
Solution:
Run the following command:
setx path "%path%;%LocalAppData%\.bvm"
If you're running VSCODE - restart it (learn why here).
Apache License, Version 2.0