Starter Templates
@hygular/create-app creates a project from a bundled starter template and installs its dependencies. Choose an Agency or Blog starter and the framework you want to use.
The scaffolder is separate from @hygular/core, which provides styles and runtime components, and @hygular/cli, which compiles project-specific CSS. Creating a project does not run the CSS compiler automatically.
Browse the Templates page for previews.
Available templates
| Template | Next.js | Nuxt | Included pages |
|---|---|---|---|
agency | Included | Included | Home, about, services, service details, contact, privacy, and terms |
blog | Included | Included | Home, blog, article details, categories, category details, about, contact, privacy, and terms |
Both templates are available for Next.js and Nuxt. The selected framework determines which starter is copied into the project.
The starters include local sample content. They are application starting points, not configured CMS instances or backend services.
Requirements
- Node.js 18 or later for the scaffolder itself.
- A Node.js version supported by the selected starter's dependencies. Next.js, Nuxt, or the CSS compiler may require a newer version.
- npm for automatic dependency installation.
- Network access to retrieve the package and install dependencies.
- A destination directory that does not already exist.
Create a project
Run the CLI without arguments to configure a project interactively:
npx @hygular/[email protected]
The CLI prompts for a project name, template, and framework. You can also supply these values directly to skip the prompts.
Choose a starter
npx @hygular/[email protected] my-agency --template agency --framework nextjs
The command creates a directory with the specified project name in your current working directory.
You can provide some options and select the remaining values interactively:
npx @hygular/[email protected] my-site
Once dependency installation completes, enter the generated directory and start the development server:
cd my-site
npm run dev
Replace my-site with the name of your project. Open the local address printed by the framework's development server.
Command reference
npx @hygular/[email protected] <project-name> --template <template> --framework <framework>
| Argument | Behavior |
|---|---|
project-name | Names the new project directory. Use a lowercase name such as my-site. |
--template | Accepts agency or blog. |
--framework | Accepts nextjs or nuxt. |
--help, -h | Prints usage information and exits. |
Missing values are requested through interactive prompts when a terminal is available. In non-interactive environments, provide the project name, template, and framework explicitly.
Project names may contain letters, numbers, hyphens, and underscores. Paths containing directory separators are not accepted. An existing destination is rejected even when it is empty.
Put the project name before the options and separate each option from its value with a space. Use --template agency, not --template=agency.
The CLI does not support overwriting existing directories, skipping dependency installation, or selecting a package manager.
Help
npx @hygular/[email protected] --help
What the generator does
- Accepts project options through command-line arguments or interactive prompts.
- Validates the selected options and checks that the destination directory does not already exist.
- Creates a new project directory using the selected starter.
- Configures the generated project with the provided name.
- Installs dependencies using
npm install. - Prints the commands to start the project.
Templates are bundled with the generator and are not downloaded separately. Dependency names and versions are defined in each starter's package.json.
The generator does not initialize Git, configure deployment, or provision external services.
Package manager behavior
The generator uses npm to install dependencies and prints npm commands for running the project.
If installation fails
The generated files remain available if dependency installation fails. Enter the project directory and run npm manually:
cd my-site
npm install
Check npm's error output to identify the installation failure. A created project directory does not mean dependency installation or a production build has succeeded.
Customize the application
The starters include sample content, shared components, and application routes. Their directory structures follow the conventions of the selected framework.
| Starter | Routes | Shared UI | Sample content |
|---|---|---|---|
| Agency · Next.js | app/ | components/ | data/mock.ts |
| Agency · Nuxt | pages/ | components/ | Starter data files and page imports |
| Blog · Next.js | app/ | components/ | lib/data.ts |
| Blog · Nuxt | pages/ | components/ | Starter data files and page imports |
Start by replacing the sample content, navigation, page metadata, and site identity. Review contact behavior and legal page content before deployment. Replace placeholder URLs and configure any environment values required by the application.
Next.js starters use app/globals.css for application styles. The Nuxt Agency starter uses assets/css/globals.css and registers global CSS in nuxt.config.ts.
Build the generated project
Run a production build after configuring your application:
npm run build
For Next.js, the supplied start script runs the production server. For Nuxt, the supplied preview script previews the built application.
npm run start