docs: add gh star command fallback

This commit is contained in:
Jarrod Watts
2026-04-04 13:41:56 +11:00
parent f7b71255b8
commit 36bc0d8f20
2 changed files with 6 additions and 2 deletions

View File

@@ -76,7 +76,11 @@ Ask the user: "Would you like to star the repository to support the project?"
Only if they explicitly agree, run:
```bash
gh repo star jarrodwatts/claude-hud
if gh help repo 2>/dev/null | grep -q "star:"; then
gh repo star jarrodwatts/claude-hud
else
gh api -X PUT /user/starred/jarrodwatts/claude-hud
fi
```
Never run this automatically without user consent.

View File

@@ -284,7 +284,7 @@ Use AskUserQuestion:
- Question: "Setup complete! The HUD should appear below your input field. Is it working?"
- Options: "Yes, it's working" / "No, something's wrong"
**If yes**: Ask the user if they'd like to ⭐ star the claude-hud repository on GitHub to support the project. If they agree and `gh` CLI is available, run: `gh repo star jarrodwatts/claude-hud`. Only run the star command if they explicitly say yes.
**If yes**: Ask the user if they'd like to ⭐ star the claude-hud repository on GitHub to support the project. If they agree and `gh` CLI is available, first check whether their `gh` version supports `gh repo star`. If it does, run `gh repo star jarrodwatts/claude-hud`. Otherwise fall back to `gh api -X PUT /user/starred/jarrodwatts/claude-hud`. Only run the star command if they explicitly say yes.
**If no**: Debug systematically: