CLI Commands
Complete reference for all Better-T-Stack CLI commands and options
Commands Overview
Command | Description |
---|---|
init (default) | Create a new Better-T-Stack project |
add | Add addons or deployment configurations to existing projects |
sponsors | Display project sponsors |
docs | Open documentation in browser |
builder | Open web-based stack builder |
init
- Create Project (Default)
The primary command for creating new Better-T-Stack projects.
Basic Usage
# Interactive setup
npx create-better-t-stack@latest
# With project name
npx create-better-t-stack@latest my-project
# With specific directory
npx create-better-t-stack@latest ./path/to/project
# Use current directory
npx create-better-t-stack@latest .
Flags Reference
General Options
Flag | Type | Default | Description |
---|---|---|---|
--yes, -y | boolean | false | Skip prompts, use defaults |
--help, -h | boolean | - | Show help information |
--version, -V | boolean | - | Show CLI version |
Frontend Options
Flag | Values | Default | Description |
---|---|---|---|
--frontend | Multiple values | tanstack-router | Frontend frameworks to include |
Available Frontend Values:
tanstack-router
- React with TanStack Routerreact-router
- React with React Routertanstack-start
- React with TanStack Start (SSR)next
- Next.js frameworknuxt
- Vue.js with Nuxtsvelte
- SvelteKitsolid
- SolidJSnative-nativewind
- React Native with NativeWindnative-unistyles
- React Native with Unistylesnone
- No frontend
Examples:
# Single web frontend
--frontend tanstack-router
# Web + Mobile
--frontend tanstack-router native-nativewind
# Multiple frontends
--frontend next solid
# No frontend (API-only)
--frontend none
Backend Options
Flag | Values | Default | Description |
---|---|---|---|
--backend | Single value | hono | Backend framework |
Available Backend Values:
hono
- Hono web frameworkexpress
- Express.jsfastify
- Fastify frameworkelysia
- Elysia frameworknext
- Next.js API routesconvex
- Convex backend-as-a-servicenone
- No backend
Examples:
--backend hono
--backend convex
--backend none
Runtime Options
Flag | Values | Default | Description |
---|---|---|---|
--runtime | Single value | bun | Runtime environment |
Available Runtime Values:
bun
- Bun runtimenode
- Node.js runtimeworkers
- Cloudflare Workers (Hono only)none
- No runtime (Convex/none backend)
Examples:
--runtime bun
--runtime workers # Only with --backend hono
Database Options
Flag | Values | Default | Description |
---|---|---|---|
--database | Single value | sqlite | Database type |
Available Database Values:
sqlite
- SQLite databasepostgres
- PostgreSQLmysql
- MySQLmongodb
- MongoDBnone
- No database
Examples:
--database postgres
--database none
ORM Options
Flag | Values | Default | Description |
---|---|---|---|
--orm | Single value | drizzle | ORM/Database toolkit |
Available ORM Values:
drizzle
- Drizzle ORM (TypeScript-first)prisma
- Prisma ORM (feature-rich)mongoose
- Mongoose (MongoDB only)none
- No ORM
Examples:
--orm drizzle
--orm prisma
--orm none
API Layer Options
Flag | Values | Default | Description |
---|---|---|---|
--api | Single value | trpc | API layer type |
Available API Values:
trpc
- tRPC (end-to-end type safety)orpc
- oRPC (OpenAPI compatible)none
- No API layer
Examples:
--api trpc
--api orpc
--api none
Authentication Options
Flag | Type | Default | Description |
---|---|---|---|
--auth | boolean | true | Enable authentication |
--no-auth | boolean | - | Disable authentication |
Examples:
--auth # Enable auth
--no-auth # Disable auth
Addons Options
Flag | Values | Default | Description |
---|---|---|---|
--addons | Multiple values | turborepo | Additional features |
Available Addon Values:
turborepo
- Turborepo build systempwa
- Progressive Web App supporttauri
- Desktop app with Tauribiome
- Biome linter/formatterhusky
- Git hooks with Huskystarlight
- Documentation sitenone
- No addons
Examples:
--addons turborepo pwa
--addons biome husky
--addons none
Examples Options
Flag | Values | Default | Description |
---|---|---|---|
--examples | Multiple values | [] | Example applications |
Available Example Values:
todo
- Todo CRUD applicationai
- AI chat interfacenone
- No examples
Examples:
--examples todo
--examples todo ai
--examples none
Database Setup Options
Flag | Values | Default | Description |
---|---|---|---|
--db-setup | Single value | none | Database hosting setup |
Available Database Setup Values:
turso
- Turso SQLite hostingneon
- Neon PostgreSQLsupabase
- Supabase PostgreSQLprisma-postgres
- Prisma PostgreSQLmongodb-atlas
- MongoDB Atlasd1
- Cloudflare D1 (Workers only)docker
- Local Docker setupnone
- Manual setup
Examples:
--db-setup neon
--db-setup docker
--db-setup none
Deployment Options
Flag | Values | Default | Description |
---|---|---|---|
--web-deploy | Single value | none | Web deployment setup |
Available Deployment Values:
workers
- Cloudflare Workersnone
- No deployment setup
Examples:
--web-deploy workers
--web-deploy none
Project Management Options
Flag | Type | Default | Description |
---|---|---|---|
--git | boolean | true | Initialize git repository |
--no-git | boolean | - | Skip git initialization |
--install | boolean | true | Install dependencies |
--no-install | boolean | - | Skip dependency installation |
--package-manager | string | auto-detect | Package manager to use |
Package Manager Values:
npm
- Use npmpnpm
- Use pnpmbun
- Use bun
Examples:
--git --install --package-manager pnpm
--no-git --no-install
add
- Add to Existing Project
Add addons or deployment configurations to existing Better-T-Stack projects.
Usage
# Interactive addon selection
npx create-better-t-stack@latest add
# Add specific addons
npx create-better-t-stack@latest add --addons pwa tauri
# Add deployment
npx create-better-t-stack@latest add --web-deploy workers
# Add both
npx create-better-t-stack@latest add --addons biome --web-deploy workers
Flags
Flag | Values | Description |
---|---|---|
--addons | Multiple values | Addons to add (same as init) |
--web-deploy | Single value | Deployment to add |
--project-dir | string | Target project directory (default: current) |
--install | boolean | Install dependencies after adding |
--no-install | boolean | Skip dependency installation |
--package-manager | string | Package manager to use |
Examples
# Add PWA support to current project
npx create-better-t-stack@latest add --addons pwa
# Add multiple addons with dependency installation
npx create-better-t-stack@latest add --addons biome husky --install
# Add to specific project directory
npx create-better-t-stack@latest add --project-dir ./my-project --addons tauri
sponsors
- View Sponsors
Display Better-T-Stack project sponsors.
Usage
npx create-better-t-stack@latest sponsors
Shows a list of project sponsors with their GitHub profiles and websites.
docs
- Open Documentation
Open Better-T-Stack documentation in your default browser.
Usage
npx create-better-t-stack@latest docs
Opens: https://better-t-stack.dev/docs
builder
- Open Stack Builder
Open the web-based interactive stack builder.
Usage
npx create-better-t-stack@latest builder
Opens: https://better-t-stack.dev/new
The web builder provides a visual interface for configuring your stack and generates the corresponding CLI command.
Complete Examples
Full-Stack Web Application
npx create-better-t-stack@latest my-webapp \
--frontend tanstack-router \
--backend hono \
--runtime bun \
--database postgres \
--orm drizzle \
--api trpc \
--auth \
--db-setup neon \
--addons pwa turborepo \
--examples todo ai
Mobile + Web Application
npx create-better-t-stack@latest my-mobile-app \
--frontend tanstack-router native-nativewind \
--backend hono \
--database sqlite \
--orm drizzle \
--auth \
--db-setup turso \
--addons turborepo
Cloudflare Workers Project
npx create-better-t-stack@latest my-workers-app \
--frontend tanstack-router \
--backend hono \
--runtime workers \
--database sqlite \
--orm drizzle \
--db-setup d1 \
--web-deploy workers
API-Only Project
npx create-better-t-stack@latest my-api \
--frontend none \
--backend fastify \
--runtime node \
--database postgres \
--orm prisma \
--api trpc \
--db-setup docker
Quick Defaults
# Use all defaults with immediate setup
npx create-better-t-stack@latest my-project --yes
# Convex full-stack (automatically configures compatible options)
npx create-better-t-stack@latest my-convex-app --backend convex
Compatibility Notes
Some options have compatibility requirements:
- Cloudflare Workers: Only with
--backend hono
,--orm drizzle
,--runtime workers
- MongoDB: Requires
--orm mongoose
or--orm prisma
- Convex: Incompatible with custom database/ORM/API options
- PWA: Requires compatible web frontend
- Tauri: Requires compatible web frontend
- AI Examples: Not compatible with
--backend elysia
or--frontend solid
The CLI will validate compatibility and show helpful error messages for invalid combinations.