Skip to content

refactor(cli): remove auto-generated help subcommand from all subcommands#200

Merged
donbeave merged 2 commits intomainfrom
jackin/scratch/jackin-the-architect
May 1, 2026
Merged

refactor(cli): remove auto-generated help subcommand from all subcommands#200
donbeave merged 2 commits intomainfrom
jackin/scratch/jackin-the-architect

Conversation

@donbeave
Copy link
Copy Markdown
Member

@donbeave donbeave commented May 1, 2026

Summary

  • Adds disable_help_subcommand = true to every clap variant that carries a nested Subcommand, removing the redundant help entry from all command listings
  • Affects root Cli, Command::Workspace, Command::Config, all four ConfigCommand variants (Mount, Trust, Auth, Env), and WorkspaceCommand::Env
  • The -h/--help flags are untouched and all 83 CLI tests pass
  • Adds 6 negative tests: help-text absence checks (root, config, workspace) and parse-rejection checks (config auth help, config mount help, workspace help)

Test plan

  • jackin config auth no longer lists help under Commands
  • jackin config no longer lists help under Commands
  • jackin workspace no longer lists help under Commands
  • jackin config auth --help and jackin config auth -h still work
  • cargo test --lib cli:: passes (83 tests)

🤖 Generated with Claude Code

@donbeave donbeave force-pushed the jackin/scratch/jackin-the-architect branch from 98d8286 to 1860fe6 Compare May 1, 2026 12:51
…ands

Use `disable_help_subcommand = true` on every subcommand-bearing clap
variant so the redundant `help` subcommand no longer appears in usage
listings. The `-h`/`--help` flags remain fully functional.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@donbeave donbeave force-pushed the jackin/scratch/jackin-the-architect branch from 1860fe6 to d91f2b4 Compare May 1, 2026 12:56
Add help-text absence checks for root, config, and workspace, plus
parse-rejection tests (InvalidSubcommand) for config auth, config
mount, and workspace so a stale disable_help_subcommand annotation
or a new unguarded subcommand can't slip through undetected.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Alexey Zhokhov <alexey@zhokhov.com>
@donbeave donbeave force-pushed the jackin/scratch/jackin-the-architect branch from d91f2b4 to 8e30dd5 Compare May 1, 2026 13:13
@donbeave donbeave merged commit 1632c55 into main May 1, 2026
6 checks passed
@donbeave donbeave deleted the jackin/scratch/jackin-the-architect branch May 1, 2026 14:46
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