bun init CLI Usage
bash
bun init <folder?>Initialization Options
--yesboolean {" "} Accept all default prompts without asking questions. Alias:
-y{" "} --minimalboolean {" "} Only initialize type definitions (skip app scaffolding). Alias:
-m{" "} Project Templates
--reactstring|boolean {" "} Scaffold a React project. When used without a value, creates a baseline React app.
Accepts values for presets:{" "}
Accepts values for presets:{" "}
- {" "}
tailwind– React app preconfigured with Tailwind CSS {" "} shadcn– React app with@shadcn/uiand Tailwind CSS {" "}
bun init --react bun init --react=tailwind bun init --react=shadcn
{" "} Output & Files
(result)info {" "} Initializes project files and configuration for the chosen options (e.g., creating essential config files and a starter directory structure). Exact files vary by template.{" "}
Global Configuration & Context
--cwdstring {" "} Run
bun init as if started in a different working directory (useful in scripts).{" "} Help
--helpboolean {" "} Print this help menu. Alias:
-h{" "} Examples
Accept all defaults
bashbun init -yReact
bashbun init --reactReact + Tailwind CSS
bashbun init --react=tailwindReact + @shadcn/ui
bashbun init --react=shadcn