Skip to content

stash CLI: --help shows global banner instead of per-command help #577

Description

@coderdan

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

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

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