Bun is a JavaScript runtime to replace Node.js. It is built based on Apple’s JS JavaScriptCore.


Install Bun

With brew:

brew tap oven-sh/bun
brew install bun

Installing a specific version with brew: brew install bun@1.1.38

Bun’s CLI replaces Node and NPM both:

Creating a project: bun init

Adding dependencies: bun add react react-dom

My bun sandbox: /sandbox/bun-sandbox

Bunx package runner

Like NPX, Bun also has a package runner called Bun x, available in the terminal as bunx.

Building a Vite app

For more on Vite, see Vite

Bun with Elysia

bun create elysia app

Bun with Astro

Bun and React.js

Bun is great for working withReact