How to download and install Bun on Mac
Bun is a fast JavaScript runtime, package manager, bundler and test runner in one program, installed with one Terminal command from Bun’s official site. Here is how to install it, check it and keep it updated.

Bun
- macOS 13 or later
- Apple Silicon and Intel
- Free, open source
The links go to the developer’s website (bun.com). MacWashing is not affiliated with the developer and keeps no installers.
Open Terminal (Applications › Utilities) and run:
brew install bunHomebrew downloads the app from the developer’s server, checks the file and puts the app in Applications.
No Homebrew yet? How to install Homebrew: one command from brew.sh.
Before you start
Bun is a single program with no dependencies. It needs macOS 13 or later and runs on Apple Silicon and Intel Macs. The install script picks the right build by itself.
The command below is from Bun’s official documentation at bun.com. Bun’s site also lives at bun.sh. Don’t run install commands copied from other sites.
Install Bun with one command
- Open Terminal: Applications › Utilities › Terminal, or press Command-Space and type Terminal.
- Copy the command below, paste it into Terminal and press Return.
- The script downloads Bun into
~/.bunand adds~/.bun/binto your PATH in~/.zshrc. - Open a new Terminal window so it picks up the new PATH.
curl -fsSL https://bun.com/install | bashCheck and update Bun
In the new Terminal window, check that Bun runs:
bun --version- Updates. If you installed Bun with the script,
bun upgradeupdates it. If you installed it with Homebrew, usebrew upgrade buninstead. - Package cache. Bun keeps every package it downloads in a global cache in
~/.bun/install/cache, which grows with your projects.
If Bun doesn’t work
- «command not found: bun». Open a new Terminal window. If it still fails, check that
~/.zshrchas the linesexport BUN_INSTALL="$HOME/.bun"andexport PATH="$BUN_INSTALL/bin:$PATH". - Bun fails on an older Mac. Check your macOS version in About This Mac: Bun needs macOS 13 or later.
- Two copies of Bun. If you installed Bun both with the script and with Homebrew,
which bunshows which one runs. Keep one of them. - Start over. To remove Bun installed with the script, delete the
~/.bunfolder, then run the install command again.
Alternatives to Bun
Keep your Mac tidy

Package managers and other developer tools keep caches that grow with every project. System Junk in MacWashing finds the caches apps and developer tools build up and shows how much space they take.
Free trial · macOS 14 or later
Questions and answers
Is Bun free?
Yes. Bun is free and open source.
Should I use the script or Homebrew?
The script from bun.com is Bun’s main way and updates with bun upgrade. Homebrew installs the same Bun with brew install bun and updates it with brew upgrade bun. There is no app to download: Bun is a Terminal tool.
Can Bun replace Node.js?
Bun is designed as a drop-in replacement for Node.js, and most Node.js projects and npm packages work with it with little or no change. You can keep Node.js installed next to it.