This repository ships a one-shot installer that scaffolds a SvelteKit app, adds common deps, optionally merges a template, tweaks .gitignore, can copy shared assets from the starter repo, sets a license, and (optionally) makes a local git commit.
Assumes the script lives at
https://raw.githubusercontent.com/bchainhub/sveltekit-starter/main/sv-starter.sh. If you use a different path or branch, adjust the URL accordingly.
Using curl (recommended - maintains interactivity):
Option 1: jsDelivr CDN (faster, more reliable):
bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/bchainhub/sveltekit-starter/sv-starter.sh)"
With a specific commit version:
bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/bchainhub/sveltekit-starter@beebeaf/sv-starter.sh)"
Option 2: GitHub Raw (original):
bash -c "$(curl -fsSL https://raw.githubusercontent.com/bchainhub/sveltekit-starter/main/sv-starter.sh)"
Or with a custom template repo:
bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/bchainhub/sveltekit-starter/sv-starter.sh)" -- --template https://github.com/your-org/your-template.git
wget alternative:
bash -c "$(wget -qO- https://cdn.jsdelivr.net/gh/bchainhub/sveltekit-starter/sv-starter.sh)"
Run locally (if you cloned this repo):
chmod +x sv-starter.sh
./sv-starter.sh --template https://github.com/blockchainhub/sveltekit-mota.git
💡 You can pass any extra flags after
--and they will go straight tosv create. ⚠️ Important: Thebash -c "$(curl ...)"approach maintains proper terminal interactivity, unlike piping with| bash -s --which can break interactive prompts.
npxpnpm, bun, yarn, or npmrsync for robust folder copies)stat commands (macOS -f, Linux -c)Runs SvelteKit creator
Uses npx sv create "$@" to start a new project (your answers go to SvelteKit’s wizard).
Detects the created project directory
Automatically cd’s into it (even if SvelteKit created a subfolder).
Installs base packages Installs a curated set of deps for this starter.
Auth picker (interactive) Choose:
0 None (default)1 @auth/sveltekit (reminder: install your adapter)2 lucia (reminder: install your adapter)If you choose Auth.js, it also runs npx auth secret.
Database / data layer picker (interactive)
Choose from Prisma, Drizzle ORM, Supabase, Neon, MongoDB, Redis, etc., or None (default).
Some options kick off a small init step (e.g., prisma init, drizzle-kit init).
(Optional) Merge a template repository
By default, uses:
https://github.com/blockchainhub/sveltekit-mota.git
Override with --template <repo-url>.
Initialize git (if needed) & make a quiet scaffold commit Initializes a repository if none exists and captures the initial state.
Run npm-check-updates locally and clean up
Updates package ranges to latest, reinstalls, then removes npm-check-updates.
Augment .gitignore
Appends extra ignores to the end of your existing .gitignore:
._**.log, *.log.*, tool-specific debug logs, logs, *.pid, ….idea/, .vscode/, etc..gitignore.(Optional) Copy shared assets from this starter repo
.editorconfig (default Yes):
Pulled from editors/.editorconfig and placed at project root as .editorconfig..github (default No):
Copies providers/.github/ to your project root as .github (includes ISSUE_TEMPLATE).
If retrieval fails, the installer prints a failure and skips—no fallback files.License selection (interactive) Default is CORE (your org’s license). You can also choose from common SPDX licenses or None:
CORE (custom)
https://raw.githubusercontent.com/bchainhub/core-license/refs/heads/main/LICENSELICENSE and sets package.json → "license": "SEE LICENSE IN LICENSE" (npm-compliant for non-SPDX).SPDX licenses (MIT, Apache-2.0, GPL-3.0-or-later, AGPL-3.0-or-later, LGPL-3.0-or-later, BSD-2/3, MPL-2.0, Unlicense, CC0-1.0, ISC, EPL-2.0)
LICENSE and sets package.json → "license": "<SPDX-ID>".None
LICENSE and leaves package.json alone.If the license text can’t be fetched, the script prints an error and does not modify
package.json.
Final (optional) local commit Prompt: “Create a single git commit with all current changes (no push)?” Default No. If Yes, it stages everything and commits locally. It never pushes.
--template <git-url>
Use a different template repository for the initial project structure.
Example:
./sv-starter.sh --template https://github.com/your-org/your-sveltekit-template.git
Any additional arguments after -- are forwarded to sv create.
Example:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/bchainhub/sveltekit-starter/main/sv-starter.sh)" -- --name my-app
Auth: pick none/Auth.js/Lucia.
DB: pick a data layer (or None).
Ignore lockfiles: default Yes (adds them to .gitignore).
Copy .editorconfig: default Yes (from editors/.editorconfig).
Copy .github folder: default No (from providers/.github/).
License: default CORE.
package.json → "SEE LICENSE IN LICENSE".package.json.Final commit: default No (never pushes).
Running remote scripts is convenient but sensitive. Review the script URL before running:
curl -fsSL https://cdn.jsdelivr.net/gh/bchainhub/sveltekit-starter/sv-starter.sh | less
Then run it once you are comfortable using:
bash -c "$(curl -fsSL https://raw.githubusercontent.com/bchainhub/sveltekit-starter/main/sv-starter.sh)"
package.json
This only happens if fetching the license text failed. Fix the URL/network and rerun that step, or set license manually.If you want to pin the asset copy steps to an exact commit:
Replace the raw base:
https://raw.githubusercontent.com/bchainhub/sveltekit-starter/<COMMIT_SHA>
After cloning the starter repo, check out the same SHA before syncing:
git -C "$STARTER_TMP" checkout <COMMIT_SHA> --quiet || true
package.json with updated dependencies and (optionally) license..gitignore with enhanced ignores (+ optional lockfile excludes)..editorconfig and .github/ISSUE_TEMPLATE from the starter repo.LICENSE file per your selection.Happy hacking! ✨