--- name: bun-development description: "Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun)." risk: critical source: community date_added: "2026-02-27" --- # ⚡ Bun Development > Fast, modern JavaScript/TypeScript development with the Bun runtime, inspired by [oven-sh/bun](https://github.com/oven-sh/bun). ## When to Use This Skill Use this skill when: - Starting new JS/TS projects with Bun - Migrating from Node.js to Bun - Optimizing development speed - Using Bun's built-in tools (bundler, test runner) - Troubleshooting Bun-specific issues --- ## 1. Getting Started ### 1.1 Installation ```bash # macOS / Linux brew install oven-sh/bun/bun # Alternative: download the official installer, inspect it, then execute it tmpdir="$(mktemp -d)" trap 'rm -rf "$tmpdir"' EXIT curl -fsSLo "$tmpdir/bun-install.sh" https://bun.sh/install sed -n '1,160p' "$tmpdir/bun-install.sh" bash "$tmpdir/bun-install.sh" # Windows powershell -NoProfile -Command "Invoke-WebRequest https://bun.sh/install.ps1 -OutFile $env:TEMP\\bun-install.ps1; Get-Content $env:TEMP\\bun-install.ps1 -TotalCount 120; powershell -ExecutionPolicy Bypass -File $env:TEMP\\bun-install.ps1" # Homebrew brew tap oven-sh/bun brew install bun # npm (if needed) npm install -g bun # Upgrade bun upgrade ``` ### 1.2 Why Bun? | Feature | Bun | Node.js | | :-------------- | :------------- | :-------------------------- | | Startup time | ~25ms | ~100ms+ | | Package install | 10-100x faster | Baseline | | TypeScript | Native | Requires transpiler | | JSX | Native | Requires transpiler | | Test runner | Built-in | External (Jest, Vitest) | | Bundler | Built-in | External (Webpack, esbuild) | --- ## 2. Project Setup ### 2.1 Create New Project ```bash # Initialize project bun init # Creates: # ├── package.json # ├── tsconfig.json # ├── index.ts # └── README.md # With specific template bun create