A glimpse
Github is a cli tool that helps you complete Github operations from the command line. It was created because I’m a command line enthusiast and a Github fan, and whenever I’m working on a command line environment and I want to see what interesting open source projects are coming up on Github or I need to complete some project repository or something, I need to switch to the browser environment and then go to Github by searching in Google to find the page I want to do what I need to do. I had to switch back to the command line environment after a whirlwind of action, which was both time consuming and boring. I am also a very lazy person, naturally this part of the waste of time I can not tolerate. I searched to see if there was a tool that could meet my needs, but the results were frustrating. In that case, create your own, because we programmers are the most creative.
The veil
Now that we’ve seen the first glimpse of Github cli, let’s take a look at how it works. First you need to install it
$ npm i -g @mozheng-neal/github_cli
Copy the code
Once installed, you can pass through
$ gh -h
Copy the code
View the supported commands and options. Github – CLI uses Oauth access token to verify identity permissions. So if you come across an interface that requires you to enter a token like this
Developer Settings
Repository
You can use the following command to view the commands supported by this scope
$ gh rs -h
Copy the code
-
ls
-
cr
-
et
-
rm
-
st
-
ck
Issues
You can run the following command to view the commands and options supported under issues Scope
$ gh iu -h
Copy the code
-
ls
-
cr
-
et
-
rm
Pull request
You can view the commands supported by the scope by following the command
$ gh pr -h
Copy the code
-
ls
-
cr
-
et
-
rm
Reaction
Reaction Scope is used to view and create emoticon responses to data such as comments or issues, and you can view the subcommands it supports by running the following command
$ gh rt -h
Copy the code
-
ls
-
cr
Search
Search scope is used for Search operations. You can run the following commands to view the commands supported by the scope
$ gh sr -h
Copy the code
Users
The scope is mainly used to view and edit some personal data. The subcommands supported by the scope can be viewed by running the following commands
$ gh us -h
Copy the code
The details of its use are as follows:
conclusion
Create a lot – cli purpose is just to save my context switching time, and enjoy myself to design and implement a tool of pleasant sensation, in order to make it better, and let those who, like me, this kind of efficiency problems of development of junior partner to save time I decided to open source, accept everyone’s feedback and even participate in the build. Finally, we welcome you to use this tool. If you have any problem in the process of using this tool, you can directly raise the issue, and I will reply you as soon as possible. If you think this tool is good, please don’t spare your star, Github address. Let’s make the world a better place together.