Skip to content

Getting Started

Before installing Node.js tooling with Homebrew, make sure Homebrew is installed and configured in your shell. See Installing Homebrew for macOS.

Fast Node Manager (fnm) is a simple and fast Node.js version manager.

Demo of fnm

To install fnm with Homebrew, run the following command:

Terminal window
brew install fnm

Now, add the following line to the end of your ~/.zshrc file:

Terminal window
eval "$(fnm env --use-on-cd --shell zsh)"

To see a list of all commands for fnm, use:

Terminal window
fnm help
CommandDescription
fnm list-remoteList all remote Node.js versions [aliases: ls-remote]
fnm listList all locally installed Node.js versions [aliases: ls]
fnm install <version>Install a Node.js version [aliases: i]
fnm install --ltsInstall the latest stable version of Node.js [aliases: i]
fnm use <version>Change Node.js version
fnm default <version>Set a version as the default version
fnm currentPrint the current Node.js version
fnm uninstall <version>Uninstall a Node.js version [aliases: uni]
fnm helpPrint this message or the help of the given subcommand(s)

To check the installed Node.js version, run the following command:

Terminal window
node --version

Alternatively, you can download the official Node.js installer from the Node.js website.

Bun is a fast, incrementally adoptable all-in-one JavaScript, TypeScript & JSX toolkit. Use individual tools like bun test or bun install in Node.js projects, or adopt the complete stack with a fast JavaScript runtime, bundler, test runner, and package manager built in. Bun aims for 100% Node.js compatibility.

To install Bun run the following command:

Terminal window
curl -fsSL https://bun.com/install | bash

To check that Bun was installed successfully, open a new terminal window and run:

Terminal window
bun --version
# Output: 1.x.y
# See the precise commit of `oven-sh/bun` that you're using
bun --revision
# Output: 1.x.y+b7982ac13189

For zsh, add this line to your .zshrc configuration file:

.zshrc
path=("$HOME/.bun/bin" $path)

Then, reload your shell configuration or open a new terminal window.

Once installed, the binary can upgrade itself:

Terminal window
bun upgrade