
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
All the power of GitHub in your terminal.
gh [command] [payload] [--flags]
[sudo] npm install -g gh
In order to sucessfully run this project you must have NodeJS installed.
gh help
gh pull-request
Alias:
gh pr
Option | Usage | Type |
---|---|---|
-l , --list | Required | Boolean |
-a , --all | Optional | Boolean |
-d , --detailed | Optional | Boolean |
-b , --branch | Optional | String |
--remote | Optional | String |
-r , --repo | Optional | String |
-S , --state | Optional | [open , closed ] |
-u , --user | Optional | String |
Shortcut for listing open pulls requests for the current branch.
gh pr ```
List open pulls requests for all branches.
gh pr --list --all ```
List open pulls requests with link and content.
gh pr --list --detailed ```
List open pulls requests for a branch.
gh pr --list --branch master ```
Option | Usage | Type |
---|---|---|
-f , --fetch | Required | Boolean |
-n , --number | Required | Number |
-M , --merge | Optional | Boolean |
-R , --rebase | Optional | Boolean |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Shortcut for fetching pull request and checkout into a new branch pull-1
.
gh pr 1 ```
Fech pull request rebasing or merging into the current branch.
gh pr 1 --fetch --rebase
gh pr 1 --fetch --merge
```
Option | Usage | Type |
---|---|---|
-M , --merge | Required | Boolean |
-R , --rebase | Required | Boolean |
-n , --number | Optional | Number |
-b , --branch | Optional | String |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Omitting --number
will try to guess the pull number from branch name e.g. pull-1
results in --number 1
. Omitting --branch
will merge or rebase into config.default_branch
.
Merge or rebase pull request into a branch.
gh pr 1 --fetch --merge ```
```
gh pr 1 --fetch --rebase ```
Merge or rebase pull request into branch dev
.
gh pr 1 --fetch --rebase --branch dev ```
```
gh pr 1 --fetch --merge --branch dev ```
Option | Usage | Type |
---|---|---|
-c , --comment | Required | String |
-n , --number | Required | Number |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Comment on a pull request.
gh pr 1 --comment "Merged, thank you!" ```
Option | Usage | Type |
---|---|---|
--fwd | Required | String |
-n , --number | Required | Number |
Forward a pull request to another reviewer.
gh pr 1 --fwd username ```
Option | Usage | Type |
---|---|---|
-o , --open | Required | Boolean |
-C , --close | Required | Boolean |
-n , --number | Required | Number |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Open a pull request.
gh pr 1 --open ```
Close a pull request.
gh pr 1 --close ```
Open or close a pull request that you've sent to someone.
gh pr 1 --close --user eduardolundgren ```
Option | Usage | Type |
---|---|---|
-s , --submit | Required | String |
-b , --branch | Optional | String |
-D , --description | Optional | String |
-r , --repo | Optional | String |
-t , --title | Optional | String |
Omitting --title
will submit a pull request using the last commit message as title.
Submit a pull request using the current branch.
gh pr --submit eduardolundgren --title 'Fix #32' --description 'Awesome fix' ```
Submit a pull request using the current branch to dev branch.
gh pr --submit eduardolundgren --branch dev ```
gh notifications
Alias:
gh nt
Option | Usage | Type |
---|---|---|
-l , --latest | Required | Boolean |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Shortcut for displaying the latest activities on the current repository.
gh nt ```
Display the latest activities on a certain repository.
gh nt --latest --user eduardolundgren --repo node-gh ```
Option | Usage | Type |
---|---|---|
-w , --watch | Required | Boolean |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Watch for any activity on the current repository.
gh nt --watch ```
Watch for any activity on a certain repository.
gh nt --watch --user eduardolundgren --repo node-gh ```
gh issue
Alias:
gh is
Option | Usage | Type |
---|---|---|
-N , --new | Required | Boolean |
-t , --title | Required | String |
-A , --assignee | Optional | String |
-L , --label | Optional | String |
-m , --message | Optional | String |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Shortcut for creating a new issue on the current repository.
gh is 'Node GH rocks!' 'Body with Markdown support' ```
Create a new issue on a certain repository.
gh is --new --title 'Node GH rocks!' --message 'Body with Markdown support' --user eduardolundgren --repo node-gh ```
Create a new issue with labels.
gh is --new --title 'Node GH rocks!' --label bug,question,test ```
Create a new issue and assign it to someone.
gh is --new --title 'Node GH rocks!' --assignee zenorocha ```
Option | Usage | Type |
---|---|---|
-c , --comment | Required | String |
-n , --number | Required | Number |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Comment on an issue of the current repository.
gh is 1 --comment 'Node GH rocks!' ```
Comment on an issue of a certain repository.
gh is 1 --comment 'Node GH rocks!' --user eduardolundgren --repo node-gh ```
Option | Usage | Type |
---|---|---|
-o , --open | Required | Boolean |
-C , --close | Required | Boolean |
-n , --number | Required | Number |
--remote | Optional | String |
-r , --repo | Optional | String |
-u , --user | Optional | String |
Open an issue.
gh is 1 --open ```
Close an issue.
gh pr 1 --close ```
Open or close an issue that you've sent to someone.
gh pr 1 --close --user eduardolundgren ```
Option | Usage | Type |
---|---|---|
-l , --list | Required | Boolean |
-a , --all | Optional | Boolean |
-A , --assignee | Optional | String |
-d , --detailed | Optional | Boolean |
-L , --label | Optional | String |
-M , --milestone | Optional | Number |
--remote | Optional | String |
-r , --repo | Optional | String |
-S , --state | Optional | [open , closed ] |
-u , --user | Optional | String |
Shortcut for listing all issues on the current repository.
gh is ```
List all issues from all repositories.
gh is --list --all ```
List issues assigned to someone.
gh is --list --assignee zenorocha ```
List issues with link and content.
gh is --list --detailed ```
List only closed issues on the current repository.
gh is --list --state closed ```
List issues filtered by milestone.
gh is --list --milestone 1 ```
List issues that contains labels todo
and bug
.
gh is --list --label todo,bug ```
List all issues on a certain repository.
gh is --list --user eduardolundgren --repo node-gh ```
gh repo
Alias:
gh re
Option | Usage | Type |
---|---|---|
-o , --open | Required | Boolean |
-u , --user | Optional | String |
-r , --repo | Optional | String |
Shortcut for opening the GitHub repository page.
gh re ```
Open GitHub repository page.
gh re --open --user eduardolundgren --repo node-gh ```
Option | Usage | Type |
---|---|---|
-l , --list | Required | Boolean |
-d , --detailed | Optional | Boolean |
-u , --user | Optional | String |
-t , --type | Optional | [all , owner , public , private , member ] |
List all repositories.
gh re --list ```
List all private repositories.
gh re --list --type private ```
List all repositories for someone.
gh re --list --user zenorocha ```
Option | Usage | Type |
---|---|---|
-n , --new | Required | String |
-c , --clone | Optional | Boolean |
-t , --type | Optional | [private ] |
--init | Optional | Boolean |
--gitignore | Optional | String |
--homepage | Optional | String |
--description | Optional | String |
Create a new GitHub repository and clone on the current directory.
gh re --new foo --clone ```
Create a new GitHub repository using .gitignore template for Ruby.
gh re --new gemified --gitignore Ruby ```
Create a new private repository on GitHub, initializing it with a initial commit of the README.
gh re --new foo --init --type private ```
Option | Usage | Type |
---|---|---|
--delete | Required | String |
--user | Required | String |
Delete a repository named vanilla of the logged user
gh re --delete vanilla ```
gh user
Alias:
gh us
Option | Usage | Type |
---|---|---|
-l , --login | Required | Boolean |
-L , --logout | Required | Boolean |
Login or show current logged in GitHub user.
gh user --login ```
Logout current GitHub account.
gh user --logout ```
gh alias
Alias:
gh al
Option | Usage | Type |
---|---|---|
-l , --list | Required | Boolean |
Shortcut for listing aliases.
gh alias ```
List aliases.
gh alias --list ```
Option | Usage | Type |
---|---|---|
-a , --add | Required | String |
-u , --user | Required | String |
Create alias for username.
gh alias --add zeno --user zenorocha ```
Option | Usage | Type |
---|---|---|
-r , --remove | Required | String |
Remove alias.
gh alias --remove zeno ```
Node GH is maintained by these guys and some awesome contributors.
Eduardo Lundgren | Zeno Rocha |
Contribute new commands to this project by copying and editing the content of Hello World example.
gh repo --new
gh repo
commandgh alias --list
--assignee
flag for issues--description
attribute on PR submitgh user
--milestone
filter flag on listing issues--label
, --state
and --detailed
flags on listing issues--state
flag--number
flaggh pr --submit
--comment
to --message
--pull
to --number
--comment
to --message
FAQs
Boost your productivity & automate tasks when working with GitHub, all from the comfort of your CLI.
The npm package gh receives a total of 14,305 weekly downloads. As such, gh popularity was classified as popular.
We found that gh demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.