8000 feat: add template selection for create-app command by michaelmagan · Pull Request #411 · tambo-ai/tambo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add template selection for create-app command #411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 13, 2025

Conversation

michaelmagan
Copy link
Collaborator

No description provided.

@charliecreates charliecreates bot requested a review from CharlieHelps May 13, 2025 00:53
Copy link
vercel bot commented May 13, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
showcase ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 13, 2025 9:35pm

Copy link
@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The interactive prompt default value isn’t one of the valid template keys, causing an undefined selection. Errors thrown during template validation occur outside your catch block, leading to unhandled exceptions. The manual .git folder removal duplicates existing helper logic instead of reusing safeRemoveGitFolder.

Additional notes (1)
  • Readability | cli/src/commands/create-app.ts:190-190
    You're duplicating .git folder validation and removal logic instead of using the existing safeRemoveGitFolder helper declared above, leading to scattered validation code. Consolidate by calling the helper.
Summary of changes

Summary of Changes

  • CLI Updates

    • Added a --template, -t <name> flag to CLIFlags in cli/src/cli.ts.
    • Updated the usage, commands, and examples sections to include the new create-app template flag.
    • Passed the template flag through to handleCreateApp invocation.
  • Template Selection in create-app

    • Imported inquirer and defined a new Template interface and templates map in cli/src/commands/create-app.ts.
    • Introduced non-interactive (via --template) and interactive (via inquirer.prompt) flows to select a project template.
    • Updated the git clone command and spinners to use the selected template’s repository URL.
    • Enhanced post-clone messages to report the chosen template.

@charliecreates charliecreates bot removed the request for review from CharlieHelps May 13, 2025 00:56
@akhileshrangani4 akhileshrangani4 merged commit 1e75289 into main May 13, 2025
7 checks passed
@akhileshrangani4 akhileshrangani4 deleted the magan/cli-templates branch May 13, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0