GitHub CLI
API Commands
Access the GitHub API directly from the command line. Learn to make REST and GraphQL requests for automation and custom integrations.
5 commands
Pro Tips
Use 'gh api graphql' for complex queries that would require multiple REST calls.
Paginate through results with '--paginate' flag: 'gh api repos/org/repo/issues --paginate'
Use jq for processing: 'gh api user/repos --jq ".[].name"' to extract specific fields.
Common Mistakes
API rate limits apply. Authenticated requests get 5000/hour, use conditionals to avoid waste.