systhema create
Scaffold a project, into an empty or an existing folder, interactively or not.
On this page
Scaffold a new Systhema project from one of the bundled templates.
systhema create my-app # interactive
systhema create my-app --template next # pick template up front
systhema create my-app --template payload --yes --no-install
systhema create --path . --force # scaffold into the current folderScaffolding into an existing folderLink to this section
Research, notes, or a brief often land in a folder before the project does. --path <dir> says where the scaffold goes (. is the current directory) and --force allows a target that isn't empty:
cd ~/projects/acme-site
systhema create --path . --force --template payload--force overwrites colliding files (README.md, package.json, …) and leaves everything else in place. The colliding files are listed before the confirmation prompt, so you can bail; under --yes the two flags together are the confirmation. Without --force, a non-empty target still exits with an error.
The package name is derived from the target directory's name (sanitized for npm). Pass the positional argument alongside --path to set it explicitly: systhema create acme-web --path ..
An existing .git directory in the target is left alone — no second "initial commit" over your history.
OptionsLink to this section
| Flag | Description | Default |
|---|---|---|
--ai <provider> | AI assistant single provider (payload): none | openai | anthropic | google | groq | openai-compatible ('none' disables the module) | |
--ai-base-url <url> | AI endpoint base URL — single provider (--ai) only; required for openai-compatible, optional override otherwise (payload; env: SYSTHEMA_AI_BASE_URL) | |
--ai-key <key> | AI provider API key — single provider (--ai) only (payload; env: SYSTHEMA_AI_API_KEY) | |
--ai-model <model> | AI model id — single provider (--ai) only (payload; env: SYSTHEMA_AI_MODEL) | |
--analytics <provider> | Analytics dashboard provider (payload): none | ga4 | plausible | umami | matomo | fathom | |
--analytics-api-key <key> | Analytics API key, or Matomo token_auth (payload; env: SYSTHEMA_ANALYTICS_API_KEY) | |
--analytics-host <url> | Analytics instance base URL — Matomo, self-hosted Plausible/Umami (payload; env: SYSTHEMA_ANALYTICS_HOST) | |
--analytics-site-id <id> | Analytics site/website/property id (payload; env: SYSTHEMA_ANALYTICS_SITE_ID) | |
--captcha <choice> | Form captcha (payload): none | recaptcha | turnstile | both | |
--cloudflare <mode> | Cloudflare authentication (payload): token | key | none (env: SYSTHEMA_CLOUDFLARE_MODE) | |
--cloudflare-api-key <key> | Cloudflare Global API key (payload; env: CLOUDFLARE_API_KEY) | |
--cloudflare-api-token <token> | Cloudflare API token (payload; env: CLOUDFLARE_API_TOKEN) | |
--cloudflare-email <email> | Cloudflare account email for Global API key auth (payload; env: CLOUDFLARE_EMAIL) | |
--cloudflare-zone-id <id> | Cloudflare zone ID — blank auto-resolves from the site URL (payload; env: CLOUDFLARE_ZONE_ID) | |
--db <adapter> | Database adapter (payload): sqlite | postgres | |
--db-url <uri> | Database connection string (payload; env: DATABASE_URI) | |
--default-locale <code> | Default locale (payload; must be in --locales) | |
--email <adapter> | Email adapter (payload): resend | sendgrid | smtp | none | |
--email-from <addr> | Default from address (payload; env: SYSTHEMA_EMAIL_FROM) | |
--force | Scaffold into a non-empty directory, overwriting colliding files | |
--forms <on|off> | Forms module (payload): on | off | |
--git | Initialize git repository | |
--install | Install dependencies after scaffolding | |
--locales <codes|none> | Locales (payload): comma-separated BCP 47 codes (e.g. en,hu), or 'none' for a single language | |
--maps-key <key> | Google Maps API key (payload; env: NEXT_PUBLIC_GOOGLE_MAPS_API_KEY) | |
--mcp | Connect the systhema-docs MCP server in the project | |
--no-git | Skip git initialization | |
--no-install | Skip dependency install | |
--no-mcp | Skip connecting the systhema-docs MCP server | |
--no-skills | Skip installing Systhema agent skills | |
-p, --path <dir> | Directory to scaffold into (relative or absolute, e.g. .); defaults to [name] | |
--pm, --package-manager <pm> | pnpm | npm | yarn | |
--recaptcha-secret-key <key> | reCAPTCHA secret key (payload; env: RECAPTCHA_SECRET_KEY) | |
--recaptcha-site-key <key> | reCAPTCHA site key (payload; env: NEXT_PUBLIC_RECAPTCHA_SITE_KEY) | |
--redirects <on|off> | Redirects module (payload): on | off | |
--resend-key <key> | Resend API key (payload; env: RESEND_API_KEY) | |
--sendgrid-key <key> | SendGrid API key (payload; env: SENDGRID_API_KEY) | |
--skill-agents <agents> | Comma-separated agents for skills (e.g. claude,agents) | |
--skills | Install Systhema agent skills into the project | |
--smtp-host <host> | SMTP host (payload; env: SMTP_HOST) | |
--smtp-pass <pass> | SMTP password (payload; env: SMTP_PASS) | |
--smtp-port <port> | SMTP port (payload; env: SMTP_PORT) | |
--smtp-user <user> | SMTP user (payload; env: SMTP_USER) | |
-t, --template <template> | Template: next | payload | |
--turnstile-secret-key <key> | Turnstile secret key (payload; env: TURNSTILE_SECRET_KEY) | |
--turnstile-site-key <key> | Turnstile site key (payload; env: NEXT_PUBLIC_TURNSTILE_SITE_KEY) | |
-y, --yes | Skip confirmation | false |
Flag behaviorLink to this section
-
-p, --path <dir>— directory to scaffold into, relative or absolute (e.g..). Defaults to[name]. When given, the positional[name]becomes thepackage.jsonname instead of the directory. -
--skills/--no-skills— install Systhema agent skills into the project (default: prompt, recommended). With--yes, skills are installed unless--no-skillsis passed. -
--skill-agents <agents>— comma-separated agent targets for the skills, e.g.claude,agents. Interactive checkbox if omitted;--yesdefaults to the cross-agent.agents/location. -
--ai <provider>— (payload) AI assistant single text provider:none(default, disables the module),openai,anthropic,google,groq, oropenai-compatible(self-hosted endpoint; requires--ai-base-url). Generates an env-gated single-providersrc/payload/ai.tsthat reads the conventionalSYSTHEMA_AI_*variables at runtime and forwards them into theaiplugin option (the package itself reads no env vars). -
(payload) A Custom multi-model setup (build your own
models[]with optionallockedupgrade teasers, apackageNamelabel, and a credit budget — all your own values) is offered interactively in thecreatequestionnaire; there's no flag for it. Keys for each provider are read from the conventional per-provider env vars (OPENAI_API_KEY,ANTHROPIC_API_KEY,GOOGLE_GENERATIVE_AI_API_KEY). The CLI ships no prescribed plan presets — pricing/quota structure is the licensee's own business logic. -
--analytics <provider>— (payload) Analytics dashboard provider:none(default),ga4,plausible,umami,matomo, orfathom. Generates an env-gatedsrc/payload/analytics.tsthat reads the conventionalSYSTHEMA_ANALYTICS_*variables at runtime and forwards them into theanalyticsplugin option (the package itself reads no env vars). Blank credentials are written as fill-later.envlines — analytics disables itself with a startup warning until they're filled in. -
--analytics-site-id <id>— (payload) the provider's site identifier: GA4 property id, Plausible domain, Umami website id, MatomoidSite, or Fathom site id (payload; env:SYSTHEMA_ANALYTICS_SITE_ID). -
(payload) GA4's service-account fields (
SYSTHEMA_ANALYTICS_GA_CLIENT_EMAIL/SYSTHEMA_ANALYTICS_GA_PRIVATE_KEY) and Umami self-hosted login (SYSTHEMA_ANALYTICS_USERNAME/SYSTHEMA_ANALYTICS_PASSWORD) are env-only — no flags;createwrites blank.envlines and points at them. -
--cloudflare <mode>— (payload) Cloudflare integration auth method:none(default),token, orkey(env:SYSTHEMA_CLOUDFLARE_MODE). Generates an env-gatedsrc/payload/cloudflare.tsthat readsCLOUDFLARE_API_TOKEN/CLOUDFLARE_API_KEY+CLOUDFLARE_EMAIL/CLOUDFLARE_ZONE_IDand forwards them into thecloudflareplugin option (the package itself reads no env vars). Blank credentials are written as fill-later.envlines. -
--locales <codes|none>— (payload) frontend locales: comma-separated BCP 47 codes (e.g.en,hu), ornone(default) for a single language. Writes the locale contract intosysthema.config.tsand — once dependencies are installed — runs the locale migration (systhema-core sync --migrate-locales) that generates the localized route seams. -
(payload) credential flags — every secret can be passed non-interactively, so one command wires a fully-configured project:
--email-from,--resend-key,--sendgrid-key,--smtp-host/--smtp-port/--smtp-user/--smtp-pass,--recaptcha-site-key/--recaptcha-secret-key,--turnstile-site-key/--turnstile-secret-key,--ai-key,--analytics-site-id/--analytics-api-key/--analytics-host,--cloudflare-api-token/--cloudflare-api-key/--cloudflare-email/--cloudflare-zone-id. Each also reads its project env var when the flag is omitted (see below). -
--pm, --package-manager <pm>—pnpm,npm, oryarn. A pnpm project getspackageManagerpinned to a pnpm 10 release. pnpm 11 and later switch to the pinned version, and so does a build host that honours the field. Without the pin they would ignore thepnpmfield ofpackage.json, which holds the project's security overrides, build allowlist and Lexical patch. Whencreateinstalls, it runs pnpm withmanage-package-manager-versionson, so pnpm 9.7 and later switch too. An older pnpm cannot switch, so the project pins that pnpm instead, to match the lockfile it writes. npm and yarn projects get no pin. -
-y, --yes— skip every prompt and use defaults (payload: SQLite + Resend, Forms and Redirects on, no maps/captcha/AI/analytics/Cloudflare, single language). Those are the template's own defaults, so--yesproduces exactly what the template ships. Any credential not supplied via a flag or env var is left blank to fill in later.
Non-interactive credential resolutionLink to this section
Each credential resolves in this order: flag → environment variable → interactive prompt (only without --yes) → blank. The env var is the same name the generated project reads, so exporting it both configures the scaffold and is what the running app uses:
| Flag | Env var |
|---|---|
--db-url | DATABASE_URI |
--email-from | SYSTHEMA_EMAIL_FROM |
--resend-key | RESEND_API_KEY |
--sendgrid-key | SENDGRID_API_KEY |
--smtp-host / --smtp-port / --smtp-user / --smtp-pass | SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASS |
--recaptcha-site-key / --recaptcha-secret-key | NEXT_PUBLIC_RECAPTCHA_SITE_KEY / RECAPTCHA_SECRET_KEY |
--turnstile-site-key / --turnstile-secret-key | NEXT_PUBLIC_TURNSTILE_SITE_KEY / TURNSTILE_SECRET_KEY |
--maps-key | NEXT_PUBLIC_GOOGLE_MAPS_API_KEY |
--ai-key / --ai-model / --ai-base-url | SYSTHEMA_AI_API_KEY / SYSTHEMA_AI_MODEL / SYSTHEMA_AI_BASE_URL |
--analytics-site-id / --analytics-api-key / --analytics-host | SYSTHEMA_ANALYTICS_SITE_ID / SYSTHEMA_ANALYTICS_API_KEY / SYSTHEMA_ANALYTICS_HOST |
--cloudflare-api-token / --cloudflare-api-key / --cloudflare-email / --cloudflare-zone-id | CLOUDFLARE_API_TOKEN / CLOUDFLARE_API_KEY / CLOUDFLARE_EMAIL / CLOUDFLARE_ZONE_ID |
A fully non-interactive, fully-wired example:
systhema create acme --template payload --yes \
--db postgres --db-url "$DATABASE_URI" \
--email resend --resend-key "$RESEND_API_KEY" \
--captcha turnstile --turnstile-site-key "$TS_SITE" --turnstile-secret-key "$TS_SECRET" \
--maps-key "$MAPS_KEY"What the scaffolder doesLink to this section
- Copies the template, restoring
.gitignoreand.npmrc(renamed to neutral names in the published bundle sonpm packdoesn't strip them). - Rewrites the project's
package.jsonname. - Pins every
@systhemaui/*dep to the running CLI's exact version. Stable CLIs use a caret (e.g.^1.6.0); prerelease CLIs (-internal.<sha>,-canary.<n>,-rc.<n>, etc.) use an exact pin so the project tests against the same code as the CLI that scaffolded it. - (Payload) Walks a short setup questionnaire (database adapter, email provider, Google Maps, form captcha, Forms, Redirects, AI assistant, analytics dashboard, Cloudflare, locales) and wires each choice:
- Swaps the matching
@payloadcms/*adapter dependency — so only the packages you actually picked are installed (no Postgres driver for SQLite, no email package for None, SendGrid addsnodemailer-sendgrid). - (Re)generates
src/payload/database.ts,src/payload/email.ts,src/payload/forms.ts,src/payload/redirects.ts,src/payload/ai.ts,src/payload/analytics.tsandsrc/payload/cloudflare.tsfor the chosen adapters and module toggles. For AI: None, a single provider (env-driven), or Custom (build your own model list — models, an optional credit budget, and an optional plan label, all your own values). Single-provider scaffolds keep the env-gated module; a custom list emits an explicitmodels[]config with keys referenced from per-provider env vars. The CLI prescribes no plans — pricing/quota structure is the licensee's own business logic. For analytics: None or one of the five providers — the env-gated module activates onSYSTHEMA_ANALYTICS_PROVIDERand blank credentials stay as fill-later.envlines. For Cloudflare: None, API token (recommended), or Global API key — the env-gated module activates onCLOUDFLARE_API_TOKENorCLOUDFLARE_API_KEY+CLOUDFLARE_EMAIL, with an optional zone ID (auto-resolved from the site URL when left blank). - Writes a
.envwith auto-generatedPAYLOAD_SECRETandSYSTHEMA_API_SECRET. - Fills in credentials you supply; comments out integrations you skip (config feature-flags on env vars, so absent keys disable features).
- For a multilingual choice: writes the locale contract into
systhema.config.ts, then — after the dependency install — runs<pm> exec systhema-core sync --migrate-localesto generate the localized route seams. If the install was skipped (or failed), the migration becomes a printed Next step instead. - Result: the default SQLite setup runs with
pnpm devimmediately, no external service needed.
- Swaps the matching
- (If skills enabled) installs the selected Systhema agent skills into
.{agent}/skills/(e.g..claude/skills/,.agents/skills/) — the same skillssysthema skills installmanages. This runs before git init, so the skills are tracked in the initial commit. - (If
--git) initializes a git repository onmainand creates the initial commit. - (If
--install) runs the chosen package manager.
After it's done you'll have a project that's already wired up with Systhema, Tailwind v4, and the chosen framework.