Skip to content

Commit 75db7e8

Browse files
feat: add blank project preset (#488)
1 parent d7818c3 commit 75db7e8

74 files changed

Lines changed: 1402 additions & 298 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ npx @tanstack/cli add clerk drizzle
1414

1515
# List available add-ons
1616
npx @tanstack/cli create --list-add-ons
17+
18+
# Minimal one-route Start app
19+
npx @tanstack/cli create my-app --blank -y
1720
```
1821

1922
## Monorepo Structure
@@ -70,6 +73,7 @@ node ../cli/packages/cli/dist/index.js create my-app
7073
| `--toolchain <id>` | Toolchain (use `--list-add-ons` to see options) |
7174
| `--deployment <id>` | Deployment target (use `--list-add-ons` to see options) |
7275
| `--template <url-or-id>` | Use template URL/path or built-in ID |
76+
| `--blank` | Minimal project without starter UI or default tooling |
7377
| `--no-git` | Skip git init |
7478
| `--no-install` | Skip npm install |
7579
| `-y` | Accept defaults |
@@ -81,7 +85,8 @@ node ../cli/packages/cli/dist/index.js create my-app
8185
| ---------------- | ------- | ---------------------------------------- |
8286
| `projectName` | string | Project name |
8387
| `typescript` | boolean | Always true (TanStack Start requires TS) |
84-
| `tailwind` | boolean | Always true (Tailwind always enabled) |
88+
| `tailwind` | boolean | False for blank unless an add-on requires it |
89+
| `blank` | boolean | True when using the blank project preset |
8590
| `fileRouter` | boolean | Always true |
8691
| `addOnEnabled` | object | `{ [id]: boolean }` |
8792
| `addOnOption` | object | `{ [id]: options }` |
@@ -138,4 +143,3 @@ skills:
138143
load: "packages/cli/skills/maintain-custom-addons-dev-watch/SKILL.md"
139144
<!-- intent-skills:end -->
140145

141-

.changeset/clean-cats-start.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
'@tanstack/cli': minor
3+
'@tanstack/create': minor
4+
---
5+
6+
Add a `--blank` project preset that creates a production-ready one-route app
7+
without starter UI, Tailwind, devtools, test tooling, Intent setup, or unused
8+
public assets. Pass `--intent` to opt local coding-agent skill mappings back in.
9+
Also move integration-specific dependencies to their owning add-ons and stop
10+
shipping an unused test stack in standard Start projects. Explicit styling and
11+
deployment add-ons remain composable with the blank preset, including when
12+
added later.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ npx @tanstack/cli create my-app
3939
# Create TanStack Start app (recommended)
4040
npx @tanstack/cli create my-app
4141

42+
# Create a minimal one-route Start app without selection prompts
43+
npx @tanstack/cli create my-app --blank -y
44+
4245
# Create Router-only SPA (no SSR)
4346
npx @tanstack/cli create my-app --router-only
4447

docs/cli-reference.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ tanstack create [project-name] [options]
1515
|--------|-------------|
1616
| `--add-ons <ids>` | Comma-separated add-on IDs |
1717
| `--template <url-or-id>` | Template URL/path or built-in template ID |
18+
| `--blank` | Create a minimal one-route Start project without default starter UI, examples, Tailwind, devtools, or a test stack |
1819
| `--package-manager <pm>` | `npm`, `pnpm`, `yarn`, `bun`, `deno` |
1920
| `--framework <name>` | `React`, `Solid` |
2021
| `--router-only` | Create file-based Router-only app without TanStack Start (add-ons/deployment/template disabled) |
2122
| `--toolchain <id>` | Toolchain add-on (use `--list-add-ons` to see options) |
2223
| `--deployment <id>` | Deployment add-on (use `--list-add-ons` to see options) |
2324
| `--examples` / `--no-examples` | Include or exclude demo/example pages |
24-
| `--tailwind` / `--no-tailwind` | Deprecated compatibility flags; accepted but ignored (Tailwind is always enabled) |
25+
| `--tailwind` / `--no-tailwind` | Deprecated compatibility flags for standard projects; blank projects omit Tailwind |
2526
| `--no-git` | Skip git init |
2627
| `--no-install` | Skip dependency install |
2728
| `-y, --yes` | Use defaults, skip prompts |
@@ -36,6 +37,8 @@ tanstack create [project-name] [options]
3637
```bash
3738
# Examples
3839
tanstack create my-app -y
40+
tanstack create my-app --blank -y
41+
tanstack create my-app --blank --deployment cloudflare -y
3942
tanstack create my-app --add-ons clerk,drizzle,tanstack-query
4043
tanstack create my-app --router-only --toolchain eslint --no-examples
4144
tanstack create my-app --template https://example.com/template.json
@@ -44,6 +47,14 @@ tanstack create --list-add-ons --framework React --json
4447
tanstack create --addon-details drizzle --framework React --json
4548
```
4649

50+
`--blank` creates the smallest useful TanStack Start project: one route and no
51+
default starter interface, examples, Tailwind, devtools, test dependencies, or
52+
TanStack Intent setup. Pass `--intent` when the project should include local
53+
skill mappings for coding agents.
54+
Explicit add-ons and deployment adapters can add their own required files and
55+
dependencies. Add `-y` to use defaults for every remaining option; when the
56+
target is non-empty, also pass `--force` or the command exits without writing.
57+
4758
### Programmatic generation
4859

4960
Use `@tanstack/create/worker` in Cloudflare Workers and other edge SSR runtimes. It does not import the generated template manifest at module startup. Instead, provide a loader for the framework and add-on chunks your Worker supports.
@@ -295,7 +306,7 @@ Removes `^` from version ranges for TanStack packages and adds any missing peer
295306

296307
## Configuration
297308

298-
Projects include `.tanstack.json`:
309+
Projects include `.cta.json`:
299310

300311
```json
301312
{

docs/quick-start.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,25 @@ Interactive prompts guide you through project name, package manager, and add-on
1717
# Defaults only (TanStack Start + file-router)
1818
npx @tanstack/cli create my-app -y
1919

20+
# Minimal one-route Start project
21+
npx @tanstack/cli create my-app --blank -y
22+
23+
# Minimal Start project configured for Cloudflare
24+
npx @tanstack/cli create my-app --blank --deployment cloudflare -y
25+
2026
# With add-ons
21-
npx @tanstack/cli create my-app --add-ons tanstack-query,clerk,drizzle
27+
npx @tanstack/cli create my-app --add-ons tanstack-query,clerk,drizzle -y
2228

2329
# Router-only SPA (no SSR)
24-
npx @tanstack/cli create my-app --router-only
30+
npx @tanstack/cli create my-app --router-only -y
2531
```
2632

33+
Blank projects omit the default starter interface, examples, Tailwind,
34+
devtools, test stack, and TanStack Intent setup. Pass `--intent` to include
35+
local skill mappings for coding agents. Explicit add-ons can add their own
36+
required files and dependencies. Pass `-y` to skip selection prompts. A
37+
non-empty target also requires `--force`.
38+
2739
## Run the Project
2840

2941
```bash
@@ -34,7 +46,7 @@ pnpm dev
3446

3547
## Environment Variables
3648

37-
Some add-ons require API keys. After creation:
49+
Some add-ons require API keys. When the project includes `.env.example`:
3850

3951
```bash
4052
cp .env.example .env
@@ -49,9 +61,9 @@ my-app/
4961
│ ├── routes/ # File-based routing
5062
│ │ ├── __root.tsx # Root layout
5163
│ │ └── index.tsx # Home page
52-
│ └── integrations/ # Add-on integration code
53-
├── .tanstack.json # CLI config
54-
└── .env.example # Required env vars
64+
│ └── integrations/ # Present when selected add-ons need it
65+
├── .cta.json # CLI config
66+
└── .env.example # Present when selected add-ons need env vars
5567
```
5668

5769
## Next Steps

examples/react/blog/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"@tanstack/react-router-ssr-query": "^1.131.7",
2020
"@tanstack/react-start": "^1.132.0",
2121
"@tanstack/router-plugin": "^1.132.0",
22-
"lucide-react": "^0.545.0",
2322
"react": "^19.2.0",
2423
"react-dom": "^19.2.0",
2524
"tailwindcss": "^4.1.18"

packages/cli/skills/add-addons-existing-app/SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ description: >
44
Apply integrations to existing projects with tanstack add, including
55
add-on id resolution, dependency chains, option prompts, and .cta.json
66
project metadata preconditions.
7-
type: core
8-
library: tanstack-cli
9-
library_version: "0.62.1"
7+
metadata:
8+
type: core
9+
library: tanstack-cli
10+
library_version: "0.62.1"
1011
---
1112

1213
# Add Add-ons To Existing App

packages/cli/skills/choose-ecosystem-integrations/SKILL.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ description: >
55
tanstack ecosystem --json, tanstack create --list-add-ons --json, and
66
tanstack create --addon-details --json. Covers exclusive categories,
77
provider options, and router-only compatibility constraints.
8-
type: composition
9-
library: tanstack-cli
10-
library_version: "0.62.1"
8+
metadata:
9+
type: composition
10+
library: tanstack-cli
11+
library_version: "0.62.1"
1112
requires:
1213
- create-app-scaffold
1314
- query-docs-library-metadata

packages/cli/skills/create-app-scaffold/SKILL.md

Lines changed: 42 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
name: create-app-scaffold
33
description: >
44
Scaffold a TanStack app with tanstack create using --framework, --template,
5-
--toolchain, --deployment, --add-ons, and --router-only. Covers flag
5+
--toolchain, --deployment, --add-ons, --blank, and --router-only. Covers flag
66
compatibility, non-interactive defaults, and intent-preserving command
77
construction.
8-
type: core
9-
library: tanstack-cli
10-
library_version: "0.62.1"
8+
metadata:
9+
type: core
10+
library: tanstack-cli
11+
library_version: "0.70.0"
1112
---
1213

1314
# Create App Scaffold
@@ -37,6 +38,20 @@ npx @tanstack/cli create acme-solid \
3738
-y
3839
```
3940

41+
### Start from a minimal production-ready scaffold
42+
43+
Use `--blank` when the task does not need the default starter UI, examples,
44+
Tailwind, devtools, test tooling, or local Intent setup. Explicit integrations
45+
remain composable; add `--intent` when the generated project should contain
46+
skill mappings for later coding-agent work.
47+
48+
```bash
49+
npx @tanstack/cli create acme-web \
50+
--blank \
51+
--deployment cloudflare \
52+
-y
53+
```
54+
4055
### Use router-only mode for compatibility scaffolds only
4156

4257
```bash
@@ -75,7 +90,7 @@ In non-interactive runs, empty add-on selection can complete with defaults and s
7590

7691
Source: https://github.com/TanStack/cli/issues/234
7792

78-
### HIGH Assume --no-tailwind is still supported
93+
### HIGH Avoid --no-tailwind; use --blank for a minimal scaffold
7994

8095
Wrong:
8196
```bash
@@ -84,12 +99,31 @@ npx @tanstack/cli create my-app --no-tailwind -y
8499

85100
Correct:
86101
```bash
87-
npx @tanstack/cli create my-app -y
102+
npx @tanstack/cli create my-app --blank -y
103+
```
104+
105+
`--no-tailwind` remains a deprecated compatibility flag for standard
106+
scaffolds. `--blank` is the supported preset for a minimal project without
107+
Tailwind.
108+
109+
Source: packages/cli/src/command-line.ts:386
110+
111+
### HIGH Combine --blank with a template, examples, or --tailwind
112+
113+
Wrong:
114+
```bash
115+
npx @tanstack/cli create my-app --blank --template ecommerce -y
88116
```
89117

90-
`--no-tailwind` is deprecated and ignored, so output still includes Tailwind and diverges from expected stack constraints.
118+
Correct:
119+
```bash
120+
npx @tanstack/cli create my-app --blank --add-ons drizzle -y
121+
```
91122

92-
Source: packages/cli/src/command-line.ts:369
123+
Templates, examples, and `--tailwind` replace the output constraints that
124+
`--blank` guarantees, so the CLI rejects those combinations. Deployment,
125+
toolchain, and add-on selections remain supported; a selected styling add-on
126+
can opt the generated app back into Tailwind when it requires it.
93127

94128
### CRITICAL Combine router-only with template/deployment/add-ons
95129

packages/cli/skills/create-app-scaffold/references/create-flag-compatibility-matrix.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Create Flag Compatibility Matrix
22

3-
Targets `@tanstack/cli` v0.62.1.
3+
Targets `@tanstack/cli` v0.70.0.
44

55
## Compatibility
66

@@ -12,7 +12,8 @@ Targets `@tanstack/cli` v0.62.1.
1212
| `--deployment` | yes | no | Ignored in router-only mode. |
1313
| `--template` / `--starter` | yes | no | Ignored in router-only mode. |
1414
| `--template-id` | yes | no | Ignored in router-only mode. |
15-
| `--tailwind` / `--no-tailwind` | deprecated/ignored | deprecated/ignored | Tailwind is always enabled. |
15+
| `--blank` | yes | yes | Omits starter UI, examples, Tailwind, devtools, and test tooling unless an explicit integration requires them. Cannot be combined with a template, `--examples`, or `--tailwind`. |
16+
| `--tailwind` / `--no-tailwind` | deprecated/ignored | deprecated/ignored | Standard scaffolds enable Tailwind; use `--blank` for the supported minimal preset. |
1617

1718
Source: `packages/cli/src/command-line.ts:337`
1819

@@ -29,6 +30,9 @@ Source: `packages/cli/src/command-line.ts:337`
2930
# Full scaffold preset
3031
npx @tanstack/cli create app --framework react --add-ons tanstack-query --deployment netlify -y
3132

33+
# Minimal Start preset
34+
npx @tanstack/cli create app --blank --framework react --deployment cloudflare -y
35+
3236
# Router-only preset
3337
npx @tanstack/cli create app --router-only --framework react --toolchain biome -y
3438
```

0 commit comments

Comments
 (0)