### Download and setup nodebrew with wget Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Downloads the nodebrew setup script using wget and then runs it with perl to install nodebrew. ```bash $ wget git.io/nodebrew $ perl nodebrew setup ``` -------------------------------- ### Confirm nodebrew installation Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Run nodebrew help to verify that nodebrew is installed and working. ```bash $ nodebrew help ``` -------------------------------- ### Install dependencies for testing Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Install the dependencies required for running nodebrew's tests using carton. ```bash $ carton install ``` -------------------------------- ### Install a specific Node.js version Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Install a specific Node.js version using nodebrew install. The version can be specified with or without the 'v' prefix, and keywords like 'latest' and 'stable' are supported. ```bash $ 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` ``` -------------------------------- ### List installed versions with nodebrew ls Source: https://github.com/hokaccha/nodebrew/blob/master/README.md List all installed Node.js versions using nodebrew ls or nodebrew list. The output shows the current version. ```bash $ nodebrew ls v8.9.9 v8.9.4 current: v8.9.4 ``` -------------------------------- ### Install nodebrew with curl Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Installs nodebrew using curl and perl. Run this command in your terminal to set up nodebrew. ```bash $ curl -L git.io/nodebrew | perl - setup ``` -------------------------------- ### List installed and remote versions with nodebrew ls-all Source: https://github.com/hokaccha/nodebrew/blob/master/README.md List both remote and installed Node.js versions using nodebrew ls-all. The output shows the current version. ```bash $ 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 ``` -------------------------------- ### List remote versions with nodebrew ls-remote Source: https://github.com/hokaccha/nodebrew/blob/master/README.md List all remote Node.js versions available for installation using nodebrew ls-remote. ```bash $ nodebrew ls-remote v0.0.1 v0.0.2 v0.0.3 v0.0.4 v0.0.5 v0.0.6 ... ``` -------------------------------- ### All nodebrew commands Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Complete list of all nodebrew commands with their descriptions. ```bash $ nodebrew help Show this message $ nodebrew install Download and install (from binary) $ nodebrew compile Download and install (from source) $ nodebrew install-binary Alias of `install` (For backward compatibility) $ nodebrew uninstall Uninstall $ nodebrew use Use $ 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 Set alias $ nodebrew unalias Remove alias $ nodebrew clean | all Remove source file $ nodebrew selfupdate Update nodebrew $ nodebrew migrate-package Install global NPM packages contained in to current version $ nodebrew exec -- Execute using specified $ nodebrew prune [--dry-run] Uninstall old versions, keeping the latest version for each major version ``` -------------------------------- ### Switch Node.js version with nodebrew use Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Switch to a specific Node.js version using nodebrew use. The version can be specified with or without the 'v' prefix, and keywords like 'latest' and 'stable' are supported. ```bash $ 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` ``` -------------------------------- ### Run nodebrew tests Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Run the test suite for nodebrew using carton exec. ```bash $ carton exec -- prove -lvr ``` -------------------------------- ### Set, use, and remove aliases with nodebrew alias Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Set an alias for a version, use the alias, and remove it. The output shows the result of each command. ```bash $ nodebrew alias default v8.9.4 default -> v8.9.4 $ nodebrew use default use v8.9.4 $ nodebrew unalias default remove default ``` -------------------------------- ### Compile Node.js from source Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Compile a specific Node.js version from source using nodebrew compile. You can pass configure options to Node.js. ```bash $ nodebrew compile v8.9.4 ``` ```bash $ nodebrew compile v8.9.4 --v8-options=--harmony ``` -------------------------------- ### Execute a command with a temporary version Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Execute a command using a specific Node.js version temporarily with nodebrew exec. ```bash $ nodebrew exec v8.9.4 -- node app.js ``` -------------------------------- ### Uninstall a Node.js version Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Uninstall a specific Node.js version using nodebrew uninstall. The output confirms the uninstallation. ```bash $ nodebrew uninstall v8.9.4 v8.9.4 uninstalled ``` -------------------------------- ### Uninstall nodebrew Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Remove the nodebrew home directory to uninstall nodebrew completely. ```bash $ rm -rf $HOME/.nodebrew ``` -------------------------------- ### Set NODEBREW_ROOT environment variable Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Set the NODEBREW_ROOT environment variable to specify a custom nodebrew home directory. The default is $HOME/.nodebrew. ```bash export NODEBREW_ROOT=/path/to/.nodebrew ``` -------------------------------- ### Add nodebrew PATH to shell config Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Add this export line to your shell config file (.bashrc or .zshrc) to make nodebrew available in your PATH. ```bash export PATH=$HOME/.nodebrew/current/bin:$PATH ``` -------------------------------- ### Reload shell config Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Reload your shell configuration file after adding the PATH export. ```bash $ source ~/.bashrc ``` -------------------------------- ### Update nodebrew itself Source: https://github.com/hokaccha/nodebrew/blob/master/README.md Update nodebrew to the latest version using nodebrew selfupdate. ```bash $ nodebrew selfupdate ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.