cvm is a per-user compiler version manager for LLVM and GCC.
It installs compiler toolchains from source, switches the active compiler in the current shell, records persistent defaults, and keeps system compilers untouched.
Install a release:
curl -fsSL https://raw.githubusercontent.com/QGrain/cvm/v0.0.3/install.sh | bashInstall from a local checkout:
git clone https://github.com/QGrain/cvm.git
cd cvm
./install.shThe installer writes cvm to $HOME/.cvm/bin/cvm, generates
$HOME/.cvm/cvm.sh, and appends a small loader to the detected shell profile.
Set PROFILE=/dev/null to skip profile edits.
Running the installer again replaces only the cvm binary and regenerates
cvm.sh; installed toolchains and defaults under $HOME/.cvm are preserved.
cvm install llvm 21 -j8
cvm install gcc 15 -j8
cvm ls-remote llvm 21
cvm ls
cvm use llvm 21
cvm which llvm
cvm alias default llvm 21.1.8
cvm version
cvm upgrade --dry-runWhen the first managed version of a compiler family is installed, cvm sets it as the persistent default automatically.
cvm install <llvm|gcc> <version-or-prefix> [-jN|--jobs N]
cvm ls-remote [llvm|gcc] [prefix]
cvm ls [llvm|gcc]
cvm use <llvm|gcc> [version-or-prefix]
cvm alias default <llvm|gcc> <version-or-prefix>
cvm current [llvm|gcc]
cvm env <llvm|gcc> [version-or-prefix]
cvm which <llvm|gcc> [version-or-prefix]
cvm uninstall <llvm|gcc> <version-or-prefix>
cvm upgrade [version] [--dry-run]
cvm init
cvm version
In interactive shells that source $CVM_HOME/cvm.sh, cvm use ... updates the
current shell like nvm. In scripts or one-off shells, use:
eval "$(cvm use llvm 21)"
Remove the profile snippet that sources $CVM_HOME/cvm.sh, then remove:
rm -rf "$HOME/.cvm"Contributions are welcome. Please read the contribution guide before opening a PR.
Apache-2.0. See LICENSE.