Skip to main content

CLI Reference

Every flag below exists because hand-editing a scaffolded project's config is how drift creeps back in — this is the exact, complete surface for create-client.mjs and the other scaffolders, so a repeat scaffold behaves the same way every time.

create-client — scaffold a new project

create-client <project-name> --template <marketing|dashboard> --out <path> [options]

--template <name> which templates/<name> to use (required)
--out <path> destination dir (must be empty/new) (required)
--set TOKEN=value override a token; repeatable
--enable m1,m2 enable optional modules
--env generate a runnable .env beside every .env.example
--yes, -y accept defaults (stored-or-template), no prompts
--no-store don't read/write the remembered-answers store
--dry-run print the plan, write nothing
FlagWhat it does
--template <name>Selects templates/<name> as the source (marketing or dashboard). Required.
--out <path>Destination directory for the scaffolded project. Must be empty or not yet exist. Required.
--set TOKEN=valueOverrides a single __TOKEN__ value, bypassing its prompt. Repeatable for multiple tokens.
--enable m1,m2Enables one or more opt-in modules declared in the template's template.config.json (e.g. billing, admin, booking).
--envCopies each .env.example to a sibling .env (skips any that already exist). Values are placeholders — fill in real secrets before running.
--yes / -yAccepts stored-or-template defaults for every prompt, no interactive prompts at all.
--no-storeSkips reading from and writing to the remembered-answers store (~/.config/next-starters/answers.json).
--dry-runPrints the full scaffold plan (tokens resolved, modules enabled, files that would be written) without writing anything.

Prompt defaults resolve last-wins: template default < remembered answer from a prior run < --set/--enable. Answers are persisted per template so repeat scaffolds need less typing.

add-api-client — add a typed API-client package

A second, orthogonal scaffolder for the data layer. Where create-client stamps a whole app, add-api-client adds one typed API-client package to an existing monorepo — an OpenAPI/Swagger spec goes in, Kubb-generated types + zod + a fetch client + TanStack Query hooks come out.

add-api-client <service> [options]

--scope <@scope> package scope (default: inferred from root/packages)
--spec <path|url> OpenAPI source to vendor as openapi.json
--seams <cogs|local> depend on shared @cogs/* (default) or local seam packages
--packages-dir <dir> where packages live (default: packages)
--out <dir> monorepo root (default: cwd)
--dry-run print the plan, write nothing

Other scaffolders

ScriptWhat it adds
bin/add-auth-email-provisioning.mjsSES + Terraform + Cloudflare DNS/DMARC/Turnstile infra for branded auth email into a repo. Write-by-default; --dry-run to preview; --ses-region required.
bin/add-auth-emails.mjsMJML/EJS transactional-email templates + a runnable compile-templates.mjs into a repo. Write-by-default; --dry-run to preview; --emails cogs|local.
bin/add-auth-org-onboarding.mjsThe auto-create-or-join-org-on-first-login flow, with a required --org-resolution live-db|jwt-embedded flag selecting the org-membership architecture.
bin/add-env-layer.mjsThe runtime env layer (EnvProvider + setClientConfig + useAccessToken) into an existing Next.js App Router app.

Installing a skill

skills add git@github.com:catesandrew/next-starters.git --skill skills/<name> -g

See the Skills Catalog for every skill's exact install command, one-line description, and use case.