gh
Use gh to interact with GitHub.
Common Commands
Issues
- List issues:
gh issue list - View issue:
gh issue view <number> - Create issue:
gh issue create --title "Title" --body "Description" - Close issue:
gh issue close <number>
Pull Requests
- List PRs:
gh pr list - View PR:
gh pr view <number> - Create PR:
gh pr create --title "Title" --body "Description" - Checkout PR:
gh pr checkout <number> - Merge PR:
gh pr merge <number> --merge - Review PR:
gh pr review <number> --approve
Repositories
- Clone:
gh repo clone <owner>/<repo> - View repo:
gh repo view - Create repo:
gh repo create <name> --public
Releases
- List releases:
gh release list - Create release:
gh release create v1.0.0 --title "Release" --notes "Notes"
Notes
- Requires
gh auth loginfor authentication - Use
--jsonflag for machine-readable output