gh release listList releases for a repository.
Release management, gist workflows, and direct REST or GraphQL automation with gh api.
Create and manage GitHub Releases and assets.
gh release listList releases for a repository.
gh release view v1.2.3Show details for a release tag.
gh release create v1.2.3 dist/*.tgz --title "v1.2.3" --notes "Bug fixes and improvements"Create a release and upload assets.
gh release create v1.2.3 --generate-notesGenerate release notes automatically.
gh release upload v1.2.3 ./dist/app-linux-amd64.tar.gz#linux-amd64Upload additional assets to a release.
gh release download v1.2.3 -D ./downloadsDownload assets for a release.
gh release edit v1.2.3 --title "v1.2.3 stable"Edit release metadata.
gh release delete-asset v1.2.3 app-linux-amd64.tar.gz --yesDelete a specific release asset.
gh release delete v1.2.3 --cleanup-tag --yesDelete a release and optionally its tag.
Verify an artifact attestation against a repository.
gh attestation verify ./dist/app-linux-amd64.tar.gz --repo my-org/my-repoVerify an artifact attestation against a repository.
Create and manage gists.
gh gist listList your gists.
gh gist view abcd1234Show a gist.
gh gist create notes.md --publicCreate a public gist from a file.
printf "hello
" | gh gist create -f hello.txtCreate a gist from standard input.
gh gist edit abcd1234 -d "Updated shell snippets"Edit a gist.
gh gist clone abcd1234Clone a gist locally.
gh gist rename abcd1234 old.txt new.txtRename a file within a gist.
gh gist delete abcd1234 --yesDelete a gist.
Use gh api for REST and GraphQL automation.
gh api repos/{owner}/{repo}Call a GitHub REST API endpoint.
gh api repos/{owner}/{repo}/issues -f title="Bug report" -f body="Details..."Create resources through the REST API.
gh api repos/{owner}/{repo} -H "Accept: application/vnd.github+json"Call the API with explicit headers.
gh api graphql --input query.jsonSend request payload from a file.
gh api graphql -f query='query($owner:String!,$repo:String!){repository(owner:$owner,name:$repo){name defaultBranchRef{name}}}' -F owner=cli -F repo=cliCall the GraphQL API with variables.
gh api repos/{owner}/{repo} --method PATCH -f description="New description"Update resources with a non-GET method.
Combine paginated results into a single JSON array.
gh api orgs/{owner}/repos --paginate --slurpCombine paginated results into a single JSON array.
gh api repos/{owner}/{repo}/issues/comments/123456 --method DELETEDelete a resource through the REST API.