Skip to content

Use Commander for CLI parsing and hierarchical help - #7

Merged
gersham merged 6 commits into
mainfrom
fix/cli-hierarchical-help-20260910
Sep 10, 2026
Merged

gersham merged 6 commits into
mainfrom
fix/cli-hierarchical-help-20260910

Conversation

@nxtman123

@nxtman123 nxtman123 commented Sep 10, 2026 •

Copy link
Copy Markdown
Collaborator

Replace the handwritten parser and help renderer with Commander 14. Root help lists command groups; nested help exposes each action, its arguments, required options, and global options. Human and JSON help come from the same command tree, and --version returns version information.

Commander enforces command scope, positional arity, required options, and conflicting options before handlers run. The adapter preserves existing JSON error envelopes, exit codes, aliases, explicit no-* flags, and secret-safe diagnostics. Existing business handlers remain unchanged. Commander 14 preserves the Node 20.11 minimum.

Command-specific options must follow the full command path; global options can appear before or after it. Values starting with a dash use --option=VALUE, and option-like filenames follow --. README documents these conventions.

Validation:

  • Clean npm install, public check, vendor integrity and source drift, typecheck, lint, and diff check passed.
  • Full local suite: 566 passed, five existing compositor failures due to missing Liberation fonts, one skipped. CI installs the fonts and runs the full suite.
  • Mock smoke, npm pack dry run, release artifact verification, and clean npm install smoke passed. Release includes all 19 exact runtime dependencies.
  • Added coverage for nested discovery, required-option metadata, strict parsing, negated options, interspersed globals, dash-prefixed values, and secret-safe error envelopes.

Live-server, plugin, and Player validation were not run; no contracts or vendored snapshots changed.

@nxtman123 nxtman123 changed the title Add focused command subtree help and fix version aliases Use Commander for CLI parsing and hierarchical help Sep 10, 2026
@gersham
gersham merged commit 90980a9 into main Sep 10, 2026
6 checks passed
@gersham
gersham deleted the fix/cli-hierarchical-help-20260910 branch September 10, 2026 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants