Obtain GitHub Token from various location.
~/.config/hub~/.config/gh/config.ymlGH_TOKENGITHUB_TOKEN
yarn add @forbital/github-token
# or npm i --save @forbital/github-tokenecho$(github-token)or
eval$(github-token --shell)# thenecho$GITHUB_TOKENor
echo"$(github-token --env)">> .env# .envrceval$(github-token --shell)importgetTokenfrom"@forbital/github-token";constuser=awaitfetch("https://api.github.com/user",{headers: {Authorization: `Bearer ${getToken()}`},}).then((res)=>res.json());console.log(user.twitter_username);