{"id":48839052,"url":"https://github.com/lispking/zvm","last_synced_at":"2026-04-15T01:02:27.338Z","repository":{"id":351328949,"uuid":"1210428298","full_name":"lispking/zvm","owner":"lispking","description":"A fast, dependency-free version manager for Zig written in Zig.","archived":false,"fork":false,"pushed_at":"2026-04-14T16:03:35.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-14T16:12:57.802Z","etag":null,"topics":["version-manager","zig","zvm"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lispking.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-14T12:07:52.000Z","updated_at":"2026-04-14T16:02:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/lispking/zvm","commit_stats":null,"previous_names":["lispking/zvm"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/lispking/zvm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispking%2Fzvm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispking%2Fzvm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispking%2Fzvm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispking%2Fzvm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lispking","download_url":"https://codeload.github.com/lispking/zvm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lispking%2Fzvm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31821685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["version-manager","zig","zvm"],"created_at":"2026-04-15T01:02:22.436Z","updated_at":"2026-04-15T01:02:27.245Z","avatar_url":"https://github.com/lispking.png","language":"Zig","readme":"# zvm — Zig Version Manager\n\n[![Release](https://github.com/lispking/zvm/actions/workflows/release.yml/badge.svg)](https://github.com/lispking/zvm/releases)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Zig](https://img.shields.io/badge/Zig-0.16.x-orange.svg)](https://ziglang.org)\n\nA fast, dependency-free version manager for [Zig](https://ziglang.org/), written entirely in Zig.\n\nManage multiple Zig compiler installations, switch between versions instantly, and keep your toolchain up to date — all with a single static binary.\n\n## Features\n\n- **Zero dependencies** — single static binary, no runtime requirements\n- **Cross-platform** — macOS, Linux, Windows (x86_64 and aarch64)\n- **Fast downloads** — latency-based mirror selection picks the fastest source automatically\n- **SHA256 verification** — every download is checksum-verified\n- **ZLS support** — install the Zig Language Server alongside Zig\n- **Shell completion** — tab completion for zsh and bash\n- **Self-updating** — `zvm upgrade` downloads the latest release\n\n## Installation\n\n### One-line Install (Recommended)\n\nAutomatically detects your platform, downloads zvm, sets up PATH and shell completion:\n\n```bash\ncurl -L https://raw.githubusercontent.com/lispking/zvm/main/install.sh | bash\n```\n\n### Manual Install\n\nDownload the [latest release](https://github.com/lispking/zvm/releases/latest) for your platform:\n\n```bash\n# macOS (Apple Silicon)\ncurl -L https://github.com/lispking/zvm/releases/latest/download/zvm-aarch64-macos.tar.gz | tar xz\n# macOS (Intel)\ncurl -L https://github.com/lispking/zvm/releases/latest/download/zvm-x86_64-macos.tar.gz | tar xz\n# Linux (x86_64)\ncurl -L https://github.com/lispking/zvm/releases/latest/download/zvm-x86_64-linux.tar.gz | tar xz\n# Linux (ARM64)\ncurl -L https://github.com/lispking/zvm/releases/latest/download/zvm-aarch64-linux.tar.gz | tar xz\n```\n\n```bash\ncd zvm-*/ \u0026\u0026 sudo mv zvm /usr/local/bin/\n```\n\n### Build from Source\n\nRequirements: [Zig 0.16.x](https://ziglang.org/download/)\n\n```bash\ngit clone https://github.com/lispking/zvm.git\ncd zvm\nzig build -Doptimize=ReleaseSafe\n# Binary at zig-out/bin/zvm\n```\n\n### Post-Install Setup\n\nAdd zvm's bin directory to your PATH:\n\n```bash\nexport PATH=\"$HOME/.zvm/bin:$PATH\"\n```\n\n## Quick Start\n\n```bash\n# Install a Zig version\nzvm install 0.16.0\n\n# Install latest nightly build\nzvm install master\n\n# Install with ZLS (Zig Language Server)\nzvm install --zls 0.16.0\n\n# Switch to a different version\nzvm use 0.14.0\n\n# List installed versions\nzvm list\n\n# List all available remote versions\nzvm available\n\n# Run a specific version without switching default\nzvm run 0.13.0 build run\n\n# Remove an installed version\nzvm uninstall 0.13.0\n\n# Self-update zvm\nzvm upgrade\n```\n\n## Commands\n\n| Command | Alias | Description |\n|---------|-------|-------------|\n| `install` | `i` | Install a Zig version |\n| `use` | | Switch to an installed version |\n| `list` | `ls` | List installed versions |\n| `available` | `remote` | List all remote versions |\n| `uninstall` | `rm` | Remove an installed version |\n| `clean` | | Remove downloaded archives |\n| `run` | | Run a version without switching default |\n| `upgrade` | | Upgrade zvm to the latest version |\n| `vmu` | | Set version map source (zig/zls) |\n| `mirrorlist` | | Set mirror distribution server |\n| `proxy` | | Set HTTP/HTTPS proxy for downloads |\n| `completion` | | Generate shell completion script |\n| `version` | `-v` | Print zvm version |\n| `help` | `-h` | Print help message |\n\n### Global Options\n\n```\n--color=VALUE    Toggle color output (on/off/true/false)\n--help, -h       Print help\n--version, -v    Print version\n```\n\n### Install Options\n\n```\n--force, -f      Force re-install even if already installed\n--zls            Also install ZLS (Zig Language Server)\n--full           Install ZLS with full compatibility mode\n--nomirror       Skip community mirror downloads\n```\n\n### List Options\n\n```\n--all, -a        List all remote versions available for download\n--vmu            Show configured version map URLs\n```\n\n### Use Options\n\n```\n--sync           Use version from build.zig.zon's minimum_zig_version\n```\n\n### VMU (Version Map URL)\n\nChange where zvm fetches version information:\n\n```bash\n# Use official Zig releases (default)\nzvm vmu zig default\n\n# Use Mach engine builds\nzvm vmu zig mach\n\n# Use a custom version map URL\nzvm vmu zig https://example.com/versions.json\n\n# Reset ZLS source\nzvm vmu zls default\n```\n\n### Mirror List\n\nConfigure community mirrors for faster downloads:\n\n```bash\n# Reset to official mirrors\nzvm mirrorlist default\n\n# Set a custom mirror\nzvm mirrorlist https://example.com/mirrors.txt\n\n# Show current mirror setting\nzvm mirrorlist\n```\n\n### Proxy\n\nConfigure HTTP/HTTPS proxy for all network operations (downloads, version map fetches, upgrades):\n\n```bash\n# Set a proxy\nzvm proxy http://127.0.0.1:7890\n\n# Set a SOCKS5 proxy\nzvm proxy socks5://127.0.0.1:1080\n\n# Clear proxy (auto-detect from http_proxy/https_proxy env vars)\nzvm proxy default\n\n# Show current proxy setting\nzvm proxy\n```\n\n## Shell Completion\n\n### Zsh\n\nAdd to `~/.zshrc`:\n\n```bash\neval \"$(zvm completion zsh)\"\n```\n\n### Bash\n\nAdd to `~/.bashrc`:\n\n```bash\neval \"$(zvm completion bash)\"\n```\n\n## How It Works\n\n```\n~/.zvm/\n├── bin            → symlink/junction to the active version directory\n├── .active        → marker file tracking the active version name\n├── 0.16.0/        → Zig 0.16.0 installation\n│   └── zig        → Zig compiler binary\n├── 0.14.0/        → Zig 0.14.0 installation\n│   └── zig\n├── master/        → Latest nightly build\n│   └── zig\n├── self/          → zvm's own data\n└── settings.json  → Configuration file\n```\n\n- **Version switching** uses symbolic links (junctions on Windows) — `~/.zvm/bin` points to the active version's directory\n- **Downloads** are streamed to disk with SHA256 verification and latency-based mirror selection\n- **Settings** are persisted immediately on every change to `~/.zvm/settings.json`\n- **No background services** — zvm runs only when you invoke it\n\n## Configuration\n\nSettings are stored in `~/.zvm/settings.json`:\n\n```json\n{\n    \"version_map_url\": \"https://ziglang.org/download/index.json\",\n    \"zls_vmu\": \"https://releases.zigtools.org/\",\n    \"mirror_list_url\": \"https://ziglang.org/download/community-mirrors.txt\",\n    \"use_color\": true,\n    \"always_force_install\": false,\n    \"preferred_mirror\": \"\",\n    \"mirror_updated_at\": 0,\n    \"proxy\": \"\"\n}\n```\n\nOverride the default `~/.zvm` location with the `ZVM_PATH` environment variable:\n\n```bash\nexport ZVM_PATH=\"/custom/path\"\n```\n\n## CI / Releases\n\nPushing a `v*` tag triggers automatic CI builds for all platforms:\n\n```bash\ngit tag v0.1.0\ngit push origin v0.1.0\n```\n\nThis creates two GitHub Releases:\n- **Versioned release** with `zvm-v0.1.0-\u003cplatform\u003e.tar.gz` assets\n- **`latest` release** with stable-named assets for permalink downloads\n\nStable download URLs (always point to the latest version):\n\n| Platform | File |\n|----------|------|\n| macOS (Apple Silicon) | `zvm-aarch64-macos.tar.gz` |\n| macOS (Intel) | `zvm-x86_64-macos.tar.gz` |\n| Linux (x86_64) | `zvm-x86_64-linux.tar.gz` |\n| Linux (ARM64) | `zvm-aarch64-linux.tar.gz` |\n| Windows (x86_64) | `zvm-x86_64-windows.zip` |\n| Windows (ARM64) | `zvm-aarch64-windows.zip` |\n\nAll available at `https://github.com/lispking/zvm/releases/latest/download/\u003cfile\u003e`\n\n## Project Structure\n\n```\nsrc/\n├── main.zig          Entry point: allocator setup, CLI dispatch\n├── cli.zig           Hand-written CLI parser with aliases and flags\n├── zvm.zig           Core ZVM struct (base dir, settings, versions)\n├── settings.zig      Settings persistence (JSON load/save)\n├── errors.zig        Domain error definitions\n├── platform.zig      OS/arch detection, symlink management\n├── terminal.zig      ANSI color output helpers\n├── version_map.zig   Fetch/parse Zig \u0026 ZLS version maps\n├── http_client.zig   HTTP downloads with mirror and proxy support\n├── crypto.zig        SHA256 file verification\n├── archive.zig       Archive extraction (.tar.xz, .zip)\n├── install.zig       Install command (download, verify, extract)\n├── use.zig           Use command (switch active version)\n├── list.zig          List command (installed, remote, VMU)\n├── uninstall.zig     Uninstall command\n├── clean.zig         Clean command (remove archives)\n├── run.zig           Run command (execute specific version)\n├── upgrade.zig       Upgrade command (self-update from GitHub)\n├── vmu.zig           VMU command (version map source)\n├── mirrorlist.zig    Mirrorlist command (mirror config)\n├── proxy.zig         Proxy command (proxy config)\n└── completion.zig    Shell completion generation (zsh/bash)\n```\n\n## Comparison with the Go Version\n\nThis is a rewrite of [tristanisham/zvm](https://github.com/tristanisham/zvm) (Go). Key differences:\n\n| | Go (original) | Zig (this) |\n|---|---|---|\n| Binary size | ~10MB | ~1-2MB |\n| Dependencies | Go runtime | None (static) |\n| Build tool | Go compiler | Zig compiler |\n| Shell completion | No | Yes (zsh, bash) |\n| Mirror selection | Sequential | Latency-based |\n| Proxy support | No | Yes (HTTP/SOCKS5) |\n| Windows support | Yes | Yes (junctions) |\n\n## License\n\nMIT\n","funding_links":[],"categories":["Fundamentals"],"sub_categories":["Package and Version Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flispking%2Fzvm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flispking%2Fzvm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flispking%2Fzvm/lists"}