Skip to content

Add --help/-h to openspec-ui-cli - #90

Merged
VeryComplexAndLongName merged 1 commit into
mainfrom
feat/cli-help-flag
Aug 26, 2026
Merged

Add --help/-h to openspec-ui-cli#90
VeryComplexAndLongName merged 1 commit into
mainfrom
feat/cli-help-flag

Conversation

@VeryComplexAndLongName

Copy link
Copy Markdown
Owner

Summary

  • The first real npm publish attempt of @openspec-ui/cli surfaced a real gap: openspec-ui-cli --help printed only unknown command '--help', with no usage text — options (--cwd, --format) were documented only in the README, not discoverable from the CLI itself.
  • Add a USAGE string and --help/-h handling: prints to stdout, exits 0.
  • Also print usage alongside the existing argument-parsing and unknown-command error messages.
  • Update packages/cli/README.md.
  • Versioned via a changeset: @openspec-ui/cli 0.1.1 -> 0.1.2 (patch).

Test plan

  • New tests in main.test.ts: --help/-h print usage and exit 0; unknown-command errors still exit 2 and now also print usage as a second stderr line
  • npm run typecheck, npm run lint (including lint:english), npm run test workspace-wide
  • Rebuilt (npm run build --workspace @openspec-ui/cli) and smoke-tested node packages/cli/dist/cli.js --help directly
  • openspec change validate --strict add-cli-help-flag

🤖 Generated with Claude Code

The first real npm publish attempt of @openspec-ui/cli surfaced a real
gap: running `openspec-ui-cli --help` gave "unknown command '--help'"
instead of any usage text, and the options (--cwd, --format) were only
documented in the README, not discoverable from the CLI itself. --help/
-h now prints usage and exits 0; usage is also printed alongside
argument-parsing and unknown-command errors.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@VeryComplexAndLongName
VeryComplexAndLongName merged commit b1e3477 into main Aug 26, 2026
6 checks passed
@VeryComplexAndLongName
VeryComplexAndLongName deleted the feat/cli-help-flag branch August 26, 2026 11:24
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.

1 participant