c:\> gnvm install latest 1.0.0-x86 1.0.0-x64 5.0.0
Start download Node.js versions [5.10.1, 1.0.0, 1.0.0-x86, 5.0.0].
5.10.1: 18% [=========>__________________________________________] 4s
1.0.0: 80% [==========================================>_________] 40s
1.0...: 50% [==========================>_________________________] 30s
5.0.1: 100% [==================================================>] 20s
End download.
c:\> gnvm ls
5.1.1 -- latest
1.0.0
1.0.0 -- x86
5.0.0 -- global
c:\> gnvm use latest
Set success, current Node.js version is 5.10.0.
c:\> gnvm update latest
Update success, current Node.js latest version is 5.10.0.
- Single file, not dependent on any environment.
- Direct use, no configuration.
- Color stdout.
- Support multiple download.
- Built-in [TAOBAO] (http://npm.taobao.org/mirrors/node), convenient switching, also support custom.
- Support
NPM
download / install.
-
For go user, please usage
go get github.com/Kenshin/gnvm
-
For git user, please usage
git clone [email protected]:Kenshin/gnvm-bin.git
-
For curl user, please usage
curl -L https://github.com/Kenshin/gnvm-bin/blob/master/32-bit/gnvm.exe?raw=true -o gnvm.exe
curl -L https://github.com/Kenshin/gnvm-bin/blob/master/64-bit/gnvm.exe?raw=true -o gnvm.exe
-
Not exist Node.js Environment
Download and unzip
gnvm.exe
save to any local folder and add this folder to EnvironmentPath
. -
Exist Node.js Environment
Download and unzip
gnvm.exe
save to the sameNode.js
folder.
- Run
cmd
(administrator permissions) and inputgnvm version
, if output printgnvm version
configuration is successful.
config Setter and getter .gnvmrc file
use Use any the local already exists of Node.js version
ls Show all [local] [remote] Node.js version
install Install any Node.js version
uninstall Uninstall local Node.js version and npm
update Update Node.js latest version
npm NPM version management
session Set any local Node.js version to session Node.js version
search Search and Print Node.js version detail usage wildcard mode or regexp mode
node-version Show [global] [latest] Node.js version
reg Add config property [noderoot] to Environment variable [NODE_HOME]
version Print GNVM version number
global
currentNode.js
version.latest
latestNode.js
version.session
currentcmd
Environment.( Temporary environment ).gnvmrc
gnvm
configure file, can be auto created and it saved local/remote Node.js version information.
gnvm.exe
is a single exe file, don't need to configure, direct usage.
.gnvmrc
globalversion: 5.0.1
latestversion: 5.10.1
noderoot: /Users/kenshin/Work/28-GO/01-work/src/gnvm
registry: http://npm.taobao.org/mirrors/node/
Change fast registry
gnvm config registry TAOBAO
Install multiple Node.js
Install any Node.js version include: automatic recognition of
latest
version,io.js
version and specified arch, e.g.x.xx.xx-x64
.
gnvm install latest 1.0.0-x86 1.0.0-x64 5.0.0
Uninstall local Node.js version
gnvm uninstall latest 1.0.0-x86 1.0.0-x64 5.0.0
Usage any local Node.js version
gnvm use 5.10.1
List all local Node.js versions
c:\> gnvm ls
5.1.1 -- latest
1.0.0
1.0.0 -- x86
5.0.0 -- global
Update local Node.js latest version
gnvm update latest
Install npm
gnvm
support installnpm
, download npm latest version, usagegnvm npm latest
.
gnvm npm latest
Search Node.js version from .gnvmrc registry
you can usage
*
or/regxp/
, e.g.gnvm search 5.*.*
orgnvm search /.10./
.
c:\> gnvm search 5.*.*
Search Node.js version rules [5.x.x] from http://npm.taobao.org/mirrors/node/index.json, please wait.
+--------------------------------------------------+
| No. date node ver exec npm ver |
+--------------------------------------------------+
1 2016-04-05 5.10.1 x86 x64 3.8.3
2 2016-04-01 5.10.0 x86 x64 3.8.3
3 2016-03-22 5.9.1 x86 x64 3.7.3
4 2016-03-16 5.9.0 x86 x64 3.7.3
5 2016-03-09 5.8.0 x86 x64 3.7.3
6 2016-03-02 5.7.1 x86 x64 3.6.0
7 2016-02-23 5.7.0 x86 x64 3.6.0
+--------------------------------------------------+
1. Not exist Node.js Environment and download Node.js latest version and usage it.
c:\> gnvm config registry TAOBAO
Set success, registry new value is http://npm.taobao.org/mirrors/node/
c:\> gnvm install latest -g
Notice: local latest version is unknown.
Notice: remote latest version is 5.10.1.
Start download Node.js versions [5.10.1].
5.10.1: 100% [==================================================>] 13s
End download.
Set success, latestversion new value is 5.10.1
Set success, global Node.js version is 5.10.1.
2. Update local Node.js latest version.
c:\> gnvm config registry TAOBAO
Set success, registry new value is http://npm.taobao.org/mirrors/node/
c:\> gnvm update latest
Notice: local Node.js latest version is 5.9.1.
Notice: remote Node.js latest version is 5.10.1 from http://npm.taobao.org/mirrors/node/.
Waring: remote latest version 5.10.1 > local latest version 5.9.1.
Waring: 5.10.1 folder exist.
Update success, Node.js latest version is 5.10.1.
3. See Node.js global and latest version.
c:\> gnvm node-version
Node.js latest version is 5.10.1.
Node.js global version is 5.10.1.
4. Verify config registry.
c:\> gnvm config registry test
Notice: gnvm config registry http://npm.taobao.org/mirrors/node/ valid ................... ok.
Notice: gnvm config registry http://npm.taobao.org/mirrors/node/index.json valid ......... ok.
5. Local not exist npm and install local Node.js version matching npm version.
c:\ gnvm npm global
Waring: current path C:\xxx\xxx\nodejs\ not exist npm.
Notice: local npm version is unknown
Notice: remote npm version is 3.8.3
Notice: download 3.8.3 version [Y/n]? y
Start download new npm version v3.8.3.zip
v3.8.3.zip: 100% [==================================================>] 4s
Start unzip and install v3.8.3.zip zip file, please wait.
Set success, current npm version is 3.8.3.
c:\> npm -v
3.8.7
6. Install latest npm version.
c:\ gnvm npm laltest
Notice: local npm version is 3.7.3
Notice: remote npm version is 3.8.7
Notice: download 3.8.7 version [Y/n]? y
Start download new npm version v3.8.7.zip
v3.8.7.zip: 100% [==================================================>] 3s
Start unzip and install v3.8.7.zip zip file, please wait.
Set success, current npm version is 3.8.7.
c:\> npm -v
3.8.7
- https://github.com/Kenshin/curl
- https://github.com/Kenshin/cprint
- https://github.com/Kenshin/regedit
- https://github.com/spf13/cobra
- https://github.com/tsuru/config
- https://github.com/pierrre/archivefile
- https://github.com/daviddengcn/go-colortext
- https://github.com/bitly/go-simplejson
- Add
HTTP_PROXY
. - Auto
Upgrade
, usagegnvm upgrad
. - Add
gnvm.exe
toChocolatey
. - Multiple system. (
MAC
,Linux
)
- Icon http://www.easyicon.net .
- Theme reference You-Get .