@tanstack/cli 0.60.1 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +266 -11
- package/dist/command-line.js +103 -8
- package/dist/discovery.js +144 -0
- package/dist/options.js +35 -2
- package/dist/types/command-line.d.ts +7 -0
- package/dist/types/{mcp/types.d.ts → discovery.d.ts} +23 -75
- package/dist/types/types.d.ts +1 -2
- package/dist/types/ui-prompts.d.ts +5 -0
- package/dist/ui-prompts.js +26 -0
- package/package.json +6 -5
- package/skills/CHANGELOG.md +18 -0
- package/skills/add-addons-existing-app/SKILL.md +113 -0
- package/skills/choose-ecosystem-integrations/SKILL.md +140 -0
- package/skills/choose-ecosystem-integrations/references/authentication-providers.md +19 -0
- package/skills/choose-ecosystem-integrations/references/data-layer-providers.md +20 -0
- package/skills/choose-ecosystem-integrations/references/deployment-targets.md +19 -0
- package/skills/create-app-scaffold/SKILL.md +132 -0
- package/skills/create-app-scaffold/references/create-flag-compatibility-matrix.md +34 -0
- package/skills/create-app-scaffold/references/deployment-providers.md +19 -0
- package/skills/create-app-scaffold/references/framework-adapters.md +17 -0
- package/skills/create-app-scaffold/references/toolchains.md +17 -0
- package/skills/maintain-custom-addons-dev-watch/SKILL.md +118 -0
- package/skills/query-docs-library-metadata/SKILL.md +85 -0
- package/skills/query-docs-library-metadata/references/discovery-command-output-schemas.md +70 -0
- package/CHANGELOG.md +0 -787
- package/dist/mcp/api.js +0 -31
- package/dist/mcp/tools.js +0 -250
- package/dist/mcp/types.js +0 -37
- package/dist/mcp.js +0 -181
- package/dist/types/mcp/api.d.ts +0 -4
- package/dist/types/mcp/tools.d.ts +0 -2
- package/dist/types/mcp.d.ts +0 -5
- package/playwright-report/index.html +0 -85
- package/playwright.config.ts +0 -21
- package/src/bin.ts +0 -15
- package/src/cli.ts +0 -767
- package/src/command-line.ts +0 -473
- package/src/dev-watch.ts +0 -564
- package/src/file-syncer.ts +0 -263
- package/src/index.ts +0 -21
- package/src/mcp/api.ts +0 -42
- package/src/mcp/tools.ts +0 -323
- package/src/mcp/types.ts +0 -46
- package/src/mcp.ts +0 -263
- package/src/options.ts +0 -234
- package/src/types.ts +0 -28
- package/src/ui-environment.ts +0 -74
- package/src/ui-prompts.ts +0 -355
- package/src/utils.ts +0 -30
- package/test-results/.last-run.json +0 -4
- package/tests/command-line.test.ts +0 -622
- package/tests/index.test.ts +0 -9
- package/tests/mcp.test.ts +0 -225
- package/tests/options.test.ts +0 -216
- package/tests/setupVitest.ts +0 -6
- package/tests/ui-environment.test.ts +0 -97
- package/tests/ui-prompts.test.ts +0 -205
- package/tests-e2e/addons-smoke.spec.ts +0 -31
- package/tests-e2e/create-smoke.spec.ts +0 -39
- package/tests-e2e/helpers.ts +0 -526
- package/tests-e2e/matrix-opportunistic.spec.ts +0 -142
- package/tests-e2e/router-only-smoke.spec.ts +0 -68
- package/tests-e2e/solid-smoke.spec.ts +0 -25
- package/tests-e2e/templates-smoke.spec.ts +0 -52
- package/tsconfig.json +0 -17
- package/vitest.config.js +0 -8
package/dist/options.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { intro } from '@clack/prompts';
|
|
2
|
-
import { finalizeAddOns, getFrameworkById, getPackageManager, populateAddOnOptionsDefaults, readConfigFile, } from '@tanstack/create';
|
|
3
|
-
import { getProjectName, promptForAddOnOptions, promptForEnvVars, selectAddOns, selectDeployment, selectExamples, selectGit, selectPackageManager, selectToolchain, } from './ui-prompts.js';
|
|
2
|
+
import { finalizeAddOns, getFrameworkById, getPackageManager, loadStarter, populateAddOnOptionsDefaults, readConfigFile, } from '@tanstack/create';
|
|
3
|
+
import { getProjectName, promptForAddOnOptions, promptForEnvVars, selectAddOns, selectDeployment, selectExamples, selectGit, selectPackageManager, selectTemplate, selectToolchain, } from './ui-prompts.js';
|
|
4
|
+
import { listTemplateChoices, resolveStarterSpecifier, } from './command-line.js';
|
|
4
5
|
import { getCurrentDirectoryName, sanitizePackageName, validateProjectName, } from './utils.js';
|
|
5
6
|
export async function promptForCreateOptions(cliOptions, { forcedAddOns = [], showDeploymentOptions = false, }) {
|
|
6
7
|
const options = {};
|
|
@@ -30,6 +31,32 @@ export async function promptForCreateOptions(cliOptions, { forcedAddOns = [], sh
|
|
|
30
31
|
['file-router', 'typescript', 'tsx', 'javascript', 'js', 'jsx'].includes(template);
|
|
31
32
|
const routerOnly = !!cliOptions.routerOnly ||
|
|
32
33
|
(isLegacyTemplate ? template !== 'file-router' : false);
|
|
34
|
+
if (!cliOptions.starter) {
|
|
35
|
+
if (cliOptions.template && !isLegacyTemplate) {
|
|
36
|
+
cliOptions.starter = cliOptions.template;
|
|
37
|
+
}
|
|
38
|
+
else if (cliOptions.templateId) {
|
|
39
|
+
cliOptions.starter = cliOptions.templateId;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!routerOnly && !cliOptions.starter) {
|
|
43
|
+
const starterChoices = await listTemplateChoices(options.framework.id);
|
|
44
|
+
const selectedTemplateId = await selectTemplate(starterChoices.map((choice) => ({
|
|
45
|
+
id: choice.id,
|
|
46
|
+
name: choice.name,
|
|
47
|
+
description: choice.description,
|
|
48
|
+
})));
|
|
49
|
+
if (selectedTemplateId) {
|
|
50
|
+
cliOptions.starter = selectedTemplateId;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
const starter = !routerOnly && cliOptions.starter
|
|
54
|
+
? await loadStarter(await resolveStarterSpecifier(cliOptions.starter, options.framework.id))
|
|
55
|
+
: undefined;
|
|
56
|
+
if (starter) {
|
|
57
|
+
options.framework = getFrameworkById(starter.framework) || options.framework;
|
|
58
|
+
options.mode = starter.mode;
|
|
59
|
+
}
|
|
33
60
|
// TypeScript is always enabled with file-router
|
|
34
61
|
options.typescript = true;
|
|
35
62
|
// Package manager selection
|
|
@@ -62,6 +89,9 @@ export async function promptForCreateOptions(cliOptions, { forcedAddOns = [], sh
|
|
|
62
89
|
addOns.add(deployment);
|
|
63
90
|
}
|
|
64
91
|
if (!routerOnly) {
|
|
92
|
+
for (const addOn of starter?.dependsOn || []) {
|
|
93
|
+
addOns.add(addOn);
|
|
94
|
+
}
|
|
65
95
|
for (const addOn of forcedAddOns) {
|
|
66
96
|
addOns.add(addOn);
|
|
67
97
|
}
|
|
@@ -112,6 +142,9 @@ export async function promptForCreateOptions(cliOptions, { forcedAddOns = [], sh
|
|
|
112
142
|
if (cliOptions.install === false) {
|
|
113
143
|
options.install = false;
|
|
114
144
|
}
|
|
145
|
+
if (starter) {
|
|
146
|
+
options.starter = starter;
|
|
147
|
+
}
|
|
115
148
|
return options;
|
|
116
149
|
}
|
|
117
150
|
export async function promptForAddOns() {
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import type { Options } from '@tanstack/create';
|
|
2
2
|
import type { CliOptions } from './types.js';
|
|
3
|
+
export declare function resolveStarterSpecifier(starterSpecifier: string, preferredFramework?: string): Promise<string>;
|
|
4
|
+
export declare function listTemplateChoices(preferredFramework?: string): Promise<Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
framework: string;
|
|
9
|
+
}>>;
|
|
3
10
|
export declare function validateLegacyCreateFlags(cliOptions: CliOptions): {
|
|
4
11
|
warnings: Array<string>;
|
|
5
12
|
error?: string;
|
|
@@ -1,48 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
id: z.ZodString;
|
|
4
|
-
name: z.ZodString;
|
|
5
|
-
tagline: z.ZodString;
|
|
6
|
-
description: z.ZodOptional<z.ZodString>;
|
|
7
|
-
frameworks: z.ZodArray<z.ZodString, "many">;
|
|
8
|
-
latestVersion: z.ZodString;
|
|
9
|
-
latestBranch: z.ZodOptional<z.ZodString>;
|
|
10
|
-
availableVersions: z.ZodArray<z.ZodString, "many">;
|
|
11
|
-
repo: z.ZodString;
|
|
12
|
-
docsRoot: z.ZodOptional<z.ZodString>;
|
|
13
|
-
defaultDocs: z.ZodOptional<z.ZodString>;
|
|
14
|
-
docsUrl: z.ZodOptional<z.ZodString>;
|
|
15
|
-
githubUrl: z.ZodOptional<z.ZodString>;
|
|
16
|
-
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
id: string;
|
|
18
|
-
name: string;
|
|
19
|
-
tagline: string;
|
|
20
|
-
frameworks: string[];
|
|
21
|
-
latestVersion: string;
|
|
22
|
-
availableVersions: string[];
|
|
23
|
-
repo: string;
|
|
24
|
-
description?: string | undefined;
|
|
25
|
-
latestBranch?: string | undefined;
|
|
26
|
-
docsRoot?: string | undefined;
|
|
27
|
-
defaultDocs?: string | undefined;
|
|
28
|
-
docsUrl?: string | undefined;
|
|
29
|
-
githubUrl?: string | undefined;
|
|
30
|
-
}, {
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
tagline: string;
|
|
34
|
-
frameworks: string[];
|
|
35
|
-
latestVersion: string;
|
|
36
|
-
availableVersions: string[];
|
|
37
|
-
repo: string;
|
|
38
|
-
description?: string | undefined;
|
|
39
|
-
latestBranch?: string | undefined;
|
|
40
|
-
docsRoot?: string | undefined;
|
|
41
|
-
defaultDocs?: string | undefined;
|
|
42
|
-
docsUrl?: string | undefined;
|
|
43
|
-
githubUrl?: string | undefined;
|
|
44
|
-
}>;
|
|
45
|
-
export declare const LibrariesResponseSchema: z.ZodObject<{
|
|
2
|
+
declare const LibrariesResponseSchema: z.ZodObject<{
|
|
46
3
|
libraries: z.ZodArray<z.ZodObject<{
|
|
47
4
|
id: z.ZodString;
|
|
48
5
|
name: z.ZodString;
|
|
@@ -125,35 +82,7 @@ export declare const LibrariesResponseSchema: z.ZodObject<{
|
|
|
125
82
|
groups: Record<string, string[]>;
|
|
126
83
|
groupNames: Record<string, string>;
|
|
127
84
|
}>;
|
|
128
|
-
|
|
129
|
-
id: z.ZodString;
|
|
130
|
-
name: z.ZodString;
|
|
131
|
-
tagline: z.ZodOptional<z.ZodString>;
|
|
132
|
-
description: z.ZodString;
|
|
133
|
-
category: z.ZodString;
|
|
134
|
-
categoryLabel: z.ZodString;
|
|
135
|
-
libraries: z.ZodArray<z.ZodString, "many">;
|
|
136
|
-
url: z.ZodString;
|
|
137
|
-
}, "strip", z.ZodTypeAny, {
|
|
138
|
-
id: string;
|
|
139
|
-
name: string;
|
|
140
|
-
description: string;
|
|
141
|
-
libraries: string[];
|
|
142
|
-
category: string;
|
|
143
|
-
categoryLabel: string;
|
|
144
|
-
url: string;
|
|
145
|
-
tagline?: string | undefined;
|
|
146
|
-
}, {
|
|
147
|
-
id: string;
|
|
148
|
-
name: string;
|
|
149
|
-
description: string;
|
|
150
|
-
libraries: string[];
|
|
151
|
-
category: string;
|
|
152
|
-
categoryLabel: string;
|
|
153
|
-
url: string;
|
|
154
|
-
tagline?: string | undefined;
|
|
155
|
-
}>;
|
|
156
|
-
export declare const PartnersResponseSchema: z.ZodObject<{
|
|
85
|
+
declare const PartnersResponseSchema: z.ZodObject<{
|
|
157
86
|
partners: z.ZodArray<z.ZodObject<{
|
|
158
87
|
id: z.ZodString;
|
|
159
88
|
name: z.ZodString;
|
|
@@ -211,7 +140,26 @@ export declare const PartnersResponseSchema: z.ZodObject<{
|
|
|
211
140
|
categories: string[];
|
|
212
141
|
categoryLabels: Record<string, string>;
|
|
213
142
|
}>;
|
|
214
|
-
export
|
|
143
|
+
export declare const LIBRARY_GROUPS: readonly ["state", "headlessUI", "performance", "tooling"];
|
|
215
144
|
export type LibrariesResponse = z.infer<typeof LibrariesResponseSchema>;
|
|
216
|
-
export type Partner = z.infer<typeof PartnerSchema>;
|
|
217
145
|
export type PartnersResponse = z.infer<typeof PartnersResponseSchema>;
|
|
146
|
+
export declare function fetchLibraries(): Promise<LibrariesResponse>;
|
|
147
|
+
export declare function fetchPartners(): Promise<PartnersResponse>;
|
|
148
|
+
export declare function fetchDocContent(repo: string, branch: string, filePath: string): Promise<string | null>;
|
|
149
|
+
export declare function searchTanStackDocs({ query, library, framework, limit, }: {
|
|
150
|
+
query: string;
|
|
151
|
+
library?: string;
|
|
152
|
+
framework?: string;
|
|
153
|
+
limit?: number;
|
|
154
|
+
}): Promise<{
|
|
155
|
+
query: string;
|
|
156
|
+
totalHits: number;
|
|
157
|
+
results: Array<{
|
|
158
|
+
title: string;
|
|
159
|
+
url: string;
|
|
160
|
+
snippet: string;
|
|
161
|
+
library: string;
|
|
162
|
+
breadcrumb: Array<string>;
|
|
163
|
+
}>;
|
|
164
|
+
}>;
|
|
165
|
+
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import type { AddOn, PackageManager } from '@tanstack/create';
|
|
|
2
2
|
import type { Framework } from '@tanstack/create/dist/types/types.js';
|
|
3
3
|
export declare function getProjectName(): Promise<string>;
|
|
4
4
|
export declare function selectPackageManager(): Promise<PackageManager>;
|
|
5
|
+
export declare function selectTemplate(templates: Array<{
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}>): Promise<string | undefined>;
|
|
5
10
|
export declare function selectAddOns(framework: Framework, mode: string, type: string, message: string, forcedAddOns?: Array<string>, allowMultiple?: boolean): Promise<Array<string>>;
|
|
6
11
|
export declare function selectGit(): Promise<boolean>;
|
|
7
12
|
export declare function selectExamples(): Promise<boolean>;
|
package/dist/ui-prompts.js
CHANGED
|
@@ -36,6 +36,32 @@ export async function selectPackageManager() {
|
|
|
36
36
|
}
|
|
37
37
|
return packageManager;
|
|
38
38
|
}
|
|
39
|
+
export async function selectTemplate(templates) {
|
|
40
|
+
if (templates.length === 0) {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const selected = await select({
|
|
44
|
+
message: 'Would you like to start from a template?',
|
|
45
|
+
options: [
|
|
46
|
+
{
|
|
47
|
+
value: undefined,
|
|
48
|
+
label: 'None (base starter)',
|
|
49
|
+
hint: 'Two-page baseline (Home + About)',
|
|
50
|
+
},
|
|
51
|
+
...templates.map((template) => ({
|
|
52
|
+
value: template.id,
|
|
53
|
+
label: template.name,
|
|
54
|
+
hint: template.description,
|
|
55
|
+
})),
|
|
56
|
+
],
|
|
57
|
+
initialValue: undefined,
|
|
58
|
+
});
|
|
59
|
+
if (isCancel(selected)) {
|
|
60
|
+
cancel('Operation cancelled.');
|
|
61
|
+
process.exit(0);
|
|
62
|
+
}
|
|
63
|
+
return selected;
|
|
64
|
+
}
|
|
39
65
|
// Track if we've shown the multiselect help text
|
|
40
66
|
let hasShownMultiselectHelp = false;
|
|
41
67
|
export async function selectAddOns(framework, mode, type, message, forcedAddOns = [], allowMultiple = true) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"description": "TanStack CLI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"skills"
|
|
11
|
+
],
|
|
8
12
|
"bin": {
|
|
9
13
|
"tanstack": "./dist/bin.js"
|
|
10
14
|
},
|
|
@@ -28,23 +32,20 @@
|
|
|
28
32
|
"license": "MIT",
|
|
29
33
|
"dependencies": {
|
|
30
34
|
"@clack/prompts": "^0.10.0",
|
|
31
|
-
"@modelcontextprotocol/sdk": "^1.6.0",
|
|
32
35
|
"chalk": "^5.4.1",
|
|
33
36
|
"chokidar": "^3.6.0",
|
|
34
37
|
"commander": "^13.1.0",
|
|
35
38
|
"diff": "^7.0.0",
|
|
36
|
-
"express": "^4.21.2",
|
|
37
39
|
"semver": "^7.7.2",
|
|
38
40
|
"tempy": "^3.1.0",
|
|
39
41
|
"validate-npm-package-name": "^7.0.0",
|
|
40
42
|
"zod": "^3.24.2",
|
|
41
|
-
"@tanstack/create": "0.62.
|
|
43
|
+
"@tanstack/create": "0.62.3"
|
|
42
44
|
},
|
|
43
45
|
"devDependencies": {
|
|
44
46
|
"@playwright/test": "^1.58.2",
|
|
45
47
|
"@tanstack/config": "^0.16.2",
|
|
46
48
|
"@types/diff": "^5.2.0",
|
|
47
|
-
"@types/express": "^5.0.1",
|
|
48
49
|
"@types/node": "^22.13.4",
|
|
49
50
|
"@types/semver": "^7.7.0",
|
|
50
51
|
"@types/validate-npm-package-name": "^4.0.2",
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## 2026-03-02
|
|
2
|
+
|
|
3
|
+
### Updated for @tanstack/cli v0.61.0
|
|
4
|
+
|
|
5
|
+
**Breaking changes:**
|
|
6
|
+
- create-app-scaffold: documents router-only compatibility behavior where template/deployment/add-on intent is ignored.
|
|
7
|
+
- add-addons-existing-app: enforces `.cta.json` metadata precondition for add flows.
|
|
8
|
+
|
|
9
|
+
**Deprecation updates:**
|
|
10
|
+
- create-app-scaffold: `--no-tailwind` treated as deprecated/ignored; recommends post-scaffold removal flow.
|
|
11
|
+
- query-docs-library-metadata: deprecated alias discovery patterns replaced with `tanstack` command namespace.
|
|
12
|
+
|
|
13
|
+
**New skills:**
|
|
14
|
+
- create-app-scaffold: deterministic app generation and flag compatibility.
|
|
15
|
+
- add-addons-existing-app: add-on layering into existing repos.
|
|
16
|
+
- query-docs-library-metadata: JSON discovery/doc retrieval for agents.
|
|
17
|
+
- choose-ecosystem-integrations: partner-to-add-on mapping and exclusivity handling.
|
|
18
|
+
- maintain-custom-addons-dev-watch: custom add-on authoring and dev-watch lifecycle.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: add-addons-existing-app
|
|
3
|
+
description: >
|
|
4
|
+
Apply integrations to existing projects with tanstack add, including
|
|
5
|
+
add-on id resolution, dependency chains, option prompts, and .cta.json
|
|
6
|
+
project metadata preconditions.
|
|
7
|
+
type: core
|
|
8
|
+
library: tanstack-cli
|
|
9
|
+
library_version: "0.61.0"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Add Add-ons To Existing App
|
|
13
|
+
|
|
14
|
+
Use this skill when the project already exists and you need to layer add-ons safely without breaking dependency or metadata assumptions.
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx @tanstack/cli add clerk drizzle
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Core Patterns
|
|
23
|
+
|
|
24
|
+
### Add multiple integrations in one pass
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx @tanstack/cli add tanstack-query drizzle
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Resolve candidate ids before applying
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx @tanstack/cli create --list-add-ons --json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Validate optionized add-ons before install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx @tanstack/cli create --addon-details prisma --json
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Common Mistakes
|
|
43
|
+
|
|
44
|
+
### CRITICAL Run tanstack add without .cta.json
|
|
45
|
+
|
|
46
|
+
Wrong:
|
|
47
|
+
```bash
|
|
48
|
+
npx @tanstack/cli add clerk
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Correct:
|
|
52
|
+
```bash
|
|
53
|
+
# Run in a project scaffolded by TanStack CLI (contains .cta.json), then:
|
|
54
|
+
npx @tanstack/cli add clerk
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Add flows depend on persisted scaffold metadata, so commands can fail or apply incomplete config when `.cta.json` is missing.
|
|
58
|
+
|
|
59
|
+
Source: packages/create/src/custom-add-ons/shared.ts:158
|
|
60
|
+
|
|
61
|
+
### HIGH Use invalid add-on id
|
|
62
|
+
|
|
63
|
+
Wrong:
|
|
64
|
+
```bash
|
|
65
|
+
npx @tanstack/cli add drizle
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Correct:
|
|
69
|
+
```bash
|
|
70
|
+
npx @tanstack/cli add drizzle
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Unknown ids stop resolution and force manual correction before any add-on work proceeds.
|
|
74
|
+
|
|
75
|
+
Source: packages/create/src/add-ons.ts:44
|
|
76
|
+
|
|
77
|
+
### HIGH Ignore add-on dependency requirements
|
|
78
|
+
|
|
79
|
+
Wrong:
|
|
80
|
+
```bash
|
|
81
|
+
npx @tanstack/cli add custom-addon-with-missing-deps
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Correct:
|
|
85
|
+
```bash
|
|
86
|
+
npx @tanstack/cli add required-dependency custom-addon-with-missing-deps
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Add-ons with `dependsOn` can fail during finalization if required dependencies are not present.
|
|
90
|
+
|
|
91
|
+
Source: packages/create/src/add-ons.ts:48
|
|
92
|
+
|
|
93
|
+
### MEDIUM Assume old Windows path bug still present
|
|
94
|
+
|
|
95
|
+
Wrong:
|
|
96
|
+
```bash
|
|
97
|
+
# Avoid tanstack add on Windows and patch manually
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
Correct:
|
|
101
|
+
```bash
|
|
102
|
+
npx @tanstack/cli add clerk
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Avoiding supported workflows based on historical bug reports causes unnecessary manual drift. Fixed in newer versions, but agents trained on older threads may still avoid this path.
|
|
106
|
+
|
|
107
|
+
Source: https://github.com/TanStack/cli/issues/329
|
|
108
|
+
|
|
109
|
+
### HIGH Tension: Backwards support vs deterministic automation
|
|
110
|
+
|
|
111
|
+
This domain's patterns conflict with maintain-custom-addons-dev-watch. Automation that assumes universal add flows tends to fail because legacy compatibility still relies on hidden scaffold metadata.
|
|
112
|
+
|
|
113
|
+
See also: maintain-custom-addons-dev-watch/SKILL.md § Common Mistakes
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: choose-ecosystem-integrations
|
|
3
|
+
description: >
|
|
4
|
+
Map tanstack ecosystem partner metadata to installable add-on ids using
|
|
5
|
+
tanstack ecosystem --json, tanstack create --list-add-ons --json, and
|
|
6
|
+
tanstack create --addon-details --json. Covers exclusive categories,
|
|
7
|
+
provider options, and router-only compatibility constraints.
|
|
8
|
+
type: composition
|
|
9
|
+
library: tanstack-cli
|
|
10
|
+
library_version: "0.61.0"
|
|
11
|
+
requires:
|
|
12
|
+
- create-app-scaffold
|
|
13
|
+
- query-docs-library-metadata
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
This skill requires familiarity with scaffold and discovery workflows. Read `create-app-scaffold` and `query-docs-library-metadata` first.
|
|
17
|
+
|
|
18
|
+
# Choose Ecosystem Integrations
|
|
19
|
+
|
|
20
|
+
Use this skill at the seam between user requirements and valid CLI integration choices.
|
|
21
|
+
|
|
22
|
+
## Setup
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @tanstack/cli ecosystem --json
|
|
26
|
+
npx @tanstack/cli create --list-add-ons --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Core Patterns
|
|
30
|
+
|
|
31
|
+
### Map partner intent to add-on ids explicitly
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx @tanstack/cli ecosystem --category database --json
|
|
35
|
+
npx @tanstack/cli create --list-add-ons --json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Inspect option surfaces before final provider choice
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
npx @tanstack/cli create --addon-details drizzle --json
|
|
42
|
+
npx @tanstack/cli create --addon-details prisma --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Enforce one choice per exclusive category
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npx @tanstack/cli create my-app \
|
|
49
|
+
--framework react \
|
|
50
|
+
--add-ons clerk,drizzle \
|
|
51
|
+
--deployment cloudflare \
|
|
52
|
+
-y
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Common Mistakes
|
|
56
|
+
|
|
57
|
+
### HIGH Treat ecosystem partner id as add-on id
|
|
58
|
+
|
|
59
|
+
Wrong:
|
|
60
|
+
```bash
|
|
61
|
+
npx @tanstack/cli add <partner-id-from-ecosystem>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Correct:
|
|
65
|
+
```bash
|
|
66
|
+
npx @tanstack/cli ecosystem --json
|
|
67
|
+
npx @tanstack/cli create --list-add-ons --json
|
|
68
|
+
npx @tanstack/cli add <mapped-addon-id>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`ecosystem` includes partners that are not directly installable add-ons, so direct reuse of partner ids can fail late in add/apply flows.
|
|
72
|
+
|
|
73
|
+
Source: tanstack ecosystem --json output + tanstack create --list-add-ons --json output
|
|
74
|
+
|
|
75
|
+
### HIGH Skip addon-details before choosing provider
|
|
76
|
+
|
|
77
|
+
Wrong:
|
|
78
|
+
```bash
|
|
79
|
+
npx @tanstack/cli create my-app --add-ons prisma -y
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Correct:
|
|
83
|
+
```bash
|
|
84
|
+
npx @tanstack/cli create --addon-details prisma --json
|
|
85
|
+
npx @tanstack/cli create my-app --add-ons prisma -y
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Optionized providers can default silently, producing the wrong data-layer stack for the requested integration.
|
|
89
|
+
|
|
90
|
+
Source: tanstack create --addon-details prisma --json
|
|
91
|
+
|
|
92
|
+
### HIGH Select multiple exclusive integrations together
|
|
93
|
+
|
|
94
|
+
Wrong:
|
|
95
|
+
```bash
|
|
96
|
+
npx @tanstack/cli create my-app --add-ons clerk,workos -y
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Correct:
|
|
100
|
+
```bash
|
|
101
|
+
npx @tanstack/cli create my-app --add-ons clerk -y
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Exclusive categories permit only one active choice, so multi-select commands can drop or replace intended providers.
|
|
105
|
+
|
|
106
|
+
Source: packages/create/src/frameworks/*/*/info.json
|
|
107
|
+
|
|
108
|
+
### CRITICAL Assume router-only supports deployment integration
|
|
109
|
+
|
|
110
|
+
Wrong:
|
|
111
|
+
```bash
|
|
112
|
+
npx @tanstack/cli create my-app --router-only --deployment cloudflare -y
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Correct:
|
|
116
|
+
```bash
|
|
117
|
+
npx @tanstack/cli create my-app --router-only -y
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Router-only mode ignores deployment integration, so the command succeeds without applying the intended ecosystem target.
|
|
121
|
+
|
|
122
|
+
Source: packages/cli/src/command-line.ts:349
|
|
123
|
+
|
|
124
|
+
### HIGH Tension: Compatibility mode vs explicit intent
|
|
125
|
+
|
|
126
|
+
This domain's patterns conflict with create-app-scaffold. Integration planning tends to over-assume command intent is preserved, but compatibility mode silently strips integration flags.
|
|
127
|
+
|
|
128
|
+
See also: create-app-scaffold/SKILL.md § Common Mistakes
|
|
129
|
+
|
|
130
|
+
### HIGH Tension: Single-command convenience vs integration precision
|
|
131
|
+
|
|
132
|
+
This domain's patterns conflict with query-docs-library-metadata. Integration choices tend to drift when discovery metadata is skipped in favor of one-shot scaffold commands.
|
|
133
|
+
|
|
134
|
+
See also: query-docs-library-metadata/SKILL.md § Common Mistakes
|
|
135
|
+
|
|
136
|
+
## References
|
|
137
|
+
|
|
138
|
+
- [Authentication providers](references/authentication-providers.md)
|
|
139
|
+
- [Data layer providers](references/data-layer-providers.md)
|
|
140
|
+
- [Deployment targets](references/deployment-targets.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Authentication Providers
|
|
2
|
+
|
|
3
|
+
Use `tanstack ecosystem --category authentication --json` for partner discovery, then map to installable add-on ids via `tanstack create --list-add-ons --json`.
|
|
4
|
+
|
|
5
|
+
## Common add-ons
|
|
6
|
+
|
|
7
|
+
- `clerk`
|
|
8
|
+
- `workos`
|
|
9
|
+
- `better-auth`
|
|
10
|
+
|
|
11
|
+
## Selection pattern
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @tanstack/cli ecosystem --category authentication --json
|
|
15
|
+
npx @tanstack/cli create --list-add-ons --json
|
|
16
|
+
npx @tanstack/cli create my-app --add-ons clerk -y
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Authentication providers are typically exclusive; select one unless metadata explicitly allows combination.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Data Layer Providers
|
|
2
|
+
|
|
3
|
+
Inspect each provider's options before generation to avoid defaulting to an unintended backend.
|
|
4
|
+
|
|
5
|
+
## Common add-ons
|
|
6
|
+
|
|
7
|
+
- `prisma`
|
|
8
|
+
- `drizzle`
|
|
9
|
+
- `convex`
|
|
10
|
+
- `neon`
|
|
11
|
+
|
|
12
|
+
## Selection pattern
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @tanstack/cli create --addon-details prisma --json
|
|
16
|
+
npx @tanstack/cli create --addon-details drizzle --json
|
|
17
|
+
npx @tanstack/cli create my-app --add-ons drizzle -y
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Database/ORM categories can be exclusive depending on framework template metadata.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Deployment Targets
|
|
2
|
+
|
|
3
|
+
Map deployment intent to one supported target and include it in scaffold commands only outside router-only mode.
|
|
4
|
+
|
|
5
|
+
## Common targets
|
|
6
|
+
|
|
7
|
+
- `cloudflare`
|
|
8
|
+
- `netlify`
|
|
9
|
+
- `railway`
|
|
10
|
+
- `nitro`
|
|
11
|
+
|
|
12
|
+
## Selection pattern
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npx @tanstack/cli ecosystem --category deployment --json
|
|
16
|
+
npx @tanstack/cli create my-app --deployment cloudflare -y
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Deployment target selection is exclusive and ignored when `--router-only` is active.
|