From 32481547687fc90f3ed446680fcbc152e812bf8a Mon Sep 17 00:00:00 2001 From: Aditya-vegi Date: Wed, 25 Mar 2026 12:19:07 +0530 Subject: [PATCH 1/2] Add app type selection prompt to create command --- src/commands/create.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/commands/create.ts b/src/commands/create.ts index 79525ac..aa655c4 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -43,6 +43,14 @@ export default class Create extends Command { this.log('We need some information first:'); this.log(''); + const appType = await cli.prompt( + chalk.bold(' App Type (chatbot/integration)'), + { default: 'chatbot' } + ); + + this.log(`Selected App Type: ${chalk.green(appType)}`); + this.log(''); + const { flags } = this.parse(Create); info.name = flags.name ? flags.name : await cli.prompt(chalk.bold(' App Name')); info.nameSlug = VariousUtils.slugify(info.name); From 42979ea2adf1f277a14e0ecba0661654467b4c1b Mon Sep 17 00:00:00 2001 From: Aditya-vegi Date: Wed, 25 Mar 2026 15:34:14 +0530 Subject: [PATCH 2/2] Add template flag to create command --- src/commands/create.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/commands/create.ts b/src/commands/create.ts index aa655c4..6fed433 100644 --- a/src/commands/create.ts +++ b/src/commands/create.ts @@ -23,6 +23,8 @@ export default class Create extends Command { author: flags.string({char: 'a', description: 'Author\'s name'}), homepage: flags.string({char: 'H', description: 'Author\'s or app\'s home page'}), support: flags.string({char: 's', description: 'URL or email address to get support for the app'}), + type: flags.string({char: 't', description: 'App type (chatbot/integration)'}), + category: flags.string({char: 'c', description: 'App category (chatbot/integration/other)'}), }; public async run() { @@ -46,12 +48,20 @@ export default class Create extends Command { const appType = await cli.prompt( chalk.bold(' App Type (chatbot/integration)'), { default: 'chatbot' } - ); + ).then((input: string) => input.toLowerCase()); this.log(`Selected App Type: ${chalk.green(appType)}`); this.log(''); - const { flags } = this.parse(Create); + const appCategory = flags.category ? flags.category.toLowerCase() : await cli.prompt( + chalk.bold(' App Category (chatbot/integration/other)'), + { default: 'other' } + ).then((input: string) => input.toLowerCase()); + + this.log(`Selected Category: ${chalk.green(appCategory)}`); + this.log(''); + + this.log(chalk.gray('(Use lowercase letters, numbers, and hyphens only, e.g., my-app)')); info.name = flags.name ? flags.name : await cli.prompt(chalk.bold(' App Name')); info.nameSlug = VariousUtils.slugify(info.name); info.classFile = `${ pascalCase(info.name) }App.ts`;