Skip to content

commands help text#88

Open
skarim wants to merge 4 commits into
mainfrom
skarim/help-text
Open

commands help text#88
skarim wants to merge 4 commits into
mainfrom
skarim/help-text

Conversation

@skarim
Copy link
Copy Markdown
Collaborator

@skarim skarim commented May 14, 2026

Improve CLI help text and command discoverability

Add Long descriptions and Example blocks to every command, group commands into categories in root help, and add a "Learn More" footer with docs/feedback links.

Changes

  • Root command (cmd/root.go): Rewrite Long description to explain stacked PRs, add 4-step workflow Example, organize commands into groups (Core, Stack Management, Navigation, Other) using cobra.Group, add "Learn More" footer linking to docs and feedback
  • All commands: Add Example blocks with commented, real-world usage and Long descriptions where missing (push, view, submit, switch, unstack, navigation commands, alias, feedback)
  • Post-command hints: Add contextual "what to do next" hints after add, push, submit, and checkout
  • CLI reference docs: Update to match new command descriptions

Stack created with GitHub Stacks CLIGive Feedback 💬

@skarim skarim marked this pull request as ready for review May 14, 2026 22:12
Copilot AI review requested due to automatic review settings May 14, 2026 22:12
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves CLI discoverability by adding Long descriptions and Example blocks to every gh stack command, organizes the root help into command groups via cobra.Group, appends a "Learn more" footer with docs/feedback links to the root help output, adds contextual next-step hints after push and checkout, and updates the CLI reference docs (re-orders the unstack and switch sections).

Changes:

  • Add Long/Example blocks across all command files and group commands in cmd/root.go with a custom HelpFunc that prints a "Learn more" footer.
  • Add post-command hints (push → "view your stack of PRs", checkout → "see the full stack").
  • Re-order the CLI reference docs to match the new help groupings, and add a TestRootCmd_HelpOutput test.
Show a summary per file
File Description
cmd/root.go Rewrite root Long/Example, add command groups, register subcommands with GroupIDs, add Learn-more help footer.
cmd/root_test.go Add help output test verifying group titles and footer links.
cmd/add.go Add Example block.
cmd/alias.go Add Example block.
cmd/checkout.go Add Example block and post-checkout hint pointing to gh stack view.
cmd/feedback.go Add Example block.
cmd/link.go Add Example block.
cmd/modify.go Add Example block; reformat indentation of an existing Printf.
cmd/navigate.go Add Long/Example for up/down/top/bottom.
cmd/push.go Add Long/Example and post-push hint when all branches have PRs.
cmd/rebase.go Add Example block covering downstack/upstack/continue/abort.
cmd/submit.go Add Long/Example.
cmd/switch.go Reformat Long and add Example.
cmd/unstack.go Add Example block.
cmd/view.go Add Long/Example (contains "JSO" typo).
docs/src/content/docs/reference/cli.md Move unstack under Stack Operations and switch under Navigation to match grouping.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 16/16 changed files
  • Comments generated: 1

Comment thread cmd/view.go Outdated
skarim and others added 3 commits May 14, 2026 18:55
@skarim skarim force-pushed the skarim/help-text branch from 5882b7d to 9d6e3b7 Compare May 14, 2026 22:55
Copy link
Copy Markdown

@ktravers ktravers left a comment

Choose a reason for hiding this comment

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

Incredibly helpful, thanks for adding all of this ✨ 🚀

I also didn't realize all of the functionality we'd packed into the gh-stack CLI -- lotta great stuff in here I'm going to start using!

Comment thread cmd/add.go Outdated
Comment thread cmd/add.go Outdated
Co-authored-by: Sameen Karim <[email protected]>
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.

3 participants