Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/amanvarshney01/create-better-t-stack/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Better-T-Stack CLI uses @clack/prompts for interactive questions. These prompts are fully keyboard-driven and work well in most terminals. This guide explains the prompt flow, navigation, and how to skip prompts with flags.

Core Keys

  • Navigate: Up/Down arrow keys
  • Confirm/Continue: Enter
  • Go Back: Left arrow (navigable prompts)
  • Cancel: Ctrl+C (exits the CLI)

Prompt Types

The CLI uses several types of prompts:
How it works:
  • Move with Up/Down arrow keys
  • Press Enter to select the highlighted option
  • Press Left arrow to go back to the previous prompt
Used for:
  • Web framework selection (TanStack Router, Next.js, Nuxt, etc.)
  • Native framework selection (Bare, UniWind, Unistyles)
  • Backend framework (Hono, Express, Fastify, etc.)
  • Runtime (Bun, Node, Workers)
  • Database type (SQLite, PostgreSQL, MySQL, MongoDB)
  • ORM choice (Drizzle, Prisma, Mongoose)
  • API type (tRPC, oRPC)
  • Package manager (npm, pnpm, bun)
Example:
◆  Select backend
│  ○ Hono - Lightweight, ultrafast web framework
│  ● Express - Fast, unopinionated, minimalist web framework
│  ○ Fastify - Fast, low-overhead web framework
│  ○ Elysia - Ergonomic web framework
│  ○ Convex - Reactive backend-as-a-service
│  ○ None - No backend server

How it works:
  • Move with Up/Down arrow keys
  • Press Space to toggle the highlighted option on/off
  • Press Enter to confirm your selection(s)
  • Press Left arrow to go back
  • Some prompts allow selecting none
Used for:
  • Project type selection (Web, Native, or both)
  • Examples selection (Todo, AI)
Example:
◆  Select project type
│  ◼ Web - React, Vue or Svelte Web Application
│  ◻ Native - Create a React Native/Expo app
└  Press Space to select, Enter to continue
How it works:
  • Options are organized under group headings (Tooling, Documentation, Extensions, AI)
  • Move with Up/Down arrow keys through all options
  • Press Space to toggle an option on/off
  • Press Enter to confirm selections
  • Group headings are informational only
Used for:
  • Addons selection
Example:
◆  Select addons

│  Tooling
│  ◼ Turborepo - High-performance build system
│  ◻ Biome - Format, lint, and more
│  ◻ Oxlint - Oxlint + Oxfmt

│  Documentation
│  ◻ Starlight - Build stellar docs with astro
│  ◻ Fumadocs - Build excellent documentation site

│  Extensions
│  ◻ PWA - Make your app installable
│  ◻ Tauri - Build native desktop apps

How it works:
  • Use Left/Right or Up/Down to highlight Yes/No
  • Press Enter to confirm
Used for:
  • Install dependencies?
  • Initialize Git repository?
Example:
◆  Install dependencies?
│  ● Yes
│  ○ No

How it works:
  • Type your answer
  • Press Enter to submit
  • If validation fails, a message explains what to fix
Used for:
  • Project name/path
  • Database URLs (for specific providers)
  • Provider-specific configuration
Example:
◆  Enter project name
│  my-awesome-app_

Validation rules:
  • Cannot be empty
  • Cannot start with . (except for .)
  • Cannot start with -
  • Cannot contain: < > : " | ? *
  • Cannot be node_modules
  • Max 255 characters

Prompt Flow

The CLI asks questions in this order (skipping irrelevant prompts based on your choices):
1

Project Name

If not provided as an argument, you’ll be asked for the project name.
# Skip this prompt by providing the name
create-better-t-stack my-app
2

Project Type

Choose Web, Native, or both.Skip with:
--frontend tanstack-router  # Web only
--frontend native-uniwind    # Native only
--frontend next native-bare  # Both
--frontend none              # Backend only
3

Web Framework

If you selected Web, choose your web framework.Options depend on backend/auth:
  • With Convex backend: Solid and Astro are hidden
  • With Clerk auth + Convex: Nuxt, Svelte, Solid, Astro are hidden
Skip with:
--frontend tanstack-router
4

Native Framework

If you selected Native, choose your native framework.Skip with:
--frontend native-uniwind
5

Backend

Choose your backend framework.Options depend on frontend:
  • With Next.js, TanStack Start, Nuxt, or Astro: “Self (Fullstack)” option appears
  • With Solid or Astro frontend: Convex is hidden
Skip with:
--backend hono
6

Runtime

Choose your runtime environment.Automatically skipped when:
  • Backend is convex, none, or self
Skip with:
--runtime bun
7

Database

Choose your database type.Automatically set to none when:
  • Backend is convex or none
MongoDB hidden when:
  • Runtime is workers
Skip with:
--database postgres
8

ORM

Choose your ORM/ODM.Automatically skipped when:
  • Database is none
  • Backend is convex or none
Options depend on database:
  • PostgreSQL/MySQL/SQLite: Drizzle, Prisma
  • MongoDB: Mongoose, Prisma
Skip with:
--orm drizzle
9

API Layer

Choose your API type.Automatically set to none when:
  • Backend is convex or none
tRPC hidden when:
  • Frontend includes Nuxt, Svelte, Solid, or Astro
Skip with:
--api trpc
10

Authentication

Choose your auth provider.Automatically set to none when:
  • Backend is none
Clerk only available when:
  • Backend is convex
  • Frontend is compatible (not Nuxt, Svelte, Solid, or Astro with Clerk)
Skip with:
--auth better-auth
11

Payments

Choose payments integration.Polar only available when:
  • Auth is better-auth
  • Has web frontend or no frontend
Skip with:
--payments polar
12

Addons

Select additional features (grouped by category).Available addons depend on:
  • Frontend choice (PWA requires web, Tauri incompatible with native)
Skip with:
--addons pwa biome husky
13

Examples

Select example implementations.Automatically set to none when:
  • Backend is none
Todo example requires:
  • Database (or Convex backend)
  • API layer (or Convex backend)
AI example not available when:
  • Frontend is Solid or Astro
  • Frontend is Nuxt or Svelte with Convex backend
Skip with:
--examples todo ai
14

Database Setup

Choose hosting/setup provider.Automatically skipped when:
  • Database is none
  • Backend is convex or none
Options depend on database and runtime:
  • SQLite: Turso, D1 (Workers only)
  • PostgreSQL: Neon, Supabase, Prisma Postgres, PlanetScale
  • MySQL: PlanetScale
  • MongoDB: MongoDB Atlas
  • All except SQLite: Docker (not with Workers)
Skip with:
--db-setup neon
15

Web Deployment

Configure web deployment.Automatically skipped when:
  • No web frontend
Skip with:
--web-deploy cloudflare
16

Server Deployment

Configure server deployment.Automatically skipped when:
  • Backend is none or convex
Skip with:
--server-deploy cloudflare
17

Git Initialization

Initialize Git repository?Skip with:
--git      # Yes
--no-git   # No
18

Package Manager

Choose your package manager.Default: Detected from your environment (checks for lockfiles)Skip with:
--package-manager bun
19

Install Dependencies

Install dependencies after creation?Skip with:
--install      # Yes
--no-install   # No

Tips & Tricks

Use --yes to accept all defaults:
create-better-t-stack my-app --yes
Defaults:
  • Frontend: tanstack-router
  • Backend: hono
  • Runtime: bun
  • Database: sqlite
  • ORM: drizzle
  • API: trpc
  • Auth: none
  • Payments: none
  • Addons: none
  • Examples: none
  • Git: true
  • Install: true
  • Package Manager: Auto-detected
You can specify some options via flags and answer prompts for others:
# Pre-configure database, still prompted for frontend/backend
create-better-t-stack --database postgres --orm drizzle
Press Ctrl+C at any time to cancel the operation. No files will be created.
If you enter invalid input (e.g., incompatible options), the CLI will show an error message and ask you to correct it.For example:
✖  tRPC API is not supported with 'nuxt' frontend.
   Please use --api orpc or --api none
Use --yolo to bypass validation (not recommended).

Common Prompt Scenarios

Full-Stack Web App

1. Project name: my-app
2. Project type: [✓] Web
3. Web framework: TanStack Router
4. Backend: Hono
5. Runtime: Bun
6. Database: PostgreSQL
7. ORM: Drizzle
8. API: tRPC
9. Auth: Better-Auth
10. Payments: None
11. Addons: [✓] Biome
12. Examples: [✓] Todo
13. Database setup: Neon
14. Web deploy: Cloudflare
15. Server deploy: Cloudflare
16. Git: Yes
17. Package manager: bun
18. Install: Yes
Equivalent command:
create-better-t-stack my-app \
  --frontend tanstack-router \
  --backend hono \
  --runtime bun \
  --database postgres \
  --orm drizzle \
  --api trpc \
  --auth better-auth \
  --addons biome \
  --examples todo \
  --db-setup neon \
  --web-deploy cloudflare \
  --server-deploy cloudflare \
  --git \
  --package-manager bun \
  --install

Backend-Only API

1. Project name: api-server
2. Project type: (skipped - no frontend selected)
3. Backend: Hono
4. Runtime: Bun
5. Database: PostgreSQL
6. ORM: Drizzle
7. API: (skipped - automatically none)
8. Auth: None
9. Examples: (skipped - automatically none)
10. Database setup: Docker
11. Server deploy: None
12. Git: Yes
13. Package manager: bun
14. Install: Yes
Equivalent command:
create-better-t-stack api-server \
  --frontend none \
  --backend hono \
  --runtime bun \
  --database postgres \
  --orm drizzle \
  --db-setup docker

Convex Full-Stack

1. Project name: convex-app
2. Project type: [✓] Web
3. Web framework: Next.js
4. Backend: Convex
5. Runtime: (skipped - automatically none)
6. Database: (skipped - automatically none)
7. ORM: (skipped - automatically none)
8. API: (skipped - automatically none)
9. Auth: Clerk
10. Payments: None
11. Addons: [✓] PWA
12. Examples: [✓] AI
13. Database setup: (skipped)
14. Web deploy: None
15. Server deploy: (skipped)
16. Git: Yes
17. Package manager: bun
18. Install: Yes
Equivalent command:
create-better-t-stack convex-app \
  --frontend next \
  --backend convex \
  --auth clerk \
  --addons pwa \
  --examples ai

For a complete list of all available options, see the Options Reference.

Build docs developers (and LLMs) love