quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.56k stars 2.63k forks source link

quarkus to rule them all (CLI) #42243

Open ia3andy opened 1 month ago

ia3andy commented 1 month ago

Description

It would be nice for the quarkus base command (without any given command) to:

Implementation ideas

No response

quarkus-bot[bot] commented 1 month ago

/cc @ebullient (cli), @maxandersen (cli)

maxandersen commented 1 month ago

not a fan.

quarkus dev mvn quarkus:dev gradle quarkusDev

consistency is good.

and opposite all of the above quarkus is able to provide more which noone will see if quarkus defaults to run your app.

maxandersen commented 1 month ago

on the idea of opening a interactive shell. I honestly hate those shells/apps that does it because you end up being stuck as a newbie.

i.e. python standalone - boom - stuck. no help/guidance what so ever.

ia3andy commented 1 month ago

@maxandersen we would keep quarkus dev, this is just a shortcut. TBH I am not sure I get your point about consistency.

I also don't get your point about being stuck? When you run quarkus outside of a project, you most probably want to create a new project (or get info on the commands)..

When you run quarkus in a existing project you most probably want to start working on it.. and we could even make it visible that it just calls quarkus dev..

I think it's quite the opposite for newbies, it gives you a directed road to Quarkus joy..

gsmet commented 1 month ago

I don't think it's a good idea.

Use an alias if you need one, that's what they are for. But a command should have an intent. Starting a server while you might just want to get the help is not a good idea.

ia3andy commented 1 month ago

I don't think it's a good idea.

Use an alias if you need one, that's what they are for.

This is for the user xp (not for me) that I think it would be good. So an alias wouldn't help..

But a command should have an intent. Starting a server while you might just want to get the help is not a good idea.

This could be a choice, e.g when running in a Quarkus project:

$ quarkus
Welcome on Quarkus, it seems you are looking to start experimenting the ultimate dev joy!

If you already have a project go into it and run `quarkus dev`.

[] print command help
[*] create a new Quarkus project

Let's create you new Quarkus project, do you want to customize it?
[*] just create a starter Rest app
[] I want my own setup

... codestart stuff

Now cd into your new app `cd code-with-quarkus` and run it with `quarkus dev`

$ cd code-with-quarkus
$ quarkus
It's the first time you run Quarkus, what do you want?
[*] alway start dev mode when I run quarkus command in a project 
[] start dev mode (but keep asking)
[] show quarkus command help

I believe this is a good starting user xp 👆

ebullient commented 1 month ago

I'm not a fan either. I use quarkus ... in multi-module projects. dev mode fails here (because it's in the parent). If that were the default, it would be bad.

If I were to pick a default, it would be build not dev.

ebullient commented 1 month ago

I don't think it's a good idea. Use an alias if you need one, that's what they are for.

This is for the user xp (not for me) that I think it would be good. So an alias wouldn't help..

But a command should have an intent. Starting a server while you might just want to get the help is not a good idea.

This could be a choice, e.g when running in a Quarkus project:

$ quarkus
Welcome on Quarkus, it seems you are looking to start experimenting the ultimate dev joy!

If you already have a project go into it and run `quarkus dev`.

[] print command help
[*] create a new Quarkus project

Let's create you new Quarkus project, do you want to customize it?
[*] just create a starter Rest app
[] I want my own setup

... codestart stuff

Now cd into your new app `cd code-with-quarkus` and run it with `quarkus dev`

$ cd code-with-quarkus
$ quarkus
It's the first time you run Quarkus, what do you want?
[*] alway start dev mode when I run quarkus command in a project 
[] start dev mode (but keep asking)
[] show quarkus command help

I believe this is a good starting user xp 👆

I don't think it is. It's a lot of complexity to add for subjective gain.

I agree with Max. Use aliases if you want shortcuts.

If we want to streamline the message emitted when the cli is used without a selected action, then we can do that. Make that shorter with the most used actions, and then show detailed actions with help.

maxandersen commented 1 month ago

@ebullient's point of how defaulting to quarkus dev will be a issue in multimodule builds is definitely another -1.

+1 on erin's comment on making the default help screen more descriptive/simpler if we want to simplify the default run.

ia3andy commented 1 month ago

I actually thought we should have a way to deal with multi-module project when running quarkus dev

maxandersen commented 1 month ago

@ia3andy deal how ? you can't know which module is the right one to run.

aloubyansky commented 1 month ago

It's possible to identify a quarkus app in a multi module project. But there could be more than one.

Besides that, also -1 on the idea. I'd rather default to (basic) help.