Start a new Alepha project in seconds. The init command sets up everything you need — configuration files, dependencies, and project structure — so you can focus on building, not configuring.
# In an empty directory
alepha init
# With React support
alepha init --react
# With the full UI kit
alepha init --ui
That's it. You now have a working Alepha project. Run alepha dev to start building.
The init command is your project bootstrap. It handles the tedious setup work that every project needs:
tsconfig.json, biome.json, vite.config.ts, .editorconfigsrc/main.ts so you have something to work with| Flag | Description |
|---|---|
--react |
Include React and @alepha/react for building web apps |
--ui |
Include @alepha/ui component library (automatically includes --react) |
--test |
Set up Vitest and create a test directory |
--yarn |
Use Yarn as the package manager |
--pnpm |
Use pnpm as the package manager |
--npm |
Use npm as the package manager |
--bun |
Use Bun as the package manager |
If you don't specify a package manager, init figures it out automatically:
yarn.lock exists → uses Yarnpnpm-lock.yaml exists → uses pnpmPackage Manager Cleanup
When switching package managers,
initcleans up the old lock files to avoid conflicts.
alepha init
Creates a minimal server-side project. Perfect for APIs, CLI tools, or background workers.
You get:
src/main.ts — Your entry pointtsconfig.json — TypeScript configurationvite.config.ts — Build configurationbiome.json — Linting and formatting rulesalepha init --react
Sets up a full-stack application with server-side rendering.
Additional files:
index.html — The HTML shell for your appsrc/main.browser.ts — Browser entry pointsrc/main.server.ts — Server entry pointsrc/AppRouter.ts — Your route definitionsAdditional dependencies:
@alepha/react — SSR React integrationreact and react-dom — React itself@types/react — TypeScript definitionsalepha init --ui
Everything from --react, plus the Alepha UI component library.
Additional dependencies:
@alepha/ui — Pre-built components (buttons, forms, modals, etc.)alepha init --test
Sets up Vitest for testing your code.
Additional files:
test/dummy.spec.ts — A starter test fileAdditional dependencies:
vitest — Fast, Vite-native test runnerYou can combine flags:
alepha init --react --test
A TypeScript configuration tuned for modern development:
A minimal Vite configuration that just works:
1import alepha from "@alepha/vite";2import { defineConfig } from "vite";3 4export default defineConfig({5 plugins: [alepha()],6});
The Alepha Vite plugin handles React, SSR, and production builds automatically.
Linting and formatting rules that make sense:
Your package.json gets these scripts:
1{2 "scripts": {3 "dev": "alepha dev",4 "build": "alepha build",5 "lint": "alepha lint",6 "typecheck": "alepha typecheck",7 "verify": "alepha verify"8 }9}
If your project has Expo installed, init adapts automatically:
vite.config.ts (Expo has its own bundler)index.html (Expo handles this)Expo Detection
Expo detection is automatic — if
expois in your dependencies, Alepha knows.
Already have a project? No problem. Running init on an existing project:
Safe to Re-run
It's safe to run
initmultiple times. Use it when you want to add React to an existing backend project, or when you need to regenerate configuration files.
Once your project is initialized:
# Start developing
alepha dev
# Check your code
alepha lint
alepha typecheck
# Build for production
alepha build
# Run the full verification pipeline
alepha verify
Start small. Begin with alepha init (no flags) and add React later if you need it. You can always run init --react on an existing project.
Use --test from the start. Tests are easier to write when you start early. The --test flag gives you a working test setup immediately.
Pick a package manager and stick with it. Mixing package managers causes headaches. If you're unsure, Yarn or pnpm are solid choices for their speed and reliability.
Check the generated files. The configurations are sensible defaults, but you might want to tweak them. They're yours now.