@@ -20,18 +20,18 @@ import type { CliOptions, Framework } from './types.js'
2020
2121export function cli ( {
2222 name,
23+ appName,
2324 forcedMode,
2425 forcedAddOns,
2526} : {
2627 name : string
28+ appName : string
2729 forcedMode ?: 'typescript' | 'javascript' | 'file-router'
2830 forcedAddOns ?: Array < string >
2931} ) {
3032 const program = new Command ( )
3133
32- program
33- . name ( 'create-tsrouter-app' )
34- . description ( 'CLI to create a new TanStack application' )
34+ program . name ( name ) . description ( `CLI to create a new ${ appName } application` )
3535
3636 // program
3737 // .command('add')
@@ -139,9 +139,16 @@ export function cli({
139139
140140 program . action ( async ( projectName : string , options : CliOptions ) => {
141141 if ( options . listAddOns ) {
142- await listAddOns ( options )
142+ await listAddOns ( options , {
143+ forcedMode,
144+ forcedAddOns,
145+ } )
143146 } else if ( options . mcp || options . mcpSse ) {
144- await runServer ( ! ! options . mcpSse )
147+ await runServer ( ! ! options . mcpSse , {
148+ forcedMode,
149+ forcedAddOns,
150+ appName,
151+ } )
145152 } else {
146153 try {
147154 const cliOptions = {
@@ -155,9 +162,9 @@ export function cli({
155162
156163 let finalOptions = await normalizeOptions ( cliOptions , forcedAddOns )
157164 if ( finalOptions ) {
158- intro ( `Creating a new TanStack app in ${ projectName } ...` )
165+ intro ( `Creating a new ${ appName } app in ${ projectName } ...` )
159166 } else {
160- intro ( " Let's configure your TanStack application" )
167+ intro ( ` Let's configure your ${ appName } application` )
161168 finalOptions = await promptForOptions ( cliOptions , {
162169 forcedMode,
163170 forcedAddOns,
@@ -167,6 +174,7 @@ export function cli({
167174 environment : createDefaultEnvironment ( ) ,
168175 cwd : options . targetDir || undefined ,
169176 name,
177+ appName,
170178 } )
171179 } catch ( error ) {
172180 log . error (
0 commit comments