1. CLI Tools & Maintenance
gh --versionWhat it doesChecks the installation of the GitHub CLI and displays the current version number
When to use itto check tool availability before executing script commands
Example
gh --versiongh repo clone OWNER/REPOWhat it doesCopy a repository directly using your preferred authentication protocol in the CLI
When to use itto clone projects without having to manually copy URLs
Example
gh repo clone kubernetes/kubernetesgh release listWhat it doesDisplays a list of published releases with their tags and release dates
When to use itTo view previous versions and distribution history of the project
Example
gh release list --limit 10gh release create <tag>What it doesCreates a new release with change notes and attached files
When to use itWhen a new production-ready version is published
Example
gh release create v1.2.0 --title "v1.2.0" --notes "Bug fixes and stability improvements"gh statusWhat it doesDisplays a summary of the status of notifications, pull requests and issues associated with you
When to use itAt the beginning of the work day to find out what needs your immediate attention
Example
gh statusgh repo archive OWNER/REPOWhat it doesMoves the repository to read-only archive mode and prevents any further modifications
When to use itWhen you stop maintaining the project and want to keep it for historical reference
Example
gh repo archive my-org/legacy-service --yesgh repo delete OWNER/REPOWhat it doesPermanently deletes the entire repository from GitHub servers (requires manual confirmation)
When to use itto permanently eliminate test repositories or unwanted repositories
Example
gh repo delete my-org/temp-playground --yes