mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
chore(web): improve docs
This commit is contained in:
253
apps/web/content/docs/cli/options.mdx
Normal file
253
apps/web/content/docs/cli/options.mdx
Normal file
@@ -0,0 +1,253 @@
|
||||
---
|
||||
title: Options Reference
|
||||
description: Complete reference for all CLI options and flags
|
||||
---
|
||||
|
||||
## General Options
|
||||
|
||||
### `--yes, -y`
|
||||
|
||||
Use default configuration and skip interactive prompts.
|
||||
|
||||
```bash
|
||||
create-better-t-stack --yes
|
||||
```
|
||||
|
||||
### `--package-manager <pm>`
|
||||
|
||||
Choose package manager: `npm`, `pnpm`, or `bun`.
|
||||
|
||||
```bash
|
||||
create-better-t-stack --package-manager bun
|
||||
```
|
||||
|
||||
### `--install / --no-install`
|
||||
|
||||
Control dependency installation after project creation.
|
||||
|
||||
```bash
|
||||
create-better-t-stack --no-install
|
||||
```
|
||||
|
||||
### `--git / --no-git`
|
||||
|
||||
Control Git repository initialization.
|
||||
|
||||
```bash
|
||||
create-better-t-stack --no-git
|
||||
```
|
||||
|
||||
## Database Options
|
||||
|
||||
### `--database <type>`
|
||||
|
||||
Database type to use:
|
||||
|
||||
- `none`: No database
|
||||
- `sqlite`: SQLite database
|
||||
- `postgres`: PostgreSQL database
|
||||
- `mysql`: MySQL database
|
||||
- `mongodb`: MongoDB database
|
||||
|
||||
```bash
|
||||
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)
|
||||
|
||||
```bash
|
||||
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)
|
||||
- `neon`: Neon (PostgreSQL)
|
||||
- `supabase`: Supabase (PostgreSQL)
|
||||
- `prisma-postgres`: Prisma Postgres via Prisma Accelerate
|
||||
- `mongodb-atlas`: MongoDB Atlas
|
||||
- `docker`: Local Docker containers
|
||||
|
||||
```bash
|
||||
create-better-t-stack --database postgres --db-setup neon
|
||||
```
|
||||
|
||||
## 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)
|
||||
- `next`: Next.js API routes
|
||||
- `convex`: Convex backend
|
||||
|
||||
```bash
|
||||
create-better-t-stack --backend hono
|
||||
```
|
||||
|
||||
### `--runtime <runtime>`
|
||||
|
||||
Runtime environment:
|
||||
|
||||
- `none`: No specific runtime (only with `convex` or `none` backend)
|
||||
- `bun`: Bun runtime
|
||||
- `node`: Node.js runtime
|
||||
- `workers`: Cloudflare Workers
|
||||
|
||||
```bash
|
||||
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)
|
||||
|
||||
```bash
|
||||
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`: SolidJS
|
||||
|
||||
**Native Frameworks:**
|
||||
- `native-nativewind`: React Native with NativeWind
|
||||
- `native-unistyles`: React Native with Unistyles
|
||||
|
||||
**No Frontend:**
|
||||
- `none`: Backend-only project
|
||||
|
||||
```bash
|
||||
# Single web frontend
|
||||
create-better-t-stack --frontend tanstack-router
|
||||
|
||||
# Web + native frontend
|
||||
create-better-t-stack --frontend next native-nativewind
|
||||
|
||||
# Backend-only
|
||||
create-better-t-stack --frontend none
|
||||
```
|
||||
|
||||
## Authentication
|
||||
|
||||
### `--auth / --no-auth`
|
||||
|
||||
Include or exclude authentication setup using Better-Auth.
|
||||
|
||||
```bash
|
||||
create-better-t-stack --auth
|
||||
create-better-t-stack --no-auth
|
||||
```
|
||||
|
||||
## Addons
|
||||
|
||||
### `--addons <types...>`
|
||||
|
||||
Additional features to include:
|
||||
|
||||
- `none`: No addons
|
||||
- `pwa`: Progressive Web App support
|
||||
- `tauri`: Desktop app support
|
||||
- `starlight`: Starlight documentation site
|
||||
- `fumadocs`: Fumadocs documentation site
|
||||
- `biome`: Biome linting and formatting
|
||||
- `husky`: Git hooks with Husky
|
||||
- `turborepo`: Turborepo monorepo setup
|
||||
- `ultracite`: Ultracite configuration
|
||||
- `oxlint`: Oxlint fast linting
|
||||
- `vibe-rules`: Vibe Rules configuration
|
||||
|
||||
```bash
|
||||
create-better-t-stack --addons pwa biome husky
|
||||
```
|
||||
|
||||
## Examples
|
||||
|
||||
### `--examples <types...>`
|
||||
|
||||
Example implementations to include:
|
||||
|
||||
- `none`: No examples
|
||||
- `todo`: Todo app example
|
||||
- `ai`: AI chat interface example
|
||||
|
||||
```bash
|
||||
create-better-t-stack --examples todo ai
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
### `--web-deploy <setup>`
|
||||
|
||||
Web deployment configuration:
|
||||
|
||||
- `none`: No deployment setup
|
||||
- `workers`: Cloudflare Workers deployment
|
||||
|
||||
```bash
|
||||
create-better-t-stack --web-deploy workers
|
||||
```
|
||||
|
||||
## Option Validation
|
||||
|
||||
The CLI validates option combinations and will show errors for incompatible selections. See the [Compatibility](/docs/cli/compatibility) page for detailed rules.
|
||||
|
||||
## Examples
|
||||
|
||||
### Full Configuration
|
||||
|
||||
```bash
|
||||
create-better-t-stack \
|
||||
--database postgres \
|
||||
--orm drizzle \
|
||||
--backend hono \
|
||||
--runtime bun \
|
||||
--frontend tanstack-router \
|
||||
--api trpc \
|
||||
--auth \
|
||||
--addons pwa biome \
|
||||
--examples todo \
|
||||
--package-manager bun \
|
||||
--install
|
||||
```
|
||||
|
||||
### Minimal Setup
|
||||
|
||||
```bash
|
||||
create-better-t-stack \
|
||||
--backend none \
|
||||
--frontend tanstack-router \
|
||||
--addons none \
|
||||
--examples none
|
||||
```
|
||||
Reference in New Issue
Block a user