feat(cli): add optional GitHub token support and actionable rate-limit guidance#186
feat(cli): add optional GitHub token support and actionable rate-limit guidance#186cauyxy wants to merge 2 commits intonextlevelbuilder:mainfrom
Conversation
…-max Support optional GitHub token and improve rate-limit handling for CLI and utils
accesspath27-lgtm
left a comment
There was a problem hiding this comment.
Review: feat(cli): add optional GitHub token support and rate-limit guidance
Solid PR — clean implementation with good factoring (resolveGitHubToken(), createGitHubHeaders(), getGitHubTokenGuidance()). Backward compatible, everything optional.
Minor notes:
--tokenoninitonly matters with--legacy— worth documenting this so users aren't confused whenuipro init --token <t>does nothing in default template mode- README alignment is slightly ragged (tabs vs spaces in examples)
- Control flow in error handling —
GitHubRateLimitErrorcatch works becauseprocess.exitterminates, but anelse ifwould be clearer
None are blockers. Good work.
|
@claude review |
|
Claude finished @mrgoonie's task in 2m 26s —— View job PR Review: feat(cli): add optional GitHub token support and actionable rate-limit guidance
Overall: This is a well-motivated, backward-compatible addition. The centralized helpers ( Security:
|
| Issue | Severity |
|---|---|
--token exposes PAT in shell history |
Medium |
--token is a no-op on init without --legacy |
Medium (UX) |
| Empty string token creates invalid auth header | Low |
versions command wiring may be incorrect |
Medium (correctness) |
Fallback to GITHUB_TOKEN env var |
Low (enhancement) |
| 403 messaging conflates rate limit with auth failure | Low |
else if control flow |
Nit |
The core approach is sound — this is close to merge-ready. The wiring issue and the --token/--legacy UX gap are the most important items to address.
Motivation
GitHub API rate limits can sometimes cause failures when listing or downloading releases.
This PR adds optional authentication support and clearer guidance to help users resolve rate-limit issues.
Changes
--token <token>to:uipro inituipro versionsuipro updateAuthorizationheader.getGitHubTokenGuidance()403/429responses--tokenusage examplesUI_PRO_MAX_GITHUB_TOKENenvironment variableBehavior
--legacy.Validation
bun run build)