Skip to content

Commit 545518a

Browse files
committed
fix: docs and command line options for create-start-app
1 parent d889e1e commit 545518a

File tree

3 files changed

+30
-69
lines changed

3 files changed

+30
-69
lines changed

cli/create-start-app/README.md

Lines changed: 12 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,18 @@ To maintain compatability with `create-react-app` you can build a new applicatio
1010

1111
| Command | Description |
1212
| -------------------------------------------------------------------------------- | ------------------------------------------------- |
13-
| `npx create-start-app@latest my-app` | Create a new app |
14-
| `npx create-start-app@latest my-app --template file-router` | Create a new file based app |
15-
| `npx create-start-app@latest my-app --template typescript` | Create a new TypeScript app using the Code Router |
16-
| `npx create-start-app@latest my-app --tailwind` | Add Tailwind CSS support |
17-
| `npx create-start-app@latest my-app --framework solid` | Create a Solid app |
18-
| `npx create-start-app@latest my-app --framework solid --template file-router` | Create a Solid app with file-router |
13+
| `pnpx create-start-app@latest my-app` | Create a new app |
14+
| `pnpx create-start-app@latest my-app --framework solid` | Create a Solid app |
1915

2016
If you don't specify a project name, the CLI will walk you through an interactive setup process:
2117

2218
```bash
23-
npx create-start-app@latest
19+
pnpx create-start-app@latest
2420
```
2521

2622
This will start an interactive CLI that guides you through the setup process, allowing you to choose:
2723

2824
- Project Name
29-
- Router Type (File-based or Code-based routing)
30-
- TypeScript support
31-
- Tailwind CSS integration
3225
- Package manager
3326
- Toolchain
3427
- Git initialization
@@ -38,13 +31,11 @@ This will start an interactive CLI that guides you through the setup process, al
3831
You can also use command line flags to specify your preferences directly:
3932

4033
```bash
41-
npx create-start-app@latest my-app --template file-router --tailwind --package-manager pnpm
34+
pnpx create-start-app@latest my-app --tailwind --package-manager pnpm
4235
```
4336

4437
Available options:
4538

46-
- `--template <type>`: Choose between `file-router`, `typescript`, or `javascript`
47-
- `--tailwind`: Enable Tailwind CSS
4839
- `--package-manager`: Specify your preferred package manager (`npm`, `yarn`, `pnpm`, `bun`, or `deno`)
4940
- `--toolchain`: Specify your toolchain solution for formatting/linting (`biome`, `eslint+prettier`)
5041
- `--no-git`: Do not initialize a git repository
@@ -58,43 +49,13 @@ What you'll get is a Vite application that uses TanStack Router. All the files w
5849

5950
`create-start-app` is everything you loved about CRA but implemented with modern tools and best practices, on top of the popular TanStack set of libraries. Which includes [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/react-router](https://tanstack.com/router/latest).
6051

61-
## Routing Options
62-
63-
### File Based Routing (Recommended)
64-
65-
File Based Routing is the default option when using the interactive CLI. The location of the home page will be `app/routes/index.tsx`. This approach provides a more intuitive and maintainable way to structure your routes.
66-
67-
To explicitly choose File Based Routing, use:
68-
69-
```bash
70-
npx create-start-app@latest my-app --template file-router
71-
```
72-
73-
### Code Based Routing
74-
75-
If you prefer traditional code-based routing, you can select it in the interactive CLI or specify it by using either the `typescript` or `javascript` template:
76-
77-
```bash
78-
npx create-start-app@latest my-app --template typescript
79-
```
80-
8152
## Additional Configuration
8253

83-
### TypeScript
84-
85-
- File Based Routing always uses TypeScript
86-
- For Code Based Routing, you can choose between TypeScript and JavaScript
87-
- Enable TypeScript explicitly with `--template typescript`
88-
89-
### Tailwind CSS
90-
91-
Enable Tailwind CSS either through the interactive CLI or by adding the `--tailwind` flag. This will automatically configure [Tailwind V4](https://tailwindcss.com/).
92-
9354
### Package Manager
9455

9556
Choose your preferred package manager (`npm`, `bun`, `yarn`, `pnpm`, or `deno`) either through the interactive CLI or using the `--package-manager` flag.
9657

97-
Extensive documentation on using the TanStack Router, migrating to a File Base Routing approach, as well as integrating [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/store](https://tanstack.com/store/latest) can be found in the generated `README.md` for your project.
58+
Extensive documentation on using the TanStack Start, as well as integrating [@tanstack/react-query](https://tanstack.com/query/latest) and [@tanstack/store](https://tanstack.com/store/latest) can be found in the generated `README.md` for your project.
9859

9960
### Toolchain
10061

@@ -109,37 +70,35 @@ Setting this flag to `eslint+prettier` will configure it as your toolchain of ch
10970
You can enable add-on selection:
11071

11172
```bash
112-
npx create-start-app@latest --add-ons
73+
pnpx create-start-app@latest --add-ons
11374
```
11475

11576
This will prompt you to select the add-ons you want to enable during application creation.
11677

11778
You can enable specific add-ons directly by adding a comma separated list of add-on names to the `--add-ons` flag. For example:
11879

11980
```bash
120-
npx create-start-app@latest my-app --add-ons shadcn,tanstack-query
81+
pnpx create-start-app@latest my-app --add-ons shadcn,tanstack-query
12182
```
12283

12384
You can get a list of all available add-ons by running:
12485

12586
```bash
126-
npx create-start-app@latest --list-add-ons
87+
pnpx create-start-app@latest --list-add-ons
12788
```
12889

129-
This will display a list of all available add-ons for React that are compatible with the Code Router.
90+
This will get you a list of all available add-ons for Solid.
13091

13192
```bash
132-
npx create-start-app@latest --list-add-ons --framework solid --template file-router
93+
pnpx create-start-app@latest --list-add-ons --framework solid
13394
```
13495

135-
Will get you a list of all available add-ons for Solid that are compatible with the File Router.
136-
13796
## MCP (Model Context Protocol) Support (experimental)
13897

139-
You can launch the `create-start-app` CLI with the `--mcp` flag to enable MCP support. Use this in your MCP enabled IDE to allow the Agent model to generate TanStack Router applications.
98+
You can launch the `create-start-app` CLI with the `--mcp` flag to enable MCP support. Use this in your MCP enabled IDE to allow the Agent model to generate TanStack Start applications.
14099

141100
```bash
142-
npx create-start-app@latest --mcp
101+
pnpx create-start-app@latest --mcp
143102
```
144103

145104
Shown below is the configuration for MCP support in Cursor.

cli/create-tsrouter-app/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ To maintain compatability with `create-react-app` you can build a new applicatio
1010

1111
| Command | Description |
1212
| -------------------------------------------------------------------------------- | ------------------------------------------------- |
13-
| `npx create-tsrouter-app@latest my-app` | Create a new app |
14-
| `npx create-tsrouter-app@latest my-app --template file-router` | Create a new file based app |
15-
| `npx create-tsrouter-app@latest my-app --template typescript` | Create a new TypeScript app using the Code Router |
16-
| `npx create-tsrouter-app@latest my-app --tailwind` | Add Tailwind CSS support |
17-
| `npx create-tsrouter-app@latest my-app --framework solid` | Create a Solid app |
18-
| `npx create-tsrouter-app@latest my-app --framework solid --template file-router` | Create a Solid app with file-router |
13+
| `pnpx create-tsrouter-app@latest my-app` | Create a new app |
14+
| `pnpx create-tsrouter-app@latest my-app --template file-router` | Create a new file based app |
15+
| `pnpx create-tsrouter-app@latest my-app --template typescript` | Create a new TypeScript app using the Code Router |
16+
| `pnpx create-tsrouter-app@latest my-app --tailwind` | Add Tailwind CSS support |
17+
| `pnpx create-tsrouter-app@latest my-app --framework solid` | Create a Solid app |
18+
| `pnpx create-tsrouter-app@latest my-app --framework solid --template file-router` | Create a Solid app with file-router |
1919

2020
If you don't specify a project name, the CLI will walk you through an interactive setup process:
2121

2222
```bash
23-
npx create-tsrouter-app@latest
23+
pnpx create-tsrouter-app@latest
2424
```
2525

2626
This will start an interactive CLI that guides you through the setup process, allowing you to choose:
@@ -38,7 +38,7 @@ This will start an interactive CLI that guides you through the setup process, al
3838
You can also use command line flags to specify your preferences directly:
3939

4040
```bash
41-
npx create-tsrouter-app@latest my-app --template file-router --tailwind --package-manager pnpm
41+
pnpx create-tsrouter-app@latest my-app --template file-router --tailwind --package-manager pnpm
4242
```
4343

4444
Available options:
@@ -67,15 +67,15 @@ File Based Routing is the default option when using the interactive CLI. The loc
6767
To explicitly choose File Based Routing, use:
6868

6969
```bash
70-
npx create-tsrouter-app@latest my-app --template file-router
70+
pnpx create-tsrouter-app@latest my-app --template file-router
7171
```
7272

7373
### Code Based Routing
7474

7575
If you prefer traditional code-based routing, you can select it in the interactive CLI or specify it by using either the `typescript` or `javascript` template:
7676

7777
```bash
78-
npx create-tsrouter-app@latest my-app --template typescript
78+
pnpx create-tsrouter-app@latest my-app --template typescript
7979
```
8080

8181
## Additional Configuration
@@ -109,27 +109,27 @@ Setting this flag to `eslint+prettier` will configure it as your toolchain of ch
109109
You can enable add-on selection:
110110

111111
```bash
112-
npx create-tsrouter-app@latest --add-ons
112+
pnpx create-tsrouter-app@latest --add-ons
113113
```
114114

115115
This will prompt you to select the add-ons you want to enable during application creation.
116116

117117
You can enable specific add-ons directly by adding a comma separated list of add-on names to the `--add-ons` flag. For example:
118118

119119
```bash
120-
npx create-tsrouter-app@latest my-app --add-ons shadcn,tanstack-query
120+
pnpx create-tsrouter-app@latest my-app --add-ons shadcn,tanstack-query
121121
```
122122

123123
You can get a list of all available add-ons by running:
124124

125125
```bash
126-
npx create-tsrouter-app@latest --list-add-ons
126+
pnpx create-tsrouter-app@latest --list-add-ons
127127
```
128128

129129
This will display a list of all available add-ons for React that are compatible with the Code Router.
130130

131131
```bash
132-
npx create-tsrouter-app@latest --list-add-ons --framework solid --template file-router
132+
pnpx create-tsrouter-app@latest --list-add-ons --framework solid --template file-router
133133
```
134134

135135
Will get you a list of all available add-ons for Solid that are compatible with the File Router.
@@ -139,7 +139,7 @@ Will get you a list of all available add-ons for Solid that are compatible with
139139
You can launch the `create-tsrouter-app` CLI with the `--mcp` flag to enable MCP support. Use this in your MCP enabled IDE to allow the Agent model to generate TanStack Router applications.
140140

141141
```bash
142-
npx create-tsrouter-app@latest --mcp
142+
pnpx create-tsrouter-app@latest --mcp
143143
```
144144

145145
Shown below is the configuration for MCP support in Cursor.

packages/cta-engine/src/options.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ export async function normalizeOptions(
6666
forcedAddOns
6767
) {
6868
addOns = true
69-
let finalAddOns = [...(overlay?.dependsOn || [])]
69+
let finalAddOns = Array.from(
70+
new Set([...(overlay?.dependsOn || []), ...(forcedAddOns || [])]),
71+
)
7072
if (cliOptions.addOns && Array.isArray(cliOptions.addOns)) {
7173
finalAddOns = Array.from(
7274
new Set([

0 commit comments

Comments
 (0)