version-manager

command module
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: MIT Imports: 2 Imported by: 0

README

Logo

Go Report Card GitHub License GitHub Release Discord

中文 | En


version-manager(vm)

vm is a simple, cross-platform, and well-tested version manager for programming languages and tools. It is totally created for general purpose. You don't need any plugins, but just vm. Then everything can be managed.

Maybe you've already heard of sdkman, gvm, nvm, pyenv, phpenv, etc. However, never of these can manage multiple programming languages. gvc does the job, but it adopts a lot of other features. Most importantly, gvc provides free VPNs/Proxies, which makes its promotion become impossible in China. So, vfox is born. Indeed, vfox implies some promising features by introducing lua runtime as plugins just like neovim. Actually, vfox is not as perfect as what it promises. Therefore, vm comes.


features

  • Installs or uninstalls versions of sdk.
  • Swithes between versions of sdk.
  • Handles envs.
  • Friendly to VSCoders or Neovimers.
  • No plugins needed.
  • More stable.
  • Download files blazingly fast🚀🚀🚀 with multi-threads. See with command vm use -h.

vm versus vfox

sdk vm vfox
java(jdk) ✅︎ ✅︎
maven ✅︎ ✅︎
gradle ✅︎ ✅︎
kotlin ✅︎ ✅︎
scala ✅︎ ❌︎
python ✅︎ ✅︎
miniconda ✅︎ ❌︎
go ✅︎ ✅︎
node ✅︎ ✅︎
deno ✅︎ ✅︎
bun ✅︎ ❌︎
flutter(dart) ✅︎ ✅︎
.net ✅︎ ✅︎
zig ✅︎ ✅︎
php ✅︎ ❌︎
rust ✅︎ ❌︎
cmdline-tool(android) ✅︎ ❌︎
vlang ✅︎ ❌︎
cygwin ✅︎ ❌︎
msys2 ✅︎ ❌︎
julia ✅︎ ❌︎
typst ✅︎ ❌︎
gleam ✅︎ ❌︎
git-for-windows ✅︎ ❌︎
neovim ✅︎ ❌︎
vscode ✅︎ ❌︎
protobuf(protoc) ✅︎ ❌︎
lazygit ✅︎ ❌︎
kubectl ✅︎ ❌︎

Installation/Update

  • for MacOS/Linux(run the command below in terminal)
curl --proto '=https' --tlsv1.2 -sSf https://gvc.1710717.xyz/proxy/https://raw.githubusercontent.com/gvcgo/version-manager/main/scripts/install.sh | sh
  • for Windows(run the command below in powershell)
powershell -nop -c "iex(New-Object Net.WebClient).DownloadString('https://gvc.1710717.xyz/proxy/https://raw.githubusercontent.com/gvcgo/version-manager/main/scripts/install.ps1')"

How to set a proxy?

Choose either proxy or reverse-proxy.

  • proxy
vm set-proxy <http://localhost:port or socks5://localhost:port>
  • reverse-proxy
# reverse proxy <https://gvc.1710717.xyz/proxy/> is available for free.
vm set-reverse-proxy https://gvc.1710717.xyz/proxy/
  • enable downloading from mirror sites in China.
vm use -mirror-in-china go@1.22.1

Subcommands

subcommand args desc
list - Shows what's supported.
search sdk-name Shows available versions for a sdk.
use sdk-name@version Installs/Swithes to the specific version of a sdk.
local sdk-name Shows installed versions of a sdk.
uninstall sdk-name@version or sdk-name@all Uninstalls versions for a sdk.
clear-cache sdk-name Clears the cached files for a sdk.
set-reverse-proxy https://gvc.1710717.xyz/proxy/ Sets a reverse-proxy for vm.
set-proxy http or socks5( scheme://host:port ) Sets a local proxy for vm.
env --remove=false/true Sets/Removes env manually.
install-self - Installs vm.
version - Shows version info of vm.
completion - Generate the autocompletion script for for the specified shell.(bash, zsh, fish, or powershell)

demo for MacOS

demo

demo for Windows

demo

demo for linux

demo


  • vm installation dir
$HOME/.vm/
  • application installation dir

Specified during installation of vm.

~ % ./vm install-self
Enter App Installation Dir["$Home/.vm/" by default]:
/Users/moqsien/.vm

For Windows

Note: If you are using vm on Windows11, you need to enable the Developer Mode as vm requires to create symbolic links. If you're on Windows10, and any creating-symbolic-links-failure occurs, you can try vm with Admin Privilege. To get envs take effect for windows, you may need to close the current powershell terminal and open a new one.


Contributors

Thanks to following people who have contributed to this project.


Supplementary

vm is created to be a cross-platform command line tool. It will not try to include everything like asdf-vm(based on shell script, only support unix-like system) did. Because that will greatly increase the complexity and also reduce the possibility of cross-platform. And most of the time, programming languages and tools that we usually use have been covered by vm. vm will not try to include sdks that need to be compiled under a certain platform. Because each developer's development environment is different, it is impossible to ensure the completion of a compilation. So vm will only use pre-compiled binaries for installations. If you have any sdks or tools to recommand for version management, please raise an issue in Issues.


Todo-List

  • To manage package repo mirror sites in China.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
vm
internal
pkgs

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL