Skip to content

jakubro/profile.d-nvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

profile.d-nvm

A plugin for profile.d that integrates nvm - Node Version Manager, a tool for managing multiple Node.js versions.

Features

  • Automatically installs and configures nvm
  • Keeps nvm up-to-date with the latest version
  • Loads nvm automatically in your shell
  • Provides bash completion for nvm commands
  • Maintains persistent NVM_DIR environment variable

Installation

  1. Add the following line to your ~/.profiledrc:
PLUGINS=(
  # ... your other plugins ...
  https://github.com/jakubro/profile.d-nvm
)
  1. Run the installation commands:
profile.d-install
. ~/.bashrc

Usage

Once installed, you can use nvm to manage your Node.js installations:

# List available Node.js versions
nvm ls-remote

# Install a specific version
nvm install 18.0.0

# Use a specific version
nvm use 18.0.0

# Set default Node.js version
nvm alias default 18.0.0

# Run a command with a specific version
nvm exec 18.0.0 node --version

How It Works

The plugin:

  1. Installs nvm in ~/.nvm during the installation phase
  2. Updates nvm to the latest version when running profile.d-install
  3. Sets up the NVM_DIR environment variable
  4. Loads nvm and its bash completion on shell initialization

Contributing

If you would like to contribute to this project, please feel free to submit a pull request or open an issue for discussion.

License

MIT License - see the LICENSE file for details.

About

A plugin for profile.d that integrates nvm - Node Version Manager, a tool for managing multiple Node.js versions.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages