A powerful CLI to scaffold modern Webflow projects using Vite and deploy them to GitHub/CDN β all with a single command.
A zero-config CLI to initialize a production-ready Webflow + Vite setup with modular JS/CSS, modern tooling, and optional GitHub deployment.
- β Interactive CLI prompts
- π§ Project scaffolding (
vite.config.js
,starter.config.js
,package.json
, etc.) - π§± Auto-setup:
- π SSH & GitHub authentication
- π GitHub deployment (public or split repo)
- π¦ CDN-ready output (jsDelivr compatible)
This tool saves hours of setup by giving you a complete dev + deploy pipeline for modern Webflow-based sites. Everything is pre-configured, and the output is tailored for use with jsDelivr CDN and Webflow custom code.
- β³ Fast setup, from zero to ready in minutes
- π§ Built-in GitHub + SSH workflow
- π Production-ready, CDN-compatible output
- π Versioned deploys with Git and jsDelivr fallback support
- Node.js >= 18
- Git + GitHub CLI
- SSH key (
id_ed25519
) added to your GitHub account
Don't have an SSH key? No worries! If
create-webflow-starter
doesn't detect a key, it will generate one for you and optionally upload it to GitHub.
Youβll also be guided through authentication using the GitHub CLI (gh auth login
) if needed.
npm install -g @kobonostudio/create-webflow-starter
# or via npx
npx @kobonostudio/create-webflow-starter
npm run dev # Start local development server
npm run build # Build for production
npm run deploy # Deploy full project (single public repo)
npm run build:pages # Build multiple JS files for each page
Running npm run build:pages
generates independent JS bundles for each file inside src/pages/
. This is useful when you want to load different scripts per Webflow page, without loading unnecessary code.
create-webflow-starter
This will prompt you with the following questions:
- π Project name
- π Create a new folder for your project?
- π³ GitHub deployment mode:
none
,public-only
, orsplit
- π GitHub user/org, repo name, and branch (if needed)
After answering these, the CLI:
- Scaffolds your project structure
- Creates the
starter.config.js
file based on your answers - Generates SSH keys if necessary
- Authenticates with GitHub CLI (
gh
)
- none: No GitHub setup or deploy
- public-only: Push full project to one public repo (ideal for open-source)
- split: Push
dist/
to a public CDN repo, and source to a private repo (ideal for Webflow + jsDelivr)
This config powers both the deployment and the loader system.
export default {
cdn: {
baseUrl: 'https://cdn.jsdelivr.net/gh',
user: 'your-github-user',
repo: 'your-cdn-repo',
branch: 'main',
org: true, // set to true for GitHub organizations
},
deploy: {
mode: 'split', // or 'none', 'public-only'
publicRepo: 'webflow-assets',
privateRepo: 'source-code',
branch: 'main',
},
}
src/
βββ main.js
βββ css/
β βββ style.css
This setup works perfectly for simple Webflow sites.
src/
βββ css/
β βββ reset.css
β βββ variables.css
β βββ layout.css
β βββ style.css
Each file will be minified individually.
src/
βββ main.js # entry point for shared/global logic
βββ modules/ # JS modules used across the project
β βββ nav.js
β βββ slider.js
βββ pages/ # page-specific JS files
β βββ home.js # only loaded on home page
β βββ about.js # only loaded on about page
modules/
: contains reusable logic that can be imported intomain.js
or any page scriptpages/
: auto-discovered and bundled independently ifbuild:pages
is used
You can reference these via
data-module
anddata-page
in your Webflow markup for conditional loading.
After running npm run build
or npm run build:pages
, your output in dist/
includes:
css/main.min.css
β main css minifiedcss/*.min.css
β individual minified CSS filesscripts/main.min.js
β main JS bundlescripts/pages/*.min.js
β page-specific JS bundlesmanifest.json
β mapping for loaders/CDN fallback
Each file generates a dynamic loader snippet with fallback from localhost to CDN:
;(function () {
const link = document.createElement('link')
link.rel = 'stylesheet'
fetch('http://localhost:3000/src/css/style.css', { method: 'HEAD' })
.then(() => (link.href = 'http://localhost:3000/src/css/style.css'))
.catch(
() =>
(link.href =
'https://cdn.jsdelivr.net/gh/your-user/your-repo@main/css/style.min.css')
)
document.head.appendChild(link)
})()
This ensures that in dev mode, files load locally, and in production (like in Webflow), they fall back to jsDelivr CDN.
npm run dev
β http://localhost:3000/webflow
Youβll get:
- π Copy-ready
<script>
blocks for CSS and JS (main + page-based) - π Visual confirmation of all generated loaders
- β¨ Perfect for integrating with Webflow custom code embeds
Made with β€οΈ by Pierre Lovenfosse
MIT β Β© Pierre Lovenfosse