create-jmrsquared-website-template
v0.9.3
Published
Scaffold a Cloudflare Pages or Firebase Hosting-ready Vite website with Git and GitHub Actions deployment setup.
Downloads
161
Maintainers
Readme
create-jmrsquared-website-template
Published scaffolder for:
yarn create jmrsquared-website-templateThe generator creates a new Vite website project from the embedded blank 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
- Blank React + Vite + TypeScript + Tailwind CSS single-page website (no starter design)
- Framer Motion + GSAP ScrollTrigger + React Three Fiber / Drei motion stack installed and ready
- Design tokens in
src/shared/tokens/theme.csswired intotailwind.config.js - Demo preview banner, JMR Squared attribution, and clear unsolicited-demo wording
- Cloudflare Pages or Firebase Hosting deploy config for
dist - GitHub Actions workflow for provider-based deploys on
main - Local Git repository initialized on
main AGENTS.mdproject instructions (CLAUDE.mdonly references@AGENTS.md)
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. - Provide a project brief (paste markdown, local
.mdpath, or URL). - Choose a coding agent:
agent(default, Cursor Agent CLI)claudepicodex
After you choose the coding agent, the scaffolder shows the exact command it will run and waits for Enter. From that point it scaffolds the app, installs dependencies, initializes git, creates/pushes the GitHub repo, configures secrets when available, writes an autonomous mission.md (premium design + quality gate + outreach), and launches the selected coding agent. The build runs without further prompts. Before outreach, the mission requires yarn quality:gate (Lighthouse + screenshots) with a SHIP decision. Every demo includes a preview banner and attribution; humans handle demo teardown manually.
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
GIT_HUB_TOKEN: used for the GitHub Packages publishNPM_TOKEN: optional legacy fallback only; npm publishes via Trusted Publishing (OIDC) and no longer needs a write token once configured
Trusted Publishing (required for npm)
npm now blocks classic automation tokens with EOTP. Configure Trusted Publishing once:
- Open https://www.npmjs.com/package/create-jmrsquared-website-template → Settings → Trusted Publisher
- Choose GitHub Actions
- Set:
- Organization or user:
JMRSquared - Repository:
jmrsquared-website-template - Workflow filename:
publish-package.yml - Allowed actions:
npm publish
- Organization or user:
- Save, then push to
mainor rungh workflow run publish-package.yml
Local publish (working path when CI OIDC fails)
npm redacts auth/cli URLs in piped output. Publish needs a real TTY, Dia as the browser, and an automatic Enter on Press ENTER to open in the browser....
yarn publish:localThat script sets npm config set browser 'open -a Dia', runs expect around npm publish, opens Dia for the auth grant, then checks npm view.
Fallback if you already have an authenticator code:
npm publish --access public --otp=<6-digit-code>Do not scrape auth/cli/***, open Safari/Firefox on a truncated link, or use a macOS OTP dialog. Follow skill npm-local-publish in jmrsquared-skills.
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.
