zig version manager.
curl -sSfL https://raw.githubusercontent.com/Satheeshsk369/zigup/main/install.sh | shNote: Make sure to add ~/.local/bin to your shell profile PATH (e.g. ~/.bashrc, ~/.zshrc or ~/.profile).
powershell -NoProfile -Command "Invoke-Expression (Invoke-RestMethod 'https://raw.githubusercontent.com/Satheeshsk369/zigup/main/install.ps1')"install <TAG>(aliasi): Downloads and installs a Zig version. Skips download if already installed. Use-Sto sync and select from mirrors,-mirror=<name>for specific mirrors, or-url=<url>for direct links.set <TAG>(aliass): Sets an installed Zig version as the default/active version.list [MIRROR](aliasl): Lists locally installed versions (or cached remote versions if a mirror name is provided). Use-Sto sync.delete <TAG>(aliasd): Uninstalls a local Zig version.update(aliasup): Updateszigupto the latest release binary.env(aliase): Checks if the~/.local/bindirectory is configured in your systemPATH.help(aliash): Prints the help message.version(aliasv): Prints the zigup tool version.
zigup automatically generates a configuration file at ~/.config/zigup/config.zon (or %APPDATA%\zigup\config.zon on Windows) on its first run. You can add new custom index mirrors directly to this list:
.{
.mirrors = .{
.{ .name = "ziglang", .url = "https://ziglang.org/download/index.json" },
.{ .name = "mach", .url = "https://pkg.hexops.org/zig/index.json" },
.{ .name = "my-custom-mirror", .url = "https://example.com/custom/index.json" },
},
.defaultMirror = "ziglang",
}-
Install a version (this only downloads/extracts it):
zigup install 0.16.0 # downloads and installs 0.16.0 -
Set an installed version as your active default:
zigup set 0.16.0 # sets 0.16.0 as active default
-
Switch between installed versions by running
set:zigup set master # switches active zig to master (if already installed) zigup set 0.16.0 # switches back to 0.16.0
-
Manage mirrors in
config.zon, then use-mirror:zigup install 0.16.0 -mirror=mach # install from mach mirror (skips if already present) zigup delete 0.16.0 # delete if you want a clean reinstall from another mirror zigup install 0.16.0 -mirror=mach # fresh install from mach
-
Use
-urlto point at a custom index without touchingconfig.zon:zigup install 0.16.0 -url="https://pkg.hexops.org/zig/index.json" -
mastertracks HEAD — always sync the index before installing:zigup -S install master # sync index, then download latest master zigup -S install master -mirror=mach -
List versions:
zigup list # locally installed versions zigup list ziglang # remote versions from ziglang mirror cache zigup -S list mach # sync mach index and list its versions
-
View the paths zigup uses:
zigup env
-
Self-update zigup:
zigup update