Returns a GitHub token or throws an error with setup instructions.
Delegates to getGitHubToken and throws if no token is found. Use this in commands that cannot proceed without authentication.
The GitHub token string (guaranteed non-null)
If no token is available, with instructions for gh auth login or setting GITHUB_TOKEN
gh auth login
GITHUB_TOKEN
const token = requireGitHubToken(); // throws if not authenticated Copy
const token = requireGitHubToken(); // throws if not authenticated
Returns a GitHub token or throws an error with setup instructions.
Delegates to getGitHubToken and throws if no token is found. Use this in commands that cannot proceed without authentication.