Skip to content

Generate CLI help with argsclopts layout and wrapping - #271

Merged
bcomnes merged 3 commits into
masterfrom
feat/argsclopts-help
Nov 19, 2026
Merged

bcomnes merged 3 commits into
masterfrom
feat/argsclopts-help

Conversation

@bcomnes

@bcomnes bcomnes commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Generate option help from shared, command-specific metadata using argsclopts.
  • Use usage(options, { lineWidth: 79, descriptionColumn: 27 }) instead of maintaining local wrapping and spacing workarounds.
  • Preserve the original custom argument parser exactly.
  • Document color-mode settings and retain usage examples and stream-based help output.
  • Add 32 parser/help regression tests, including width and continuation-alignment assertions.

Upstream release dependency

Requires argsclopts 1.1.1.

The upstream release target changed from 1.1.0 to 1.1.1 following a release-automation issue.
The dependency now requires argsclopts@^1.1.1.

At the latest validation attempt, npm view argsclopts@1.1.1 version still returned E404.
Keep this PR in draft until the package is available, then install it, rerun validation, and mark the PR ready.
There are no saved local-path dependencies or lockfile changes.

Validation

  • Full npm test previously passed against a temporary installation of the local unpublished argsclopts implementation, including lint and type checks.
  • All 32 focused parser/help tests previously passed.
  • git diff --check passed for the dependency-floor update.
  • Validation against the published 1.1.1 package is pending registry availability.

@bcomnes
bcomnes marked this pull request as ready for review November 19, 2026 01:34
@bcomnes
bcomnes requested a balanced review from Copilot November 19, 2026 01:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The required argsclopts 1.1.1 release returned E404, leaving validation dependent on an unpublished local implementation until a human confirms availability and tests the published package.

No open issues 🎉

What changed in this PR

Replaces hand-maintained CLI option help with shared metadata and argsclopts formatting, while leaving the custom argument parser unchanged.

Changes:

  • Generates command-specific option lists with 79-column wrapping and aligned descriptions.
  • Documents color modes, preserves examples and stream-based output, and updates repository links.
  • Adds 32 parser/help regression tests and requires argsclopts@^1.1.1; validation against the published package remains pending per the PR description.
File Description
test/​parse-cli-args.js Adds regression coverage for existing parser behavior.
test/​cli-help.js Tests help content, wrapping, alignment, and entrypoint precedence.
package.json Adds the argsclopts dependency.
bin/​run-s/​help.js Uses shared sequential-command help and updates the repository link.
bin/​run-p/​help.js Uses shared parallel-command help and updates the repository link.
bin/​npm-run-all/​help.js Uses shared help, adds a shorthand example, and updates the repository link.
bin/​common/​help.js Filters options by command and configures help layout.
bin/​common/​help-options.js Defines shared option metadata and descriptions.

Review effort: Balanced

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Maintainer confirmation is needed because argsclopts 1.1.1 reportedly returns a registry E404, and validation used a temporary local implementation rather than the required published package.

No open issues 🎉

Review effort: Balanced

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