nvm
БесплатноБез исполняемых скриптовНе проверенnvm (Node Version Manager) is a shell script that installs several Node.js versions side by side in your home directory and switches between them per terminal…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
nvm — install and switch Node.js versions per project
Overview
nvm is a shell function, not a binary. Sourcing nvm.sh defines the nvm command, which downloads official Node.js builds (with checksum verification) into ~/.nvm/versions/node/ and rewrites PATH for the current shell. Each project can name its version in a .nvmrc file. Because it is a function, it only exists in shells that sourced the script. That explains most "command not found" problems in cron, Docker and CI.
nvm does not support native Windows (use WSL, or nvm-windows, a different project). If a team also needs Python, Go or Ruby versions from one file, see the mise skill. For what to do with Node once it is installed, see the node skill.
Instructions
Install (download, inspect, then run)
The installer is a script, so download it to a file, look at it, and run it. Use the pinned release tag (v0.41.0 was the latest release on 2026-11-05; check https://github.com/nvm-sh/nvm/releases):
curl -fsSLo nvm-install.sh https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh
sha256sum nvm-install.sh # v0.41.0 gave 045932fe05f0d4247c946f2ec0ec4026dbfd8ce88a5f67ea28d8ea833227f48b when checked; note the value for your records
less nvm-install.sh # it clones or downloads into ~/.nvm and edits one shell profile
bash nvm-install.sh
By default the installer appends a loader snippet to your shell profile (~/.bashrc, ~/.zshrc, ...). To keep the profile untouched, run PROFILE=/dev/null bash nvm-install.sh and add the snippet yourself. To install elsewhere set NVM_DIR first. Open a new terminal, or load nvm into the current one:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
nvm --version # 0.41.0
command -v nvm prints nvm when it is loaded. which nvm finds nothing, because it is a function.
Install and select versions
nvm ls-remote --lts # every LTS release, latest per line marked "Latest LTS"
nvm version-remote --lts # just the newest LTS, e.g. v26.13.0
nvm install --lts # newest LTS
nvm install 24 # newest 24.x
nvm install 22.23.4 # exact version
nvm install 24 --no-progress # no download bar (use in logs and CI)
nvm use 24 # switch this shell
nvm current # active version
nvm which 24 # path of that version's node binary
nvm ls # installed versions, aliases, and the lts/* names
Version arguments are prefixes (24 means the newest installed or available 24.x) and aliases such as node (latest release), lts/*, and lts/krypton (codenames are lowercase). If a version is not installed, nvm use prints You need to run `nvm install 24` to install and use it. (with that version number) instead of downloading it.
Default version and aliases
nvm alias default 24 # used by every new terminal
nvm alias legacy 22 # your own name; then: nvm use legacy
nvm install 26 --default # install and make it the default in one step
nvm use system # go back to the Node installed by the OS
nvm deactivate # remove nvm's versions from PATH in this shell
Pin a version per project with .nvmrc
.nvmrc holds one line: 24, 24.22.2, lts/krypton or lts/*.
echo "lts/krypton" > .nvmrc # or: nvm use 24 --save (writes the resolved v24.22.2)
nvm install # installs the version named in .nvmrc (no-op if present), then uses it
nvm use # switches to it; "No version provided and no .nvmrc file found" otherwise
nvm looks for .nvmrc in the current directory and walks up through parent directories. nvm current does not read .nvmrc, so run nvm use first. nvm does not switch automatically when you cd; the README documents optional shell hooks for that, which you must add to your own profile.
Run one command on another version
nvm exec 22 node --version # runs the command with Node 22 on PATH, shell stays unchanged
nvm run 22 scripts/migrate.js --dry-run # node 22 running that script
nvm exec 22 npm test # test the project on an older line
nvm exec and nvm run do not change your current shell, which makes them the safe way to try a second version. Piping nvm use or nvm install into another command (nvm use 24 | tail) runs it in a subshell, so the switch is lost; run it on its own line.
Upgrade and move global packages
nvm install 26 --reinstall-packages-from=24 --latest-npm # new line, same global packages, newest npm
nvm install --lts --default # follow the newest LTS
nvm uninstall 22.23.4 # delete one installed version
Global packages live inside each version's directory, so they are not shared between versions. `-
Установить nvm в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл nvm?
nvm (Node Version Manager) is a shell script that installs several Node.js versions side by side in your home directory and switches between them per terminal session or per project. Use this skill when a user asks to install or upgrade Node.js without sudo, run a project on a different Node version, pin a version with `.nvmrc`, move to the newest LTS, keep global npm packages when upgrading, or fix "nvm: command not found" in scripts, Docker and CI. Works on Linux, macOS and WSL with bash, zsh or other POSIX shells; not for native Windows.
Как установить скилл nvm?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл nvm запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub