⚡ Installation
Install via Homebrew:
$ brew tap hendriknielaender/zvm && brew install zvm
Install via Curl:
$ curl -fsSL https://raw.githubusercontent.com/hendriknielaender/zvm/main/install.sh | bash
Install via PowerShell:
> irm https://raw.githubusercontent.com/hendriknielaender/zvm/master/install.ps1 | iex
Shell Setup
After installation, configure your shell environment:
# Get shell-specific configuration
$ zvm env
# Example output:
# Add this to your ~/.bashrc, ~/.profile, or ~/.zshrc:
export PATH="/home/user/.local/share/zvm/bin:$PATH"
⚡ Usage Guide
| Command | Description | Example |
|---|---|---|
| install, i | Install a Zig or ZLS version | zvm install 0.16.0 |
| use, u | Switch to a Zig or ZLS version | zvm use 0.16.0 |
| list, ls | List installed versions | zvm list --all |
| list-remote | List available Zig or ZLS versions | zvm list-remote --zls |
| remove, rm | Remove an installed version | zvm --yes remove 0.15.2 |
| clean | Clean cache and unused versions | zvm clean --all |
| upgrade | Upgrade zvm itself | zvm upgrade |
Examples
# Install a stable Zig release zvm install 0.16.0 # Install master/development build zvm install master # Install ZLS (Language Server) zvm install --zls 0.16.0
Management
# Switch to specific version zvm use 0.16.0 # List installed Zig and ZLS versions zvm list --all # Remove old version without prompting zvm --yes remove 0.15.2
⚡ Auto-version Detection
zvm automatically detects the required Zig version from your project's build.zig.zon file.
build.zig.zon
.{ .name = "my-project", .version = "0.1.0", .minimum_zig_version = "0.16.0", .dependencies = .{}, }
1. Detect
Reads minimum_zig_version from your zon file.
2. Install
Fetches the version if it is not present.
3. Apply
Runs your Zig command with the matching binary.
⚡ Configuration
Global Options
| Flag | Description |
|---|---|
| --json | Output machine-readable JSON |
| --plain | Tabular pipeline output without headers or color |
| --quiet | Suppress non-error output |
| --verbose | Show debug output on stderr |
| --trace | Show HTTP details and file paths while debugging |
| --yes | Skip confirmation prompts for destructive operations |
| --no-input | Refuse to prompt; fail fast in automation |
| --no-color | Disable colored output |
| --color | Force colored output |
| --help, -h | Show help |
| --version | Show version |
Environment Variables
| Variable | Description | Default |
|---|---|---|
| ZVM_HOME | Override zvm install/data directory | platform data dir |
| XDG_DATA_HOME | Base data directory on Unix when ZVM_HOME is unset | ~/.local/share |
| ZVM_DEBUG | Legacy verbose logging alias | false |
| NO_COLOR | Disable colored output when set | unset |
| ZVM_DOWNLOAD_TIMEOUT_SECONDS | Per-mirror download timeout with fallback | 1800 |