@mozheng-neal/github_cli
v1.0.9
Published
github的命令行操作工具
Downloads
11
Readme
Description
This project is designed to supply the conveniance of completing a variety github actions in commamd line.
I am a command line fans, just inputting the command and everything is well done gives me a lot of enjoyment, especially in the process of developing applications.
At the same time, I visit github website frequently to look for something interesting. This results to that I have to checkout my acting environment,either from command line to website or the contrary, which is time consuming. I have searched for whether there exist some good command line tools could help me solve this problem, but the result is frustrating. So I decided to create a command line on my own.
Usage
Install
To use this tool, firstly you need install it, there are two ways you could achive the install.
$ npm i -g @mozheng-neal/github_cli // npm install
After install you could get the detail command information through
$ gh
Attention
There is a situation may raise your attention in the process of usage. In the essence, command line is a client type, when you input a command to create, update, or remove data, you need complete identity authentication firstly, in github, this authentication could be accomplished by the way of creating a personal access token, so when you encounter a interface that alert you to input your identity token,
what you need to do firstly is create it at generate token address
when you select the scopes for this access token,a better choice is making all those scopes checked in case this access token can not comlete some actions that need authentication. After input the description and select the scopes,you could click the generate token button to create your personal access token, thus copy this token to the command line question interface.
Detail
Currently, this command line tool has supported the main types of github actions, such as search, repositories, pull request, pesonal user, reaction, issues.The usage detail of these commands scope as follows:
Repository
You could get the supported command list of repository scope through
$ gh rs
rs command has eight child commands and nearly every child command has some child options, the detail introduction as follows:
ls
the child command 'ls' is for listting all the repositories data belong to a github user, it has some child options to get different type of data:cr
Th child command cr is for making create actions, it has following child options:et
The child command et is for making edit actions, it has following child options:rm
This child command is for making delete actions, it has following child options:st
This child command is for making set actions, it has following child options:ck
This child command is for making check actions,it has following child options:ts
This child command is for transfering your repositories to another githug user,it has no child optionsfk
This child command is for forking a repository,it has no child options
Issues
you could get the supported command list of issues scope through
$ gh iu
iu command has four child commands to complete different tasks, the detail command list as follows:
ls
This command is for listing issues data, it has some child options to do different things:cr
This command is for making create actions, it has following child optionset
This command is for making edit issue actions,it has following child optionsrm
This command is for making delete issue actions, it has following child options:
Pull request
The commands of this scope are designed to complete the tasks of pull requests, you could get the supported command list through
$ gh pr
this command has seven child commands, the detail list as follows:
ls
This child command is for listing pull request data, it has some child options to display different types of datacr
This child command is for making create actions,it support following child options:et
This child command is for making edit actions for pull request,it support following child options:rm
This child command is for making delete actions for pull request,it support following child options:other child commands
Except the commands described above,there are other three child commands without child options,they are 'mr', 'st', 'ds',I have introduced them on the initial image
Reaction
Reaction scope is responsible for processing some tasks using emoji.You could get the supported command list through
$ gh rt
The detail usage as follows:
ls
This child command is for listing datas about reactions,the supported child options as follows:cr
This child command is for creating reactions, the suppored child options as follows:
Search
This scope is responsible for completing the task of searching,you could get supported child options list through
$ gh sr
The detail usage as follows:
Users
This scope is responsible for personal actions, you could get the supported child commands and options through
$ gh us
the detail usage as follows:
End
Initially, creating github-cli is just for save the time of checking in and out between the environments of command line and website,after using it for a month, I decided to share this tool with you and I hope that this tool could dou you a favor.If you have any question or suggestion about this tool,please contact me or create an issue for this repository.May you an enjoyable life!