Home

Awesome

DEPRECATED


<h1 align="center">Node GH</h1> <p align="center"> <a href="#contributors" alt="All Contributors Badge"> <img src="https://img.shields.io/badge/all_contributors-88-orange.svg?style=flat-square" /> </a> <a href="http://npmjs.org/gh" alt="NPM version Badge"> <img src="http://img.shields.io/npm/v/gh.svg?style=flat" /> </a> <a href="https://travis-ci.org/node-gh/gh" alt="Build Status Badge"> <img src="http://img.shields.io/travis/node-gh/gh/master.svg?style=flat" /> </a> <a href="https://snyk.io/test/github/node-gh/gh" alt="Known Vulnerabilities Badge"> <img src="https://snyk.io/test/github/node-gh/gh/badge.svg" /> </a> <a href="https://github.com/semantic-release/semantic-release" alt="Semantic Release Badge"> <img src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" /> </a> <a href="https://lgtm.com/projects/g/node-gh/gh/context:javascript" alt="LGTM Grade Badge"> <img src="https://img.shields.io/lgtm/grade/javascript/g/node-gh/gh.svg?logo=lgtm&logoWidth=18" /> </a> <a href="https://lgtm.com/projects/g/node-gh/gh/alerts" alt="LGTM Total Alerts Badge"> <img src="https://img.shields.io/lgtm/alerts/g/node-gh/gh.svg?logo=lgtm&logoWidth=18" /> </a> </p>

Boost your productivity & automate tasks when working with GitHub, all from the comfort of your CLI.

Table of contents

Contributors

<details><summary>Getting Started</summary> <details><summary>Available Commands</summary><br/> <details><summary>Pull Requests `pr`</summary> <details><summary>Issues `is`</summary> <details><summary>Repos `re`</summary> <details><summary>Gists `gi`</summary> <details><summary>User `us`</summary> <details><summary>Notifications `nt`</summary> <details><summary>Milestones `ms`</summary> <details><summary>Alias `al`</summary> <br/> </details> <details><summary>General</summary>

Install

npm install -g gh

Usage

Simple example: list prs for current repo

gh pr

Contributors

Huge thanks goes to these wonderful people (emoji key):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tr> <td align="center"><a href="https://github.com/eduardolundgren"><img src="https://avatars0.githubusercontent.com/u/113087?v=4" width="50px;" alt=""/><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="https://github.com/node-gh/gh/pulls?q=is%3Apr+reviewed-by%3Aeduardolundgren" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#ideas-eduardolundgren" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://zenorocha.com"><img src="https://avatars1.githubusercontent.com/u/398893?v=4" width="50px;" alt=""/><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="https://github.com/node-gh/gh/pulls?q=is%3Apr+reviewed-by%3Azenorocha" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#ideas-zenorocha" title="Ideas, Planning, & Feedback">πŸ€”</a> <a href="#content-zenorocha" title="Content">πŸ–‹</a></td> <td align="center"><a href="https://henvic.github.io/"><img src="https://avatars3.githubusercontent.com/u/936421?v=4" width="50px;" alt=""/><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="https://github.com/node-gh/gh/pulls?q=is%3Apr+reviewed-by%3Ahenvic" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#security-henvic" title="Security">πŸ›‘οΈ</a> <a href="#ideas-henvic" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/protoEvangelion"><img src="https://avatars3.githubusercontent.com/u/20076677?v=4" width="50px;" alt=""/><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="https://github.com/node-gh/gh/pulls?q=is%3Apr+reviewed-by%3AprotoEvangelion" title="Reviewed Pull Requests">πŸ‘€</a> <a href="#security-protoEvangelion" title="Security">πŸ›‘οΈ</a> <a href="#ideas-protoEvangelion" title="Ideas, Planning, & Feedback">πŸ€”</a></td> <td align="center"><a href="https://github.com/brunocoelho"><img src="https://avatars1.githubusercontent.com/u/827445?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://www.joyent.com/"><img src="https://avatars1.githubusercontent.com/u/2080476?v=4" width="50px;" alt=""/><br /><sub><b>Dustin Ryerson</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=dustinryerson" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/drewbrokke"><img src="https://avatars1.githubusercontent.com/u/6403097?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="http://twitter.com/joserobleda"><img src="https://avatars1.githubusercontent.com/u/1263865?v=4" width="50px;" alt=""/><br /><sub><b>Jose Ignacio</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=joserobleda" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/rodrigovidal"><img src="https://avatars0.githubusercontent.com/u/388081?v=4" width="50px;" alt=""/><br /><sub><b>Rodrigo Vidal</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=rodrigovidal" title="Code">πŸ’»</a></td> <td align="center"><a href="http://hamxabaig.github.io"><img src="https://avatars2.githubusercontent.com/u/12872177?v=4" width="50px;" alt=""/><br /><sub><b>Hamza Baig</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=hamxabaig" title="Code">πŸ’»</a></td> <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=""/><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> <td align="center"><a href="https://blog.tomrochette.com"><img src="https://avatars2.githubusercontent.com/u/188960?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://m-roberts.github.io"><img src="https://avatars2.githubusercontent.com/u/2947595?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://snyk.io"><img src="https://avatars2.githubusercontent.com/u/19733683?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="https://github.com/TheBlockchainDeveloper"><img src="https://avatars1.githubusercontent.com/u/139483?v=4" width="50px;" alt=""/><br /><sub><b>BlockchainDeveloper</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=TheBlockchainDeveloper" title="Code">πŸ’»</a></td> <td align="center"><a href="https://www.linkedin.com/in/jpbochi"><img src="https://avatars1.githubusercontent.com/u/96475?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://maael.github.io/"><img src="https://avatars3.githubusercontent.com/u/5610674?v=4" width="50px;" alt=""/><br /><sub><b>Matthew Elphick</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=maael" title="Code">πŸ’»</a></td> <td align="center"><a href="http://alterform.com"><img src="https://avatars2.githubusercontent.com/u/116871?v=4" width="50px;" alt=""/><br /><sub><b>Nate Cavanaugh</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=natecavanaugh" title="Code">πŸ’»</a></td> <td align="center"><a href="https://www.peterdavehello.org/"><img src="https://avatars3.githubusercontent.com/u/3691490?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://mattdesl.com/"><img src="https://avatars1.githubusercontent.com/u/1383811?v=4" width="50px;" alt=""/><br /><sub><b>Matt DesLauriers</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=mattdesl" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/oughter"><img src="https://avatars1.githubusercontent.com/u/18747026?v=4" width="50px;" alt=""/><br /><sub><b>oughter</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=oughter" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="https://adrianmacneil.com/"><img src="https://avatars2.githubusercontent.com/u/637671?v=4" width="50px;" alt=""/><br /><sub><b>Adrian Macneil</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=amacneil" title="Code">πŸ’»</a></td> <td align="center"><a href="http://kbakba.net/"><img src="https://avatars1.githubusercontent.com/u/36834?v=4" width="50px;" alt=""/><br /><sub><b>Aleksey Ostapenko</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=kbakba" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/roadhump"><img src="https://avatars3.githubusercontent.com/u/234692?v=4" width="50px;" alt=""/><br /><sub><b>Aliaksei</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=roadhump" title="Code">πŸ’»</a></td> <td align="center"><a href="https://akv.io"><img src="https://avatars2.githubusercontent.com/u/967317?v=4" width="50px;" alt=""/><br /><sub><b>Andrey</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=andreyvital" title="Code">πŸ’»</a></td> <td align="center"><a href="http://arbo.com.br"><img src="https://avatars0.githubusercontent.com/u/859765?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://slewsystems.com"><img src="https://avatars1.githubusercontent.com/u/5579960?v=4" width="50px;" alt=""/><br /><sub><b>Brandon Patram</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=bpatram" title="Code">πŸ’»</a></td> <td align="center"><a href="https://twitter.com/jbalsas"><img src="https://avatars1.githubusercontent.com/u/905006?v=4" width="50px;" alt=""/><br /><sub><b>Chema Balsas</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=jbalsas" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="http://cswebartisan.com"><img src="https://avatars2.githubusercontent.com/u/555044?v=4" width="50px;" alt=""/><br /><sub><b>Christian Schlensker</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=wordofchristian" title="Code">πŸ’»</a></td> <td align="center"><a href="http://cironunes.com/"><img src="https://avatars2.githubusercontent.com/u/469908?v=4" width="50px;" alt=""/><br /><sub><b>Ciro Nunes</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=cironunes" title="Code">πŸ’»</a></td> <td align="center"><a href="https://t.me/piterden"><img src="https://avatars3.githubusercontent.com/u/5930429?v=4" width="50px;" alt=""/><br /><sub><b>Denis Efremov</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=Piterden" title="Code">πŸ’»</a></td> <td align="center"><a href="http://henrimichel.com.br"><img src="https://avatars1.githubusercontent.com/u/2352034?v=4" width="50px;" alt=""/><br /><sub><b>Henri Cavalcante</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=henricavalcante" title="Code">πŸ’»</a></td> <td align="center"><a href="http://www.jakahudoklin.com"><img src="https://avatars2.githubusercontent.com/u/585547?v=4" width="50px;" alt=""/><br /><sub><b>Jaka Hudoklin</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=offlinehacker" title="Code">πŸ’»</a></td> <td align="center"><a href="http://twitter.com/jfroma"><img src="https://avatars3.githubusercontent.com/u/178512?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://joshuawu.me/"><img src="https://avatars2.githubusercontent.com/u/12107969?v=4" width="50px;" alt=""/><br /><sub><b>Joshua Wu</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=jwu910" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="https://keaglin.com"><img src="https://avatars0.githubusercontent.com/u/1952896?v=4" width="50px;" alt=""/><br /><sub><b>Kevon Eaglin</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=keaglin" title="Code">πŸ’»</a></td> <td align="center"><a href="https://mtyurt.net"><img src="https://avatars0.githubusercontent.com/u/2225537?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://mbuffett.com"><img src="https://avatars3.githubusercontent.com/u/1834328?v=4" width="50px;" alt=""/><br /><sub><b>Marcus Buffett</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=marcusbuffett" title="Code">πŸ’»</a></td> <td align="center"><a href="https://rands0n.com"><img src="https://avatars2.githubusercontent.com/u/4191734?v=4" width="50px;" alt=""/><br /><sub><b>RandΡ•on</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=rands0n" title="Code">πŸ’»</a></td> <td align="center"><a href="http://www.earthbound.io"><img src="https://avatars1.githubusercontent.com/u/2556781?v=4" width="50px;" alt=""/><br /><sub><b>Alex Hall</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=earthbound19" title="Code">πŸ’»</a></td> <td align="center"><a href="http://www.dev-institut.fr"><img src="https://avatars1.githubusercontent.com/u/1372183?v=4" width="50px;" alt=""/><br /><sub><b>Rossi Oddet</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=roddet" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/rschmukler"><img src="https://avatars1.githubusercontent.com/u/651740?v=4" width="50px;" alt=""/><br /><sub><b>Ryan Schmukler</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=rschmukler" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="https://www.onato.com/"><img src="https://avatars2.githubusercontent.com/u/107999?v=4" width="50px;" alt=""/><br /><sub><b>Stephen Williams</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=onato" title="Code">πŸ’»</a></td> <td align="center"><a href="http://www.wulftone.com"><img src="https://avatars3.githubusercontent.com/u/142784?v=4" width="50px;" alt=""/><br /><sub><b>Trevor Bortins</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=wulftone" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/wbyoung"><img src="https://avatars1.githubusercontent.com/u/57162?v=4" width="50px;" alt=""/><br /><sub><b>Whitney Young</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=wbyoung" title="Code">πŸ’»</a></td> <td align="center"><a href="https://www.lgtm.com"><img src="https://avatars3.githubusercontent.com/u/7395402?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://the.igreque.info/"><img src="https://avatars2.githubusercontent.com/u/227057?v=4" width="50px;" alt=""/><br /><sub><b>YAMAMOTO Yuji</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=igrep" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/smikes"><img src="https://avatars0.githubusercontent.com/u/5124609?v=4" width="50px;" alt=""/><br /><sub><b>Sam Mikes</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=smikes" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/tijuthomas"><img src="https://avatars0.githubusercontent.com/u/8406974?v=4" width="50px;" alt=""/><br /><sub><b>Tiju Thomas</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=tijuthomas" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="https://averba.ch"><img src="https://avatars3.githubusercontent.com/u/2838836?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://aaronkjones.com"><img src="https://avatars1.githubusercontent.com/u/17125755?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://linkedin.com/in/jrschumacher"><img src="https://avatars1.githubusercontent.com/u/46549?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://robdodson.me"><img src="https://avatars0.githubusercontent.com/u/1066253?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/dsifford"><img src="https://avatars0.githubusercontent.com/u/5240018?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/rachidbch"><img src="https://avatars1.githubusercontent.com/u/1119174?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://www.tabookey.com/"><img src="https://avatars0.githubusercontent.com/u/1171354?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="https://github.com/zsoltbalogh"><img src="https://avatars1.githubusercontent.com/u/866157?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://www.liferay.com/"><img src="https://avatars3.githubusercontent.com/u/78014?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://dante.io"><img src="https://avatars0.githubusercontent.com/u/1185063?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://rotty3000.github.io"><img src="https://avatars1.githubusercontent.com/u/146764?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://mbassem.com"><img src="https://avatars2.githubusercontent.com/u/2418637?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/sez11a"><img src="https://avatars3.githubusercontent.com/u/515497?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/jasonkuhrt"><img src="https://avatars3.githubusercontent.com/u/284476?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="https://github.com/gon138"><img src="https://avatars0.githubusercontent.com/u/5614711?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/m-novikov"><img src="https://avatars2.githubusercontent.com/u/5163640?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://andersdjohnson.com"><img src="https://avatars3.githubusercontent.com/u/615381?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://izaias.co"><img src="https://avatars3.githubusercontent.com/u/192261?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://smyles.dev"><img src="https://avatars3.githubusercontent.com/u/553732?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://www.giladpeleg.com"><img src="https://avatars0.githubusercontent.com/u/4533329?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://yoshuawuyts.com"><img src="https://avatars3.githubusercontent.com/u/2467194?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="http://marclundgren.github.io/"><img src="https://avatars1.githubusercontent.com/u/1154834?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/juliocamarero"><img src="https://avatars0.githubusercontent.com/u/203395?v=4" width="50px;" alt=""/><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> <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=""/><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> <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=""/><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> <td align="center"><a href="http://resume.djalmaaraujo.com/"><img src="https://avatars1.githubusercontent.com/u/3402?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/brunobasto"><img src="https://avatars0.githubusercontent.com/u/156388?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://jason.pincin.com/"><img src="https://avatars0.githubusercontent.com/u/1831096?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="https://twitter.com/leoj3n"><img src="https://avatars2.githubusercontent.com/u/990216?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://github.com/shinzui"><img src="https://avatars3.githubusercontent.com/u/519?v=4" width="50px;" alt=""/><br /><sub><b>Nadeem Bitar</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=shinzui" title="Documentation">πŸ“–</a></td> <td align="center"><a href="https://github.com/cleydyr"><img src="https://avatars1.githubusercontent.com/u/441513?v=4" width="50px;" alt=""/><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> <td align="center"><a href="https://twitter.com/rmnPires"><img src="https://avatars1.githubusercontent.com/u/1796577?v=4" width="50px;" alt=""/><br /><sub><b>Ramon Pires da Silva</b></sub></a><br /><a href="#plugin-ramonPires" title="Plugin/utility libraries">πŸ”Œ</a></td> <td align="center"><a href="https://github.com/Lisiadito"><img src="https://avatars0.githubusercontent.com/u/13214912?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://gabrieluizramos.com.br/"><img src="https://avatars0.githubusercontent.com/u/13336905?v=4" width="50px;" alt=""/><br /><sub><b>Gabriel Ramos</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=gabrieluizramos" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/mdelapenya"><img src="https://avatars2.githubusercontent.com/u/951580?v=4" width="50px;" alt=""/><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> </tr> <tr> <td align="center"><a href="http://jmvidal.cse.sc.edu"><img src="https://avatars3.githubusercontent.com/u/228704?v=4" width="50px;" alt=""/><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> <td align="center"><a href="http://saulovallory.com"><img src="https://avatars1.githubusercontent.com/u/117560?v=4" width="50px;" alt=""/><br /><sub><b>Saulo Vallory</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=svallory" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/hernan"><img src="https://avatars0.githubusercontent.com/u/15841?v=4" width="50px;" alt=""/><br /><sub><b>Hernan Fernandez</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=hernan" title="Code">πŸ’»</a></td> <td align="center"><a href="https://github.com/Aaron-K-T-Berry"><img src="https://avatars1.githubusercontent.com/u/24759009?v=4" width="50px;" alt=""/><br /><sub><b>Aaron Berry</b></sub></a><br /><a href="https://github.com/node-gh/gh/commits?author=Aaron-K-T-Berry" title="Code">πŸ’»</a></td> <td align="center"><a href="http://www.liferay.com/web/inacio.nery/profile"><img src="https://avatars0.githubusercontent.com/u/14062516?v=4" width="50px;" alt=""/><br /><sub><b>InΓ‘cio Nery</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ainacionery" title="Bug reports">πŸ›</a> <a href="https://github.com/node-gh/gh/commits?author=inacionery" title="Code">πŸ’»</a></td> <td align="center"><a href="http://marcbizal.com"><img src="https://avatars1.githubusercontent.com/u/1304994?v=4" width="50px;" alt=""/><br /><sub><b>Marcus Bizal</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Amarcbizal" title="Bug reports">πŸ›</a></td> <td align="center"><a href="http://julien.github.io"><img src="https://avatars2.githubusercontent.com/u/5572?v=4" width="50px;" alt=""/><br /><sub><b>Julien Castelain</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Ajulien" title="Bug reports">πŸ›</a> <a href="https://github.com/node-gh/gh/commits?author=julien" title="Code">πŸ’»</a></td> </tr> <tr> <td align="center"><a href="https://github.com/cspotcode"><img src="https://avatars1.githubusercontent.com/u/376504?v=4" width="50px;" alt=""/><br /><sub><b>Andrew Bradley</b></sub></a><br /><a href="https://github.com/node-gh/gh/issues?q=author%3Acspotcode" title="Bug reports">πŸ›</a></td> </tr> </table> <!-- markdownlint-enable --> <!-- prettier-ignore-end --> <!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the all-contributors specification. Contributions of any kind welcome!

Contributing

For detailed instructions, check Contributing. Don't miss the source code reports.

History

For detailed changelog, check Releases.

License

BSD-3-Clause

Demonstration

<a href="https://asciinema.org/a/214594?autoplay=1"> <p align="center"> <img alt="Terminal Demo" src="http://nodegh.io/images/terminal-demo.svg" width="600"> </p> </a>

Supported Node Versions:

We support the node versions that the Node.js organization supports which as of now is Node v6 & up.

<p><img src="https://github.com/nodejs/Release/blob/master/schedule.svg" alt="LTS Schedule"/></p>

Authentication

Under the hood, we are using @octokit/rest to work with the GitHub API The method of authentication that we use with octokit, is a personal access token You have two options here: 1. Run gh which will start the authentication process & generate the token for you automatically - Though they are hidden, the downside of this is having to type your user & pass - Supports 2fa 2. Manually generate your personal token & add it to your ~/.gh.json

Available commands

gh help

List all comands options.

gh help --all

List specific command options.

gh help <command>

Global flags

OptionUsageType
--verboseOptionalBoolean
--insaneOptionalBoolean
--no-colorOptionalBoolean
--no-hooksOptionalBoolean

The verbose flag is useful for debugging issues. The insane flag is a more complete verbose flag, which leaks more privacy sensitive data by default.

Pull requests

gh pull-request

Alias: gh pr

PR: Info

OptionUsageType
-u, --userRequiredString
-I, --infoRequiredBoolean
-n, --numberRequiredString
-r, --repoOptionalString
-u, --userOptionalString

Get information about a pull request.

gh pr --info 1

PR: List

OptionUsageType
-l, --listRequiredBoolean
-a, --allOptionalBoolean
-O, --orgOptionalString
-m, --meOptionalBoolean
-d, --detailedOptionalBoolean
--directionOptional[asc, desc]
--dateOptionalString
-b, --branchOptionalString
--remoteOptionalString
-r, --repoOptionalString
--sortOptional[created, updated, popularity, long-running, complexity]
-S, --stateOptional[open, closed]
-u, --userOptionalString
--linkOptionalBoolean

Examples

Shortcut for listing open pull requests for the current repository

gh pr

List open pull requests for all branches from all your repositories.

gh pr --list --all

List open pull requests for all branches in all repositories belonging to the "github" organization.

gh pr --list --all --org github

List open pull requests sent by logged user on current repository.

gh pr --list --me

List open pull requests in node-gh/gh repository.

gh pr --list --user node-gh --repo gh

List open pull requests with link and content.

gh pr --list --detailed

List open pull requests for a branch.

gh pr --list --branch master

List open pull requests and sort them by popularity (comment count).

gh pr --list --sort popularity

List open pull requests and sort them by asc long-running (old but still active).

gh pr --list --sort long-running --direction asc

List open pull requests and sort them by complexity (complexity is calculated based on number of additions, deletions, changed files, comments and review comments).

gh pr --list --sort complexity

List open pull requests with their link

gh pr --list --link

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/).

gh pr --list --date "dddd, MMMM Do YYYY, h:mm:ss a"

PR: Merge or Rebase

OptionUsageType
-f, --fetchRequiredBoolean
-M, --mergeRequiredBoolean
-R, --rebaseRequiredBoolean
-n, --numberOptionalNumber
-b, --branchOptionalString
--draftOptionalBoolean
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Omitting --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.

Examples

Shortcut for fetching pull request and checkout into a new branch pr-1.

gh pr 1

Merge or rebase pull request into a local 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

PR: Comment

OptionUsageType
-c, --commentRequiredString
-n, --numberRequiredNumber
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

Comment on a pull request.

gh pr 1 --comment "Merged, thank you!"

Submit a pull request using your default editor by passing an empty --comment

gh pr 1 --comment

PR Forward

OptionUsageType
--fwdRequiredString
-n, --numberRequiredNumber

Omitting a value for --fwd fallbacks to the default_pr_forwarder key found in your config file.

Examples

Forward a pull request to another reviewer.

gh pr 1 --fwd username

PR: Open or Close

OptionUsageType
-o, --openRequiredBoolean
-C, --closeRequiredBoolean
-n, --numberRequiredNumber
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

Open a pull request.

gh pr 1 --open

Close a pull request.

gh pr 1 --close

Close multiple pull requests.

gh pr --close --number 1 --number 2

Open multiple pull requests.

gh pr --open --number 1 --number 2

Open or close a pull request that you've sent to someone.

gh pr 1 --close --user eduardolundgren

PR: Submit

OptionUsageType
-s, --submitRequiredString
-b, --branchOptionalString
-D, --descriptionOptionalString
-i, --issueOptionalNumber
-r, --repoOptionalString
-t, --titleOptionalString

Omitting a value for --submit fallbacks to the default_pr_reviewer key found in your config file. Omitting --title will submit a pull request using the last commit message as title.

Examples

Submit a pull request using the current branch to the repository owner or organization.

gh pr --submit eduardolundgren --title 'Fix #32' --description 'Awesome fix'

Submit a pull request using your default editor by passing an empty --title and or --description

gh pr --submit eduardolundgren --title --description

Submit a pull request using the current branch to dev branch.

gh pr --submit eduardolundgren --branch dev

Submit a pull request from a issue.

gh pr --submit eduardolundgren --issue 150

Submit a pull request in draft state.

gh pr --submit eduardolundgren --draft

PR: Open in Browser

OptionUsageType
-B, --browserRequiredBoolean
-n, --numberRequiredNumber
-u, --userOptionalString
-r, --repoOptionalString

Examples

Open GitHub pull request page in the browser.

gh pr 100 --browser

Notifications

gh notification

Alias: gh nt

Notifications: Latest

OptionUsageType
-l, --latestRequiredBoolean
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString
--dateOptionalString

Examples

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

Diplay notifications with a formatted date (Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/).

gh nt --date "dddd, MMMM Do YYYY, h:mm:ss a"

Notifications: Watch

OptionUsageType
-w, --watchRequiredBoolean
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

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

Issues

gh issue

Alias: gh is

Issue: Create

OptionUsageType
-N, --newRequiredBoolean
-t, --titleRequiredString
-A, --assigneeOptionalString
-L, --labelsOptionalString
-m, --messageOptionalString
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

Shortcut for creating a new issue on the current repository.

gh is 'Node GH rocks!' 'Body with **Markdown** support'

Create a new issue using your default editor by passing an empty --message (also works with an empty title)

gh is --new --title 'Node GH rocks!' --message

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!' --labels bug,question,test

Create a new issue and assign it to someone.

gh is --new --title 'Node GH rocks!' --assignee zenorocha

Issue: Comment

OptionUsageType
-c, --commentRequiredString
-n, --numberRequiredNumber
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

Comment on an issue of the current repository.

gh is 1 --comment 'Node GH rocks!'

Comment on an issue using your default editor by passing an empty --comment (also works with an empty title)

gh is 1 --comment

Comment on an issue of a certain repository.

gh is 1 --comment 'Node GH rocks!' --user eduardolundgren --repo node-gh

Issue: Open or Close

OptionUsageType
-o, --openRequiredBoolean
-C, --closeRequiredBoolean
-n, --numberRequiredNumber
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

Open an issue.

gh is 1 --open

Close an issue.

gh is 1 --close

Close multiple issues.

gh is --close --number 1 --number 2

Open multiple issues.

gh is --open --number 1 --number 2

Open or close an issue that you've sent to someone.

gh is 1 --close --user eduardolundgren

Issue: List

OptionUsageType
-l, --listRequiredBoolean
-a, --allOptionalBoolean
-A, --assigneeOptionalString
--dateOptionalString
-d, --detailedOptionalBoolean
-L, --labelsOptionalString
-M, --milestoneOptional[Number, String]
--remoteOptionalString
-r, --repoOptionalString
-S, --stateOptional[open, closed]
-u, --userOptionalString

Examples

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 with a formatted date (Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/).

gh is --list --date "dddd, MMMM Do YYYY, h:mm:ss a"

List issues filtered by milestone title.

gh is --list --milestone "milestone title"

List issues that contains labels todo and bug.

gh is --list --labels todo,bug

List all issues on a certain repository.

gh is --list --user eduardolundgren --repo node-gh

Issue: Open in Browser

OptionUsageType
-B, --browserRequiredBoolean
-n, --numberRequiredNumber
-u, --userOptionalString
-r, --repoOptionalString

Examples

Shortcut for opening GitHub issue page in the browser.

gh is 100

Open GitHub issue page in the browser.

gh is 100 --browser

Issue: Lock

OptionUsageType
--lockRequiredBoolean
--lock-reasonOptional[off-topic, too heated, resolved, spam]
-n, --numberRequiredNumber
--remoteOptionalString
-r, --repoOptionalString
-u, --userOptionalString

Examples

Lock issue on the current repository.

gh is 1 --lock

Lock issue on the current repository with a reason.

gh is 1 --lock --lock-reason resolved

Issue: Search

OptionUsageType
-s, --searchRequiredBoolean
-a, --allOptionalBoolean
-d, --detailedOptionalBoolean
-r, --repoOptionalString
-u, --userOptionalString

Examples

Search issues in current repository

gh is --search 'term'

Search issues in all repositories for a user

gh is --all --user node-gh --search 'term'

Search issues in a repository for a user

gh is  --user node-gh --repo gh --search 'term'

Search issues in a repository for a user with link and content

gh is  --user node-gh --repo gh --search 'term'

Search issues with github filters

gh is  --user node-gh --repo gh --search 'updated:<=2013-05-24'

Issue: Assign

OptionUsageType
--assignRequiredBoolean
-A, --assigneeRequiredString
-n, --numberRequiredNumber
-r, --repoOptionalString
-u, --userOptionalString

Examples

Assign an issue on the current repository to a user.

gh is --assign --assignee zenorocha --number 1

Assign an issue on a specific repository to a user.

gh is --assign --assignee zenorocha --number 1 --user eduardolundgren --repo gh

Repo

gh repo

Alias: gh re

Repo: Open in Browser

OptionUsageType
-B, --browserRequiredBoolean
-u, --userOptionalString
-r, --repoOptionalString

Examples

Shortcut for opening the GitHub repository page in the browser.

gh re

Open GitHub repository page in the browser.

gh re --browser --user eduardolundgren --repo node-gh

Repo: List

OptionUsageType
-l, --listRequiredBoolean
-d, --detailedOptionalBoolean
-u, --userOptionalString
-t, --typeOptional[all, owner, public, private, member]
--dateOptionalString

Examples

List all repositories.

gh re --list

List all private repositories.

gh re --list --type private

List all repositories from someone.

gh re --list --user zenorocha

List open repositories with a formatted date (Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/).

gh re --list --detailed --date "dddd, MMMM Do YYYY, h:mm:ss a"

Repo: Create

OptionUsageType
-N, --newRequiredString
-O, --organizationOptionalString
-c, --cloneOptionalBoolean
-t, --typeOptional[private]
--initOptionalBoolean
--gitignoreOptionalString
--homepageOptionalString
--descriptionOptionalString

Examples

Create a new GitHub repository and clone on the current directory.

gh re --new foo --clone

Create a new GitHub repository based on the name of the current directory & init with a README

gh re --new --clone --init

Create a new GitHub repository for an organization.

gh re --new foo --organization node-gh

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

Repo: Fork

OptionUsageType
-f, --forkRequiredString
-u, --userRequiredString
-O, --organizationOptionalString

Examples

Fork a GitHub repository.

gh re --fork repo --user user

Fork a GitHub repository into the node-gh organization.

gh re --fork repo --user user --organization node-gh

Repo: Delete

OptionUsageType
-D, --deleteRequiredString
-u, --userRequiredString

Example

Delete a repository of the logged user.

gh re --delete foo

Repo: Clone

OptionUsageType
-c, --cloneRequiredString
-r, --repoRequiredString
-O, --organizationOptionalString
-P, --protocolOptionalString
-u, --userOptionalString

If you have custom ssh config, you can add "api": { "ssh_host": "custom-name", ... } to your .gh.json file.

Examples

Clone a repository.

gh re --clone --repo gh

Clone a repository from a specific user using HTTPS protocol.

gh re --clone --user eduardolundgren --repo gh --protocol https

Repo: Create Label

OptionUsageType
-C, --colorRequiredString
-L, --labelRequiredBoolean
-N, --newRequiredString
-r, --repoRequiredString
-O, --organizationOptionalString
-u, --userOptionalString

Examples

Create a label for a repository (color is a hex code with or without literal hex symbol).

gh re --label --new bug --color '#7057ff' --repo gh

Create a label for a user's repository.

gh re --label --new bug --color '#7057ff' --user eduardolundgren --repo gh

Repo: Delete Label

OptionUsageType
-L, --labelRequiredBoolean
-D, --deleteRequiredString
-r, --repoRequiredString
-O, --organizationOptionalString
-u, --userOptionalString

Examples

Delete a label from a repository.

gh re --label --delete bug --repo gh

Delete a label from a user's repository.

gh re --label --delete bug --user eduardolundgren --repo gh

Repo: List Labels

OptionUsageType
-L, --labelRequiredBoolean
-l, --listRequiredBoolean
-r, --repoRequiredString
-O, --organizationOptionalString
-u, --userOptionalString

Examples

List labels for a repository.

gh re --label --list --repo gh

List labels for a user's repository.

gh re --label --list --user eduardolundgren --repo gh

Repo: Update Label

OptionUsageType
-C, --colorRequiredString
-L, --labelRequiredBoolean
-r, --repoRequiredString
-U, --updateRequiredString
-O, --organizationOptionalString
-u, --userOptionalString

Examples

Update a label for a repository (color is a hex code with or without literal hex symbol).

gh re --label --update bug --color color --repo gh

Update a label for a user's repository.

gh re --label --update bug --color color --user eduardolundgren --repo gh

Repo: Search

Find repositories via various criteria. Repository search looks through the projects you have access to on GitHub. You can filter the results using GitHub's search qualifiers. Examples:

OptionUsageType
-s, --searchRequiredBoolean
-d, --detailedOptionalBoolean
-u, --userOptionalString
-r, --repoOptionalString
-O, --organizationOptionalString
-t, --typeOptional[all, owner, public, private, member]

Examples

Search private repositories you have access to with the term "secret".

gh re --search secret --type private

OR

gh re --search secret is:private

Matches repositories from GitHub org showing detailed results.

gh re --detailed -o github --search octocat

OR

gh re --detailed --search octocat org:github

Gists

gh gists

Alias: gh gi

Gist: Open in Browser

OptionUsageType
-B, --browserRequiredBoolean
-u, --userOptionalString
-i, --idOptionalString

Examples

Shortcut for opening your Gists in the browser.

gh gi

Open a Gist in the browser.

gh gi --browser --id 5991877

Gist: List

OptionUsageType
-l, --listRequiredBoolean
-u, --userOptionalString
--dateOptionalString

Examples

List all gists.

gh gi --list

List all gists from someone.

gh gi --list --user brunocoelho

List gists with a formatted date (Any string that the moment library's formatter accepts should work: https://momentjs.com/docs/#/displaying/format/).

gh gi --list --date "dddd, MMMM Do YYYY, h:mm:ss a"

Gist: Create

OptionUsageType
-N, --newRequiredString
-c, --contentOptionalString
-d, --descriptionOptionalString
-p, --privateOptionalBoolean

Examples

Create a Gist hello containing "Hello World".

gh gi --new hello --content "Hello World!"

Create a private Gist hello containing "Hello World".

gh gi --new hello --content "Hello World!" --private

Gist: Fork

OptionUsageType
-f, --forkRequiredString

Examples

Fork a Gist.

gh gi --fork 5444883

Gist: Delete

OptionUsageType
-D, --deleteRequiredString

Example

Delete a Gist.

gh gi --delete 4252323

Delete multiple Gists.

gh gi --delete 4252321 --delete 4252322

User

gh user

Alias: gh us

User: Login or Logout

OptionUsageType
-l, --loginRequiredBoolean
-L, --logoutRequiredBoolean

Examples

Automates saving user name & generating developer token credentials to your ~/.gh.json config

gh user --login

Automates removing user name & developer token credentials to your ~/.gh.json config

gh user --logout

User: Whoami

OptionUsageType
-w, --whoamiRequiredBoolean

Examples

Prints the user name from ~/.gh.json to your console.

gh user --whoami

Milestones

gh milestone

Alias: gh ms

Milestone: List

OptionUsageType
-l, --listRequiredBoolean
-u, --userRequiredString
-a, --allRequiredBoolean
-r, --repoOptionalString
-o, --organizationOptionalString

Examples

Shortcut for listing milestones for a specific repo.

gh ms

Listing milestones for a specific repo & user.

gh ms --list --user node-gh --repo gh

Listing all milestones for a specific organization.

gh ms --list --all --organization node-gh

Alias

This 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.

gh alias

Alias: gh al

Alias: List

OptionUsageType
-l, --listRequiredBoolean

Examples

Shortcut for listing aliases.

gh alias

List aliases.

gh alias --list

Alias: Add

OptionUsageType
-a, --addRequiredString
-u, --userRequiredString

Examples

Create alias for username.

gh alias --add zeno --user zenorocha

And use like:

gh pr --submit zeno -b master -t Title

Alias: Remove

OptionUsageType
-r, --removeRequiredString

Examples

Remove alias.

gh alias --remove zeno

Config

There are some pretty useful configurations that you can set on .gh.json. This file can be found under home directory (on MacOSx: /Users/yourName/.gh.json on Windows: C:\\Users\yourName\.gh.json).

You can also set per-project configurations by adding a .gh.json file in your project's root folder and overriding existing keys.

GitHub API configurations.

Change it if you're a GitHub Enterprise user.

"api": {
    "host": "github.mydomain.com",
    "protocol": "https"
}

Set Pagination Rules

"page_size": 77
"page_size": ""

Set default branch and remote.

"default_branch": "master",
"default_remote": "origin"

Set default users

For submitting or forwarding pull requests.

"default_pr_forwarder": "",
"default_pr_reviewer": ""

Update GitHub credentials manually

"github_token": "your_dev_token",
"github_user": "username"

Run automated tasks before or after a certain command.

"hooks": {
        "pull-request": {
            "merge": {
                "before": [{"cmd": "ls -la", "log": true}],
                "after": [
                    "gh pr {{options.number}} --comment 'Thank you, pull request merged :D'"
                ]
            }
        }
}

Run automated tasks passing arguments to the commands.

Required for prompt commands.

"hooks": {
        "pull-request": {
            "merge": {
                "before": [{"cmd": "foo", "args": ["bar", "qux"]}]
            }
        }
}

Set default branch name prefix for PR fetching.

"pull_branch_name_prefix": "pr-"

Set default editor to use when creating a new message

Insert signature below issue comment.

"signature": "<br><br>:octocat: *Sent from [GH](http://nodegh.io).*"

Turn off ssh when pulling a repo and use https instead.

"ssh": false,

If you need to use a custom git command, set the environment variable GH_GIT_COMMAND.

Plugins

GH Gif - A plugin for commenting on pull requests/issues using GIF reactions. GH Travis - A plugin for integrating Travis, a continous integration server. GH Jira - A plugin for integrating Jira, an issue management system.

Feel free to create your own plugins by forking GH Boilerplate.