DEV Community

Nitin
Nitin

Posted on

GitHub CLI 1.0 is now available

CLI

What is github Cli ?

GitHub cli brings pull requests, issues, and other GitHub concepts write into your Terminal.It reduces context switching, helps you focus, and enables you to more easily script and create your own workflows.

What is the benefit of Github cli:-

Can run entire GitHub workflow from the terminal, from issues through releases no need to open the github.com and do all those stuff that is done after commiting and pushing code.

How to install:-

Mac Users -

brew install gh
Enter fullscreen mode Exit fullscreen mode

Window Users -

choco install gh
Enter fullscreen mode Exit fullscreen mode

Linux Users -

sudo apt install gh
Enter fullscreen mode Exit fullscreen mode

Authentication:-

Step 1:Run the command gh auth login in your terminal.

C:\Windows\system32>gh auth login
? What account do you want to log into?  [Use arrows to move, type to filter]
> GitHub.com
  GitHub Enterprise Server
Enter fullscreen mode Exit fullscreen mode

Step 2: Select the option shown in step 1.
Now press enter and enter login with browser.

- Logging into github.com
? How would you like to authenticate?  [Use arrows to move, type to filter]
> Login with a web browser
  Paste an authentication token
Enter fullscreen mode Exit fullscreen mode

Step 3:
You will be asked to copy one-time code and enter this code into the browser for login.

! First copy your one-time code: 44D6-2E80
- Press Enter to open github.com in your browser...
Enter fullscreen mode Exit fullscreen mode

Step 4. Now authorize for login and give your github password.
Step 5. All Done.

Now you are ready to use github cli commands.

Note: Github cli is written in Go lang(99.6%)

I will post how to use the github cli commands for doing many operations in my next blog so stay tuned........

Top comments (0)