toolbox · tool
GitHub CLI
The gh command for repos, secrets and workflow runs without leaving the terminal.
Install
winget install --id GitHub.cli --source wingetgh auth logingh --versionWhat it is
The official GitHub command-line client. It does almost anything the website does, which makes repo setup and deployment repeatable.
How it works
gh reads your authenticated account from the OS keyring. Commands take --repo owner/name
when you are not in the repository folder.
In this project
gh repo create HensonHenson/Unni-Web --private --source . --remote origin --push
gh secret set CLOUDFLARE_API_TOKEN
gh secret set CLOUDFLARE_ACCOUNT_ID --body <account-id>
gh workflow run deploy-games.yml --ref main
gh run watch <run-id> --exit-status
Gotchas
gh secret set NAMEprompts for the value without echoing it. Prefer that over--bodyfor real secrets, which would land in shell history.gh auth statusshows the active account and token scopes.- Deleting a repository is permanent. Check the name twice.