Microsoft's GitHub: Our new 'gh' command-line interface makes you more productive

GitHub offers developers an official command-line interface for managing code changes.
Written by Liam Tung, Contributing Writer

Developers on GitHub who prefer the command line (CLI) in a terminal are gaining an official CLI tool for managing changes to open-source projects. 

GitHub has announced the beta of the command-line interface, called the GitHub CLI or 'gh' in the command line, which allows developers to type and execute code from the terminal rather than using a graphical integrated development environment (IDE) application. 

The GitHub CLI beta is available today for macOS, Windows and Linux (Debian, Fedora/CentOS, and Arch) from GitHub's CLI page

GitHub notes that the CLI is in "early development" but that it brings pull requests, issues, and more GitHub concepts to the terminal. 

SEE: How to build a successful developer career (free PDF)

The current commands include pull requests for status, list, view, check out, and create. The issue commands include status, list, view, and create.  

The Microsoft-owned code-sharing site acknowledges that its 'hub' tool has traditionally been the unofficial command-line tool for interacting with the git system for monitoring changes to source code in the software development process. 

The official GitHub CLI on the other hand is being used to explore what an official CLI tool would look like with a "fundamentally different design". 

"While both tools bring GitHub to the terminal, hub behaves as a proxy to git and gh is a standalone tool," GitHub explains

SEE: Pay for these four tech jobs is rocketing. Cloud computing is the cause

GitHub has kicked off the GitHub CLI with issues and pull requests because they're used daily by developers. 

GitHub argues that the CLI will help help boost developer productivity, for example, by using gh to filter issue lists to show issues tagged with 'help wanted' labels. 

Developers can also use gh to quickly view details about a bug that they can probably fix, view the status of work, and quickly check out pull requests.  


The command-line tool provides a quick snapshot of what has happened since you created the pull request.   

image: GitHub
Editorial standards