feat(output): add --no-hints flag to suppress advisory hints (#214)#226
Merged
Conversation
Narrow opt-out for the list-size advisory hint without the broader suppression of --quiet (which also kills the spinner and progress output). Adds --no-hints flag + JAMF_CLI_NO_HINTS env var. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
--quiet is overloaded: it suppresses the list-size advisory hint, the loading spinner, and progress output all at once. Users who only want the hint gone had no narrower option. Add --no-hints (and JAMF_CLI_NO_HINTS env) that suppresses advisory hints only, leaving the spinner and progress output intact. --quiet remains a strict superset; the two compose (hint off if either set). The env var is value-parsed via strconv.ParseBool (unlike NO_COLOR's presence semantics) so JAMF_CLI_NO_HINTS=0 correctly leaves hints on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
neilmartin83
previously approved these changes
May 31, 2026
Self-review follow-up. The suite proved the hint is suppressed but not that the spinner survives — the defining invariant of #214. Add TestShouldShowSpinner_IgnoresNoHints so a future change leaking noHints into shouldShowSpinner() is caught. Rename the misleadingly-named TestListHint_NoHintsKeepsSpinnerSemantics to TestListHint_NoHintsDoesNotImplyQuiet (it asserts quiet independence, not spinner behavior, which lives in the commands package). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
neilmartin83
approved these changes
May 31, 2026
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.
Problem
Closes #214.
--quietis overloaded. A single flag drives three independent suppression paths:hint: 73 results returned. Narrow with …)Loading…spinnerA user who only wants the hint gone has no choice but to also kill the spinner and all progress feedback. The issue requests a narrower opt-out.
Solution
Add a
--no-hintsflag and aJAMF_CLI_NO_HINTSenv var that suppress advisory hints only, leaving the spinner and progress output intact.--no-hints/JAMF_CLI_NO_HINTS=1--quiet/-q--quietis unchanged and remains a strict superset; the two compose (the hint is suppressed if either is set). This keeps the documented CI patternJAMF_CLI_ARGS='--quiet --no-input'working — no behavior change for existing users.The hint is emitted inside the
Formatter, so this is wired once (one field + one global flag) and applies to every command; no per-command edits.Env-var semantics
JAMF_CLI_NO_HINTSis value-parsed viastrconv.ParseBool, not presence-based likeNO_COLOR. SoJAMF_CLI_NO_HINTS=0/=falsecorrectly leaves hints on, avoiding the well-knownNO_COLOR=0-still-disables footgun for a Jamf-owned variable.Changes
internal/output/output.go—noHintsfield,SetNoHintssetter, gate inmaybePrintListHintinternal/commands/root.go—noHintsglobal,--no-hintsflag,JAMF_CLI_NO_HINTSparse, formatter wiring,Longhelp lineCLAUDE.md— convention note beside the existingNO_COLORentrydocs/superpowers/specs/2026-05-30-no-hints-flag-design.md— design specTesting
Built test-first (RED watched to fail for both the formatter gate and the env wiring before implementing).
internal/output/list_hint_test.go—--no-hintssuppresses the hint; regression guard that it does not flipquietinternal/commands/root_test.go— table test thatJAMF_CLI_NO_HINTStruthy values enable and0/false/empty/garbage leave hints onmake test: full suite passes (0 failures) ·make lint: 0 issues ·make build: ok--no-hintsandJAMF_CLI_NO_HINTSsurface in--help, and thatshouldShowSpinner()does not referencenoHints(spinner provably untouched)🤖 Generated with Claude Code