Skip to content
You are reading the unreleased documentation. No version is released yet, and these pages describe code that is not in a release.

Install CLI

./setup.sh on Linux and macOS and ./setup.ps1 on Windows run the install stepper in tools/setup. Both wrappers pass their arguments through unchanged. The usage text below is the one the stepper prints.

themerchantengine setup
Usage: node tools/setup/dist/index.js [options]
Options:
--profile <engine|storefront|both|local> What this box runs. Asked when omitted.
--local Shorthand for --profile local.
--answers <file.json> Non-interactive run from an answers document.
--dry-run Print every file and command; write and run nothing.
--state <file> Resumable state file (default .setup-state.json).
--root <dir> Repository root (default: the current directory).
--reset Ignore the state file and start over.
--help This text.
--version The engine version.
  • --profile <engine|storefront|both|local>: What this box runs. Asked when omitted.
  • --local: Shorthand for —profile local.
  • --answers <file.json>: Non-interactive run from an answers document.
  • --dry-run: Print every file and command; write and run nothing.
  • --state <file>: Resumable state file (default .setup-state.json).
  • --root <dir>: Repository root (default: the current directory).
  • --reset: Ignore the state file and start over.
  • --help: This text.
  • --version: The engine version.
  • engine
  • storefront
  • both
  • local

The resumable state file defaults to .setup-state.json in the repository root and never holds a secret.

A JSON document for --answers <file.json>. Every field, with required meaning the schema refuses the file without it:

  • profile ("engine", "storefront", "both", "local", optional).
  • license (object, optional).
    • license.file (string, optional).
  • identity (object, optional).
    • identity.storeName (object, optional).
    • identity.brandName (string, optional).
    • identity.description (object, optional).
    • identity.legalName (object, optional).
    • identity.contactEmail (string, optional).
    • identity.contactPhone (string, optional).
    • identity.street (object, optional).
    • identity.locality (string, optional).
    • identity.region (string, optional).
    • identity.postalCode (string or null, optional).
    • identity.country (string, optional).
    • identity.areaServed (array of string, optional).
    • identity.businessType ("OnlineStore", "LocalBusiness", "Hybrid", optional).
  • domains (object, optional).
    • domains.storefront (string, optional).
    • domains.admin (string, optional).
    • domains.api (string, optional).
    • domains.certbotEmail (string, optional).
  • brand (object, optional).
    • brand.primary (string, pattern ^#[0-9A-Fa-f]{6}$, optional).
    • brand.secondary (string, pattern ^#[0-9A-Fa-f]{6}$ or "" or null, optional).
    • brand.accent (string, pattern ^#[0-9A-Fa-f]{6}$ or "" or null, optional).
    • brand.fontKit ("latin-rounded", "arabic-latin", optional).
    • brand.logoPath (string, optional).
  • localization (object, optional).
    • localization.supportedLocales (array of "fr", "en", "ar", optional).
    • localization.defaultLocale ("fr", "en", "ar", optional).
    • localization.rtlLocales (array of "fr", "en", "ar", optional).
    • localization.timezone (string, optional).
  • money (object, optional).
    • money.currencyCode (string, optional).
    • money.symbol (string, optional).
    • money.symbolPosition ("before", "after", optional).
    • money.decimalSeparator (string, optional).
    • money.thousandsSeparator (string, optional).
    • money.displayPrecision (integer, min 0, max 3, optional).
    • money.taxDisplay ("HT", "TTC", "none", optional).
    • money.vatRate (number, min 0, max 1, optional).
    • money.vatPercent (number, min 0, max 100, optional).
    • money.shippingFlatRate (number, min 0, optional).
  • storage (object, optional).
    • storage.driver ("s3", "local", optional).
    • storage.endpoint (string, optional).
    • storage.region (string, optional).
    • storage.bucket (string, optional).
    • storage.publicUrl (string, optional).
    • storage.accessKey (string, optional).
    • storage.secretKey (string, optional).
  • mail (object, optional).
    • mail.transport ("resend", "console", optional).
    • mail.apiKey (string, optional).
    • mail.webhookSecret (string, optional).
    • mail.fromEmail (string, optional).
    • mail.fromName (string, optional).
    • mail.replyTo (string, optional).
    • mail.contactFormRecipient (string, optional).
    • mail.devRedirectTo (string, optional).
    • mail.testRecipient (string, optional).
  • turnstile (object, optional).
    • turnstile.enabled (boolean, optional).
    • turnstile.siteKey (string, optional).
    • turnstile.secretKey (string, optional).
  • seo (object, optional).
    • seo.indexNowKey ("" or string, pattern ^[a-f0-9]{8,128}$, optional).
    • seo.bingApiKey (string, optional).
    • seo.gscServiceAccountFile (string, optional).
    • seo.gscSiteUrl (string, optional).
  • payments (object, optional).
    • payments.cod (boolean, optional).
    • payments.stripe (boolean, optional).
    • payments.stripeApiKey (string, optional).
    • payments.manual (boolean, optional).
  • owner (object, optional).
    • owner.email (string, optional).
    • owner.firstName (string, optional).
    • owner.lastName (string, optional).
    • owner.password (string, optional).
  • demoCatalogue (boolean, optional).
  • engine (object, optional).
    • engine.revalidateSecret (string, optional).
    • engine.apiUrl (string, optional).