This week GitHub announced the beta for their new GitHub CLI tool, which provides an easier and more seamless way for you to interact with GitHub from your terminal.

The GitHub CLI can be installed on Windows, macOS and Linux. Get started by downloading the installer from the GitHub CLI repository.

New GitHub CLI announced and available as beta

What can GitHub CLI do?

Once you have it downloaded, open up your terminal and use the gh command:

The GitHub CLI beta currently allows you to do the following commands:

  • Pull requests: Using the pr command to checkout, create, list, status and view
  • Issues: Using the issue command to create, list, status and view
  • Help: Using help command to see how to use the tool

When you first use it you will need to authenticate the GitHub CLI. As you can see here I will be prompted to open GitHub in my browser:

After authenticating the GitHub CLI you will be able to continue with your last command:

I needed to change directories to where my repository was and then I was able to list out my pull requests using the following command:

gh pr list

For more details about what can be done, check out the GitHub CLI manual for lots of examples on using each of the commands.

Wrap up

This is an early look at what can be done with the GitHub CLI, and because it’s still in early development the team would love for you to give the tool a try and then provide them feedback.

Enjoy!

Resources

Announcement https://github.blog/2020-02-12-supercharge-your-command-line-experience-github-cli-is-now-in-beta/

Download from https://cli.github.com/

Documentation at https://cli.github.com/manual/

Posted by Callon Campbell [MVP]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s