Problem
Running --help on any subcommand prints the global banner instead of help for that command. Noticed while testing the 0.17 CLI:
$ npx stash eql --help
CipherStash CLI v0.17.0
Usage: npx stash <command> [options]
... (the entire global banner) ...
Expected: help specific to eql (its subcommands / flags).
Root cause
run() in packages/cli/src/bin/main.ts checked flags.help before dispatching to a command, so --help always rendered the global HELP string — shadowing even the existing auth help.
Related: -h after a command (stash eql install -h) was silently ignored — parseArgs only recognised the long --help.
Fix
- Render
stash <command> --help from the command-descriptor registry (src/cli/registry.ts), the same source stash manifest uses.
- Leaf command → usage, summary, long description, flags, examples.
- Command group → subcommand listing pointing at each subcommand's own
--help.
- Honour
-h after a command.
- Slim the global banner (drop the now-redundant per-command flag sections).
This is the documented follow-on to the manifest/registry work in docs/plans/cli-help-and-manifest.md.
PR
#576
Problem
Running
--helpon any subcommand prints the global banner instead of help for that command. Noticed while testing the 0.17 CLI:Expected: help specific to
eql(its subcommands / flags).Root cause
run()inpackages/cli/src/bin/main.tscheckedflags.helpbefore dispatching to a command, so--helpalways rendered the globalHELPstring — shadowing even the existingauthhelp.Related:
-hafter a command (stash eql install -h) was silently ignored —parseArgsonly recognised the long--help.Fix
stash <command> --helpfrom the command-descriptor registry (src/cli/registry.ts), the same sourcestash manifestuses.--help.-hafter a command.This is the documented follow-on to the manifest/registry work in
docs/plans/cli-help-and-manifest.md.PR
#576