Help flag produces usage information for every command
Why it matters
A CLI without help text is a CLI no one can use. Users land on your tool via npx mytool or pip install, type --help out of reflex, and either see nothing or see a framework-default skeleton. They close the terminal and find a competitor. Missing descriptions also break shell autocomplete hints, man-page generation, and docs scrapers that harvest --help output. This is a user-experience failure severe enough to zero out adoption regardless of how good the underlying logic is.
Severity rationale
Critical because without `--help` output the CLI is effectively undiscoverable and unusable for any new user.
Remediation
Add a description to every .command(), cobra.Command, @cli.command(), or #[command] definition, and verify --help and -h produce usage text on the root command plus every subcommand. Ship descriptions in the same file the command is registered in — for example src/cli/commands/deploy.ts:
program
.command('deploy')
.description('Deploy the current project to production')
.action(deploy)
Detection
-
ID:
help-flag -
Severity:
critical -
What to look for: Count all commands and subcommands in the CLI. For each, check that
--helpand-hproduce usage information for the root command and every subcommand. In commander, verify.description()is set on every.command()call. In yargs, check that.describe()or.usage()is configured. In click/typer, verify docstrings exist on command functions. In cobra, checkShortandLongfields on everycobra.Command. In clap, verifyaboutorlong_abouton everyCommandor#[command(about = "...")]attribute. -
Pass criteria: Every registered command and subcommand has a description that will appear in
--helpoutput. The root command's--helplists all available subcommands. No command produces an empty or framework-default-only help screen — 100% of commands and subcommands must display help text when invoked with --help. Report the count: "X commands found, all Y respond to --help." -
Fail criteria: Any command is missing a description (will show blank in help output), or the root command does not list subcommands, or
--help/-his not wired up (manually overridden or disabled). -
Skip (N/A) when: All checks skip when no CLI entry point is detected. This specific check never skips otherwise — every CLI must have help text.
-
Cross-reference: The
subcommand-patterncheck verifies the command hierarchy that --help should document. -
Detail on fail:
"3 of 7 subcommands have no .description() set — 'deploy', 'rollback', 'config' will show blank help text"or"Root command help does not list available subcommands — only shows global flags" -
Remediation: Help text is how users discover your CLI's capabilities. Every command needs a description:
// commander (Node.js) program .command('deploy') .description('Deploy the current project to production') .option('-e, --env <environment>', 'Target environment', 'production') .action(deploy)# click (Python) @cli.command() @click.argument('target') def deploy(target): """Deploy the current project to the specified target.""" pass// cobra (Go) var deployCmd = &cobra.Command{ Use: "deploy [target]", Short: "Deploy the current project", Long: "Deploy the current project to the specified target environment.", RunE: runDeploy, }
Taxons
History
- 2026-04-18·v1.0.0·Initial import from cli-quality·automated