v1.2 Bun 1.2 ships a Node-compatible package manager, S3 & Postgres clients, and 90% faster installs →
NEW Bun is now production-ready on Windows →

# Bun is a fast
all-in-one toolkit

Develop, test, run, and bundle JavaScript & TypeScript projects — all with Bun. A runtime, package manager, bundler and test runner in a single tool.

$ curl -fsSL bun.sh/install | bash
Read the docs →
Works with npm, Node.js APIs and node_modules — no rewrite required.
bun.com / docs / runtime / bun-apis
v1.2.4
Search the docs… ⌘K
Get Started
Welcome to Bun
Installation
Quickstart
TypeScript
Core Runtime
Bun APIs
Watch Mode
Debugging
bunfig.toml
Runtime / Bun APIs

### Bun APIs

Fast, native implementations of the things you build with every day.

Bun implements a set of native APIs for HTTP servers, file I/O, hashing, and SQLite — all written in native code and exposed on the global Bun object. They're drop-in replacements that run 3–5× faster than their Node.js counterparts.

server.ts Copy
// Bun.serve — a fast HTTP server const server = Bun.serve({ port: 3000, fetch(req) { return new Response("Bun 🥛"); }, }); console.log(`Listening on :${server.port}`);

###### Native modules

Bun.serve Bun.file Bun.$bun:sqlite Bun.password
Trusted in production by fast-moving teams
Vercel
Shopify
Midjourney
Linear
Replit
Anthropic
One tool, the whole workflow

## Everything you need to build, in a single binary.

Bun replaces node, npm, pnpm, yarn, jest, webpack, esbuild and dotenv. Less to install, less to configure, dramatically faster — and fully compatible with the ecosystem you already use.

### Runtime

A JavaScriptCore-powered runtime with first-class TypeScript, JSX and ESM. Starts in milliseconds, no transpile step.

$ bun run index.ts

### Package manager

An npm-compatible installer that's up to 25× faster than npm. Global cache, lockfile, workspaces — all built in.

$ bun install

### Bundler

Bundle for the browser, Node, or Bun with a single command. Tree-shaking, code-splitting, and a plugin API on board.

$ bun build ./app.ts

### Test runner

A Jest-compatible test runner built into the binary. Snapshots, mocks, and DOM testing — running at native speed.

$ bun test

### Node compatible

Implements Node.js APIs and globals — `fs`, `path`, `http`, `Buffer` — so your existing code just runs.

$ bun --bun next dev

### Built-in clients

Native SQLite, Postgres, Redis and S3 clients ship with the runtime. No drivers, no dependencies — just import and go.

$ import { sql } from "bun"
Install, faster

## Your node_modules, in a blink.

Bun installs dependencies up to 25× faster than npm by using a global module cache and the fastest possible syscalls on each OS. Same lockfile semantics, none of the waiting.

Try bun install Read the benchmarks →
25×
faster than npm
7×
faster than pnpm
0.36s
cold Next.js install
~/my-app · zsh
# swap npm for bun — same package.json $ bun install bun install v1.2.4 + react@19.0.0 + typescript@5.7.2 + @types/node@22.10.1 412 packages installed [0.36s] # run it — no build step $ bun run dev ✓ ready on http://localhost:3000
⚡ bun:test

> "We moved our entire CI to Bun and watched test suites go from 4 minutes to 38 seconds. It felt illegal."

JR
Jordan Reyes · Staff Engineer, Replit
bun test 0.38s
vitest 2.10s
jest 5.74s
1,240 tests all green

## Design system reference

Tokens, type ladder, radius, components — extracted from the live bun.com/docs surface.
View source ↗

### Color

Hot pink `#ff73a8` is the single chromatic accent — CTAs, active sidebar pills, links, focus rings. The cream `#fbf0df` is Bun's heritage canvas, kept for the hero. Hairlines are a warm pink-grey, never neutral.

Brand & accent

Bun pink
#ff73a8
Pink deep
#f24b8e
Pink soft
#ffe4ef
Cheek
#f9a8d4
Cream
#fbf0df
Cream deep
#f3e3c8

Surface

Canvas
#ffffff
Warm white
#fdfbfc
Surface
#faf7f8
Hairline
#f5f1f3
Hairline mid
#ece6e9
Terminal
#15131a

Text

Ink
#1e1a1b
Charcoal
#2d282a
Slate
#464243
Steel
#575355
Stone
#777375
Muted
#a39ea1

### Typography

Inter for UI and prose, Inter Display weight 800 for headlines with tight negative tracking, JetBrains Mono for every command and code surface. Documentation prose runs a relaxed 1.7 line-height.

hero-display
76 / 800 / -3px
A fast all-in-one toolkit
section-h
48 / 800 / -1.6px
Everything in one binary
doc-title
30 / 800 / -0.8px
Bun APIs
feature-h
21 / 700 / -0.4px
Package manager
subtitle
21 / 400 / 1.5
A runtime, bundler and test runner in one.
body-md
16 / 400 / 1.5
Primary marketing body copy.
doc-body
14.5 / 400 / 1.7
Documentation prose, relaxed for long-form reading.
micro-upper
11 / 700 · UPPER
CORE RUNTIME
code-md
13 / 500 · JetBrains
$ bun install

### Radius

Pills for buttons, nav stars and sidebar items — the soft, friendly Bun silhouette. Cards and ghost commands sit at 12–16px. Code chips at 6px.

xs
4px
sm
6px
md
8px
lg
12px
xl
16px
xxl
24px
full
9999px

### Components

Pink-fill pill primaries, warm-hairline secondaries, pink active-pill sidebar items, mono command chips, and the dark code block with a pink dot. Focus states ring in Bun pink.

#### Buttons

primary Install Bun
ink Read the docs →
secondary Quickstart
on-dark
Benchmarks
ghost Guides

#### Pills, tabs & badges

sidebar-pill Bun APIs Watch Mode
star
76.4k ★
badge-new New Bun.serve

#### Inputs

text
focused

#### Doc primitives

inline-code Bun.file()
badge-type string number
link compatibility page

#### Code block

install.sh Copy
$ curl -fsSL bun.sh/install | bash $ bun init # scaffold a new project $ bun run index.ts ✓ ready
View source ↗