create-jmrsquared-website-template
v0.6.1
Published
Scaffold a Cloudflare Pages or Firebase Hosting-ready Vite website with Git and GitHub Actions deployment setup.
Downloads
2,083
Maintainers
Readme
create-jmrsquared-website-template
Published scaffolder for:
yarn create jmrsquared-website-templateThe generator creates a new Vite website project from the embedded template, rewrites app/deploy settings for Cloudflare Pages (default) or Firebase Hosting, initializes Git, and can prepare GitHub Actions deployment when required CLIs and gh are available.
What It Generates
- React + Vite + TypeScript + Tailwind CSS single-page website
- Cloudflare Pages or Firebase Hosting deploy config for
dist - GitHub Actions workflow for provider-based deploys on
main - Local Git repository initialized on
main
Requirements
node --version
yarn --version
gh --version- Node.js 22+
- Yarn (Corepack-enabled Yarn is recommended)
- GitHub CLI (
gh) authenticated withgh auth login - Cloudflare CLI (
wrangler) if you choose Cloudflare - Firebase CLI (
firebase) if you choose Firebase
Create A Website Project
Run:
yarn create jmrsquared-website-templateDuring scaffolding:
- Enter your project directory name.
- Enter your app name.
- Choose deploy provider:
cloudflare(default)firebase
- Enter GitHub repository (
owner/repo) when prompted.
The scaffolder creates the app, installs dependencies, initializes git, optionally creates/pushes the GitHub repo, and configures secrets if matching env vars are already set locally.
Alternative: Full-Stack Monorepo Template
Skip the default Vite + Cloudflare/Firebase flow and scaffold a @geekmidas/toolbox monorepo (apps/api + apps/web|app + packages/*) with beads + pi agents instead:
yarn create jmrsquared-website-template --template full --name my-appAll flags after --template full are forwarded to bin/init-gkm-and-beads.sh. Run with --help for the full option list:
yarn create jmrsquared-website-template --template full --helpCommon flags:
--name <project-name>(required, npm-safe)--frontend nextjs|tanstack-start|expo--db true|false--cache true|false--mailer console|mailpit--logger pino|console--pkg-manager pnpm|npm|yarn|bun--provider claude|codex|cursor|cursor-provider--vsc,--warp,--skip-install
Prerequisites: chosen package manager + Docker (for Postgres/Redis/Mailpit) + the chosen provider CLI (claude, codex, or cursor).
Provider Setup
Cloudflare (Default)
Required local environment variables before running the scaffolder:
export CLOUDFLARE_API_TOKEN="your_cloudflare_api_token"
export CLOUDFLARE_ACCOUNT_ID="your_cloudflare_account_id"How to get values:
- In Cloudflare dashboard, create an API token with Pages deploy permissions.
- Copy your Cloudflare account ID from the dashboard.
- Export both vars in your shell before running
yarn create jmrsquared-website-template.
What happens:
- The scaffolder uses
wranglerto resolve/create the Pages project. - If GitHub setup is enabled, it writes
CLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_IDto repo secrets. - Generated workflow deploys on push to
main.
Firebase
Required local environment variable before running the scaffolder:
export FIREBASE_TOKEN="your_firebase_cli_token"How to get values:
- Generate a token from Firebase CLI on a machine where you are logged in:
firebase login:ci - Copy the token output.
- Export it as
FIREBASE_TOKENbefore runningyarn create jmrsquared-website-template.
What happens:
- The scaffolder creates a new Firebase project using the project name.
- If the Firebase project already exists, scaffolding fails by design.
- It writes Firebase hosting config (
firebase.json,.firebaserc) in the generated app. - If GitHub setup is enabled, it writes
FIREBASE_TOKENto repo secrets. - Generated workflow deploys on push to
main.
GitHub Actions Secrets (Manual Fallback)
If secrets were not auto-set by the scaffolder, add them manually in:
- GitHub repo -> Settings -> Secrets and variables -> Actions -> New repository secret
Set based on provider:
- Cloudflare:
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID - Firebase:
FIREBASE_TOKEN
Deployment Behavior
- Every push to
mainin the generated project triggers.github/workflows/release-website.yml. - Workflow installs deps, builds the website, then runs
yarn deploy. yarn deployis provider-specific in the generated app.
Publishing
Publish this package to the registry as create-jmrsquared-website-template. Once published, users can run:
yarn create jmrsquared-website-templatePublish CI
The root package publish workflow lives at .github/workflows/publish-package.yml.
- Pushes to
maintry to publish the root scaffolder package. - npm publishes the unscoped package:
create-jmrsquared-website-template - GitHub Packages publishes a scoped package prepared during CI:
@<owner>/create-jmrsquared-website-template - If the current version already exists in either registry, that registry is skipped instead of failing the workflow.
Required Secrets
NPM_TOKEN: npm access token with permission to publishcreate-jmrsquared-website-templateGITHUB_TOKEN: built into GitHub Actions and used for the GitHub Packages publish
Important Notes
- Bump the version in
package.jsonbefore pushing tomainwhen you want a new release. - The root publish workflow only publishes this scaffolder package. It does not publish the generated app inside
template/. - The generated website deployment workflow remains in
template/_github/workflows/release-website.ymland is copied into scaffolded projects.
