npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ghi

v0.0.16

Published

GitHub Interface

Readme

ghi

GitHub Interface - a minimal command line tool

Description

Simple command line tool created to automate the repetative GitHub operations I perform regularly.

Installation

Developer (you want to contribute)

If you'd like to contribute to the repo:

  1. clone down the repo
```sh
git clone [email protected]:phillipalexander/ghi.git
```
  1. cd to the root directory of the project
```sh
cd ./ghi
```
  1. use npm-link to create a local link to the github repo so that you can develop on it more effectively
```sh
npm link
```
  1. start hacking!

Basic (you just want it to work)

If you're not insterested in contributing right now, just use npm to install ghi:

$ npm install -g ghi

Configuration

To use the ghi tool, you must configure the config.json file in the root directory. To do so, run any of the commands below and follow the instructions when prompted.

The default configuration file contains the following:

{
  "github": {
    "token": "OAUTH_TOKEN",
    "webhook": "WEBHOOK_CONFIG_OBJECT"
  },
  "settings": {
    "openurls": false
  }
}

Commands

Configuration Commands

c (configure)

Usage: c
Description: Configure: edit application settings
Example: ghi c
Options:

  -h, --help     output usage information
  -V, --version  output the version number

Repo Commands

rc (repo create)

Usage: rc <orgname/reponame>
Description: Repo Create: Create a repo on GitHub
Example: ghi rc macroscope/blog
Options:

  -h, --help     output usage information
  -V, --version  output the version number
Things to Note:
  • If settings.openurls = true in config.json, when running ghi rc <orgname>/reponame> the resulting github page will be opened automatically in your default browser.
  • If you replace "WEBHOOK_CONFIG_OBJECT" in config.json with a properly formated GitHub webhook configuration object, when running ghi rc <orgname>/reponame> that webhook will automatically be set on all repos created within orgs.

rd (repo destroy)

Usage: rd <orgname/reponame>
Description: Repo Destroy: Destroy a repo on GitHub
Example: ghi rd macroscope/blog
Options:

  -h, --help     output usage information
  -V, --version  output the version number

rhc (repo hook add)

Usage: rhc <orgname/reponame>
Description: Repo Hook Create: Add webhook defined in config.json to a repo
Example: ghi rhc macroscope/blog
Options:

  -h, --help     output usage information
  -V, --version  output the version number

rpn (repo patch name)

Usage: rpn [options]
Description: Repo Patch Name: change the name of an existing repo
Example: ghi rpn -o "macroscope" -r "venus" -p "mars"
Options:

  -h, --help               output usage information
  -o, --org <orgname>      GitHub OrgName
  -r, --repo <reponame>    GitHub RepoName
  -p, --patch <patchdata>  Updated RepoName

rs (repo sync)

Usage: rs [options]
Description: Repo Sync: sync a repo across owners using force push
Example: ghi rs -s "macroscope" -t "phillipalexander" -r "mars"
  Options:

    -h, --help                       output usage information
    -s, --ownersource <ownersource>  GitHub Source Owner
    -t, --ownertarget <ownertarget>  GitHub Target Owner
    -r, --reponame <reponame>        RepoName

Team Commands

tua (team user add)

Usage: tua [options]
Description: Team User Add: Add a GitHub user to an existing team
Example: ghi tua -o "macroscope" -t "awesome force" -u "jasper"
Options:

  -h, --help             output usage information
  -o, --org <orgname>    GitHub OrgName
  -t, --team <teamname>  GitHub TeamName
  -u, --user <username>  GitHub UserName

tra (team repo add)

Usage: tra [options]
Description: Team Repo Add: Add a GitHub repo to an existing team
Example: ghi tra -o "macroscope" -t "awesome force" -r "blog"
Options:

  -h, --help             output usage information
  -o, --org <orgname>    GitHub OrgName
  -t, --team <teamname>  GitHub TeamName
  -u, --repo <reponame>  GitHub RepoName

Org Commands

ogt (team get all)

Usage: ogt <orgname>
Description: Org Get Teams: Get the first 100 teams associated with an Org
Example: ghi ogt macroscope
Options:

  -h, --help     output usage information
  -V, --version  output the version number

ogr (org get repos)

Usage: ogr <orgname>
Description: Org Get Repos: Get the first 100 repos associated with an Org
Example: ghi ogr macroscope
Options:

  -h, --help     output usage information
  -V, --version  output the version number

For additional usage instructions, run

ghi --help

License

Copyright (c) 2014 Phillip Alexander

MIT License