To install Bun, open your terminal and run
npm install -g bun
If you don’t have Node.js installed yet, check out other installation options
After the installation you’ll have two commands available: bun
and bunx
.
You’ll use bunx
to install and directly run packages. If you know or used npx
, that’s the same thing.
For everything else, you’ll use the bun
command.
We’ll see more about it, but if you type just bun
you’ll see a overview of how to use it.
bun --help
to see a more detailed list of flags you can use.
And just so you know, you can upgrade Bun running bun upgrade
.
Lessons this unit:
0: | Introduction |
1: | ▶︎ Installing Bun |
2: | Running your first Bun program |
3: | Working with packages |
4: | Bun's built-in features |