Skip to content

[BUG] Unknown command has no 'Did you mean...?' recovery hint #269

@ottovlotto

Description

@ottovlotto

Severity: UX friction (P2)
Reported by: DevEx Audit External
Source: DevEx Audit (External), 3 June 2026

Symptom

Unknown command has no recovery hint
Severity: UX friction
Location: src/index.ts — Commander configuration

Actual output:
error: unknown command 'doesnotexist'

Repro: playground doesnotexist

Fix (one-liner): Add program.suggestAfterError(true) to the Commander instance in src/index.ts — this adds "Did you mean...?" suggestions for close matches. Also add:
program.addHelpText('afterError', "\nRun 'playground --help' for usage.");

Reproduction

playground doesnotexist

Observe terse error: unknown command 'doesnotexist' with no recovery hint.

Recommended fix / next steps

Per auditor's one-liner fix in src/index.ts:

program.suggestAfterError(true);
program.addHelpText('afterError', "\nRun 'playground --help' for usage.");

This gives users "Did you mean..." suggestions for close-match typos plus a help pointer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions