Bun is an all-in-one JavaScript runtime, package manager, bundler, and test runner built to replace Node.js and the fragmented JavaScript tooling ecosystem. Written in Zig and powered by Apple's JavaScriptCore engine, Bun delivers cold start times under 15ms and installs packages up to 35× faster than npm. Unlike Node.js, Bun ships with native support for TypeScript, JSX, SQLite, testing, and HTTP servers—no configuration required. From local development to production deployment, Bun unifies what used to require a dozen separate tools into a single, dependency-free binary that runs on macOS, Linux, and Windows.
What This Cheat Sheet Covers
This topic spans 20 focused tables and 143 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Installation & Setup
| Command | Example | Description |
|---|---|---|
curl -fsSL https://bun.sh/install | bash | • Downloads and installs Bun to ~/.bun/bin• adds to PATH automatically | |
powershell -c "irm bun.sh/install.ps1 | iex" | • PowerShell installation script for Windows • requires Windows 10 1903+ or Windows 11. | |
bun --version | Prints installed Bun version (e.g., 1.3.8). | |
bun upgrade | Updates Bun to the latest stable version. |