Skip to content

CLI: Remove help --verbose option and improve general help output #8497

@medikoo

Description

@medikoo

Use case description

Currently sls --help --verbose simply outputs CLI commands grouped by plugins.

Where plugins are also internal plugins, which resemble characteristcs of internal implementation which should not be interesting in anyway for regular users.

If read properly in an issue with which it was introduced, it seemed helpful for Framework contributors back then, when Framework was frequently extended with new command.

I doubt there's a value for it now (but ofc that's open for discussion).

I believe that all commands that come with Framework (and dashboard plugin) should be listed as they're listed now in regular help. While all commands as introduced by external plugins could be listed as they are when w use --verbose mode.

And that could all be covered under regular --help, making --verbose option obsolete

Proposed solution

  1. In lib/classes/PluginManager.js ensure that commands coming from external commands are recognizable:
  1. In context of cli.generateMainHelp() ensure to not list external plugin commands in main listing, but instead (if there are any external plugins) add "Commands by plugin" section below "Plugins" and list all those commands there in same manner as they're displayed now with --verbose option.
  2. In "Plugins" section do not list internal plugins. If there are no external plugin, do not present this section at all.

As we're simply affecting CLI help output, I think it's ok to not consider this change as breaking, it has no influence for deployment or any application setup/processing process.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions