# ⚡ Bun Development - Detailed Guide > This file contains the detailed procedure and reference material extracted from `SKILL.md` for focused loading. The root skill defines activation, examples, safety constraints, and limitations. ## 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 cat "$tmpdir/bun-install.sh" # review the full installer before executing bash "$tmpdir/bun-install.sh" # Windows: use the official installation page to save the installer to a private # review directory. Read the ENTIRE script, verify its source/version, then run it # as a separate authorized step. Do not preview only 120 lines and auto-execute. # 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/install speed | Measure on the actual project | Workload/platform dependent | | TypeScript | Built-in transpilation, separate type checking | Current Node versions support a subset through type stripping; verify syntax | | Test runner | Built-in | Node also has a built-in test runner; ecosystem runners are optional | | Bundler | Built-in | Separate bundler commonly used | These are capability comparisons, not measured speedup guarantees. --- ## 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