You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DX: Commands should be listed alphabetically in help #3784
Currently the commands are listed by the order of their definition. This leads to the commands being grouped by their defining plugins implicitly. IMO neither an alphabetic nor a plugin based order is right or wrong as both are discussable.
What if we'd add a sort option to the help command, with alphabetic being the default.
I wonder if there are any metrics on which are used the most? Plugins might make that awkward, but I'd rather order a more logical way than alphabetic.
I'm not sure that the plugin based ordering is immediately obvious to the greater chunk of the user base (mainly because they're unaware that plugins and commands are related until they've really dug in to the code). I've seen this a few times now watching new users of the framework explore the commands. Their comments are "hey, your commands are out of order"
What if we'd add a sort option to the help command, with alphabetic being the default.
I like this as being an option. Potentially it would be nice to have them displayed under plugin headers. This seems like a feature that power users would get the most use out of, specifically plugin authors and framework maintainers.
Maybe something to this effect?
Commands by plugin
AwsConfigCredentials
config credentials ............ Configures a new provider profile for the Serverless Framework
Config
config ........................ Configure Serverless
Create
create ........................ Create new Serverless service
Deploy
deploy ........................ Deploy a Serverless service
deploy function ............... Deploy a single function from the service
deploy list ................... List deployed version of your Serverless Service
deploy list functions ......... List all the deployed functions and their versions
Info
info .......................... Display information about the service
Install
install ....................... Install a Serverless service from GitHub
Invoke
invoke ........................ Invoke a deployed function
invoke local .................. Invoke function locally
Login
login ......................... Login or sign up for the Serverless Platform
logout ........................ Logout from the Serverless Platform
Logs
logs .......................... Output the logs of a deployed function
Metrics
metrics ....................... Show metrics for a specific function
Package
package ....................... Packages a Serverless service
Remove
remove ........................ Remove Serverless service and all resources
Rollback
rollback ...................... Rollback the Serverless service to a specific deployment
rollback function ............. Rollback the function to the previous version
SlStats
slstats ....................... Enable or disable stats
Reacted by Frank Schmid, Ryan H. Lewis and Philipp Muens
I wonder if there are any metrics on which are used the most? Plugins might make that awkward, but I'd rather order a more logical way than alphabetic.
@ryanmurakami any thoughts around more useful ways of ordering? I can't think of much else other than alphabetical and grouping by plugin.
I like the idea with the plugin headers, Looks very structured and explanatory to me. This would also reveal quickly which plugins are installed/active.
Also +1 for the headers. Only downside could be that most of our provider plugins are prefixed with the provider name. So e.g. AwsDeploy or AwsMetrics which could look a little bit ugly.
We could filter them before displaying so that only the "core" plugins are shown (e.g. Deploy instead of AwsDeploy). But this way we would run into the problem where options which are defined only on the provider plugins won't show up in the help screen.
Definitely smth. we should take a deeper dive into.
@pmuens A pragmatic solution for the names would be that every plugin gets a displayName property that is set to a human-readable name and used in the help screen instead of the class names.
@pmuens A pragmatic solution for the names would be that every plugin gets a displayName property that is set to a human-readable name and used in the help screen instead of the class names.
Activity
HyperBrain commentedon Jun 12, 2017
Currently the commands are listed by the order of their definition. This leads to the commands being grouped by their defining plugins implicitly. IMO neither an alphabetic nor a plugin based order is right or wrong as both are discussable.
What if we'd add a sort option to the help command, with alphabetic being the default.
ryanmurakami commentedon Jun 12, 2017
I wonder if there are any metrics on which are used the most? Plugins might make that awkward, but I'd rather order a more logical way than alphabetic.
brianneisler commentedon Jun 12, 2017
@HyperBrain good insights as usual 👍
I'm not sure that the plugin based ordering is immediately obvious to the greater chunk of the user base (mainly because they're unaware that plugins and commands are related until they've really dug in to the code). I've seen this a few times now watching new users of the framework explore the commands. Their comments are "hey, your commands are out of order"
I like this as being an option. Potentially it would be nice to have them displayed under plugin headers. This seems like a feature that power users would get the most use out of, specifically plugin authors and framework maintainers.
Maybe something to this effect?
brianneisler commentedon Jun 12, 2017
@ryanmurakami any thoughts around more useful ways of ordering? I can't think of much else other than alphabetical and grouping by plugin.
HyperBrain commentedon Jun 13, 2017
I like the idea with the plugin headers, Looks very structured and explanatory to me. This would also reveal quickly which plugins are installed/active.
ryanmurakami commentedon Jun 14, 2017
@brianneisler Yep, love what you did. Plugin ordering makes the a lot of sense.
pmuens commentedon Jun 14, 2017
Also +1 for the headers. Only downside could be that most of our provider plugins are prefixed with the provider name. So e.g.
AwsDeployorAwsMetricswhich could look a little bit ugly.We could filter them before displaying so that only the "core" plugins are shown (e.g.
Deployinstead ofAwsDeploy). But this way we would run into the problem where options which are defined only on the provider plugins won't show up in the help screen.Definitely smth. we should take a deeper dive into.
HyperBrain commentedon Jun 14, 2017
@pmuens A pragmatic solution for the names would be that every plugin gets a
displayNameproperty that is set to a human-readable name and used in the help screen instead of the class names.pmuens commentedon Jun 14, 2017
Thats sounds like a simple and good solution 👍
darkowlzz commentedon Jun 21, 2017
I would like to work on this, if no one else is already working on it 😊
pmuens commentedon Jun 21, 2017
Awesome @darkowlzz 👍 Thanks for offering help here.
Let us know if you need any assistance!