Skip to content

Installing ZVM

ZVM lives entirely in $HOME/.zvm on all platforms it supports. Inside of the directory, ZVM will download new ZIG versions and symlink whichever version you specify with zvm use to $HOME/.zvm/bin. You should add this folder to your path. After ZVM 0.2.3, ZVM’s installer will now add ZVM to $HOME/.zvm/self. You should also add this directory as the environment variable ZVM_INSTALL. The installer scripts should handle this for you automatically on *nix and Windows systems.

If you don’t want to use ZVM_INSTALL (like you already have ZVM in a place you like), then ZVM will update the exact executable you’ve called upgrade from.

All installation scripts hosted on www.zvm.app are identical to, and are automatically synced with their respective copies on GitHub.

www.zvm.app/install.sh === ./install.sh
Terminal window
curl https://www.zvm.app/install.sh | bash
Terminal window
irm https://www.zvm.app/install.ps1 | iex
Terminal window
powershell -c "irm https://www.zvm.app/install.ps1 | iex"
Terminal window
go install -ldflags "-s -w" github.com/tristanisham/zvm@latest

Please grab the latest release.

Alternatively, you can build the app by cloning the repository and running

Terminal window
go build .
./zvm

If you want to compile ZVM without the ability to run zvm upgrade (self-update), like if you’re including it as a system dependency or want to distrubute it via a package manager you can build it with the noAutoUpgrades tag.

Terminal window
go build -tags noAutoUpgrades .

instead for building the app.

ZVM requires a few directories to be on your $PATH. If you don’t know how to update your environment variables permanently on Windows, you can follow this guide. Once you’re in the appropriate menu, add or append to the following environment variables:

Add

  • ZVM_INSTALL: %USERPROFILE%\.zvm\self

Append

  • PATH: %USERPROFILE%\.zvm\bin
  • PATH: %ZVM_INSTALL%

It is possible to overwrite the default behavior of ZVM to adhere to XDG specification on Linux. There’s an environment variable ZVM_PATH. Setting it to $XDG_DATA_HOME/zvm will do the trick.

ZVM on the Arch AUR is a community-maintained package, and may be out of date.