Skip to content

feat(cli): add Alloy app to create menu#14387

Merged
cb1kenobi merged 15 commits intomainfrom
cliAlloy
Feb 19, 2026
Merged

feat(cli): add Alloy app to create menu#14387
cb1kenobi merged 15 commits intomainfrom
cliAlloy

Conversation

@m1ga
Copy link
Contributor

@m1ga m1ga commented Jan 28, 2026

fixes #14386

Add an option to create an Alloy app into the create menu:

Bildschirmfoto_20260128_155300

Notes
I've added a new type app_alloy to have it in the menu. As soon as it's selected I'll store isAlloy to run the alloy command at the end and set the type back to app so it will use the same flow as before. In order to have less duplicated code I've created a base_app file and include that in app_alloy and app.

Test:

  • ti create
  • select 1 or 2
  • check the project at the end

@m1ga m1ga requested a review from cb1kenobi January 28, 2026 14:58
@m1ga m1ga marked this pull request as draft January 28, 2026 15:08
@m1ga m1ga marked this pull request as ready for review January 28, 2026 15:18
@cb1kenobi cb1kenobi mentioned this pull request Jan 29, 2026
1 task
m1ga and others added 3 commits February 18, 2026 21:14
Co-authored-by: Chris Barber <chris@cb1inc.com>
Co-authored-by: Chris Barber <chris@cb1inc.com>

if (cli.argv.alloy !== undefined) {
execSync(`alloy new "${path.join(cli.argv['workspace-dir'], cli.argv.name)}"`, { stdio: 'inherit' });
if (cli.argv.alloy !== undefined || useAlloy) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be moved before the "Project created successfully".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bildschirmfoto_20260219_161500

vs

Bildschirmfoto_20260219_161615

Not sure if we should end with the error message or not. I see the argument that in the first one it will be more visible that the project is created.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think what I am trying to suggest is we have multiple sad paths and one happy path.

  • If the create fails
    • then show error
    • exit w/ code 1
  • If useAlloy
    • run alloy new
    • if error
      • show error
      • exit w/ code 1
  • show success message

Copy link
Contributor Author

@m1ga m1ga Feb 19, 2026

Choose a reason for hiding this comment

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

trying to move it above the message "Project created successfully" but I'm having troubles with github at the moment 😞

update: looks like it worked, guess it was some caching.

Copy link
Contributor

Choose a reason for hiding this comment

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

I was thinking we should process.exit(1), but now I'm wondering we should throw and let the CLI catch it and exit w/ code 1.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've pushed an update that will show the Project created successfully message ONLY if it's really created.

So: ti create --alloy without Alloy installed will now just show the ERROR message as you wanted to have an Alloy project and it's not "successful".
All other cases (alloy installed or creating a classic project) will show Project created successfully at the end.

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

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

This is perfect! Thanks for the back and forth!

@cb1kenobi cb1kenobi merged commit 3016623 into main Feb 19, 2026
7 checks passed
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.

ti create: alloy by default?

2 participants

Comments