#!/bin/sh # VanillaBun installer. # # curl -fsSL https://vanillabun.org/install.sh | sh # curl -fsSL https://vanillabun.org/install.sh | sh -s my-app # custom directory # # Downloads the current template and unpacks it. No git history (you want a fresh # start, not ours), and nothing to build — the app has zero runtime dependencies. # You are piping a script to a shell, so read it first; that is why it is short. set -eu DIR="${1:-vanillabun}" BASE="https://vanillabun.org" for tool in curl tar; do command -v "$tool" >/dev/null 2>&1 || { echo "vanillabun: $tool is required" >&2; exit 1; } done if [ -e "$DIR" ] && [ -n "$(ls -A "$DIR" 2>/dev/null || true)" ]; then echo "vanillabun: '$DIR' already exists and is not empty — refusing to overwrite" >&2 exit 1 fi # The cache-buster is deliberate: a CDN copy of the tarball could be hours stale, and # silently installing yesterday's template is worse than one extra origin request. mkdir -p "$DIR" curl -fsSL "$BASE/public/vanillabun.tar.gz?t=$(date +%s)" | tar -xzf - -C "$DIR" --strip-components=1 echo "VanillaBun unpacked into $DIR/" echo if command -v bun >/dev/null 2>&1; then echo " cd $DIR && bun install && bun run dev" else echo " Bun first: curl -fsSL https://bun.sh/install | bash" echo " then: cd $DIR && bun install && bun run dev" fi echo echo "'bun install' pulls dev-only tooling (typescript, @types/bun); the app itself" echo "ships zero runtime dependencies. Then open it in Claude Code and type /vanillabun."