Skip to content

gvm

A command-line tool for installing and switching between multiple Go language versions.

Stars
11.7k
Forks
584
Licence
MIT
Language
Shell
Last update
2.2 years ago
Type
CLI

No commits in over a year — check for forks or alternatives before adopting.

What it is

GVM is a shell-based command-line tool that lets you install several versions of the Go programming language on one machine and switch between them. It also offers commands to list available versions, compare files in the Go installation directory, and manage separate Go workspaces (called package sets). People use it when projects need different Go versions and mixing them causes build problems.

  • Install a specific Go release such as go1.4 with gvm install go1.4
  • Switch the active Go version with gvm use and set it as default
  • List installed versions with gvm list and available ones with gvm listall
  • Create a separate package set with gvm pkgset create for an isolated workspace

Great for

  • Go developers who work on several projects that need different Go versions
  • Developers who need to test code against an older or newer Go release
  • Engineers who want isolated dependency environments per project using package sets
  • People comfortable with the terminal and shell scripts

Not ideal for

  • Users who only need one Go version and can use the official installer or a package manager instead, since GVM adds setup overhead
  • Windows users, because the README only documents Mac OS X, Linux, and FreeBSD requirements
  • Anyone wanting a polished graphical interface, since the README describes only command-line usage
Step-by-step guide: how to use gvmInstall, first run, examples, tips and FAQs

How to get it

  1. 1

    See the README

    You'll need: Bison · curl · git · Mercurial (Mac OS X and some Linux setups per the README) · gcc and make (for compiling Go from source)

    Install Bison (Debian/Ubuntu)

    sudo apt-get install bison

    Install gvm

    bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
  2. 2

    Run it

    • Install Bison and the other listed system requirements for your OS
    • Run the gvm installer script from the README
    • Install a Go version, for example: gvm install go1.4
    • Activate it with gvm use go1.4 --default
    • Check the active version with gvm list
  3. 3

    Get the most out of it

    • Use gvm install with -B to install from a binary when source builds fail
    • Use --prefer-binary to try a binary install and fall back to source automatically
    • Create per-project package sets with gvm pkgset and use --local for repository-specific paths
    • Use gvm diff to see which files were added or removed in GOROOT

Downloads

Strengths

  • Installs and switches between many Go versions from one tool
  • Supports bootstrapping older Go versions needed to build newer ones, as described in the README
  • Shell-based and simple to remove with gvm implode or rm -rf ~/.gvm

Trade-offs

  • The README notes that Go 1.5+ requires a multi-step bootstrap process, which is error-prone
  • Upgrades from older versions can leave gvm's state mixed up, according to the troubleshooting section
  • The README's last push date is August 2024 and it lists no formal release, so maintenance status is uncertain

How it compares

ProjectStarsTypeLevelUpdatedBest for
gvm (this)11.7kCLIintermediate2.2 years agoGo developers who work on several projects that need different Go versions
asdf25.6kDev toolbeginner5 days agoDevelopers who work on several projects that need different language versions
cli46.8kCLIbeginner6 days agoDevelopers who already work in the terminal and use GitHub daily
croc40.8kCLIbeginner4 days agoPeople who need to send a file to someone without setting up a server, accounts, or port forwarding
lux31.8kCLIbeginner7 months agoPeople who want to save videos from supported sites to a local file from the command line
gitleaks30.6kCLIbeginner9 days agoDevelopers who want to catch accidentally committed credentials before they reach a shared repository

Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.