⚠️ WORK IN PROGRESS DONT TAKE REFERENCE!!!
better-t-stackBetter T Stack

CLI Commands

Complete reference for all Better-T-Stack CLI commands and options

Commands Overview

CommandDescription
init (default)Create a new Better-T-Stack project
addAdd addons or deployment configurations to existing projects
sponsorsDisplay project sponsors
docsOpen documentation in browser
builderOpen 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

FlagTypeDefaultDescription
--yes, -ybooleanfalseSkip prompts, use defaults
--help, -hboolean-Show help information
--version, -Vboolean-Show CLI version

Frontend Options

FlagValuesDefaultDescription
--frontendMultiple valuestanstack-routerFrontend frameworks to include

Available Frontend Values:

  • tanstack-router - React with TanStack Router
  • react-router - React with React Router
  • tanstack-start - React with TanStack Start (SSR)
  • next - Next.js framework
  • nuxt - Vue.js with Nuxt
  • svelte - SvelteKit
  • solid - SolidJS
  • native-nativewind - React Native with NativeWind
  • native-unistyles - React Native with Unistyles
  • none - 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

FlagValuesDefaultDescription
--backendSingle valuehonoBackend framework

Available Backend Values:

  • hono - Hono web framework
  • express - Express.js
  • fastify - Fastify framework
  • elysia - Elysia framework
  • next - Next.js API routes
  • convex - Convex backend-as-a-service
  • none - No backend

Examples:

--backend hono
--backend convex
--backend none

Runtime Options

FlagValuesDefaultDescription
--runtimeSingle valuebunRuntime environment

Available Runtime Values:

  • bun - Bun runtime
  • node - Node.js runtime
  • workers - Cloudflare Workers (Hono only)
  • none - No runtime (Convex/none backend)

Examples:

--runtime bun
--runtime workers  # Only with --backend hono

Database Options

FlagValuesDefaultDescription
--databaseSingle valuesqliteDatabase type

Available Database Values:

  • sqlite - SQLite database
  • postgres - PostgreSQL
  • mysql - MySQL
  • mongodb - MongoDB
  • none - No database

Examples:

--database postgres
--database none

ORM Options

FlagValuesDefaultDescription
--ormSingle valuedrizzleORM/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

FlagValuesDefaultDescription
--apiSingle valuetrpcAPI 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

FlagTypeDefaultDescription
--authbooleantrueEnable authentication
--no-authboolean-Disable authentication

Examples:

--auth        # Enable auth
--no-auth     # Disable auth

Addons Options

FlagValuesDefaultDescription
--addonsMultiple valuesturborepoAdditional features

Available Addon Values:

  • turborepo - Turborepo build system
  • pwa - Progressive Web App support
  • tauri - Desktop app with Tauri
  • biome - Biome linter/formatter
  • husky - Git hooks with Husky
  • starlight - Documentation site
  • none - No addons

Examples:

--addons turborepo pwa
--addons biome husky
--addons none

Examples Options

FlagValuesDefaultDescription
--examplesMultiple values[]Example applications

Available Example Values:

  • todo - Todo CRUD application
  • ai - AI chat interface
  • none - No examples

Examples:

--examples todo
--examples todo ai
--examples none

Database Setup Options

FlagValuesDefaultDescription
--db-setupSingle valuenoneDatabase hosting setup

Available Database Setup Values:

  • turso - Turso SQLite hosting
  • neon - Neon PostgreSQL
  • supabase - Supabase PostgreSQL
  • prisma-postgres - Prisma PostgreSQL
  • mongodb-atlas - MongoDB Atlas
  • d1 - Cloudflare D1 (Workers only)
  • docker - Local Docker setup
  • none - Manual setup

Examples:

--db-setup neon
--db-setup docker
--db-setup none

Deployment Options

FlagValuesDefaultDescription
--web-deploySingle valuenoneWeb deployment setup

Available Deployment Values:

  • workers - Cloudflare Workers
  • none - No deployment setup

Examples:

--web-deploy workers
--web-deploy none

Project Management Options

FlagTypeDefaultDescription
--gitbooleantrueInitialize git repository
--no-gitboolean-Skip git initialization
--installbooleantrueInstall dependencies
--no-installboolean-Skip dependency installation
--package-managerstringauto-detectPackage manager to use

Package Manager Values:

  • npm - Use npm
  • pnpm - Use pnpm
  • bun - 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

FlagValuesDescription
--addonsMultiple valuesAddons to add (same as init)
--web-deploySingle valueDeployment to add
--project-dirstringTarget project directory (default: current)
--installbooleanInstall dependencies after adding
--no-installbooleanSkip dependency installation
--package-managerstringPackage 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.