Easily switch between multiple Node versions without using nvm

If you already have Homebrew, you don't need nvm to juggle Node versions on macOS. brew unlink / brew link handles it.

Install a versioned formula

1brew install node@22

The node@N formulae are keg-only — Homebrew won't symlink them into your PATH automatically because they'd collide with whatever brew install node already linked.

Switch versions

Unlink whatever's currently linked and link the version you want:

1brew unlink node && brew link --overwrite --force node@22

--overwrite because /opt/homebrew/bin/node is probably already taken; --force because keg-only formulae need explicit consent. Verify with node -v.

To go back:

1brew unlink node@22 && brew link node

When to reach for nvm anyway

Fine for two or three versions you switch between rarely. If you want .nvmrc-style auto-switching when you cd into a project, use fnm, volta, or nvm itself — that's the one thing brew link won't do for you.