aurelia / cli

The Aurelia 1 command line tool. Use the CLI to create projects, scaffold components, and bundle your app for release.
MIT License
407 stars 133 forks source link

Usability issues (behave like normal CLI applications please) #849

Closed JoakimSoderberg closed 6 years ago

JoakimSoderberg commented 6 years ago

I'm submitting a feature request

The usability of the cli is really bad. Some extremly annoying behavior that is not common for cli-applications (at least not outside the Javascript world):

JeroenVinke commented 6 years ago

I agree with everything except the context-aware help command. au new is only relevant when you're not inside a project directory. It's not useful to show au build outside of a project directory, or to show au jest as an option when your project is not setup for jest.

JoakimSoderberg commented 6 years ago

Well if that is important, then at least provide a full_help so I can see everything available like in normal command line applications.

But most important I guess is not to have a bug where all you see is new in an existing project directory.

JeroenVinke commented 6 years ago

Yep i'll have a look what's causing that.

JoakimSoderberg commented 6 years ago

Ok thanks.

I have a use case for the help stuff, which I use quite often.

Say I have a console window open, I'm inside of a project directory and I'm using au... ok now I want to read the help, but I don't want to spam my backlog by repeatedly running au help (especially not when it does clear like today).

Instead I quickly open a second console window and type au help ... oh right, now I'm not in a project dir so all I get is new shown in the help.

Extremly annoying.... So then I have to cd into some project. This is not how any other cli-app works, and au shouldn't either.

JeroenVinke commented 6 years ago

Thanks for the description of the use case. I'm trying to see how that would work in practice, you'd see commands that you're not going to be able to use for your project (and you end up with a pretty large output too). It would be kind of misleading for the CLI to tell you that you can run au karma while Karma hasn't been setup, or that you could run au karma from outside a project dir.

In addition, the Aurelia CLI allows you to create your own au <something> commands by adding a gulp task to the aurelia_project/tasks folder of your project. Those commands then show up in au help, but would be missing from the complete list of available commands that we're discussing.

avrahamcool commented 6 years ago

maybe au help --full? the list will be pretty big, but maybe it can be braked down to section regarding the context in witch you can potentially run au? it's a bit clunky..