Required vs optional arguments are clear
Why it matters
deploy target env tells the user nothing about which argument is required, which is optional, or what the default is. They guess, hit an error, guess again, and eventually give up. Unclear argument signatures also break automated documentation and API-shaped wrappers that parse help output. When a missing required argument triggers a stack trace instead of Error: missing argument <target>, users interpret the tool as unstable and stop using it in CI.
Severity rationale
Medium because unclear arguments produce constant user friction and support load but rarely break production.
Remediation
Use angle brackets for required arguments and square brackets for optional ones in command signatures, and pass show_default=True (or equivalent) so defaults appear in --help. In src/cli/commands/deploy.ts:
program
.command('deploy <target> [environment]')
.description('Deploy to target (environment defaults to production)')
.option('-p, --port <number>', 'Port to use', '3000')
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the CLI Quality Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from cli-quality·automated