# @salixcommerce/create

Creates one standalone Salix Commerce application per business. It does not create tenants inside a shared application.

## Registry usage

```shell
npx @salixcommerce/create@latest my-store
```

Workspace development usage is:

```shell
pnpm build:packages
node packages/create/dist/cli.js my-store --business-name "My Store" --package-manager npm --defaults --install
```

To generate from a complete, validated initial configuration:

```shell
node packages/create/dist/cli.js my-store --configuration ./my-store.configuration.json --package-manager npm --defaults --install
```

## Options

- `--business-name <name>` sets the display name.
- `--configuration <path>` loads a JSON application configuration validated by `@salixcommerce/config`; its `business.displayName` is authoritative.
- `--package-manager npm|pnpm|yarn` overrides invoking-package-manager detection.
- `--template nextjs-store` selects the approved template.
- `--install` installs dependencies and runs the generated typecheck.
- `--no-install` skips dependency installation and is the default.
- `--defaults` or `--yes` disables interactive questions and accepts documented defaults.
- `--dry-run` lists planned files without writing.
- `--help` and `--version` print CLI information.

The generator refuses existing destinations, restricts projects to safe direct-child slugs, copies through an atomic staging directory, rejects unknown template tokens, writes non-secret provenance and a normalized-configuration SHA-256 fingerprint to `.salixcommerce.json`, and leaves recovery commands when optional dependency setup fails.

The generated v0.9.0 template is intentionally neutral and SC10-certified against two differently configured standalone applications. It includes strict public configuration, a server-only environment wrapper, catalog/inventory/cart/order/payment/admin contracts, generated Supabase schema and repositories, opaque guest capabilities, Supabase Auth cookie sessions, protected administrator membership and role gates, product/inventory/order operations, fulfillment, hosted Stripe Checkout, verified webhooks, authenticated refund requests and visibility, immutable audit evidence, accessible presentation, centralized visual tokens, and shared-package provenance. It has no built-in client preset, embedded secret, tenant runtime, public sign-up, or runtime dependency on this generator.
