# GitHub Command Line Interface
# What is
gh (opens new window) pretends to facilitate the access to GitHub from the command line. It brings pull requests, issues, and other GitHub concepts to the terminal next to where you are already working with git and your code.
# Version
➜ dmsi2223apuntes git:(master) ✗ gh --version
gh --version
gh version 2.20.2 (2022-11-15)
https://github.com/cli/cli/releases/tag/v2.20.2
1
2
3
4
2
3
4
# Help
- Output of the command gh help reference
# Installation
To install it, see the installation instructions (opens new window).
Check the GitHub CLI Manual (opens new window) for more details.
# Ways to extend gh-cli
There are several ways you can extend/customize gh
:
- Create shorthands using gh alias set
- Make custom API queries using the gh REST api
- Make custom API queries using gh GraphQL api
- Use environment variables (opens new window)
- Using and writing gh extensions
# Running Manually GitHub Workflows with gh
# The --json flag
# References
- Repo crguezl/learning-graphql-with-gh (opens new window)
- gh manual (opens new window)
- GitHub REST API (opens new window)
- Getting started with the REST API (opens new window)
- Scripting with GitHub CLI by Mislav Marohnić (opens new window)
- Blog: GitHub CLI is Now Available: Here’s Why You Should Be Excited by Kasun Rajapakse (opens new window)
- An Introduction to GraphQL via the GitHub API (opens new window) by Derek Haynes
- GitHub GraphQL Playground (opens new window)