Skip to content

feat(cli): add help subcommand for command-specific help#507

Open
arielshad wants to merge 2 commits intomainfrom
feat/cli-help-command-8919e8
Open

feat(cli): add help subcommand for command-specific help#507
arielshad wants to merge 2 commits intomainfrom
feat/cli-help-command-8919e8

Conversation

@arielshad
Copy link
Copy Markdown
Contributor

Summary

  • Adds shep help [command] subcommand so users can get command-specific help (e.g., shep help version)
  • Previously, shep help <command> was treated as an unknown subcommand and returned an error
  • Configures Commander.js .addHelpCommand() to enable the built-in help subcommand alongside existing --help flags

Changes

  • src/presentation/cli/index.ts — Added .addHelpCommand('help [command]', 'Display help for a command') to the root Commander program
  • tests/e2e/cli/help.test.ts — Updated tests: shep help now returns success with usage info, and shep help version shows command-specific help instead of failing
  • specs/081-cli-help-command-8919e8/ — Feature specification and tracking YAML

Test plan

  • shep --help continues to display general help (existing behavior preserved)
  • shep help displays general help with usage info and available commands
  • shep help version displays version-specific help instead of erroring
  • shep version --help continues to work as before
  • All 5267 unit tests pass
  • All 579 integration tests pass
  • Build compiles without errors
  • Linter passes with zero warnings

Built with Shep 🐑 Shep Bot

arielshad and others added 2 commits April 1, 2026 17:50
Enable Commander's built-in help subcommand so that `shep help` shows
general help and `shep help <command>` shows command-specific help,
matching the convention of git, npm, and other popular CLIs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 1, 2026

Dev Release Published

Artifact Version Install
npm 1.162.0-pr507.849f7ce npm install -g @shepai/cli@1.162.0-pr507.849f7ce

Published from commit b021af8 | View CI

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