@craveup/cli
v1.3.0
Published
Crave Up CLI — bootstrap storefronts, sign in, and connect integrations
Readme
Crave Up CLI
The Crave Up command line interface bootstraps production-ready storefronts in minutes. It scaffolds one of our open-source templates, wires credentials, installs dependencies, and can launch the dev server for you.
Quick start
npx @craveup/cli initThe CLI publishes as
@craveup/cli. The older unscopedcraveuppackage on npm is unmaintained and stops at 1.0.3 — install the scoped name. The installed command is stillcraveup, socraveup login,craveup apps status, and friends are unchanged.
Follow the prompts to:
- Choose a template.
storefront-defaultis the recommended starter for most restaurants. - Sign in or create a free Crave Up account in the secure browser window.
- Select an existing restaurant, or create a lightweight development restaurant when the account is new.
- Let the CLI create the project key, clone the template, write
.env.local, and install dependencies. - Develop locally. Subscription, business verification, and live payments wait until go-live onboarding.
Tip: rerun the command with
--skip-installif you prefer to manage dependencies manually.
Command reference
| Command | Description |
| ------------------------------------ | ------------------------------------------------------------- |
| craveup init | Interactive storefront scaffolding |
| craveup login [--device] | Sign in or sign up (browser OAuth; stored in keychain) |
| craveup logout | Sign out and remove local credentials |
| craveup whoami | Show the signed-in account |
| craveup integrations list | Show Stripe/Square integration status for the current project |
| craveup integrations add stripe | Connect Stripe payments |
| craveup integrations add square | Connect Square POS |
| craveup apps doctor | Check Expo/EAS release readiness |
| craveup apps configure | Create manual internal-release EAS workflows |
| craveup apps publish testflight | Build and submit iOS to internal TestFlight |
| craveup apps publish play-internal | Build and submit Android to Google Play internal testing |
| craveup apps status | Show recent EAS builds and the submission dashboard |
Flags
| Flag | Description |
| -------------------- | ----------------------------------------------------------------------------------- |
| --template <id> | Pre-select a template (storefront-default, tomodachi-sushi, xichuan-noodles). |
| --dir <path> | Target directory for the generated project. |
| --api-key <key> | Inject the API key non-interactively. |
| --location-id <id> | Inject the location ID used for menu, cart, checkout, and integration checks. |
| --org-slug <slug> | Inject the organization slug for organization templates. |
| --skip-install | Skip dependency installation (the CLI prints the command you need to run). |
| --skip-dev | Skip launching the local dev server after a successful init. |
| --skip-validate | Skip the API key/location smoke check. |
| --force | Overwrite an empty directory without prompting; handy for scripted runs. |
Combine flags for CI/CD usage:
npx @craveup/cli init \
--template storefront-default \
--dir my-storefront \
--api-key "$NEXT_PUBLIC_CRAVEUP_API_KEY" \
--location-id "$NEXT_PUBLIC_LOCATION_ID" \
--org-slug "$NEXT_PUBLIC_ORG_SLUG" \
--skip-installMobile app releases
The mobile release commands are Expo/EAS-first and intentionally start with internal testing. EAS builds consume plan minutes and require the corresponding paid Apple Developer or Google Play account.
# Run from an Expo or React Native project root
npx @craveup/cli apps doctor --platform ios
npx @craveup/cli apps configure
# Interactive Apple login/2FA stays in this visible terminal
npx @craveup/cli apps publish testflight
# Requires submit.production.android.track="internal" in eas.json
npx @craveup/cli apps publish play-internal
npx @craveup/cli apps statusUse --project-dir <path> when the app is elsewhere. --yes skips only the Crave Up paid-build
confirmation; EAS can still request credentials or configuration. apps configure refuses to
overwrite its two workflow files unless --force is supplied.
The generated workflows are manual-only and target internal TestFlight or Google Play internal
testing. Commit them before an agent dispatches them through @craveup/mcp.
Crave Up never stores an Apple password or 2FA code. For MCP/CI automation, configure a scoped Expo
robot-user EXPO_TOKEN; keep App Store Connect and Google service-account credentials in EAS. An
iOS upload becomes a TestFlight build, not a public App Store release. Test the build, complete App
Store metadata and compliance, and submit it for App Review in App Store Connect.
Environment variables
The CLI communicates with Crave Up partner services and writes initial environment values into the generated storefront.
| Variable | Default | Purpose |
| --- | --- | --- |
| CRAVEUP_ENVIRONMENT | production | Select the atomic sandbox or production dashboard, API, Clerk, and credential profile. MCP callers must set this explicitly. |
| CRAVEUP_DASHBOARD_URL | From profile | Optional custom dashboard override; must match the selected environment. |
| CRAVEUP_API_BASE_URL | From profile | Optional custom API override; must match the selected environment. |
| CRAVEUP_PARTNER_API_URL | From profile | Optional custom partner API override; must match the selected environment. |
| CRAVEUP_OAUTH_ISSUER | From profile | Optional custom Clerk issuer; must match the selected environment. |
| CRAVEUP_ALLOW_CUSTOM_ENDPOINTS | false | Permit an intentional unrecognized custom deployment. Never use this to cross sandbox/production. |
craveup whoami prints the active environment and resolved hosts. Sandbox and production sessions
use separate keychain accounts (or separate fallback credential files), so switching environments
cannot silently reuse the other environment's session.
Generated storefronts receive a minimal .env.local:
- Always:
NEXT_PUBLIC_CRAVEUP_API_KEY,NEXT_PUBLIC_LOCATION_ID, andNEXT_PUBLIC_GOOGLE_MAPS_API_KEY(blank placeholder). - Organization templates: also add
NEXT_PUBLIC_ORG_SLUG.
Update the placeholder values before starting the dev server.
Template catalogue
Template metadata lives in src/templates.ts. Each entry defines:
- Template identifier (
storefront-default,tomodachi-sushi,xichuan-noodles). - Git repository URL (can point to local/private forks).
- Scope (
single-locationororganization) along with the credentials collected by the wizard.
| Template | Scope | Credentials collected |
| -------------------- | --------------- | -------------------------------------------------------------------------------- |
| tomodachi-sushi | Single location | NEXT_PUBLIC_CRAVEUP_API_KEY, NEXT_PUBLIC_LOCATION_ID |
| xichuan-noodles | Single location | NEXT_PUBLIC_CRAVEUP_API_KEY, NEXT_PUBLIC_LOCATION_ID |
| storefront-default | Organization | NEXT_PUBLIC_CRAVEUP_API_KEY, NEXT_PUBLIC_LOCATION_ID, NEXT_PUBLIC_ORG_SLUG |
To add your own template, update src/templates.ts and publish a compatible Git repository.
Local development
pnpm install
pnpm --filter @craveup/cli build- The compiled CLI binary is emitted to
dist/cli.js. - Run
pnpm --filter @craveup/cli devfor watch-mode rebuilds. - Execute the local build with
node dist/cli.js init.
Troubleshooting
| Symptom | Fix |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
| CLI exits with Cannot read property 'trim' of undefined. | Ensure NEXT_PUBLIC_CRAVEUP_API_KEY is supplied either interactively or via --api-key. |
| Generated project fails to fetch data. | Verify .env.local contains a valid API key and restart pnpm dev (Next.js reads env vars at boot). |
| Template install fails due to Git access. | Confirm you can clone the template repo directly. Private templates require authenticated URLs. |
Need help? Open an issue in the monorepo or join the Crave Up developer community.
