UNPKG

65.2 kBMarkdownView Raw
1# Node GH
2
3[![All Contributors](https://img.shields.io/badge/all_contributors-85-orange.svg?style=flat-square)](#contributors-)
4[![NPM version](http://img.shields.io/npm/v/gh.svg?style=flat)](http://npmjs.org/gh)
5[![Build Status](http://img.shields.io/travis/node-gh/gh/master.svg?style=flat)](https://travis-ci.org/node-gh/gh)
6[![Known Vulnerabilities](https://snyk.io/test/github/node-gh/gh/badge.svg)](https://snyk.io/test/github/node-gh/gh)
7[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8[![Code Quality: Javascript](https://img.shields.io/lgtm/grade/javascript/g/node-gh/gh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/node-gh/gh/context:javascript)
9[![Total Alerts](https://img.shields.io/lgtm/alerts/g/node-gh/gh.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/node-gh/gh/alerts)
10
11> All the power of GitHub in your terminal.
12
13## Table of contents
14
15- [Install](#install)
16- [Usage](#usage)
17- [Contributors](#contributors)
18- [Contributing](#contributing)
19- [History](#history)
20- [License](#license)
21- [Demonstration](#demonstration)
22- [Supported Node Versions](#supported-node-versions)
23- [Available commands](#available-commands)
24 - [Pull requests](#pull-requests)
25 - [Notifications](#notifications)
26 - [Issues](#issues)
27 - [Repo](#repo)
28 - [Gists](#gists)
29 - [User](#user)
30 - [Milestone](#milestone)
31 - [Alias](#alias)
32- [Config](#config)
33- [Plugins](#plugins)
34
35## Install
36
37 [sudo] npm install -g gh
38
39## Usage
40
41 gh [command] [--flags]
42
43## Contributors
44
45Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
46
47<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
48<!-- prettier-ignore -->
49<table>
50 <tr>
51 <td align="center"><a href="https://github.com/eduardolundgren"><img src="https://avatars0.githubusercontent.com/u/113087?v=4" width="50px;" alt="Eduardo Lundgren"/><br /><sub><b>Eduardo Lundgren</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=eduardolundgren" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Aeduardolundgren" title="Bug reports">🐛</a> <a href="https://github.com/node-gh/gh/commits?author=eduardolundgren" title="Documentation">📖</a> <a href="#question-eduardolundgren" title="Answering Questions">💬</a> <a href="#infra-eduardolundgren" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#plugin-eduardolundgren" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/node-gh/gh/commits?author=eduardolundgren" title="Tests">⚠️</a> <a href="#review-eduardolundgren" title="Reviewed Pull Requests">👀</a> <a href="#ideas-eduardolundgren" title="Ideas, Planning, & Feedback">🤔</a></td>
52 <td align="center"><a href="https://zenorocha.com"><img src="https://avatars1.githubusercontent.com/u/398893?v=4" width="50px;" alt="Zeno Rocha"/><br /><sub><b>Zeno Rocha</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=zenorocha" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Azenorocha" title="Bug reports">🐛</a> <a href="https://github.com/node-gh/gh/commits?author=zenorocha" title="Documentation">📖</a> <a href="#question-zenorocha" title="Answering Questions">💬</a> <a href="#infra-zenorocha" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#plugin-zenorocha" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/node-gh/gh/commits?author=zenorocha" title="Tests">⚠️</a> <a href="#review-zenorocha" title="Reviewed Pull Requests">👀</a> <a href="#ideas-zenorocha" title="Ideas, Planning, & Feedback">🤔</a> <a href="#content-zenorocha" title="Content">🖋</a></td>
53 <td align="center"><a href="https://henvic.github.io/"><img src="https://avatars3.githubusercontent.com/u/936421?v=4" width="50px;" alt="Henrique Vicente"/><br /><sub><b>Henrique Vicente</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=henvic" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Ahenvic" title="Bug reports">🐛</a> <a href="#question-henvic" title="Answering Questions">💬</a> <a href="#infra-henvic" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#plugin-henvic" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/node-gh/gh/commits?author=henvic" title="Tests">⚠️</a> <a href="#review-henvic" title="Reviewed Pull Requests">👀</a> <a href="#security-henvic" title="Security">🛡️</a> <a href="#ideas-henvic" title="Ideas, Planning, & Feedback">🤔</a></td>
54 <td align="center"><a href="https://github.com/protoEvangelion"><img src="https://avatars3.githubusercontent.com/u/20076677?v=4" width="50px;" alt="Ryan Garant"/><br /><sub><b>Ryan Garant</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3AprotoEvangelion" title="Bug reports">🐛</a> <a href="#question-protoEvangelion" title="Answering Questions">💬</a> <a href="#infra-protoEvangelion" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="#plugin-protoEvangelion" title="Plugin/utility libraries">🔌</a> <a href="https://github.com/node-gh/gh/commits?author=protoEvangelion" title="Tests">⚠️</a> <a href="#review-protoEvangelion" title="Reviewed Pull Requests">👀</a> <a href="#security-protoEvangelion" title="Security">🛡️</a> <a href="#ideas-protoEvangelion" title="Ideas, Planning, & Feedback">🤔</a></td>
55 <td align="center"><a href="https://github.com/brunocoelho"><img src="https://avatars1.githubusercontent.com/u/827445?v=4" width="50px;" alt="Bruno Coelho"/><br /><sub><b>Bruno Coelho</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=brunocoelho" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Abrunocoelho" title="Bug reports">🐛</a></td>
56 <td align="center"><a href="https://www.joyent.com/"><img src="https://avatars1.githubusercontent.com/u/2080476?v=4" width="50px;" alt="Dustin Ryerson"/><br /><sub><b>Dustin Ryerson</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=dustinryerson" title="Code">💻</a></td>
57 <td align="center"><a href="https://github.com/drewbrokke"><img src="https://avatars1.githubusercontent.com/u/6403097?v=4" width="50px;" alt="Drew Brokke"/><br /><sub><b>Drew Brokke</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=drewbrokke" title="Code">💻</a> <a href="#ideas-drewbrokke" title="Ideas, Planning, & Feedback">🤔</a></td>
58 </tr>
59 <tr>
60 <td align="center"><a href="http://twitter.com/joserobleda"><img src="https://avatars1.githubusercontent.com/u/1263865?v=4" width="50px;" alt="Jose Ignacio"/><br /><sub><b>Jose Ignacio</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=joserobleda" title="Code">💻</a></td>
61 <td align="center"><a href="https://github.com/rodrigovidal"><img src="https://avatars0.githubusercontent.com/u/388081?v=4" width="50px;" alt="Rodrigo Vidal"/><br /><sub><b>Rodrigo Vidal</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=rodrigovidal" title="Code">💻</a></td>
62 <td align="center"><a href="http://hamxabaig.github.io"><img src="https://avatars2.githubusercontent.com/u/12872177?v=4" width="50px;" alt="Hamza Baig"/><br /><sub><b>Hamza Baig</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=hamxabaig" title="Code">💻</a></td>
63 <td align="center"><a href="http://www.liferay.com/web/gregory.amerson/blog"><img src="https://avatars2.githubusercontent.com/u/595221?v=4" width="50px;" alt="Gregory Amerson"/><br /><sub><b>Gregory Amerson</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=gamerson" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Agamerson" title="Bug reports">🐛</a></td>
64 <td align="center"><a href="https://blog.tomrochette.com"><img src="https://avatars2.githubusercontent.com/u/188960?v=4" width="50px;" alt="Tom Rochette"/><br /><sub><b>Tom Rochette</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=tomzx" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Atomzx" title="Bug reports">🐛</a> <a href="#infra-tomzx" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
65 <td align="center"><a href="https://m-roberts.github.io"><img src="https://avatars2.githubusercontent.com/u/2947595?v=4" width="50px;" alt="Mike Roberts"/><br /><sub><b>Mike Roberts</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=m-roberts" title="Code">💻</a></td>
66 <td align="center"><a href="https://snyk.io"><img src="https://avatars2.githubusercontent.com/u/19733683?v=4" width="50px;" alt="Snyk bot"/><br /><sub><b>Snyk bot</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=snyk-bot" title="Code">💻</a></td>
67 </tr>
68 <tr>
69 <td align="center"><a href="https://github.com/TheBlockchainDeveloper"><img src="https://avatars1.githubusercontent.com/u/139483?v=4" width="50px;" alt="BlockchainDeveloper"/><br /><sub><b>BlockchainDeveloper</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=TheBlockchainDeveloper" title="Code">💻</a></td>
70 <td align="center"><a href="https://www.linkedin.com/in/jpbochi"><img src="https://avatars1.githubusercontent.com/u/96475?v=4" width="50px;" alt="João Paulo Bochi"/><br /><sub><b>João Paulo Bochi</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=jpbochi" title="Code">💻</a></td>
71 <td align="center"><a href="http://maael.github.io/"><img src="https://avatars3.githubusercontent.com/u/5610674?v=4" width="50px;" alt="Matthew Elphick"/><br /><sub><b>Matthew Elphick</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=maael" title="Code">💻</a></td>
72 <td align="center"><a href="http://alterform.com"><img src="https://avatars2.githubusercontent.com/u/116871?v=4" width="50px;" alt="Nate Cavanaugh"/><br /><sub><b>Nate Cavanaugh</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=natecavanaugh" title="Code">💻</a></td>
73 <td align="center"><a href="https://www.peterdavehello.org/"><img src="https://avatars3.githubusercontent.com/u/3691490?v=4" width="50px;" alt="Peter Dave Hello"/><br /><sub><b>Peter Dave Hello</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=PeterDaveHello" title="Code">💻</a></td>
74 <td align="center"><a href="https://mattdesl.com/"><img src="https://avatars1.githubusercontent.com/u/1383811?v=4" width="50px;" alt="Matt DesLauriers"/><br /><sub><b>Matt DesLauriers</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=mattdesl" title="Code">💻</a></td>
75 <td align="center"><a href="https://github.com/oughter"><img src="https://avatars1.githubusercontent.com/u/18747026?v=4" width="50px;" alt="oughter"/><br /><sub><b>oughter</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=oughter" title="Code">💻</a></td>
76 </tr>
77 <tr>
78 <td align="center"><a href="https://adrianmacneil.com/"><img src="https://avatars2.githubusercontent.com/u/637671?v=4" width="50px;" alt="Adrian Macneil"/><br /><sub><b>Adrian Macneil</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=amacneil" title="Code">💻</a></td>
79 <td align="center"><a href="http://kbakba.net/"><img src="https://avatars1.githubusercontent.com/u/36834?v=4" width="50px;" alt="Aleksey Ostapenko"/><br /><sub><b>Aleksey Ostapenko</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=kbakba" title="Code">💻</a></td>
80 <td align="center"><a href="https://github.com/roadhump"><img src="https://avatars3.githubusercontent.com/u/234692?v=4" width="50px;" alt="Aliaksei"/><br /><sub><b>Aliaksei</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=roadhump" title="Code">💻</a></td>
81 <td align="center"><a href="https://akv.io"><img src="https://avatars2.githubusercontent.com/u/967317?v=4" width="50px;" alt="Andrey"/><br /><sub><b>Andrey</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=andreyvital" title="Code">💻</a></td>
82 <td align="center"><a href="http://arbo.com.br"><img src="https://avatars0.githubusercontent.com/u/859765?v=4" width="50px;" alt="André de Oliveira"/><br /><sub><b>André de Oliveira</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=arboliveira" title="Code">💻</a></td>
83 <td align="center"><a href="https://slewsystems.com"><img src="https://avatars1.githubusercontent.com/u/5579960?v=4" width="50px;" alt="Brandon Patram"/><br /><sub><b>Brandon Patram</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=bpatram" title="Code">💻</a></td>
84 <td align="center"><a href="https://twitter.com/jbalsas"><img src="https://avatars1.githubusercontent.com/u/905006?v=4" width="50px;" alt="Chema Balsas"/><br /><sub><b>Chema Balsas</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=jbalsas" title="Code">💻</a></td>
85 </tr>
86 <tr>
87 <td align="center"><a href="http://cswebartisan.com"><img src="https://avatars2.githubusercontent.com/u/555044?v=4" width="50px;" alt="Christian Schlensker"/><br /><sub><b>Christian Schlensker</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=wordofchristian" title="Code">💻</a></td>
88 <td align="center"><a href="http://cironunes.com/"><img src="https://avatars2.githubusercontent.com/u/469908?v=4" width="50px;" alt="Ciro Nunes"/><br /><sub><b>Ciro Nunes</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=cironunes" title="Code">💻</a></td>
89 <td align="center"><a href="https://t.me/piterden"><img src="https://avatars3.githubusercontent.com/u/5930429?v=4" width="50px;" alt="Denis Efremov"/><br /><sub><b>Denis Efremov</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=Piterden" title="Code">💻</a></td>
90 <td align="center"><a href="http://henrimichel.com.br"><img src="https://avatars1.githubusercontent.com/u/2352034?v=4" width="50px;" alt="Henri Cavalcante"/><br /><sub><b>Henri Cavalcante</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=henricavalcante" title="Code">💻</a></td>
91 <td align="center"><a href="http://www.jakahudoklin.com"><img src="https://avatars2.githubusercontent.com/u/585547?v=4" width="50px;" alt="Jaka Hudoklin"/><br /><sub><b>Jaka Hudoklin</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=offlinehacker" title="Code">💻</a></td>
92 <td align="center"><a href="http://twitter.com/jfroma"><img src="https://avatars3.githubusercontent.com/u/178512?v=4" width="50px;" alt="José F. Romaniello"/><br /><sub><b>José F. Romaniello</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=jfromaniello" title="Code">💻</a></td>
93 <td align="center"><a href="http://joshuawu.me/"><img src="https://avatars2.githubusercontent.com/u/12107969?v=4" width="50px;" alt="Joshua Wu"/><br /><sub><b>Joshua Wu</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=jwu910" title="Code">💻</a></td>
94 </tr>
95 <tr>
96 <td align="center"><a href="https://keaglin.com"><img src="https://avatars0.githubusercontent.com/u/1952896?v=4" width="50px;" alt="Kevon Eaglin"/><br /><sub><b>Kevon Eaglin</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=keaglin" title="Code">💻</a></td>
97 <td align="center"><a href="https://mtyurt.net"><img src="https://avatars0.githubusercontent.com/u/2225537?v=4" width="50px;" alt="M. Tarık Yurt"/><br /><sub><b>M. Tarık Yurt</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=mtyurt" title="Code">💻</a></td>
98 <td align="center"><a href="https://mbuffett.com"><img src="https://avatars3.githubusercontent.com/u/1834328?v=4" width="50px;" alt="Marcus Buffett"/><br /><sub><b>Marcus Buffett</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=marcusbuffett" title="Code">💻</a></td>
99 <td align="center"><a href="https://rands0n.com"><img src="https://avatars2.githubusercontent.com/u/4191734?v=4" width="50px;" alt="Randѕon"/><br /><sub><b>Randѕon</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=rands0n" title="Code">💻</a></td>
100 <td align="center"><a href="http://www.earthbound.io"><img src="https://avatars1.githubusercontent.com/u/2556781?v=4" width="50px;" alt="Alex Hall"/><br /><sub><b>Alex Hall</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=earthbound19" title="Code">💻</a></td>
101 <td align="center"><a href="http://www.dev-institut.fr"><img src="https://avatars1.githubusercontent.com/u/1372183?v=4" width="50px;" alt="Rossi Oddet"/><br /><sub><b>Rossi Oddet</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=roddet" title="Code">💻</a></td>
102 <td align="center"><a href="https://github.com/rschmukler"><img src="https://avatars1.githubusercontent.com/u/651740?v=4" width="50px;" alt="Ryan Schmukler"/><br /><sub><b>Ryan Schmukler</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=rschmukler" title="Code">💻</a></td>
103 </tr>
104 <tr>
105 <td align="center"><a href="https://www.onato.com/"><img src="https://avatars2.githubusercontent.com/u/107999?v=4" width="50px;" alt="Stephen Williams"/><br /><sub><b>Stephen Williams</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=onato" title="Code">💻</a></td>
106 <td align="center"><a href="http://www.wulftone.com"><img src="https://avatars3.githubusercontent.com/u/142784?v=4" width="50px;" alt="Trevor Bortins"/><br /><sub><b>Trevor Bortins</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=wulftone" title="Code">💻</a></td>
107 <td align="center"><a href="https://github.com/wbyoung"><img src="https://avatars1.githubusercontent.com/u/57162?v=4" width="50px;" alt="Whitney Young"/><br /><sub><b>Whitney Young</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=wbyoung" title="Code">💻</a></td>
108 <td align="center"><a href="https://www.lgtm.com"><img src="https://avatars3.githubusercontent.com/u/7395402?v=4" width="50px;" alt="Xavier RENE-CORAIL"/><br /><sub><b>Xavier RENE-CORAIL</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=xcorail" title="Code">💻</a></td>
109 <td align="center"><a href="http://the.igreque.info/"><img src="https://avatars2.githubusercontent.com/u/227057?v=4" width="50px;" alt="YAMAMOTO Yuji"/><br /><sub><b>YAMAMOTO Yuji</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=igrep" title="Code">💻</a></td>
110 <td align="center"><a href="https://github.com/smikes"><img src="https://avatars0.githubusercontent.com/u/5124609?v=4" width="50px;" alt="Sam Mikes"/><br /><sub><b>Sam Mikes</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=smikes" title="Code">💻</a></td>
111 <td align="center"><a href="https://github.com/tijuthomas"><img src="https://avatars0.githubusercontent.com/u/8406974?v=4" width="50px;" alt="Tiju Thomas"/><br /><sub><b>Tiju Thomas</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=tijuthomas" title="Code">💻</a></td>
112 </tr>
113 <tr>
114 <td align="center"><a href="https://averba.ch"><img src="https://avatars3.githubusercontent.com/u/2838836?v=4" width="50px;" alt="Zev Averbach"/><br /><sub><b>Zev Averbach</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=zevaverbach" title="Code">💻</a> <a href="https://github.com/node-gh/gh/issues?q=author%3Azevaverbach" title="Bug reports">🐛</a></td>
115 <td align="center"><a href="http://aaronkjones.com"><img src="https://avatars1.githubusercontent.com/u/17125755?v=4" width="50px;" alt="Aaron Jones"/><br /><sub><b>Aaron Jones</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Aaaronkjones" title="Bug reports">🐛</a></td>
116 <td align="center"><a href="https://linkedin.com/in/jrschumacher"><img src="https://avatars1.githubusercontent.com/u/46549?v=4" width="50px;" alt="Ryan Schumacher"/><br /><sub><b>Ryan Schumacher</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ajrschumacher" title="Bug reports">🐛</a></td>
117 <td align="center"><a href="http://robdodson.me"><img src="https://avatars0.githubusercontent.com/u/1066253?v=4" width="50px;" alt="Rob Dodson"/><br /><sub><b>Rob Dodson</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Arobdodson" title="Bug reports">🐛</a></td>
118 <td align="center"><a href="https://github.com/dsifford"><img src="https://avatars0.githubusercontent.com/u/5240018?v=4" width="50px;" alt="Derek Sifford"/><br /><sub><b>Derek Sifford</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Adsifford" title="Bug reports">🐛</a></td>
119 <td align="center"><a href="https://github.com/rachidbch"><img src="https://avatars1.githubusercontent.com/u/1119174?v=4" width="50px;" alt="rachidbch"/><br /><sub><b>rachidbch</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Arachidbch" title="Bug reports">🐛</a></td>
120 <td align="center"><a href="https://www.tabookey.com/"><img src="https://avatars0.githubusercontent.com/u/1171354?v=4" width="50px;" alt="Liraz Siri"/><br /><sub><b>Liraz Siri</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Alirazsiri" title="Bug reports">🐛</a></td>
121 </tr>
122 <tr>
123 <td align="center"><a href="https://github.com/zsoltbalogh"><img src="https://avatars1.githubusercontent.com/u/866157?v=4" width="50px;" alt="Zsolt Balogh"/><br /><sub><b>Zsolt Balogh</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Azsoltbalogh" title="Bug reports">🐛</a> <a href="https://github.com/node-gh/gh/commits?author=zsoltbalogh" title="Documentation">📖</a></td>
124 <td align="center"><a href="https://www.liferay.com/"><img src="https://avatars3.githubusercontent.com/u/78014?v=4" width="50px;" alt="Iliyan Peychev"/><br /><sub><b>Iliyan Peychev</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Aipeychev" title="Bug reports">🐛</a></td>
125 <td align="center"><a href="https://dante.io"><img src="https://avatars0.githubusercontent.com/u/1185063?v=4" width="50px;" alt="Dante Wang"/><br /><sub><b>Dante Wang</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Adantewang" title="Bug reports">🐛</a></td>
126 <td align="center"><a href="http://rotty3000.github.io"><img src="https://avatars1.githubusercontent.com/u/146764?v=4" width="50px;" alt="Raymond Augé"/><br /><sub><b>Raymond Augé</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Arotty3000" title="Bug reports">🐛</a></td>
127 <td align="center"><a href="https://mbassem.com"><img src="https://avatars2.githubusercontent.com/u/2418637?v=4" width="50px;" alt="Mohamed Bassem"/><br /><sub><b>Mohamed Bassem</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3AMohamedBassem" title="Bug reports">🐛</a></td>
128 <td align="center"><a href="https://github.com/sez11a"><img src="https://avatars3.githubusercontent.com/u/515497?v=4" width="50px;" alt="Rich Sezov"/><br /><sub><b>Rich Sezov</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Asez11a" title="Bug reports">🐛</a></td>
129 <td align="center"><a href="https://github.com/jasonkuhrt"><img src="https://avatars3.githubusercontent.com/u/284476?v=4" width="50px;" alt="Jason Kuhrt"/><br /><sub><b>Jason Kuhrt</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ajasonkuhrt" title="Bug reports">🐛</a></td>
130 </tr>
131 <tr>
132 <td align="center"><a href="https://github.com/gon138"><img src="https://avatars0.githubusercontent.com/u/5614711?v=4" width="50px;" alt="gon138"/><br /><sub><b>gon138</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Agon138" title="Bug reports">🐛</a></td>
133 <td align="center"><a href="https://github.com/m-novikov"><img src="https://avatars2.githubusercontent.com/u/5163640?v=4" width="50px;" alt="Maxim Novikov"/><br /><sub><b>Maxim Novikov</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Am-novikov" title="Bug reports">🐛</a></td>
134 <td align="center"><a href="https://andersdjohnson.com"><img src="https://avatars3.githubusercontent.com/u/615381?v=4" width="50px;" alt="Anders D. Johnson"/><br /><sub><b>Anders D. Johnson</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3AAndersDJohnson" title="Bug reports">🐛</a></td>
135 <td align="center"><a href="https://izaias.co"><img src="https://avatars3.githubusercontent.com/u/192261?v=4" width="50px;" alt="Gabriel Izaias"/><br /><sub><b>Gabriel Izaias</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Agabrielizaias" title="Bug reports">🐛</a></td>
136 <td align="center"><a href="https://smyles.dev"><img src="https://avatars3.githubusercontent.com/u/553732?v=4" width="50px;" alt="Myles McNamara"/><br /><sub><b>Myles McNamara</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Atripflex" title="Bug reports">🐛</a></td>
137 <td align="center"><a href="https://www.giladpeleg.com"><img src="https://avatars0.githubusercontent.com/u/4533329?v=4" width="50px;" alt="Gilad Peleg"/><br /><sub><b>Gilad Peleg</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Apgilad" title="Bug reports">🐛</a></td>
138 <td align="center"><a href="https://yoshuawuyts.com"><img src="https://avatars3.githubusercontent.com/u/2467194?v=4" width="50px;" alt="Yoshua Wuyts"/><br /><sub><b>Yoshua Wuyts</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ayoshuawuyts" title="Bug reports">🐛</a></td>
139 </tr>
140 <tr>
141 <td align="center"><a href="http://marclundgren.github.io/"><img src="https://avatars1.githubusercontent.com/u/1154834?v=4" width="50px;" alt="Marc Lundgren"/><br /><sub><b>Marc Lundgren</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Amarclundgren" title="Bug reports">🐛</a></td>
142 <td align="center"><a href="https://github.com/juliocamarero"><img src="https://avatars0.githubusercontent.com/u/203395?v=4" width="50px;" alt="Julio Camarero"/><br /><sub><b>Julio Camarero</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ajuliocamarero" title="Bug reports">🐛</a></td>
143 <td align="center"><a href="http://www.liferay.com/web/marcellus.tavares/blog"><img src="https://avatars2.githubusercontent.com/u/286892?v=4" width="50px;" alt="Marcellus Tavares"/><br /><sub><b>Marcellus Tavares</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Amarcellustavares" title="Bug reports">🐛</a></td>
144 <td align="center"><a href="http://www.liferay.com/es/web/sergio.gonzalez/blog"><img src="https://avatars3.githubusercontent.com/u/860987?v=4" width="50px;" alt="Sergio Gonzalez"/><br /><sub><b>Sergio Gonzalez</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Asergiogonzalez" title="Bug reports">🐛</a></td>
145 <td align="center"><a href="http://resume.djalmaaraujo.com/"><img src="https://avatars1.githubusercontent.com/u/3402?v=4" width="50px;" alt="Djalma Araújo"/><br /><sub><b>Djalma Araújo</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Adjalmaaraujo" title="Bug reports">🐛</a></td>
146 <td align="center"><a href="https://github.com/brunobasto"><img src="https://avatars0.githubusercontent.com/u/156388?v=4" width="50px;" alt="Bruno Basto"/><br /><sub><b>Bruno Basto</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Abrunobasto" title="Bug reports">🐛</a></td>
147 <td align="center"><a href="http://jason.pincin.com/"><img src="https://avatars0.githubusercontent.com/u/1831096?v=4" width="50px;" alt="Jason Pincin"/><br /><sub><b>Jason Pincin</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ajasonpincin" title="Bug reports">🐛</a></td>
148 </tr>
149 <tr>
150 <td align="center"><a href="https://twitter.com/leoj3n"><img src="https://avatars2.githubusercontent.com/u/990216?v=4" width="50px;" alt="Joel Kuzmarski"/><br /><sub><b>Joel Kuzmarski</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Aleoj3n" title="Bug reports">🐛</a></td>
151 <td align="center"><a href="https://github.com/shinzui"><img src="https://avatars3.githubusercontent.com/u/519?v=4" width="50px;" alt="Nadeem Bitar"/><br /><sub><b>Nadeem Bitar</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=shinzui" title="Documentation">📖</a></td>
152 <td align="center"><a href="https://github.com/cleydyr"><img src="https://avatars1.githubusercontent.com/u/441513?v=4" width="50px;" alt="Cleydyr Bezerra de Albuquerque"/><br /><sub><b>Cleydyr Bezerra de Albuquerque</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Acleydyr" title="Bug reports">🐛</a></td>
153 <td align="center"><a href="https://twitter.com/rmnPires"><img src="https://avatars1.githubusercontent.com/u/1796577?v=4" width="50px;" alt="Ramon Pires da Silva"/><br /><sub><b>Ramon Pires da Silva</b></sub></a><br /><a href="#plugin-ramonPires" title="Plugin/utility libraries">🔌</a></td>
154 <td align="center"><a href="https://github.com/Lisiadito"><img src="https://avatars0.githubusercontent.com/u/13214912?v=4" width="50px;" alt="Patrick Weingärtner"/><br /><sub><b>Patrick Weingärtner</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=Lisiadito" title="Code">💻</a></td>
155 <td align="center"><a href="http://gabrieluizramos.com.br/"><img src="https://avatars0.githubusercontent.com/u/13336905?v=4" width="50px;" alt="Gabriel Ramos"/><br /><sub><b>Gabriel Ramos</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=gabrieluizramos" title="Code">💻</a></td>
156 <td align="center"><a href="https://github.com/mdelapenya"><img src="https://avatars2.githubusercontent.com/u/951580?v=4" width="50px;" alt="Manuel de la Peña"/><br /><sub><b>Manuel de la Peña</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=mdelapenya" title="Code">💻</a></td>
157 </tr>
158 <tr>
159 <td align="center"><a href="http://jmvidal.cse.sc.edu"><img src="https://avatars3.githubusercontent.com/u/228704?v=4" width="50px;" alt="Jose M Vidal"/><br /><sub><b>Jose M Vidal</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ajosemvidal" title="Bug reports">🐛</a></td>
160 <td align="center"><a href="http://saulovallory.com"><img src="https://avatars1.githubusercontent.com/u/117560?v=4" width="50px;" alt="Saulo Vallory"/><br /><sub><b>Saulo Vallory</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=svallory" title="Code">💻</a></td>
161 </tr>
162</table>
163
164<!-- ALL-CONTRIBUTORS-LIST:END -->
165
166This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
167
168## Contributing
169
170For detailed instructions, check [Contributing](https://github.com/node-gh/gh/blob/master/CONTRIBUTING.md). Don't miss the [source code reports](https://node-gh.github.io/reports/).
171
172## History
173
174For detailed changelog, check [Releases](https://github.com/node-gh/gh/releases).
175
176## License
177
178[BSD-3-Clause](https://github.com/node-gh/gh/blob/master/LICENSE.txt)
179
180## Demonstration
181
182<a href="https://asciinema.org/a/214594?autoplay=1">
183 <p align="center">
184 <img alt="Terminal Demo" src="http://nodegh.io/images/terminal-demo.svg" width="600">
185 </p>
186</a>
187
188## Supported Node Versions:
189
190- We support the node versions that the Node.js organization supports which as of now is Node v6 & up.
191
192<p><img src="https://github.com/nodejs/Release/blob/master/schedule.svg" alt="LTS Schedule"/></p>
193
194## Authentication
195
196- Under the hood, we are using [@octokit/rest](https://github.com/octokit/rest.js) to work with the GitHub API
197- The method of authentication that we use with octokit, is a personal access token
198- You have two options here:
199 1. Run `gh` which will start the authentication process & generate the token for you automatically
200 - Though they are hidden, the downside of this is having to type your user & pass
201 - Supports 2fa
202 2. [Manually generate your personal token](https://github.com/node-gh/gh/issues/450#issuecomment-490530739) & add it to your `~/.gh.json`
203
204## Available commands
205
206```
207gh help
208```
209
210- List all comands options.
211
212```
213gh help --all
214```
215
216- List specific command options.
217
218```
219gh help <command>
220```
221
222### Global flags
223
224| Option | Usage | Type |
225| ------------ | ---------- | --------- |
226| `--verbose` | _Optional_ | `Boolean` |
227| `--insane` | _Optional_ | `Boolean` |
228| `--no-color` | _Optional_ | `Boolean` |
229| `--no-hooks` | _Optional_ | `Boolean` |
230
231The verbose flag is useful for debugging issues.
232The insane flag is a more complete verbose flag, which leaks more privacy sensitive data by default.
233
234## Pull requests
235
236```
237gh pull-request
238```
239
240> **Alias:** `gh pr`
241
242### 1. Info
243
244| Option | Usage | Type |
245| ---------------- | ---------- | --------- |
246| `-u`, `--user` | _Required_ | `String` |
247| `-I`, `--info` | _Required_ | `Boolean` |
248| `-n`, `--number` | _Required_ | `String` |
249| `-r`, `--repo` | _Optional_ | `String` |
250| `-u`, `--user` | _Optional_ | `String` |
251
252```
253gh pr
254```
255
256- Get information about a pull request.
257
258```
259gh pr --info number
260```
261
262### 2. List
263
264| Option | Usage | Type |
265| ------------------ | ------------ | ------------------------------------------------------------------ |
266| `-l`, `--list` | **Required** | `Boolean` |
267| `-a`, `--all` | _Optional_ | `Boolean` |
268| `-O`, `--org` | _Optional_ | `String` |
269| `-m`, `--me` | _Optional_ | `Boolean` |
270| `-d`, `--detailed` | _Optional_ | `Boolean` |
271| `--direction` | _Optional_ | [`asc`, `desc`] |
272| `--date` | _Optional_ | `String` |
273| `-b`, `--branch` | _Optional_ | `String` |
274| `--remote` | _Optional_ | `String` |
275| `-r`, `--repo` | _Optional_ | `String` |
276| `--sort` | _Optional_ | [`created`, `updated`, `popularity`, `long-running`, `complexity`] |
277| `-S`, `--state` | _Optional_ | [`open`, `closed`] |
278| `-u`, `--user` | _Optional_ | `String` |
279| `--link` | _Optional_ | `Boolean` |
280
281`user` is owner of the repository, it is the authenticated user by default.
282`remote` is the name of the remote configuration in a git directory, i.e. origin, upstream. Therefore, it only makes sense when this command is run in a git directory.
283
284#### Examples
285
286- **Shortcut** for listing open pull requests for the current repository.
287- To turn off pretty printing of output in a table add `"pretty_print": false` to your `~/.gh-json` config
288
289- List open pull requests for all branches from all your repositories.
290
291```
292gh pr --list --all
293```
294
295- List open pull requests for all branches in all repositories belonging to the "github" organization.
296
297```
298gh pr --list --all --org github
299```
300
301- List open pull requests sent by logged user on current repository.
302
303```
304gh pr --list --me
305```
306
307- List open pull requests in node-gh/gh repository.
308
309```
310gh pr --list --user node-gh --repo gh
311```
312
313- List open pull requests with link and content.
314
315```
316gh pr --list --detailed
317```
318
319- List open pull requests for a branch.
320
321```
322gh pr --list --branch master
323```
324
325- List open pull requests and sort them by popularity _(comment count)_.
326
327```
328gh pr --list --sort popularity
329```
330
331- List open pull requests and sort them by asc long-running _(old but still active)_.
332
333```
334gh pr --list --sort long-running --direction asc
335```
336
337- List open pull requests and sort them by complexity _(complexity is calculated based on number of additions, deletions, changed files, comments and review comments)_.
338
339```
340gh pr --list --sort complexity
341```
342
343- List open pull requests with their link
344
345```
346gh pr --list --link
347```
348
349- List open pull requests with a formatted date (_Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/_).
350
351```
352gh pr --list --date "dddd, MMMM Do YYYY, h:mm:ss a"
353```
354
355### 3. Fetch
356
357| Option | Usage | Type |
358| ---------------- | ------------ | --------- |
359| `-f`, `--fetch` | **Required** | `Boolean` |
360| `-n`, `--number` | **Required** | `Number` |
361| `-M`, `--merge` | _Optional_ | `Boolean` |
362| `-R`, `--rebase` | _Optional_ | `Boolean` |
363| `--remote` | _Optional_ | `String` |
364| `-r`, `--repo` | _Optional_ | `String` |
365| `-u`, `--user` | _Optional_ | `String` |
366
367#### Examples
368
369- **Shortcut** for fetching pull request and checkout into a new branch `pr-1`.
370
371```
372gh pr 1
373```
374
375- Fech pull request rebasing or merging into the current branch.
376
377```
378gh pr 1 --fetch --rebase
379```
380
381```
382gh pr 1 --fetch --merge
383```
384
385### 4. Merge or rebase
386
387| Option | Usage | Type |
388| ---------------- | ------------ | --------- |
389| `-M`, `--merge` | **Required** | `Boolean` |
390| `-R`, `--rebase` | **Required** | `Boolean` |
391| `-n`, `--number` | _Optional_ | `Number` |
392| `-b`, `--branch` | _Optional_ | `String` |
393| `--draft` | _Optional_ | `Boolean` |
394| `--remote` | _Optional_ | `String` |
395| `-r`, `--repo` | _Optional_ | `String` |
396| `-u`, `--user` | _Optional_ | `String` |
397
398Omitting `--number` will try to guess the pull number from branch name e.g. `pr-1` results in `--number 1`. Omitting `--branch` will merge or rebase into `config.default_branch`.
399
400#### Examples
401
402- Merge or rebase pull request into a local branch.
403
404```
405gh pr 1 --fetch --merge
406```
407
408```
409gh pr 1 --fetch --rebase
410```
411
412- Merge or rebase pull request into branch `dev`.
413
414```
415gh pr 1 --fetch --rebase --branch dev
416```
417
418```
419gh pr 1 --fetch --merge --branch dev
420```
421
422### 5. Comment
423
424| Option | Usage | Type |
425| ----------------- | ------------ | -------- |
426| `-c`, `--comment` | **Required** | `String` |
427| `-n`, `--number` | **Required** | `Number` |
428| `--remote` | _Optional_ | `String` |
429| `-r`, `--repo` | _Optional_ | `String` |
430| `-u`, `--user` | _Optional_ | `String` |
431
432#### Examples
433
434- Comment on a pull request.
435
436```
437gh pr 1 --comment "Merged, thank you!"
438```
439
440### 6. Forward
441
442| Option | Usage | Type |
443| ---------------- | ------------ | -------- |
444| `--fwd` | **Required** | `String` |
445| `-n`, `--number` | **Required** | `Number` |
446
447Omitting a value for `--fwd` fallbacks to the `default_pr_forwarder` key found
448in your [config file](#config).
449
450#### Examples
451
452- Forward a pull request to another reviewer.
453
454```
455gh pr 1 --fwd username
456```
457
458### 7. Open or close
459
460| Option | Usage | Type |
461| ---------------- | ------------ | --------- |
462| `-o`, `--open` | **Required** | `Boolean` |
463| `-C`, `--close` | **Required** | `Boolean` |
464| `-n`, `--number` | **Required** | `Number` |
465| `--remote` | _Optional_ | `String` |
466| `-r`, `--repo` | _Optional_ | `String` |
467| `-u`, `--user` | _Optional_ | `String` |
468
469#### Examples
470
471- Open a pull request.
472
473```
474gh pr 1 --open
475```
476
477- Close a pull request.
478
479```
480gh pr 1 --close
481```
482
483- Close multiple pull requests.
484
485```
486gh pr --close --number 1 --number 2
487```
488
489- Open multiple pull requests.
490
491```
492gh pr --open --number 1 --number 2
493```
494
495- Open or close a pull request that you've sent to someone.
496
497```
498gh pr 1 --close --user eduardolundgren
499```
500
501### 8. Submit
502
503| Option | Usage | Type |
504| --------------------- | ------------ | -------- |
505| `-s`, `--submit` | **Required** | `String` |
506| `-b`, `--branch` | _Optional_ | `String` |
507| `-D`, `--description` | _Optional_ | `String` |
508| `-i`, `--issue` | _Optional_ | `Number` |
509| `-r`, `--repo` | _Optional_ | `String` |
510| `-t`, `--title` | _Optional_ | `String` |
511
512Omitting a value for `--submit` fallbacks to the `default_pr_reviewer` key found
513in your [config file](#config). Omitting `--title` will submit a pull request
514using the last commit message as title.
515
516#### Examples
517
518- Submit a pull request using the current branch.
519
520```
521gh pr --submit eduardolundgren --title 'Fix #32' --description 'Awesome fix'
522```
523
524- Submit a pull request using the current branch to dev branch.
525
526```
527gh pr --submit eduardolundgren --branch dev
528```
529
530- Submit a pull request from a issue.
531
532```
533gh pr --submit eduardolundgren --issue 150
534```
535
536- Submit a pull request in draft state.
537
538```
539gh pr --submit eduardolundgren --draft
540```
541
542### 9. Open in Browser
543
544| Option | Usage | Type |
545| ----------------- | ------------ | --------- |
546| `-B`, `--browser` | **Required** | `Boolean` |
547| `-n`, `--number` | **Required** | `Number` |
548| `-u`, `--user` | _Optional_ | `String` |
549| `-r`, `--repo` | _Optional_ | `String` |
550
551#### Examples
552
553- Open GitHub pull request page in the browser.
554
555```
556gh pr 100 --browser
557```
558
559## Notifications
560
561```
562gh notification
563```
564
565> **Alias:** `gh nt`
566
567### 1. Latest
568
569| Option | Usage | Type |
570| ---------------- | ------------ | --------- |
571| `-l`, `--latest` | **Required** | `Boolean` |
572| `--remote` | _Optional_ | `String` |
573| `-r`, `--repo` | _Optional_ | `String` |
574| `-u`, `--user` | _Optional_ | `String` |
575| `--date` | _Optional_ | `String` |
576
577#### Examples
578
579- **Shortcut** for displaying the latest activities on the current repository.
580
581```
582gh nt
583```
584
585- Display the latest activities on a certain repository.
586
587```
588gh nt --latest --user eduardolundgren --repo node-gh
589```
590
591- Diplay notifications with a formatted date (_Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/_).
592
593```
594gh nt --date "dddd, MMMM Do YYYY, h:mm:ss a"
595```
596
597### 2. Watch
598
599| Option | Usage | Type |
600| --------------- | ------------ | --------- |
601| `-w`, `--watch` | **Required** | `Boolean` |
602| `--remote` | _Optional_ | `String` |
603| `-r`, `--repo` | _Optional_ | `String` |
604| `-u`, `--user` | _Optional_ | `String` |
605
606#### Examples
607
608- Watch for any activity on the current repository.
609
610```
611gh nt --watch
612```
613
614- Watch for any activity on a certain repository.
615
616```
617gh nt --watch --user eduardolundgren --repo node-gh
618```
619
620## Issues
621
622```
623gh issue
624```
625
626> **Alias:** `gh is`
627
628### 1. Create
629
630| Option | Usage | Type |
631| ------------------ | ------------ | --------- |
632| `-N`, `--new` | **Required** | `Boolean` |
633| `-t`, `--title` | **Required** | `String` |
634| `-A`, `--assignee` | _Optional_ | `String` |
635| `-L`, `--labels` | _Optional_ | `String` |
636| `-m`, `--message` | _Optional_ | `String` |
637| `--remote` | _Optional_ | `String` |
638| `-r`, `--repo` | _Optional_ | `String` |
639| `-u`, `--user` | _Optional_ | `String` |
640
641#### Examples
642
643- **Shortcut** for creating a new issue on the current repository.
644
645```
646gh is 'Node GH rocks!' 'Body with **Markdown** support'
647```
648
649- Create a new issue on a certain repository.
650
651```
652gh is --new --title 'Node GH rocks!' --message 'Body with **Markdown** support' --user eduardolundgren --repo node-gh
653```
654
655- Create a new issue with labels.
656
657```
658gh is --new --title 'Node GH rocks!' --labels bug,question,test
659```
660
661- Create a new issue and assign it to someone.
662
663```
664gh is --new --title 'Node GH rocks!' --assignee zenorocha
665```
666
667### 2. Comment
668
669| Option | Usage | Type |
670| ----------------- | ------------ | -------- |
671| `-c`, `--comment` | **Required** | `String` |
672| `-n`, `--number` | **Required** | `Number` |
673| `--remote` | _Optional_ | `String` |
674| `-r`, `--repo` | _Optional_ | `String` |
675| `-u`, `--user` | _Optional_ | `String` |
676
677#### Examples
678
679- Comment on an issue of the current repository.
680
681```
682gh is 1 --comment 'Node GH rocks!'
683```
684
685- Comment on an issue of a certain repository.
686
687```
688gh is 1 --comment 'Node GH rocks!' --user eduardolundgren --repo node-gh
689```
690
691### 3. Open or close
692
693| Option | Usage | Type |
694| ---------------- | ------------ | --------- |
695| `-o`, `--open` | **Required** | `Boolean` |
696| `-C`, `--close` | **Required** | `Boolean` |
697| `-n`, `--number` | **Required** | `Number` |
698| `--remote` | _Optional_ | `String` |
699| `-r`, `--repo` | _Optional_ | `String` |
700| `-u`, `--user` | _Optional_ | `String` |
701
702#### Examples
703
704- Open an issue.
705
706```
707gh is 1 --open
708```
709
710- Close an issue.
711
712```
713gh is 1 --close
714```
715
716- Close multiple issues.
717
718```
719gh is --close --number 1 --number 2
720```
721
722- Open multiple issues.
723
724```
725gh is --open --number 1 --number 2
726```
727
728- Open or close an issue that you've sent to someone.
729
730```
731gh is 1 --close --user eduardolundgren
732```
733
734### 4. List
735
736| Option | Usage | Type |
737| ------------------- | ------------ | -------------------- |
738| `-l`, `--list` | **Required** | `Boolean` |
739| `-a`, `--all` | _Optional_ | `Boolean` |
740| `-A`, `--assignee` | _Optional_ | `String` |
741| `--date` | _Optional_ | `String` |
742| `-d`, `--detailed` | _Optional_ | `Boolean` |
743| `-L`, `--labels` | _Optional_ | `String` |
744| `-M`, `--milestone` | _Optional_ | [`Number`, `String`] |
745| `--remote` | _Optional_ | `String` |
746| `-r`, `--repo` | _Optional_ | `String` |
747| `-S`, `--state` | _Optional_ | [`open`, `closed`] |
748| `-u`, `--user` | _Optional_ | `String` |
749
750#### Examples
751
752- **Shortcut** for listing all issues on the current repository.
753
754```
755gh is
756```
757
758- List all issues from all repositories.
759
760```
761gh is --list --all
762```
763
764- List issues assigned to someone.
765
766```
767gh is --list --assignee zenorocha
768```
769
770- List issues with link and content.
771
772```
773gh is --list --detailed
774```
775
776- List only closed issues on the current repository.
777
778```
779gh is --list --state closed
780```
781
782- List issues with a formatted date (_Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/_).
783
784```
785gh is --list --date "dddd, MMMM Do YYYY, h:mm:ss a"
786```
787
788- List issues filtered by milestone.
789
790```
791gh is --list --milestone 1
792```
793
794- List issues that contains labels `todo` and `bug`.
795
796```
797gh is --list --labels todo,bug
798```
799
800- List all issues on a certain repository.
801
802```
803gh is --list --user eduardolundgren --repo node-gh
804```
805
806### 5. Open in Browser
807
808| Option | Usage | Type |
809| ----------------- | ------------ | --------- |
810| `-B`, `--browser` | **Required** | `Boolean` |
811| `-n`, `--number` | **Required** | `Number` |
812| `-u`, `--user` | _Optional_ | `String` |
813| `-r`, `--repo` | _Optional_ | `String` |
814
815#### Examples
816
817- **Shortcut** for opening GitHub issue page in the browser.
818
819```
820gh is 100
821```
822
823- Open GitHub issue page in the browser.
824
825```
826gh is 100 --browser
827```
828
829### 6. Search
830
831| Option | Usage | Type |
832| ------------------ | ------------ | --------- |
833| `-s`, `--search` | **Required** | `Boolean` |
834| `-a`, `--all` | _Optional_ | `Boolean` |
835| `-d`, `--detailed` | _Optional_ | `Boolean` |
836| `-r`, `--repo` | _Optional_ | `String` |
837| `-u`, `--user` | _Optional_ | `String` |
838
839#### Examples
840
841- Search issues in current repository
842
843```
844gh is --search 'term'
845```
846
847- Search issues in all repositories for a user
848
849```
850gh is --all --user node-gh --search 'term'
851```
852
853- Search issues in a repository for a user
854
855```
856gh is --user node-gh --repo gh --search 'term'
857```
858
859- Search issues in a repository for a user with link and content
860
861```
862gh is --user node-gh --repo gh --search 'term'
863```
864
865- Search issues with github filters
866
867```
868gh is --user node-gh --repo gh --search 'updated:<=2013-05-24'
869```
870
871### 7. Assign
872
873| Option | Usage | Type |
874| ------------------ | ------------ | --------- |
875| `--assign` | **Required** | `Boolean` |
876| `-A`, `--assignee` | **Required** | `String` |
877| `-n`, `--number` | **Required** | `Number` |
878| `-r`, `--repo` | _Optional_ | `String` |
879| `-u`, `--user` | _Optional_ | `String` |
880
881#### Examples
882
883- Assign an issue on the current repository to a user.
884
885```
886gh is --assign --assignee zenorocha --number 1
887```
888
889- Assign an issue on a specific repository to a user.
890
891```
892gh is --assign --assignee zenorocha --number 1 --user eduardolundgren --repo gh
893```
894
895## Repo
896
897```
898gh repo
899```
900
901> **Alias:** `gh re`
902
903### 1. Open in Browser
904
905| Option | Usage | Type |
906| ----------------- | ------------ | --------- |
907| `-B`, `--browser` | **Required** | `Boolean` |
908| `-u`, `--user` | _Optional_ | `String` |
909| `-r`, `--repo` | _Optional_ | `String` |
910
911#### Examples
912
913- **Shortcut** for opening the GitHub repository page in the browser.
914
915```
916gh re
917```
918
919- Open GitHub repository page in the browser.
920
921```
922gh re --browser --user eduardolundgren --repo node-gh
923```
924
925### 2. List
926
927| Option | Usage | Type |
928| ------------------ | ------------ | ----------------------------------------------- |
929| `-l`, `--list` | **Required** | `Boolean` |
930| `-d`, `--detailed` | _Optional_ | `Boolean` |
931| `-u`, `--user` | _Optional_ | `String` |
932| `-t`, `--type` | _Optional_ | [`all`, `owner`, `public`, `private`, `member`] |
933| `--date` | _Optional_ | `String` |
934
935#### Examples
936
937- List all repositories.
938
939```
940gh re --list
941```
942
943- List all private repositories.
944
945```
946gh re --list --type private
947```
948
949- List all repositories from someone.
950
951```
952gh re --list --user zenorocha
953```
954
955- List open repositories with a formatted date (_Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/_).
956
957```
958gh re --list --detailed --date "dddd, MMMM Do YYYY, h:mm:ss a"
959```
960
961### 3. Create
962
963| Option | Usage | Type |
964| ---------------------- | ------------ | ----------- |
965| `-N`, `--new` | **Required** | `String` |
966| `-O`, `--organization` | _Optional_ | `String` |
967| `-c`, `--clone` | _Optional_ | `Boolean` |
968| `-t`, `--type` | _Optional_ | [`private`] |
969| `--init` | _Optional_ | `Boolean` |
970| `--gitignore` | _Optional_ | `String` |
971| `--homepage` | _Optional_ | `String` |
972| `--description` | _Optional_ | `String` |
973
974#### Examples
975
976- Create a new GitHub repository and clone on the current directory.
977
978```
979gh re --new foo --clone
980```
981
982- Create a new GitHub repository for an organization.
983
984```
985gh re --new foo --organization node-gh
986```
987
988- Create a new GitHub repository using .gitignore template for Ruby.
989
990```
991gh re --new gemified --gitignore Ruby
992```
993
994- Create a new private repository on GitHub, initializing it with a initial commit of the README.
995
996```
997gh re --new foo --init --type private
998```
999
1000### 4. Fork
1001
1002| Option | Usage | Type |
1003| ---------------------- | ------------ | -------- |
1004| `-f`, `--fork` | **Required** | `String` |
1005| `-u`, `--user` | **Required** | `String` |
1006| `-O`, `--organization` | _Optional_ | `String` |
1007
1008#### Examples
1009
1010- Fork a GitHub repository.
1011
1012```
1013gh re --fork repo --user user
1014```
1015
1016- Fork a GitHub repository into the node-gh organization.
1017
1018```
1019gh re --fork repo --user user --organization node-gh
1020```
1021
1022### 5. Delete
1023
1024| Option | Usage | Type |
1025| ---------------- | ------------ | -------- |
1026| `-D`, `--delete` | **Required** | `String` |
1027| `-u`, `--user` | **Required** | `String` |
1028
1029#### Example
1030
1031- Delete a repository of the logged user.
1032
1033```
1034gh re --delete foo
1035```
1036
1037### 6. Clone
1038
1039| Option | Usage | Type |
1040| ---------------------- | ------------ | -------- |
1041| `-c`, `--clone` | **Required** | `String` |
1042| `-r`, `--repo` | **Required** | `String` |
1043| `-O`, `--organization` | _Optional_ | `String` |
1044| `-P`, `--protocol` | _Optional_ | `String` |
1045| `-u`, `--user` | _Optional_ | `String` |
1046
1047> If you have custom ssh config, you can add `"api": { "ssh_host": "custom-name", ... }` to your .gh.json file.
1048
1049#### Examples
1050
1051- Clone a repository.
1052
1053```
1054gh re --clone --repo gh
1055```
1056
1057- Clone a repository from a specific user using HTTPS protocol.
1058
1059```
1060gh re --clone --user eduardolundgren --repo gh --protocol https
1061```
1062
1063### 7. Create Label
1064
1065| Option | Usage | Type |
1066| ---------------------- | ------------ | --------- |
1067| `-C`, `--color` | **Required** | `String` |
1068| `-L`, `--label` | **Required** | `Boolean` |
1069| `-N`, `--new` | **Required** | `String` |
1070| `-r`, `--repo` | **Required** | `String` |
1071| `-O`, `--organization` | _Optional_ | `String` |
1072| `-u`, `--user` | _Optional_ | `String` |
1073
1074#### Examples
1075
1076- Create a label for a repository (_color is a hex code with or without literal hex symbol_).
1077
1078```
1079gh re --label --new bug --color '#7057ff' --repo gh
1080```
1081
1082- Create a label for a user's repository.
1083
1084```
1085gh re --label --new bug --color '#7057ff' --user eduardolundgren --repo gh
1086```
1087
1088### 8. Delete Label
1089
1090| Option | Usage | Type |
1091| ---------------------- | ------------ | --------- |
1092| `-L`, `--label` | **Required** | `Boolean` |
1093| `-D`, `--delete` | **Required** | `String` |
1094| `-r`, `--repo` | **Required** | `String` |
1095| `-O`, `--organization` | _Optional_ | `String` |
1096| `-u`, `--user` | _Optional_ | `String` |
1097
1098#### Examples
1099
1100- Delete a label from a repository.
1101
1102```
1103gh re --label --delete bug --repo gh
1104```
1105
1106- Delete a label from a user's repository.
1107
1108```
1109gh re --label --delete bug --user eduardolundgren --repo gh
1110```
1111
1112### 9. List Labels
1113
1114| Option | Usage | Type |
1115| ---------------------- | ------------ | --------- |
1116| `-L`, `--label` | **Required** | `Boolean` |
1117| `-l`, `--list` | **Required** | `Boolean` |
1118| `-r`, `--repo` | **Required** | `String` |
1119| `-O`, `--organization` | _Optional_ | `String` |
1120| `-u`, `--user` | _Optional_ | `String` |
1121
1122#### Examples
1123
1124- List labels for a repository.
1125
1126```
1127gh re --label --list --repo gh
1128```
1129
1130- List labels for a user's repository.
1131
1132```
1133gh re --label --list --user eduardolundgren --repo gh
1134```
1135
1136### 10. Update Label
1137
1138| Option | Usage | Type |
1139| ---------------------- | ------------ | --------- |
1140| `-C`, `--color` | **Required** | `String` |
1141| `-L`, `--label` | **Required** | `Boolean` |
1142| `-r`, `--repo` | **Required** | `String` |
1143| `-U`, `--update` | **Required** | `String` |
1144| `-O`, `--organization` | _Optional_ | `String` |
1145| `-u`, `--user` | _Optional_ | `String` |
1146
1147#### Examples
1148
1149- Update a label for a repository (_color is a hex code with or without literal hex symbol_).
1150
1151```
1152gh re --label --update bug --color color --repo gh
1153```
1154
1155- Update a label for a user's repository.
1156
1157```
1158gh re --label --update bug --color color --user eduardolundgren --repo gh
1159```
1160
1161### 11. Search
1162
1163Find repositories via various criteria. Repository search looks through the projects you have access to on GitHub.
1164You can filter the results using GitHub's search qualifiers.
1165[Examples:](https://help.github.com/articles/searching-for-repositories/)
1166
1167| Option | Usage | Type |
1168| ---------------------- | ------------ | ----------------------------------------------- |
1169| `-s`, `--search` | **Required** | `Boolean` |
1170| `-d`, `--detailed` | _Optional_ | `Boolean` |
1171| `-u`, `--user` | _Optional_ | `String` |
1172| `-r`, `--repo` | _Optional_ | `String` |
1173| `-O`, `--organization` | _Optional_ | `String` |
1174| `-t`, `--type` | _Optional_ | [`all`, `owner`, `public`, `private`, `member`] |
1175
1176#### Examples
1177
1178- Search private repositories you have access to with the term "secret".
1179
1180```
1181gh re --search secret --type private
1182```
1183
1184OR
1185
1186```
1187gh re --search secret is:private
1188```
1189
1190- Matches repositories from GitHub org showing detailed results.
1191
1192```
1193gh re --detailed -o github --search octocat
1194```
1195
1196OR
1197
1198```
1199gh re --detailed --search octocat org:github
1200```
1201
1202## Gists
1203
1204```
1205gh gists
1206```
1207
1208> **Alias:** `gh gi`
1209
1210### 1. Open in Browser
1211
1212| Option | Usage | Type |
1213| ----------------- | ------------ | --------- |
1214| `-B`, `--browser` | **Required** | `Boolean` |
1215| `-u`, `--user` | _Optional_ | `String` |
1216| `-i`, `--id` | _Optional_ | `String` |
1217
1218#### Examples
1219
1220- **Shortcut** for opening your Gists in the browser.
1221
1222```
1223gh gi
1224```
1225
1226- Open a Gist in the browser.
1227
1228```
1229gh gi --browser --id 5991877
1230```
1231
1232### 2. List
1233
1234| Option | Usage | Type |
1235| -------------- | ------------ | --------- |
1236| `-l`, `--list` | **Required** | `Boolean` |
1237| `-u`, `--user` | _Optional_ | `String` |
1238| `--date` | _Optional_ | `String` |
1239
1240#### Examples
1241
1242- List all gists.
1243
1244```
1245gh gi --list
1246```
1247
1248- List all gists from someone.
1249
1250```
1251gh gi --list --user brunocoelho
1252```
1253
1254- List gists with a formatted date (_Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/_).
1255
1256```
1257gh gi --list --date "dddd, MMMM Do YYYY, h:mm:ss a"
1258```
1259
1260### 3. Create
1261
1262| Option | Usage | Type |
1263| --------------------- | ------------ | --------- |
1264| `-N`, `--new` | **Required** | `String` |
1265| `-c`, `--content` | _Optional_ | `String` |
1266| `-d`, `--description` | _Optional_ | `String` |
1267| `-p`, `--private` | _Optional_ | `Boolean` |
1268
1269#### Examples
1270
1271- Create a Gist `hello` containing "Hello World".
1272
1273```
1274gh gi --new hello --content "Hello World!"
1275```
1276
1277- Create a private Gist `hello` containing "Hello World".
1278
1279```
1280gh gi --new hello --content "Hello World!" --private
1281```
1282
1283### 4. Fork
1284
1285| Option | Usage | Type |
1286| -------------- | ------------ | -------- |
1287| `-f`, `--fork` | **Required** | `String` |
1288
1289#### Examples
1290
1291- Fork a Gist.
1292
1293```
1294gh gi --fork 5444883
1295```
1296
1297### 5. Delete
1298
1299| Option | Usage | Type |
1300| ---------------- | ------------ | -------- |
1301| `-D`, `--delete` | **Required** | `String` |
1302
1303#### Example
1304
1305- Delete a Gist.
1306
1307```
1308gh gi --delete 4252323
1309```
1310
1311- Delete multiple Gists.
1312
1313```
1314gh gi --delete 4252321 --delete 4252322
1315```
1316
1317## User
1318
1319```
1320gh user
1321```
1322
1323> **Alias:** `gh us`
1324
1325### 1. Login/Logout
1326
1327| Option | Usage | Type |
1328| ---------------- | ------------ | --------- |
1329| `-l`, `--login` | **Required** | `Boolean` |
1330| `-L`, `--logout` | **Required** | `Boolean` |
1331
1332#### Examples
1333
1334- Login or show current logged in GitHub user.
1335
1336```
1337gh user --login
1338```
1339
1340- Logout current GitHub account.
1341
1342```
1343gh user --logout
1344```
1345
1346### 2. Whoami
1347
1348| Option | Usage | Type |
1349| ---------------- | ------------ | --------- |
1350| `-w`, `--whoami` | **Required** | `Boolean` |
1351
1352#### Examples
1353
1354- Prints your username to stdout.
1355
1356```
1357gh user --whoami
1358```
1359
1360## Milestones
1361
1362```
1363gh milestone
1364```
1365
1366> **Alias:** `gh ms`
1367
1368### 1. List
1369
1370| Option | Usage | Type |
1371| ---------------------- | ------------ | --------- |
1372| `-l`, `--list` | **Required** | `Boolean` |
1373| `-u`, `--user` | _Required_ | `String` |
1374| `-a`, `--all` | _Required_ | `Boolean` |
1375| `-r`, `--repo` | _Optional_ | `String` |
1376| `-o`, `--organization` | _Optional_ | `String` |
1377
1378#### Examples
1379
1380- **Shortcut** for listing milestones for a specific repo.
1381
1382```
1383gh ms
1384```
1385
1386- Listing milestones for a specific repo & user.
1387
1388```
1389gh ms --list --user node-gh --repo gh
1390```
1391
1392- Listing all milestones for a specific organization.
1393
1394```
1395gh ms --list --all --organization node-gh
1396```
1397
1398## Alias
1399
1400This cmd provides something similar to shell aliases. If there are aliases in your .gh.json file, we will attempt to resolve the user, PR forwarder or PR submitter to your alias.
1401
1402```
1403gh alias
1404```
1405
1406> **Alias:** `gh al`
1407
1408### 1. List
1409
1410| Option | Usage | Type |
1411| -------------- | ------------ | --------- |
1412| `-l`, `--list` | **Required** | `Boolean` |
1413
1414#### Examples
1415
1416- **Shortcut** for listing aliases.
1417
1418```
1419gh alias
1420```
1421
1422- List aliases.
1423
1424```
1425gh alias --list
1426```
1427
1428### 2. Add
1429
1430| Option | Usage | Type |
1431| -------------- | ------------ | -------- |
1432| `-a`, `--add` | **Required** | `String` |
1433| `-u`, `--user` | **Required** | `String` |
1434
1435#### Examples
1436
1437- Create alias for username.
1438
1439```
1440gh alias --add zeno --user zenorocha
1441```
1442
1443### 3. Remove
1444
1445| Option | Usage | Type |
1446| ---------------- | ------------ | -------- |
1447| `-r`, `--remove` | **Required** | `String` |
1448
1449#### Examples
1450
1451- Remove alias.
1452
1453```
1454gh alias --remove zeno
1455```
1456
1457## Config
1458
1459There are some pretty useful configurations that you can set on [.gh.json](default.gh.json).
1460This file can be found under home directory _(on MacOSx: `/Users/yourName/.gh.json` on Windows: `C:\\Users\yourName\.gh.json`)_.
1461
1462You can also set per-project configurations by adding a `.gh.json` file in your project's root folder and overriding existing keys.
1463
1464- GitHub API configurations. Change it if you're a [GitHub Enterprise](https://enterprise.github.com/) user.
1465
1466```javascript
1467"api": {
1468 "host": "github.mydomain.com",
1469 "protocol": "https"
1470}
1471```
1472
1473- Set default branch and remote.
1474
1475```javascript
1476"default_branch": "master",
1477"default_remote": "origin"
1478```
1479
1480- Set default users when [submitting](#7-submit) or [forwarding](#5-forward) pull requests.
1481
1482```javascript
1483"default_pr_forwarder": "",
1484"default_pr_reviewer": ""
1485```
1486
1487- GitHub data filled once you log in.
1488
1489```javascript
1490"github_token": "",
1491"github_user": ""
1492```
1493
1494- Run automated tasks before or after a certain command.
1495
1496```javascript
1497"hooks": {
1498 "pull-request": {
1499 "merge": {
1500 "before": [{"cmd": "ls -la", "log": true}],
1501 "after": [
1502 "gh pr {{options.number}} --comment 'Thank you, pull request merged :D'"
1503 ]
1504 }
1505 }
1506}
1507```
1508
1509- Run automated tasks passing arguments to the commands. Required for prompt commands.
1510
1511```javascript
1512"hooks": {
1513 "pull-request": {
1514 "merge": {
1515 "before": [{"cmd": "foo", "args": ["bar", "qux"]}]
1516 }
1517 }
1518}
1519```
1520
1521- Set default branch name prefix for PR fetching.
1522
1523```javascript
1524"pull_branch_name_prefix": "pr-"
1525```
1526
1527- Insert signature below issue comment.
1528
1529```javascript
1530"signature": "<br><br>:octocat: *Sent from [GH](http://nodegh.io).*"
1531```
1532
1533- Turn off ssh when pulling a repo and use https instead.
1534
1535```javascript
1536"ssh": false,
1537```
1538
1539If you need to use a custom git command, set the environment variable `GH_GIT_COMMAND`.
1540
1541## Plugins
1542
1543- [GH Gif](https://github.com/node-gh/gh-gif) - A plugin for commenting on pull requests/issues using GIF reactions.
1544- [GH Travis](https://github.com/node-gh/gh-travis) - A plugin for integrating Travis, a continous integration server.
1545- [GH Jira](https://github.com/node-gh/gh-jira) - A plugin for integrating Jira, an issue management system.
1546
1547Feel free to create your own plugins by forking [GH Boilerplate](https://github.com/node-gh/gh-boilerplate).