alepha@docs:~/docs/.content/release/framework/docs/packages$
cat 9-create-alepha.md | pretty
2 min read
Last commit:

#create-alepha

Create a new Alepha project with a single command.

#Usage

bash
npm create alepha my-app

#Overview

create-alepha scaffolds a new Alepha project with a single command - it is the first thing a new user runs:

bash
npm create alepha my-app

Works with any package manager, and the one you invoke is the one your project gets - yarn create alepha, pnpm create alepha and bun create alepha all resolve themselves through npm_config_user_agent, so there is nothing to answer.

Pass the name and it runs start to finish in a CI, a Dockerfile or an agent's shell: with no input to read, every remaining question takes its default, so the project is the same one a human gets by pressing Enter.

bash
npm create alepha my-app

On a terminal, an interactive wizard asks for whatever no flag has answered. --yes (-y) takes every default there too, without asking. Flags win over both, so --preset saas is a complete, promptless description of a different shape. The project name is the one thing no default can supply; leave it out with nothing to read and the command says so.

The package is standalone with no runtime dependencies, so npm create stays fast. It scaffolds the same layout as alepha init; use init from inside an existing project to fill in missing pieces (it additionally takes --force).

#Presets

bash
npm create alepha my-app -- --preset saas
Preset What you get
default API module, React web module with SSR, Tailwind
saas The above plus @alepha/ui: sign-in at /auth/*, the account as a dialog over the page, an admin console at /admin/*, and the $realm behind them

Both presets lay out src/api/, src/web/ and src/main.css identically - a preset decides what is mounted, never where it lives.

#Options

Flag Description
--preset <name> default (the default) or saas
--pm <manager> Force a package manager: yarn, npm, pnpm, or bun
--yes, -y Take the default for every remaining question

#After creating

bash
cd my-app
npm run dev