Full-stack-skills nvm-setup
Configure shell initialization files so nvm loads correctly in bash, zsh, and fish. Covers NVM_DIR, nvm.sh sourcing, profile file selection, XDG_CONFIG_HOME, and bash completion. Use when the user reports nvm not found after installation, needs to configure shell profiles, or wants to set up nvm environment variables.
install
source · Clone the upstream repo
git clone https://github.com/partme-ai/full-stack-skills
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/partme-ai/full-stack-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/nvm-skills/nvm-setup" ~/.claude/skills/partme-ai-full-stack-skills-nvm-setup && rm -rf "$T"
manifest:
skills/nvm-skills/nvm-setup/SKILL.mdsource content
nvm Shell Setup
Configure shell profiles so nvm loads automatically on every new terminal session.
Workflow
-
Identify the shell and profile file:
- bash:
(or~/.bashrc
on macOS)~/.bash_profile - zsh:
~/.zshrc - fish:
~/.config/fish/config.fish - With XDG_CONFIG_HOME:
etc.$XDG_CONFIG_HOME/bash/bashrc
- bash:
-
Add nvm initialization to the correct profile:
# Required lines for bash/zsh: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" -
Optional: Load nvm without switching versions (faster shell startup):
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use -
Verify nvm loads in a new shell:
# Open a new terminal, then: command -v nvm # Should print "nvm" nvm --version # Should print version number
Notes:
- XDG_CONFIG_HOME changes the expected profile path.
- Use
when you only want nvm loaded without switching versions.--no-use - For installation, use the nvm-install skill. For version usage, use nvm-usage-basics.
Example file map
- Profile configuration templatestemplates/shell-config.md
- Environment variable referenceexamples/environment-variables.md
- Bash completion setupexamples/bash-completion.md
- Completion usage examplesexamples/bash-completion-usage.md
Keywords
nvm setup, NVM_DIR, nvm.sh, profile, bash, zsh, fish, XDG_CONFIG_HOME, shell init