
GoVM is a modern tool for managing multiple Go versions on your system. It features both a clean Terminal UI (TUI) and a command-line interface for easy installation and switching between Go versions.
1.21 for latest 1.21.x)go install github.com/melkeydev/govm@latest
Then in a new terminal run:
govm
To launch the TUI
When you first run GoVM, it will guide you through adding the required directory to your PATH. This is a one-time setup that enables GoVM to manage your Go versions.
Add this to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):
export PATH="$HOME/.govm/shim:$PATH"
Or run this command to add it automatically:
echo 'export PATH="$HOME/.govm/shim:$PATH"' >> ~/.bashrc # or ~/.zshrc
Then reload your shell configuration:
source ~/.bashrc # or whichever file you modified
Add the shim directory to your PATH:
setx PATH "%USERPROFILE%\.govm\shim;%PATH%"
Then restart your terminal.
GoVM can be used in two ways: via the interactive TUI or through command-line commands.
Launch the interactive TUI by running govm without arguments:
govm
i to install the selected versionu to use/switch to the selected versionr to refresh the list of available versionsTab to switch between "Available Versions" and "Installed Versions" viewsq to quit# Install a Go version (latest patch for the specified version)
govm install 1.21 # Installs the latest Go 1.21.x
# Switch to a Go version
govm use 1.20 # Switches to the latest installed Go 1.20.x
# List installed versions
govm list
# Show help
govm help
# Launch the TUI
govm
GoVM downloads Go versions from the official go.dev website and installs them in ~/.govm/versions. It uses a "shim" approach:
~/.govm/shim that point to the selected Go versiongo or other Go commands, these wrappers execute the proper versionThis ensures a seamless experience without needing to manually update environment variables or source scripts each time you switch versions.
# Clone the repository
git clone https://github.com/melkeydev/govm.git
cd govm
# Build and install
go build -o govm
Then place the binary somewhere in your PATH.
Add Homebrew repository to the system:
brew tap melkeydev/tap
You can then install your package with:
brew install govm