• Stars
    star
    1,046
  • Rank 42,573 (Top 0.9 %)
  • Language
    Perl
  • License
    MIT License
  • Created over 12 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Node.js version manager

nodebrew

Build Status

Node.js version manager.

Install

Install with curl.

$ curl -L git.io/nodebrew | perl - setup

Or, download and setup.

$ wget git.io/nodebrew
$ perl nodebrew setup

Add PATH setting your shell config file (.bashrc or .zshrc).

export PATH=$HOME/.nodebrew/current/bin:$PATH

Reload config.

$ source ~/.bashrc

Confirm.

$ nodebrew help

NODEBREW_ROOT (which indicates nodebrew's home directory) is configurable. If you want to install nodebrew manually, please configure such as follows.

export NODEBREW_ROOT=/path/to/.nodebrew

The default value is $HOME/.nodebrew.

Usage

nodebrew install <version>

Install Node.js.

$ nodebrew install v8.9.4

# or
$ nodebrew install latest # latest version
$ nodebrew install stable # stable version
$ nodebrew install v8.9   # v8.9 latest
$ nodebrew install 8.9.4  # without `v`

nodebrew compile <version>

If you want to compile from source, you can use compile command.

$ nodebrew compile v8.9.4

Pass configure options to Node.js.

$ nodebrew compile v8.9.4 --v8-options=--harmony

nodebrew use <version>

Switch a version to use.

$ nodebrew use v8.9.4
$ node -v
v8.9.4

# or
$ nodebrew use latest # latest version
$ nodebrew use stable # stable version
$ nodebrew use v8.9   # v8.9 latest
$ nodebrew use 8.9.4  # without `v`

nodebrew ls or nodebrew list

List all installed versions.

$ nodebrew ls
v8.9.9
v8.9.4

current: v8.9.4

nodebrew ls-remote

List remote versions.

$ nodebrew ls-remote
v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6
...

nodebrew ls-all

List installed and remote versions.

$ nodebrew ls-all
Remote:
v0.0.1    v0.0.2    v0.0.3    v0.0.4    v0.0.5    v0.0.6
...

Local:
v8.9.0
v8.9.4

current: v8.9.4

nodebrew alias

Set alias.

$ nodebrew alias default v8.9.4
default -> v8.9.4

$ nodebrew use default
use v8.9.4

$ nodebrew unalias default
remove default

nodebrew uninstall <version>

Uninstall Node.js.

$ nodebrew uninstall v8.9.4
v8.9.4 uninstalled

nodebrew selfupdate

Update nodebrew itself.

$ nodebrew selfupdate

nodebrew exec <version>

Execute other version temporary.

$ nodebrew exec v8.9.4 -- node app.js

All commands

$ nodebrew help                         Show this message
$ nodebrew install <version>            Download and install <version> (from binary)
$ nodebrew compile <version>            Download and install <version> (from source)
$ nodebrew install-binary <version>     Alias of `install` (For backward compatibility)
$ nodebrew uninstall <version>          Uninstall <version>
$ nodebrew use <version>                Use <version>
$ nodebrew list                         List installed versions
$ nodebrew ls                           Alias for `list`
$ nodebrew ls-remote                    List remote versions
$ nodebrew ls-all                       List remote and installed versions
$ nodebrew alias <key> <value>          Set alias
$ nodebrew unalias <key>                Remove alias
$ nodebrew clean <version> | all        Remove source file
$ nodebrew selfupdate                   Update nodebrew
$ nodebrew migrate-package <version>    Install global NPM packages contained in <version> to current version
$ nodebrew exec <version> -- <command>  Execute <command> using specified <version>
$ nodebrew prune [--dry-run]            Uninstall old versions, keeping the latest version for each major version

Uninstall nodebrew

$ rm -rf $HOME/.nodebrew

That's all.

Development

Install dependencies for testing.

$ carton install

Run test.

$ carton exec -- prove -lvr

License

MIT © Kazuhito Hokamura

More Repositories

1

node-jwt-simple

JWT(JSON Web Token) encode and decode module for node.js
JavaScript
1,365
star
2

js-flipsnap

snap scroll for touch device.
JavaScript
482
star
3

simpacker

Use modern JavaScript build system in Rails.
Ruby
134
star
4

go-prettyjson

JSON pretty print for Golang.
Go
134
star
5

react-micro-container

Micro framework for React
JavaScript
89
star
6

sprinkler

End To End Testing framework.
Go
49
star
7

mabiki

Provides throttle and debounce, which are compatible with lodash.
TypeScript
36
star
8

browserify-rails-example

Ruby
30
star
9

js-zip2address

jsで郵便番号から住所検索。google日本語検索使用。
JavaScript
30
star
10

immup

Update deeply nested objects/arrays without changing the original source
JavaScript
23
star
11

backbone-hands-on

Backbone.js ハンズオン講座
JavaScript
20
star
12

js-meca

markup engineer's coding adminicle javascript library
JavaScript
17
star
13

vim-html5validator

html5 validator vim plugin using validator.nu API.
Vim Script
17
star
14

x-sushiyuki

15
star
15

electron-template-2021

TypeScript
11
star
16

svg2raphael

svg2raphael web site
JavaScript
11
star
17

node-confy

Manage settings library, like as pit.
JavaScript
10
star
18

react-rails-example

Ruby
10
star
19

jekyll-template

Ruby
9
star
20

vim-prove

prove for vim plugin.
Vim Script
9
star
21

twitter-bot-kanojo

twitter kanojo bot using Google App Engine + JRuby
Ruby
9
star
22

ie-buglist.org

web site about IE bug. powerd by Ark
Perl
9
star
23

apimock-middleware

connect middleware for API Mocking.
JavaScript
9
star
24

atom-japanese-dictionary

英和/和英の辞書を引くためのAtomパッケージ
CoffeeScript
8
star
25

node-chain-tiny

A simple control flow library.
JavaScript
7
star
26

graphql-codegen-example-for-techlife

TypeScript
7
star
27

slides

my public slides
JavaScript
7
star
28

webtech-walker

webtech-walker blog
HTML
6
star
29

electron-starter

My Electron starter kit
TypeScript
5
star
30

grpc-web-proxy-nginx

JavaScript
5
star
31

google-inapp-payment-sample-node

Node.jsで実装したGoogle In-app paymentのサンプルアプリ
JavaScript
5
star
32

graphql-cli

JavaScript
5
star
33

tomoe

Tomoe API client
Go
5
star
34

node-data-section

Read data from comment, like a perl's Data::Section::Simple.
JavaScript
5
star
35

mocha-phantom-travis-test

mochaとphantomJSとtravis-ciでテストできるか実験
JavaScript
5
star
36

atom-sonots

CSS
5
star
37

react-micro-flyout

A react component that provides minimum feature for flyout
JavaScript
4
star
38

frontend-dev-env

JavaScript
4
star
39

js-count-this

JavaScript
4
star
40

atom-open-github-from-npm

Open GitHub URL from npm package name
CoffeeScript
4
star
41

gm-html5validator

HTML5 Validator For Greasemonkey
JavaScript
4
star
42

relay-handbook

Relay Handbook
4
star
43

eslint-config

My eslint config
JavaScript
3
star
44

draftan

TypeScript
3
star
45

titanium-sugamo.css

Titanium application for Sugamo.css
JavaScript
3
star
46

module-setup-flavors

my module setup flavors
Perl
3
star
47

jquery.ui.slideDownStream

JavaScript
3
star
48

vim-perllocallib

Set local::lib environment variables.
Vim Script
3
star
49

node-freee-api

JavaScript
3
star
50

i-sourceview

HTML source viewer for iPhone/iPad.
Python
3
star
51

linter-coffeescript

Linter plugin for CoffeeScript in the Atom text editor
CoffeeScript
2
star
52

graphql-examples

JavaScript
2
star
53

slidetool

HTML base slide tool.
JavaScript
2
star
54

drawing

JavaScript
2
star
55

node-await-flow

A simple async/await module, abstraction of node-fibers.
JavaScript
2
star
56

js-storageDB

localStorageをDB風に使うためのライブラリ
JavaScript
2
star
57

sql-formatter

TypeScript
2
star
58

node-connect-external-sass

node-connect middleware for sass. using external ruby sass command.
JavaScript
2
star
59

moment

Moment.js is a lightweight javascript date library for parsing, manipulating, and formatting dates.
JavaScript
2
star
60

tolymer-score-input-prototype

JavaScript
1
star
61

vscode-graphql-schema-linter

TypeScript
1
star
62

homebrew-sprinkler

Ruby
1
star
63

bagman

JavaScript
1
star
64

react-flex-frame

1
star
65

mysql2-query-logger

Ruby
1
star
66

atom-spec-tree-view

List and jump to line in the current spec file.
CoffeeScript
1
star
67

isucon-trial-noder

PHP
1
star
68

react-backbone-example

JavaScript
1
star
69

homebrew-tomoe

Ruby
1
star
70

create-react-app-ts-dev

JavaScript
1
star
71

atom-project-finder

A Atom package for finding and opening projects
CoffeeScript
1
star
72

browserbench

Go
1
star
73

github-url-from-npm

Get GitHub URL from npm module name
JavaScript
1
star
74

isucon9q

TypeScript
1
star
75

css-spec

JavaScript
1
star