Add a Template

Templates are curated project starters: a starter, a layout, and a set of feature packs pre-wired together, plus a custom theme and extra pages. The template command installs one into an existing Hype Stack project.

Prerequisite

Templates go on top of a Hype Stack project, so scaffold one first:

npx @hype-stack/cli create my-app
cd my-app

create clones the base template (the empty canvas). You then layer a template on with the template command.

Usage

Install a template by id:

npx @hype-stack/cli template better-studio

Omit the id to pick interactively:

npx @hype-stack/cli template

The command expands the template into its starter and layout slot variants plus its fixed feature packs, installs them like a normal compose, then layers the template's frontend overrides (landing page, pricing page, and so on) on top so the template owns those paths.

Swapping slot variants

A template names a pack family for each slot rather than a concrete pack, so you can swap variants at install time. Pick interactively, or preselect with --variants:

npx @hype-stack/cli template better-studio --variants starter-saas=starter-saas-betterauth,layout=layout-basic

Adding extra packs

Add feature packs that fall outside the template's own scope with --packs:

npx @hype-stack/cli template better-studio --packs pack-notifications,pack-collaboration

Flags

FlagWhat it does
[id]Template id. Omit to choose from a list.
--variants <family=pack,...>Preselect slot variants instead of prompting.
--packs <a,b,c>Extra feature packs to add on top of the template.
-k, --key <key>License key for paid packs and templates.
--forceOverwrite existing files.
-y, --yesSkip confirmation prompts (requires an id).
--cwd <path>Run against a different working directory.

Available templates

TemplateScaffolded code
better-studioAuth, billing, unified app shell, plus landing and pricing pages

The free template does not include paid provider integrations such as WorkOS auth, Stripe billing or Sentry. Paid packs are installed and licensed separately.

After install

The template and its packs are recorded in stack.json:

{
  "template": "better-studio",
  "installedPacks": [
    "starter-saas-betterauth",
    "layout-glass",
    "pack-billing-stripe"
  ]
}

Templates are starting points, not constraints. Once installed, you own all the code. Modify routes, swap providers, restructure the layout. Nothing is locked.

Add more packs on top at any time:

npx @hype-stack/cli compose

Then run onboard to fill in any new env vars the template and its packs need and apply migrations.