Bun is a fastJavaScript runtime& toolkit.All in one.
Runtime, package manager, test runner and bundler in a single binary. Use bun install or bun test in an existing Node.js project, or run the whole thing on Bun.
curl -fsSL https://bun.sh/install | bashFrom the first line of code to production
Bun isn't a loose collection of tools. The runtime, package manager, test runner, and bundler share the same foundation and work out of the box.
Bun Runtime
A fast JavaScript and TypeScript runtime designed as a drop-in replacement for Node.js.
bun run index.tsBun Package Manager
npm-compatible, up to 30× faster installs, with a global cache, workspaces, and lockfile.
bun installBun Test Runner
Jest-compatible, TypeScript-first tests with snapshots, DOM, and watch mode built in.
bun testBun Bundler
Bundle TypeScript, JSX, React, and CSS for browsers and servers, with HTML entrypoints.
bun build ./index.ts --outdir ./distBun Linter
Extremely fast JavaScript and TypeScript linting with built-in rules and an ESLint migration path.
bun lintBun Formatter
Zero-config formatting for JavaScript, TypeScript, JSX, and JSON at native speed.
bun formatOne runtime.
From script to server.
Bun runs TypeScript, JSX and TSX natively, with an HTTP server, WebSockets, SQLite, S3 and password hashing built in. Install fewer packages. Ship more code.
- TypeScript and JSX with zero config
- Node.js compatibility and the npm ecosystem
- Bun.serve, SQLite and S3 built in
- One binary, millisecond startup
const server = Bun.serve({
port: 3000,
async fetch(req) {
const url = new URL(req.url);
if (url.pathname === "/api")
return Response.json({ ok: true });
return new Response("Hello from Bun!");
},
});
console.log(`Listening on ${server.url}`);Your first Bun project in seconds
Install Bun, create a project, and run it. No config files, no extra dependencies.
curl -fsSL https://bun.sh/install | bashbun init my-appcd my-app && bun run index.tsEverything you need. One binary.
Install Bun, open the docs, and ship something fast.