create-lithia-app
Lithia.js Official Project Initializer
Next-Gen Project Scaffolding
Curated Production Templates
Template | Stack Highlights | Use Case |
---|---|---|
default | Minimal core configuration | API development |
with-drizzle | Drizzle ORM + PostgreSQL setup | Data-intensive applications |
with-prisma | Prisma + PostgreSQL setup | Rapid prototyping |
Zero-Config Initialization
Launch projects with industry-best practices:
Terminal
npx create-lithia-app@latest
Intelligent Configuration Workflow
Core Project Settings
Prompt | Default Value | Key Functionality |
---|---|---|
Project Name | my-lithia-app | Creates namespaced directory |
Template Selection | default | Optimized tech stack bootstrap |
Dependency Install | Yes | Auto-detects package manager |
Git Initialization | Yes | Creates .gitignore with defaults |
Advanced Options
Flag | Command Example | Execution Impact |
---|---|---|
--name | --name=api-service | Forces specific project name |
--template | --template=with-drizzle | Bypasses template selection |
--package-manager | --package-manager=yarn | Overrides auto-detection logic |
--yes | --yes | Silent mode for CI/CD pipelines |
Enterprise-Grade Features
Multi-Environment Ready
- Development setup:
Terminal
npx create-lithia-app --template=with-prisma
- Production foundation:
Terminal
npx create-lithia-app --template=with-drizzle --no-install
Package Manager Support
Manager | Status | Flags |
---|---|---|
npm | Native | --package-manager=npm |
Yarn | Stable | --package-manager=yarn |
pnpm | Beta | --package-manager=pnpm |
Bun | Beta | --package-manager=bun |
Optimized Workflows
CI/CD Integration Example
Terminal
npx create-lithia-app@latest \
--name=payment-gateway \
--template=with-drizzle \
--package-manager=pnpm \
--yes
Post-Install Automation
- Security audit with
npm audit
- TypeScript type checking
- Pre-commit hook setup (optional)
- Health check endpoint generation
Technical Reference
Full Command Specification
Option | Type | Default | Environment |
---|---|---|---|
--name | string | my-lithia-app | Development |
--template | enum | default | All |
--no-install | boolean | false | CI/CD |
--git | boolean | true | New projects |
--overwrite | boolean | false | Existing folders |
Exit Codes
Code | Scenario |
---|---|
0 | Successful project creation |
1 | Validation error |
2 | Network failure |
3 | File system permission issue |
Pro Tip: Combine with lithia dev
for instant hot-reload development experience after project creation.