Make CLI help easier to scan - #274
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Reorganizes CLI help for faster scanning while preserving command behavior.
Changes:
- Groups commands by common workflows.
- Adds four cross-cutting help topics and completion.
- Expands documentation and automated help checks.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
README.md |
Documents help discovery and references. |
internal/cmd/root.go |
Registers topics and bypasses runtime hooks for help. |
internal/cmd/help.go |
Implements grouped rendering and completion. |
internal/cmd/help_topics.go |
Defines cross-cutting reference content. |
internal/cmd/help_test.go |
Tests rendering, discovery, lifecycle, and usage forms. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the top-level help faster to scan by putting frequent email workflows first, separating specialized commands into task-oriented groups, and adding references for cross-cutting CLI behavior. Existing commands, flags, output behavior, and the executable command catalog remain compatible.
Review readiness: ✅ Yes
Risk: 🟢 Low — this changes help presentation and adds non-runnable help topics without changing command execution.
Decision: None
✅ Change — common email commands lead and detailed references remain discoverable
Before
After
Runnable commands that also own subcommands now show both valid usage forms. Help references bypass runtime configuration, account selection, network access, credential migration, and skill refresh; shell completion includes both commands and help topics after
hey help.✅ Evidence — automated checks and the complete rendered help flow pass
GOWORK=off make check— unit tests, formatting, lint, surface compatibility, and repository checks passed.GOWORK=off make build— built./bin/heyfor local review.✅ Scope — help discovery changes; executable behavior remains compatible
Included: root command grouping and ordering, concise root-only flag descriptions, four Cobra additional-help topics, broader examples, dual usage lines for runnable parents, safe help execution, completion, tests, and README reference documentation.
Preserved: every existing command and flag, detailed inherited flag descriptions,
hey commandsoutput,.surface, output formats, authentication, account behavior, and TUI behavior.Non-goal: renaming singular/plural command pairs or introducing a new noun-first command hierarchy.
➖ Delivery — no rollout, migration, configuration, or cleanup work
The change ships with the CLI binary. Rollback is a normal code revert; no data or external resources are involved.
✅ Review decision — no unresolved decision; focus on hierarchy and reference wording
Please confirm that the CORE COMMANDS order reflects the normal email workflow and that the four help topics describe the existing behavior at the right level of detail.
✅ Review path — start with the command hierarchy, then references and proof
internal/cmd/help.go— root hierarchy, concise flag summaries, completion, and rendering.internal/cmd/help_topics.go— the four user-facing references.internal/cmd/help_test.go— behavior and compatibility proof.internal/cmd/root.goandREADME.md— registration, safe lifecycle, and documentation.Origin and supporting links: Basecamp card
Summary by cubic
Makes root CLI help easier to scan by promoting frequent email workflows, grouping specialized commands, adding
helptopics with completion, and shortening global flag descriptions. Previously, help mixed interactive and 34 email commands with long flag text; now CORE COMMANDS lead, task groups follow, reference topics are discoverable, and command execution is unchanged.Review
-his shown for--help.helptopics (output, exit-codes, environment, linked-accounts) render as references, are excluded fromhey commands, and appear inhey helpcompletion alongside commands; exit-codes clarifies operational failure statuses.Rollout
Written for commit bfbb4a7. Summary will update on new commits.