@craveup/cli
v1.0.0
Published
CraveUp CLI to bootstrap storefront templates
Readme
CraveUp CLI
Bootstrap a CraveUp storefront from one of our opinionated templates.
Usage
npx craveup initYou will be guided through:
- selecting the Tomodashi Sushi template (additional templates coming soon)
- entering your CraveUp API key (or pass it via
--api-key) - capturing the storefront's location ID when required
- cloning the template and preparing a clean workspace
- installing dependencies with the detected package manager
- optionally starting the development server immediately so you can preview the storefront right away
Non-interactive flags
--template <id>– select a template by id (tomodashi-sushi)--dir <name>– specify the target directory--api-key <key>– prefill the API key prompt--skip-install– skip installing dependencies (CLI will print the command to run manually)--force– overwrite an existing empty directory without prompting (useful for reruns)
Environment variables
The CLI talks to the partner dashboard and API. Override the defaults when pointing at non-production environments:
CRAVEUP_DASHBOARD_URL(default:https://partners.craveup.com)CRAVEUP_PARTNER_API_URL(default:https://partners-api.craveup.com)
During project setup the CLI writes credentials to your storefront's environment file:
NEXT_PUBLIC_API_KEY– the key you provide during setupNEXT_PUBLIC_LOCATION_ID– only when the selected template requires a location scopeNODE_ENV,NEXT_PUBLIC_API_URL,NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY,NEXT_PUBLIC_GOOGLE_MAPS_API_KEY,VERCEL_URL– seeded with default values for the Tomodashi Sushi template (edit as needed after setup)
Templates registry
Template metadata lives in src/templates.ts. Update the repository URLs or add new templates as they become available.
Development
pnpm --filter craveup buildThe compiled entry point is emitted to dist/cli.js and exposed via the craveup binary defined in package.json.
