
Zig Version Manager (zvm) is a tool for managing your
Zig installs. With std under heavy development and a
large feature roadmap, Zig is bound to continue changing. Breaking existing
builds, updating valid syntax, and introducing new features like a package
manager. While this is great for developers, it also can lead to headaches when
you need multiple versions of a language installed to compile your projects, or
a language gets updated frequently.
Donate
Join our Community
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
Linux, BSD, MacOS, *nix
curl https://www.zvm.app/install.sh | bash
Windows
PowerShell
irm "https://www.zvm.app/install.ps1" | iex
Command Prompt
powershell -c "irm https://www.zvm.app/install.ps1 | iex"
You Have Go Installed
go install -ldflags "-s -w" github.com/tristanisham/zvm@latest
Manually
Please grab the
latest release.
Verifying a download
Releases are built by GitHub Actions, which publishes a SHA256SUMS file and a
signed build provenance attestation
for every archive. To check that an archive is exactly what CI built from this
repository:
gh attestation verify zvm-linux-amd64.tar --repo tristanisham/zvm
# or, without the GitHub CLI, just the checksum:
sha256sum --check --ignore-missing SHA256SUMS
This covers releases built by the workflow, starting after v0.9.3. The install
scripts and zvm upgrade don't check it yet.
Alternatively, you can build the app by cloning the repository and running
go build .
./zvm
If you want to disable that ZVM can automatically update itself, you can run
go build -tags noAutoUpgrades .
instead for building the app.
Putting ZVM on your Path
ZVM requires a few directories to be on your $PATH.
Linux, BSD, MacOS, *nix
The installer script handles this for you automatically. If you need to set it
up manually, append the following to your shell's startup file (~/.bashrc,
~/.zshrc, or ~/.profile):
export ZVM_INSTALL="$HOME/.zvm/self"
export PATH="$HOME/.zvm/bin:$ZVM_INSTALL:$PATH"
Then restart your shell or source the file for the changes to take effect.
Windows
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%
Configure ZVM path
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.
Community Package
AUR
zvm on the Arch AUR is a
community-maintained package, and may be out of date.
Why should I use ZVM?
While Zig is still pre-1.0 if you're going to stay up-to-date with the master
branch, you're going to be downloading Zig quite often. You could do it
manually, having to scroll around to find your appropriate version, decompress
it, and install it on your $PATH. Or, you could install ZVM and run
zvm i master every time you want to update. zvm is a static binary under a
permissive license. It supports more platforms than any other Zig version
manager. ZVM has no system dependencies. Whether you're on
Windows, MacOS, Linux, a flavor of BSD, or Plan 9 zvm will let you install,
switch between, and run multiple versions of Zig.
Using ZVM with AI coding agents
ZVM ships one portable agent skill with plugin manifests for Claude Code and
Codex. It teaches coding agents to reach for zvm instead of a distro package
or a hand-unpacked tarball, and to drive it correctly when they do.
Claude Code
/plugin marketplace add tristanisham/zvm
/plugin install zvm
The same commands are also available from a shell:
claude plugin marketplace add tristanisham/zvm
claude plugin install zvm@zvm
Print the bundled skill and command reference as Markdown with zvm --skill:
zvm --skill > zig-versions.md
Codex and other agents
The repository includes a Codex plugin manifest at .codex-plugin/plugin.json.
The underlying skills/zig-versions/ directory uses the portable Agent Skills
layout, so other skill-compatible agents can load that directory directly.
The shared skill covers ZVM's real command surface, how to find the version a
repository actually wants (//! zvm-lock: in build.zig,
.minimum_zig_version in build.zig.zon), and why agents should prefer
zvm run over zvm use so they never repoint your global Zig without being
asked. The command reference is generated from ZVM's own CLI definition, so it
cannot drift from the binary.
Contributing and Notice
zvm is stable software. Pre-v1.0.0 any breaking changes will be clearly
labeled, and any commands potentially on the chopping block will print notice.
The program is under constant development, and the author is very willing to
work with contributors. If you have any issues, ideas, or contributions you'd
like to suggest
create a GitHub issue.
How to use ZVM
Install
zvm install <version>
# Or
zvm i <version>
Use install or i to download a specific version of Zig. You can pass an
exact version, a shorthand, or an
alias.
zvm i 0.13.0 # Install an exact version
zvm i master # Install the current master nightly
zvm i stable # Install the latest stable release
zvm i .14 # Shorthand — installs 0.14.x (latest patch)
Download checks
ZVM checks official Zig downloads against Zig's signing key, including the
filename in the signature. If a mirror serves the wrong file, or a download
fails verification, ZVM tries the next mirror. The original download URL is
the last fallback.
After a verified download, ZVM records the archive's SHA-256 in
~/.zvm/known_hashes.json. If that same filename ever comes back with a
different hash, the install fails. --force still reinstalls an existing
version, but it doesn't bypass this check. Custom version maps keep using
their published checksums and aren't added to this store.
Version Shorthand
You can use abbreviated version numbers and ZVM will resolve them to the
latest matching release:
zvm i 0.13 # Installs 0.13.0
zvm i .13 # Same as above — a leading dot implies "0."
zvm i 0.15 # Installs 0.15.2 (latest 0.15.x patch)
zvm i .15 # Same — resolves to 0.15.2
Whenever ZVM expands a shorthand, it prints the result so you know exactly
what's being fetched:
$ zvm i .14
Resolved ".14" to 0.14.1
...
Shorthand works across every command that takes a version:
zvm i 0.14 # install
zvm use .13 # switch active version
zvm run 0.12 version
zvm rm .11 # uninstall
For use and rm, shorthand is resolved against your locally installed
versions. For install and run, it resolves against the remote version
map.
Version Aliases
ZVM understands a few named aliases in addition to concrete versions:
| Alias | Resolves to |
|---|
master | The current master nightly build (passes through as-is) |
stable | The highest non-dev, non-master release (e.g. 0.16.0) |
zvm i stable # Install the latest stable release
zvm use stable # Switch to the latest installed stable release
zvm i master # Install the current master nightly
stable is especially useful in automation — you don't have to know the exact
version number to grab the newest release.
You can also create your own named aliases with the alias command.
Force Install
As of v0.7.6 ZVM will now skip downloading a version if it is already
installed. You can always force an install with the --force or -f flag.
zvm i --force master
You can also enable the old behavior by setting the new alwaysForceInstall
field to true in ~/.zvm/settings.json.
Install Without Switching
By default, installing Zig also makes that version active. Pass --skip-use
or -k to install it without changing the active Zig version:
zvm i --skip-use 0.15.2
This also applies when installing ZLS with --zls.
Keep the Old Master Build
Installing master replaces the master build you already have. Pass --keep-and-rename <name> (or --keep <name> or -n <name>) to keep the old build instead: ZVM moves it to a directory named after its version and saves <name> as an alias for it.
zvm i --keep before-upgrade master
zvm use before-upgrade
The flag is ignored for other versions, and when there is no old build to keep. If <name> is already an alias, ZVM asks before pointing it at the old build; answering no, or running without input, stops the install without replacing master. If the old version’s destination already exists, the command also stops without replacing master.
Install a Specific Development Build
Zig development builds can be installed by their full build identifier, such as
0.16.0-dev.1334+06d08daba. ZVM downloads these builds directly from
ziglang.org/builds because they are not listed in the release version map.
Development builds do not have a version-map SHA-256 checksum. ZVM warns about
this and asks for confirmation before continuing:
zvm i 0.16.0-dev.1334+06d08daba
For an explicit non-interactive install, pass --skip-shasum (or -s). This
also skips SHA-256 verification for regular Zig and ZLS installations, so use
it only when you accept that risk: