Exploring the New GitHub CLI

Github just released it’s own Command-Line Interface (CLI) so developers can now do everyday GitHub tasks from the terminal. Yay! This means no more squiggling around the UI. With this new CLI, you can now view, create, clone, or fork repositories, create, view, and edit gists, you can also work with pull requests and issues right from the terminal.

Isn’t that awesome?

The motive behind this CLI is to move all of the developer workflow right to the terminal where we were already working with git. Now you might ask, _will it replace the git CLI? _The answer is no. The CLI is meant to integrate well with git, which means your trusty old git isn’t going anywhere. Rather this was one of the motives behind the creation of the GitHub CLI, bringing all your tools to one place to avoid context switching.

_But wait! doesn’t something like this already exists? Yes, yes it does. A GitHub wrapper called _hubwhich is an open-source extension to command-line git, maintained by a GitHub employee, that lets you do everyday GitHub tasks without ever leaving the terminal. Sounds pretty familiar eh? Hub already offers a lot of the things that the Github CLI brings to the table.

So why is GitHub Reinventing the Wheel?

The GitHub team mentions that the primary reason they didn’t build on top of hub was that they didn’t want to wrestle with the 10 odd years of design decisions that hub went through which weren’t really focused on GitHub workflows. They also_ didn’t want to change hub significantly_ because that might upset the already established user base which used hub on a daily basis. They addressed this in a lot more detail in their docs.

So enough talk, let’s see how it actually works. By the end of this article, you should be well on your way to integrating the GitHub CLI in your workflow.

Installation

The first step is installing the CLI. To do that simply follow the install instructions for your operating system given on their official page

#github #cli #cli-tools #open-source #terminal #shell #git #git-workflow

Exploring the New GitHub CLI