Tutorial
These examples assume shell integration is enabled. Pick versions shown by vmr search for your platform.
Switch an SDK
vmr plugins
vmr search node
vmr use node@20.11.0
vmr local nodevmr use installs a missing version and makes it active globally. To remove a version, run vmr uninstall node@20.11.0; vmr uninstall node@all removes all installed Node versions.
Pin a project
cd my-project
vmr use -l node@20.11.0The command writes .vmr.lock and enters a session. Commit the file so teammates can share the pin. When you later enter the project, the shell hook activates its versions, asking before installing any that are missing; leaving restores the previous environment.
Project lock files are limited to 1 MiB; larger files are ignored.
Try a temporary version
vmr use -s python@3.12.2
python --version
exitThe session ends at exit, restoring the prior environment. If you need a session inside another session, toggle the setting first with vmr nested.
Install from conda-forge
vmr search -p lua
vmr use -p lua@5.4.6Use VMR_PIXI_CHANNEL to select a mirror. Package activation scripts' environment variables are not imported.
Move to another machine
vmr freeze my-versions.txt
# Copy my-versions.txt to the new machine, then:
vmr use -f my-versions.txtThe manifest contains one sdk@version per line; # begins a comment. The active version is exported last for each SDK, so replay selects it. Without a filename, freeze writes vmr_<YYYYMMDD>.txt.
Migrate an existing setup
vmr migrate --asdf
vmr migrate --vfox
vmr migrate --system
# Review the generated file, then install its entries:
vmr use -f migration_from_asdf.txtMigration reads existing state and writes migration_from_asdf.txt, migration_from_vfox.txt, or migration_from_system.txt; it does not install anything or modify the other manager. It skips unsupported names and incomplete installations, and does not convert project-level version files. System probing skips executables owned by common version managers.
To override name mapping, supply a positional map file:
nodejs node
golang go
unwanted -vmr migrate my-map.txt --asdfThe map is authoritative: unlisted names are skipped and reported; a bare source name or - target skips that source.
Configure downloads
vmr reads ~/.vmr/conf.toml, falling back to ~/.config/vmr/conf.toml only if the first file does not exist. It never merges them and writes to the file it read. If neither exists, it creates the first. Keys are PascalCase:
Configuration and vfox TOML migration files are limited to 1 MiB; version caches are limited to 16 MiB and are refreshed when rejected.
ProxyUri = "http://127.0.0.1:7890"
ThreadNum = 4Other keys include ReverseProxy, SDKIntallationDir (spelling intentional), VersionHostUrl, AllowNestedSessions, GithubToken, CacheRetentionTime, and DisableCache. Environment variables take precedence: VMR_SDK_INSTALLATION_DIR, VMR_HOST, VMR_LOCAL_PROXY, VMR_REVERSE_PROXY, VMR_DOWNLOAD_THREADS, VMR_ALLOW_NESTED_SESSIONS, and VMR_GITHUB_TOKEN. The GitHub token also falls back to GITHUB_TOKEN; standard HTTP_PROXY, HTTPS_PROXY, and NO_PROXY are honored.
See the command reference and FAQ for more.
