Skip to main content
Bun is designed to be a drop-in replacement for Node.js. It starts 4x faster, installs packages up to 30x faster than npm, and includes everything you need to build, test, and ship JavaScript/TypeScript applications.

Runtime

Execute JS/TS files with near-zero overhead. TypeScript and JSX work out of the box.

Package Manager

Install packages up to 30x faster than npm, with workspaces and a global cache.

Bundler

Bundle TypeScript, JSX, CSS, and HTML for browsers and servers natively.

Test Runner

Jest-compatible test runner with snapshots, mocks, and DOM testing built in.

Get started in minutes

1

Install Bun

Run the install script to download the single bun binary.
curl -fsSL https://bun.sh/install | bash
2

Create a project

Initialize a new project or use Bun in an existing Node.js project.
mkdir my-app && cd my-app
bun init
3

Run your code

Run any TypeScript or JavaScript file directly — no compilation step needed.
bun run index.ts
4

Install dependencies

Install packages from npm faster than any other package manager.
bun install

Explore by topic

HTTP Server

Build fast HTTP servers with Bun.serve() — supports WebSockets, TLS, and streaming.

SQLite

Query SQLite databases with Bun’s built-in, synchronous bun:sqlite driver.

Shell scripting

Use Bun.$ to write cross-platform shell scripts in TypeScript.

Node.js compatibility

Drop-in compatibility with Node.js APIs, globals, and npm packages.

Deployment guides

Docker

Containerize your Bun app with an optimized multi-stage Dockerfile.

Vercel

Deploy serverless Bun functions on Vercel Edge Runtime.

AWS Lambda

Run Bun on AWS Lambda with a custom runtime layer.

Railway

One-click deploy Bun applications to Railway.

Build docs developers (and LLMs) love