CLI

Options Reference

Complete reference for all CLI options and flags

General Options

--yes, -y

Use default configuration and skip interactive prompts.

create-better-t-stack --yes

--template <type>

Use a predefined project template:

  • none: No template (default)
  • mern: MongoDB, Express, React, Node.js stack
  • pern: PostgreSQL, Express, React, Node.js stack
  • t3: T3 stack configuration
  • uniwind: UniWind React Native template
create-better-t-stack --template t3

--manual-db

Skip automatic database setup prompts and use manual database configuration.

create-better-t-stack --manual-db

--dry-run

Validate configuration, compatibility, and directory handling without writing files.

create-better-t-stack my-app --yes --dry-run

--package-manager <pm>

Choose package manager: npm, pnpm, or bun.

create-better-t-stack --package-manager bun

--install / --no-install

Control dependency installation after project creation.

create-better-t-stack --no-install

--open <target>

Open the generated project in an installed editor, IDE, or coding agent. Interactive runs show an installed-tools-only picker after scaffolding. Use none to skip it explicitly.

create-better-t-stack my-app --yes --open zed
create-better-t-stack my-app --yes --open codex

Supported targets include Cursor, VS Code, VS Code Insiders, Zed, Windsurf, VSCodium, WebStorm, IntelliJ IDEA, Sublime Text, Neovim, the Codex app (macOS only), Codex CLI, Claude Code, OpenCode, Pi, Gemini CLI, GitHub Copilot CLI, Kiro CLI, Factory Droid, goose, Cline CLI, Continue CLI, Amp, Aider, Qwen Code, Crush, Cursor Agent, T3 Code, and Orca.

The picker is skipped for --yes, CI, and non-interactive terminals. An explicit --open value still works in those modes. JSON and programmatic creation never launch external applications.

--git / --no-git

Control Git repository initialization.

create-better-t-stack --no-git

--yolo

Bypass validations and compatibility checks. Not recommended for normal use.

create-better-t-stack --yolo

--verbose

Show detailed result information in JSON format after project creation.

create-better-t-stack --verbose

--render-title / --no-render-title

Control whether the ASCII art title is shown. Enabled by default.

# Hide the title (useful in CI)
create-better-t-stack --no-render-title

--directory-conflict <strategy>

How to handle existing, non-empty target directories:

  • merge: Keep unrelated files and replace conflicting generated files
  • overwrite: Permanently clear the directory before scaffolding
  • increment: Create a suffixed directory (e.g., my-app-1)
  • error: Fail instead of prompting

The interactive prompt recommends the first available suffixed directory and requires an extra confirmation before overwriting. Project targets and generated paths that pass through symbolic links are rejected instead of being followed.

# Overwrite an existing directory without prompting
create-better-t-stack my-app --yes --directory-conflict overwrite

# Safely create a new directory name if it exists
create-better-t-stack my-app --yes --directory-conflict increment

--disable-analytics / --no-disable-analytics

Control whether analytics and telemetry data is collected.

# Disable analytics collection
create-better-t-stack --disable-analytics

# Enable analytics collection (default)
create-better-t-stack --no-disable-analytics

Analytics help improve Better-T-Stack by providing insights into usage patterns. When disabled, no data is collected or transmitted.

For JSON-first automation, runtime schemas, and nested structured options, see Agent Workflows.

Database Options

--database <type>

Database type to use:

  • none: No database
  • sqlite: SQLite database
  • postgres: PostgreSQL database
  • mysql: MySQL database
  • mongodb: MongoDB database
create-better-t-stack --database postgres

--orm <type>

ORM to use with your database:

  • none: No ORM
  • drizzle: Drizzle ORM (TypeScript-first)
  • prisma: Prisma ORM (feature-rich)
  • mongoose: Mongoose ODM (for MongoDB)
create-better-t-stack --database postgres --orm drizzle

--db-setup <setup>

Database hosting/setup provider:

  • none: Manual setup
  • turso: Turso (SQLite)
  • d1: Cloudflare D1 (SQLite; requires either Cloudflare Workers server deployment or backend self with Cloudflare web deployment)
  • neon: Neon (PostgreSQL)
  • supabase: Supabase (PostgreSQL)
  • prisma-postgres: Prisma Postgres
  • planetscale: PlanetScale (MySQL/PostgreSQL)
  • aurora: AWS Aurora Serverless V2 (PostgreSQL/MySQL; requires an AWS deployment target)
  • mongodb-atlas: MongoDB Atlas
  • docker: Local Docker containers
create-better-t-stack --database postgres --db-setup neon

If you need structured control over database provisioning behavior, use dbSetupOptions with create-json or the programmatic API. See Agent Workflows.

Backend Options

--backend <framework>

Backend framework to use:

  • none: No backend
  • hono: Hono (fast, lightweight)
  • express: Express.js (popular, mature)
  • fastify: Fastify (fast, plugin-based)
  • elysia: Elysia (Bun-native)
  • convex: Convex backend
  • self: Self-hosted/custom backend
create-better-t-stack --backend hono

--runtime <runtime>

Runtime environment:

  • none: No specific runtime (only with convex, none, or self backend)
  • bun: Bun runtime
  • node: Node.js runtime
  • workers: Cloudflare Workers
  • lambda: AWS Lambda (Hono only; requires --server-deploy aws)
create-better-t-stack --backend hono --runtime bun

--api <type>

API layer type:

  • none: No API layer
  • trpc: tRPC (type-safe)
  • orpc: oRPC (OpenAPI-compatible)
create-better-t-stack --api trpc

Frontend Options

--frontend <types...>

Frontend frameworks (can specify multiple):

Web Frameworks:

  • tanstack-router: React with TanStack Router
  • react-router: React with React Router
  • tanstack-start: React with TanStack Start (SSR)
  • next: Next.js
  • nuxt: Nuxt (Vue)
  • svelte: SvelteKit
  • solid: Solid (SSR)
  • astro: Astro

Native Frameworks:

  • native-bare: React Native (bare setup)
  • native-uniwind: React Native with UniWind (NativeWind alternative)
  • native-unistyles: React Native with Unistyles

No Frontend:

  • none: Backend-only project
# Single web frontend
create-better-t-stack --frontend tanstack-router

# Web + native frontend
create-better-t-stack --frontend next native-uniwind

# Backend-only
create-better-t-stack --frontend none

shadcn Theme

Apply a shadcn/ui theme to a generated React web frontend. When no shadcn theme is configured, React web apps keep the existing static base-lyra output. Theming requires next, tanstack-start, tanstack-router, or react-router.

--shadcn-preset <value>

shadcn theme preset to apply. Required to enable shadcn theming. Accepted formats:

  • A base62 preset code, e.g. b1x9M8ZeJW
  • A named preset: nova, vega, maia, lyra, mira, luma, sera, or rhea
  • A preset URL (http:// or https://)
create-better-t-stack --frontend next --shadcn-preset nova

--shadcn-base <base>

Headless component base used to resolve per-base components:

  • baseui: Base UI (default)
  • radixui: Radix UI
  • react-aria: React Aria
create-better-t-stack --frontend next --shadcn-preset nova --shadcn-base radixui

--shadcn-rtl

Enable right-to-left styles.

create-better-t-stack --frontend next --shadcn-preset nova --shadcn-rtl

--shadcn-pointer

Enable pointer cursor styles.

create-better-t-stack --frontend next --shadcn-preset nova --shadcn-pointer

Note: When a shadcn theme is configured, the generator fetches the shadcn registry (https://ui.shadcn.com/init and /r/styles/{base}-{style}/*) at generation time to resolve theme CSS variables, per-base components, fonts, and dependencies. Set BTS_SHADCN_REGISTRY_URL to point the registry client at an alternate origin, such as an offline or local mirror.

Authentication

--auth <provider>

Choose authentication provider:

  • better-auth: Better-Auth authentication (default)
  • clerk: Clerk authentication
  • none: No authentication
create-better-t-stack --auth better-auth
create-better-t-stack --auth clerk
create-better-t-stack --auth none

Note:

  • better-auth requires a backend framework (cannot be none)
  • if you choose a database, you should also choose an ORM
  • with --backend convex, better-auth supports react-router, tanstack-router, tanstack-start, next, and native Expo frontends
  • clerk requires a compatible frontend
  • Supported Clerk backends: convex, hono, express, fastify, elysia, and self with Next.js or TanStack Start
  • Authentication is automatically set to none when using --backend none

Payments

--payments <provider>

Payments provider:

  • none: No payments integration
  • polar: Polar payments integration (works with Convex and native-only stacks)
  • stripe: Stripe payments integration
  • autumn: Autumn payments integration
  • dodo: Dodo Payments integration
  • creem: Creem payments integration
  • chargebee: Chargebee payments integration
  • commet: Commet payments integration
create-better-t-stack --payments polar --auth better-auth

Note:

  • All payments providers require Better-Auth authentication
  • stripe, autumn, dodo, creem, chargebee, and commet are not available with --backend convex or native-only frontends; Polar supports both
  • Autumn requires a React web frontend (Next.js, TanStack Router, React Router, or TanStack Start)
  • Stripe, Dodo Payments, Creem, and Chargebee extend the Better Auth schema: run bun run auth:generate, then apply the generated schema with your ORM's migration workflow

Addons

--addons <types...>

Additional features to include:

  • none: No addons
  • pwa: Progressive Web App support
  • tauri: Desktop app support for static web output (not compatible with --backend self)
  • electrobun: Lightweight desktop shell for static web output (not compatible with --backend self)
  • starlight: Starlight documentation site
  • fumadocs: Fumadocs documentation site
  • biome: Biome linting and formatting
  • lefthook: Git hooks with Lefthook
  • husky: Git hooks with Husky
  • turborepo: Turborepo monorepo setup
  • nx: Nx monorepo setup
  • vite-plus: Vite+ unified toolchain, workspace task runner, linting, formatting, and optional native Git hooks
  • ultracite: Ultracite configuration
  • oxlint: Oxlint + Oxfmt (linting & formatting)
  • eslint: ESLint + Prettier (oxlint, Vite+, or Biome preferred; mutually exclusive with vite-plus)
  • mcp: Install MCP servers, including Better T Stack itself, with add-mcp
  • opentui: OpenTUI components
  • wxt: WXT browser extension framework
  • skills: Install AI agent skills for coding assistants (Cursor, Claude Code, GitHub Copilot, etc.)
  • evlog: Structured request logging for Hono, Express, Fastify, Elysia, or fullstack web backends
  • axiom: Managed Axiom observability through Evlog and Alchemy (select during project creation)
  • turnstile: Cloudflare Turnstile CAPTCHA on Better Auth sign-in/sign-up (select during project creation)
create-better-t-stack --addons pwa biome husky

Cloudflare Turnstile

The turnstile addon enables Cloudflare Turnstile CAPTCHA on Better Auth sign-in and sign-up. The widget is provisioned with Alchemy and requires --auth better-auth, --web-deploy cloudflare, and either --backend self or --server-deploy cloudflare. It supports web frontends only and is creation-only: it cannot be added to an existing project with the add command. Before deploying, set TURNSTILE_DOMAINS in .env to a comma-separated list of the production hostname(s); it defaults to localhost,127.0.0.1 and local development uses Cloudflare's always-pass test keys automatically.

Examples

--examples <types...>

Example implementations to include:

  • none: No examples
  • todo: Todo app example
  • ai: AI chat interface example
create-better-t-stack --examples todo ai

Deployment

--web-deploy <setup>

Web deployment configuration:

  • none: No deployment setup
  • cloudflare: Cloudflare Workers deployment (via Alchemy infrastructure as code)
  • prisma: Prisma deployment via Alchemy (all generated web frameworks)
  • aws: AWS deployment via Alchemy (AWS.Website.* for supported web frameworks, including Solid through nitro's aws-lambda output)
  • docker: Self-hosted deployment with a Dockerfile and a root docker-compose.yml
  • vercel: Vercel Services deployment with a root vercel.json
create-better-t-stack --web-deploy docker

When the app that consumes Neon, PlanetScale, Prisma Postgres, or Aurora is deployed with Alchemy, the CLI asks how the database should be provisioned and defaults to Alchemy. You can instead choose the provider's automatic setup when available or configure an existing database manually. With Alchemy selected, the generated stack provisions the database, injects runtime credentials, and applies checked-in migrations. Run alchemy profile edit from packages/infra; no separate provider setup step is required. See the Alchemy deployment guide for details.

Automation Surfaces

These are part of the CLI contract for agents and scripts even though they are commands or JSON fields instead of traditional flags:

  • create-json
  • add-json
  • schema --name <schema>
  • mcp
  • addonOptions
  • dbSetupOptions

See Agent Workflows for examples.

--server-deploy <setup>

Server deployment configuration:

  • none: No deployment setup
  • cloudflare: Cloudflare Workers deployment (when runtime is workers, via Alchemy infrastructure as code)
  • prisma: Prisma deployment via Alchemy (requires the Bun or Node runtime)
  • aws: AWS deployment via Alchemy (requires the Bun, Node, or Lambda runtime)
  • docker: Self-hosted deployment with a Dockerfile and a root docker-compose.yml (requires the bun or node runtime)
  • vercel: Vercel Services deployment (requires the bun or node runtime)
create-better-t-stack --server-deploy docker

Note: The CLI displays this target simply as Prisma. The generated infrastructure uses Alchemy's Prisma provider. See the Alchemy deployment guide for details.

Email

--email-renderer <renderer>

Email rendering setup. When set to react-email, the CLI adds a packages/email workspace that renders emails with React Email:

  • none: No email package (default)
  • react-email: Add packages/email with email-safe components and Welcome, Verify Email, and Reset Password templates, plus renderEmail, renderHtml, and renderText helpers
create-better-t-stack --email-renderer react-email

--email-deploy <target>

Email sending infrastructure. When not none, the CLI generates a @<project>/email send helper and Alchemy infrastructure in packages/infra/alchemy.run.ts:

  • none: No email deployment (default)
  • cloudflare: Cloudflare Email Sending via Alchemy, exposing an EMAIL binding in the Cloudflare Worker env (requires --server-deploy cloudflare, or --backend self --web-deploy cloudflare)
  • ses: AWS SES via Alchemy, provisioning an email identity and configuration set; runtime sending uses the AWS SDK with EMAIL_FROM, AWS_REGION, AWS_ACCESS_KEY_ID, and AWS_SECRET_ACCESS_KEY
create-better-t-stack --email-deploy ses

The renderer and sender are independent: --email-renderer works without a sending provider, and --email-deploy works without the renderer.

History

history

View your project creation history. Projects are tracked locally using platform-specific directories:

  • macOS: ~/Library/Application Support/better-t-stack/history.json
  • Linux: ~/.local/share/better-t-stack/history.json
  • Windows: %LOCALAPPDATA%\better-t-stack\Data\history.json
# Show last 10 projects
create-better-t-stack history

# Show last 5 projects
create-better-t-stack history --limit 5

# Output as JSON
create-better-t-stack history --json

# Clear all history
create-better-t-stack history --clear

Options:

  • --limit <number>: Number of entries to show (default: 10)
  • --clear: Clear all project history
  • --json: Output history as JSON

Option Validation

The CLI validates option combinations and will show errors for incompatible selections. See the Compatibility page for detailed rules.

Examples

Full Configuration

create-better-t-stack \
  --database postgres \
  --orm drizzle \
  --backend hono \
  --runtime bun \
  --frontend tanstack-router \
  --api trpc \
  --auth better-auth \
  --addons pwa biome \
  --examples todo \
  --package-manager bun \
  --web-deploy cloudflare \
  --server-deploy cloudflare \
  --install

Minimal Setup

create-better-t-stack \
  --backend none \
  --frontend tanstack-router \
  --addons none \
  --examples none

On this page