# nvm-sh/nvm

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/nvm-sh-nvm).**

93,825 stars · 10,227 forks · Shell · MIT

## Links

- GitHub: https://github.com/nvm-sh/nvm
- awesome-repositories: https://awesome-repositories.com/repository/nvm-sh-nvm.md

## Topics

`bash` `install` `lts` `node` `node-js` `nodejs` `nvm` `nvmrc` `posix` `posix-compliant` `shell` `version-manager` `zsh`

## Description

This project is a command-line tool designed for managing multiple runtime versions on a local machine. It functions as a shell-based environment manager that enables users to install, switch between, and maintain different versions of a runtime to support project-specific requirements or diverse shell sessions. By dynamically updating system paths and environment variables, it provides a consistent interface for runtime version control across various Unix-like operating systems.

The tool distinguishes itself through its portable, POSIX-compliant shell implementation, which ensures reliable execution across a wide range of shell environments. It utilizes lazy-loading function aliasing to defer the execution of management logic until a command is actually invoked, minimizing overhead during shell startup. Furthermore, it employs directory-symlink-based switching and persistent environment variable configuration to maintain a stable and predictable execution context for developers.

Beyond core version switching, the project supports a broad range of environment configuration capabilities. It facilitates the installation of pre-release and nightly builds, provides command-line tab completion for improved usability, and includes automated mechanisms for updating the manager itself. The system is designed to enforce environment consistency across development teams, allowing for standardized runtime configurations and simplified cross-version development workflows.

Installation is performed via shell scripts, which integrate the manager into the user's shell profile to ensure persistent access to versioning commands across terminal sessions.

## Tags

### Development Tools & Productivity

- [Path-Based Version Switchers](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/version-managers/path-based-version-switchers.md) — Swaps active runtime binaries by dynamically modifying the system PATH variable to target version-specific directories.
- [Shell-Based](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/version-managers/shell-based.md) — Integrates directly into POSIX shell sessions to facilitate the installation and active management of various runtime versions.
- [Runtime Version Managers](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/developer-environment-tooling/runtime-version-managers.md) — Enforces consistent runtime versions by configuring necessary environment variables and directory structures on local machines. ([source](https://github.com/nvm-sh/nvm/blob/v0.40.4/install.sh))
- [Version Managers](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/version-managers.md) — Downloads runtime binaries and updates shell profiles to ensure persistent access to multiple software versions. ([source](https://github.com/nvm-sh/nvm/blob/master/install.sh))
- [Shell Initialization Managers](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/terminal-cli-enhancements/shell-terminal-utilities/general-enhancements-tooling/terminal-utilities/shell-configuration-customization/shell-initialization-managers.md) — Injects management logic into startup files to intercept commands and dynamically adjust environment variables.
- [Lazy-Loading Mechanisms](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/terminal-cli-enhancements/shell-terminal-utilities/general-enhancements-tooling/terminal-utilities/shell-configuration-customization/shell-performance-optimizers/lazy-loading-mechanisms.md) — Defers the initialization of management logic until a version-specific command is explicitly invoked to improve shell startup performance.
- [Environment Consistency Tools](https://awesome-repositories.com/f/development-tools-productivity/development-workflow/environment-management/environment-consistency-tools.md) — Standardizes development environments by ensuring all team members utilize identical runtime versions and configuration settings.
- [Shell Environment Configurations](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/developer-environment-tooling/shell-environment-configurations.md) — Orchestrates shell-level paths and environment variables to ensure runtime binaries remain accessible across distinct terminal sessions.
- [Development Environment Configurations](https://awesome-repositories.com/f/development-tools-productivity/development-environment-management/environment-provisioning-configuration/development-environment-configurations.md) — Supports flexible deployment via shell scripts, allowing for manual, git-based, or containerized environment setup. ([source](https://github.com/nvm-sh/nvm#readme))
- [Shell Completions](https://awesome-repositories.com/f/development-tools-productivity/shell-completions.md) — Activates tab completion for shell sessions to simplify the discovery and execution of version management commands. ([source](https://github.com/nvm-sh/nvm#readme))
- [Version Manager Updaters](https://awesome-repositories.com/f/development-tools-productivity/version-control-repository-tools/version-management-tooling/version-manager-updaters.md) — Automates the update process to ensure the management tool remains current with the latest features and security patches. ([source](https://github.com/nvm-sh/nvm/blob/master/ROADMAP.md))

### Programming Languages & Runtimes

- [Symlink-Based Version Switching](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtime-management-utilities/symlink-based-version-switching.md) — Updates symbolic links to point to specific runtime directories, enabling seamless switching between multiple installed versions.
- [Cross-Shell Managers](https://awesome-repositories.com/f/programming-languages-runtimes/language-ecosystems-tooling/python-tooling/environment-managers/cross-shell-managers.md) — Maintains consistent runtime version control across a wide range of shell types and operating system configurations.
- [Runtime Execution Wrappers](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtime-management-utilities/runtime-execution-wrappers.md) — Wraps command execution to ensure operations run within the context of a specific, selected runtime version. ([source](https://github.com/nvm-sh/nvm/blob/master/AGENTS.md))
- [Pre-release Runtime Installers](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/runtime-environments/runtime-management-utilities/pre-release-runtime-installers.md) — Facilitates the discovery and installation of nightly or beta runtime builds to enable testing of pre-release software features. ([source](https://github.com/nvm-sh/nvm/blob/master/ROADMAP.md))

### Operating Systems & Systems Programming

- [POSIX-Compliant Shell Scripts](https://awesome-repositories.com/f/operating-systems-systems-programming/terminal-command-line-environments/shells-scripting/posix-compliant-shell-scripts.md) — Utilizes strictly portable shell syntax to ensure reliable execution and environment management across Unix-like systems.

### Part of an Awesome List

- [Developer Tools and Editors](https://awesome-repositories.com/f/awesome-lists/devtools/developer-tools-and-editors.md) — Version manager for handling multiple active Node.js environments.
- [Node.js Version Management](https://awesome-repositories.com/f/awesome-lists/devtools/node-js-version-management.md) — Node.js version manager.
- [Notes and Management](https://awesome-repositories.com/f/awesome-lists/productivity/notes-and-management.md) — Manages multiple active versions of the Node.js runtime.

### Software Engineering & Architecture

- [Cross-Version Testing](https://awesome-repositories.com/f/software-engineering-architecture/development-methodologies/engineering-best-practices/development-process-methodologies/development-workflows/cross-version-testing.md) — Facilitates testing applications against multiple runtime versions to verify compatibility and behavior across different release cycles.
- [Environment Variable Managers](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/environment-variable-management/environment-variable-managers.md) — Sets environment variables to define paths, mirrors, and default configurations for runtime management. ([source](https://github.com/nvm-sh/nvm#readme))
- [Environment Variables](https://awesome-repositories.com/f/software-engineering-architecture/application-lifecycle-management/configuration-management/environment-variable-management/environment-variables.md) — Controls runtime behavior by managing persistent shell variables that define the active execution context.

### DevOps & Infrastructure

- [Containerized Version Managers](https://awesome-repositories.com/f/devops-infrastructure/container-orchestration/platforms/container-orchestration-environments/containerized-version-managers.md) — Encapsulates runtime management within container images to provide consistent environments across development and production. ([source](https://github.com/nvm-sh/nvm/blob/master/Dockerfile))
- [Package Manager Configurations](https://awesome-repositories.com/f/devops-infrastructure/dependency-management/configuration-declaration-formats/package-manager-configurations.md) — Configures registry URLs and environment-specific variables to streamline package installation and dependency resolution. ([source](https://github.com/nvm-sh/nvm/blob/master/.npmrc))

### Testing & Quality Assurance

- [Test Version Managers](https://awesome-repositories.com/f/testing-quality-assurance/software-testing/test-execution-orchestration/test-version-managers.md) — Executes automated test suites to verify the functional integrity of version management logic across diverse environments. ([source](https://github.com/nvm-sh/nvm/tree/master/test))
