How to Use ZVM
Install
zvm install <version># Orzvm i <version>
Use install
or i
to download a specific version of Zig. To install the
latest version, use “master”.
# Examplezvm i master
Install ZLS with ZVM
You can now install ZLS with your Zig download! To install ZLS with ZVM, simply
pass the -D=zls
flag with zvm i
. For example:
zvm i -D=zls master
Switch between installed Zig versions
zvm use <version>
Use use
to switch between versions of Zig.
# Examplezvm use master
List installed Zig versions
# Examplezvm ls
Use ls
to list all installed version of Zig.
List all versions of Zig available
zvm ls --all
The --all
flag will list the available verisons of Zig for download. Not the
versions locally installed.
Uninstall a Zig version
# Examplezvm rm 0.10.0
Use uninstall
or rm
to remove an uninstalled version from your system.
Upgrade your ZVM installation
As of zvm v0.2.3
you can now upgrade your ZVM installation from, well, zvm.
Just run:
zvm upgrade
The latest version of ZVM should install on your machine, regardless of where
your binary lives (though if you have your binary in a privaledged folder, you
may have to run this command with sudo
).
Clean up build artifacts
# Examplezvm clean
Use clean
to remove build artifacts (Good if you’re on Windows).
Version Map Source
zvm vmu <Version Map URL>
vmu default # Resets back to default Zig releases. vmu mach # Sets ZVM to pull from Mach nominated Zig.
## Print program help
```shzvm help
Print program version
zvm --version
Prints the version of ZVM you have installed.
Color Toggle
Enable or disable colored ZVM output. No value toggles colors.
Enable
- on
- yes/y
- enabled
- true
Disabled
- off
- no/n
- disabled
- false
--color # Toggle ANSI color printing on or off for ZVM's output, i.e. --color=true
Environment Variables
ZVM_DEBUG
enables DEBUG logging for your executable. This is meant for contributors and developers.ZVM_SET_CU
Toggle the automatic upgrade checker. If you want to reenable the checker, justuset ZVM_SET_CU
.ZVM_PATH
sets the install location for ZVM. Set the environment variable to the parent directory of where you’ve placed the.zvm
directory.