mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
feat(cli): add alchemy and improve cli tooling and structure (#520)
This commit is contained in:
@@ -149,11 +149,11 @@ create-better-t-stack --frontend next native-nativewind
|
||||
|
||||
### Tauri (Desktop Apps)
|
||||
- Requires web frontend
|
||||
- Compatible frontends: `tanstack-router`, `react-router`, `nuxt`, `svelte`, `solid`
|
||||
- Compatible frontends: `tanstack-router`, `react-router`, `nuxt`, `svelte`, `solid`, `next`
|
||||
- Cannot be combined with native frameworks
|
||||
|
||||
### Web Deployment
|
||||
- `--web-deploy workers` requires a web frontend
|
||||
- `--web-deploy wrangler` requires a web frontend
|
||||
- Cannot be used with native-only projects
|
||||
|
||||
## Authentication Requirements
|
||||
|
||||
@@ -35,9 +35,11 @@ create-better-t-stack [project-directory] [options]
|
||||
- `--api <type>`: `none`, `trpc`, `orpc`
|
||||
- `--db-setup <setup>`: `none`, `turso`, `d1`, `neon`, `supabase`, `prisma-postgres`, `mongodb-atlas`, `docker`
|
||||
- `--examples <types...>`: `none`, `todo`, `ai`
|
||||
- `--web-deploy <setup>`: `none`, `workers`
|
||||
- `--web-deploy <setup>`: `none`, `wrangler`, `alchemy`
|
||||
- `--server-deploy <setup>`: `none`, `wrangler`, `alchemy`
|
||||
- `--directory-conflict <strategy>`: `merge`, `overwrite`, `increment`, `error`
|
||||
- `--render-title / --no-render-title`: Show/hide ASCII art title
|
||||
- `--disable-analytics / --no-disable-analytics`: Control analytics collection
|
||||
|
||||
See the full reference in [Options](/docs/cli/options).
|
||||
|
||||
@@ -45,7 +47,7 @@ See the full reference in [Options](/docs/cli/options).
|
||||
|
||||
```bash
|
||||
# Default setup with prompts
|
||||
create-better-t-stack
|
||||
create-better-t-stack
|
||||
|
||||
# Quick setup with defaults
|
||||
create-better-t-stack --yes
|
||||
@@ -65,7 +67,8 @@ create-better-t-stack add [options]
|
||||
### Options
|
||||
|
||||
- `--addons <types...>`: Addons to add (see [Addons](/docs/cli/options#addons))
|
||||
- `--web-deploy <setup>`: Web deployment setup (`workers`, `none`)
|
||||
- `--web-deploy <setup>`: Web deployment setup (`none`, `wrangler`, `alchemy`)
|
||||
- `--server-deploy <setup>`: Server deployment setup (`none`, `wrangler`, `alchemy`)
|
||||
- `--project-dir <path>`: Project directory (defaults to current directory)
|
||||
- `--install`: Install dependencies after adding
|
||||
- `--package-manager <pm>`: Package manager to use
|
||||
@@ -80,7 +83,7 @@ create-better-t-stack add
|
||||
create-better-t-stack add --addons pwa tauri --install
|
||||
|
||||
# Add deployment setup
|
||||
create-better-t-stack add --web-deploy workers
|
||||
create-better-t-stack add --web-deploy wrangler
|
||||
```
|
||||
|
||||
## `sponsors`
|
||||
|
||||
@@ -79,6 +79,20 @@ create-better-t-stack my-app --yes --directory-conflict overwrite
|
||||
create-better-t-stack my-app --yes --directory-conflict increment
|
||||
```
|
||||
|
||||
### `--disable-analytics / --no-disable-analytics`
|
||||
|
||||
Control whether analytics and telemetry data is collected.
|
||||
|
||||
```bash
|
||||
# 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.
|
||||
|
||||
## Database Options
|
||||
|
||||
### `--database <type>`
|
||||
@@ -212,6 +226,8 @@ create-better-t-stack --auth
|
||||
create-better-t-stack --no-auth
|
||||
```
|
||||
|
||||
**Note:** Authentication requires both a database and backend framework to be selected. It is automatically disabled when using Convex backend or when no backend is selected.
|
||||
|
||||
## Addons
|
||||
|
||||
### `--addons <types...>`
|
||||
@@ -255,12 +271,31 @@ create-better-t-stack --examples todo ai
|
||||
Web deployment configuration:
|
||||
|
||||
- `none`: No deployment setup
|
||||
- `workers`: Cloudflare Workers deployment
|
||||
- `wrangler`: Cloudflare Workers deployment
|
||||
- `alchemy`: Cloudflare Workers deployment (via Alchemy infrastructure as code)
|
||||
|
||||
```bash
|
||||
create-better-t-stack --web-deploy workers
|
||||
create-better-t-stack --web-deploy wrangler
|
||||
create-better-t-stack --web-deploy alchemy
|
||||
```
|
||||
|
||||
**Note:** Alchemy uses TypeScript to define infrastructure programmatically. See the [Infrastructure as Code with Alchemy Guide](/docs/guides/alchemy-deployment) for details.
|
||||
|
||||
### `--server-deploy <setup>`
|
||||
|
||||
Server deployment configuration:
|
||||
|
||||
- `none`: No deployment setup
|
||||
- `wrangler`: Cloudflare Workers deployment (when runtime is workers)
|
||||
- `alchemy`: Cloudflare Workers deployment (when runtime is workers, via Alchemy infrastructure as code)
|
||||
|
||||
```bash
|
||||
create-better-t-stack --server-deploy wrangler
|
||||
create-better-t-stack --server-deploy alchemy
|
||||
```
|
||||
|
||||
**Note:** Alchemy uses TypeScript to define infrastructure programmatically. See the [Infrastructure as Code with Alchemy Guide](/docs/guides/alchemy-deployment) for details.
|
||||
|
||||
## Option Validation
|
||||
|
||||
The CLI validates option combinations and will show errors for incompatible selections. See the [Compatibility](/docs/cli/compatibility) page for detailed rules.
|
||||
@@ -281,6 +316,8 @@ create-better-t-stack \
|
||||
--addons pwa biome \
|
||||
--examples todo \
|
||||
--package-manager bun \
|
||||
--web-deploy wrangler \
|
||||
--server-deploy alchemy \
|
||||
--install
|
||||
```
|
||||
|
||||
|
||||
@@ -146,6 +146,7 @@ interface CreateInput {
|
||||
runtime?: Runtime; // Runtime environment
|
||||
api?: API; // API type
|
||||
webDeploy?: WebDeploy; // Web deployment setup
|
||||
serverDeploy?: ServerDeploy; // Server deployment setup
|
||||
directoryConflict?: DirectoryConflict; // "merge" | "overwrite" | "increment" | "error"
|
||||
renderTitle?: boolean; // Show ASCII art title
|
||||
disableAnalytics?: boolean; // Disable analytics and telemetry
|
||||
|
||||
Reference in New Issue
Block a user