gvm provides a simple command-line interface for managing multiple Go versions. All commands follow a consistent pattern and provide helpful error messages.
Command | Description | Example |
---|---|---|
install | Install a specific Go version | gvm install go1.19 |
list | List installed and available versions | gvm list --all |
use | Switch to a specific version | gvm use go1.19 |
uninstall | Remove an installed version | gvm uninstall go1.18 |
# Install the latest stable version
gvm install --latest
# Or install a specific version
gvm install go1.19
# Set it as the default
gvm use go1.19
# Verify it's active
go version
# List all installed versions
gvm list
# See what's available to install
gvm list --all
# Switch between versions
gvm use go1.20
gvm use go1.19
# Clean up old versions
gvm uninstall go1.18
All commands support the following global flags:
Flag | Description |
---|---|
--help |
Show help for any command |
--version |
Show version information |
All commands provide clear, actionable error messages for common issues:
For help with any command, use:
gvm [command] --help
For example: ```bash gvm install –help gvm list –help