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 🙏

© 2024 – Pkg Stats / Ryan Hefner

gh-plugin-org

v2.5.2

Published

gh plugin to manage github organizations

Downloads

8

Readme

gh-org

Synopsis

A plugin for gh to manage GitHub organizations

Installation

npm i -g gh-plugin-org

or if you prefer to install it locally:

npm i gh-plugin-org

Usage

$ npx gh-org
Usage: gh-org [options] [command]

Options:
  -V, --version   output the version number
  -h, --help      display help for command

Commands:
  cd              Set your organization to use as default
  list            Lists the information within the organization
  create          Create information within the organization
  help [command]  display help for command

Adding as an alias to gh

Install gh-cli. Follow th instructions in GitHub CLI README.md

When gh-org is installed globally you can do the alias this way:

✗ gh alias set --shell org 'gh-org $@' 
- Adding alias for org: gh-org $@
✓ Added alias.

Or if installed locally:

✗ gh alias set --shell org 'npx gh-org $@' 
- Adding alias for org: npx gh-org $@
✓ Added alias.

Then you can use it as:

$ gh org list people --outside-collaborators
User: alu21901
Github url: https://github.com/alu21901
User: aluBN11
Github url: https://github.com/aluBN11
User: Angred19
Github url: https://github.com/Angred19
User: carlos016
Github url: https://github.com/carlos016
User: coromoto
Github url: https://github.com/coromoto

Command cd

[test-package(master)]$ npx gh-org cd ULL-ESIT-PL-2021

Currently, creates a file org.jsonin the current folder:

[test-package(master)]$ cat org.json
{"organizationDefault":"ULL-ESIT-PL-2021"}[~/campus-virtual/2021/tfg2021/TFG2021_Jos

Command Create

The create command creates information about our organization

$ npx gh-org create --help
Usage: create [options] [command]

Options:
  -h, --help      display help for command

Commands:
  superrepo       Create a repo containing all the organization's repos in
                  submodules.
  repo            Create a repo within the organization.

  help [command]  display help for command

Subcommnad Superrepo

The superrepo, create a repo within the default organization where it includes as submodules the other repositories in the same organization. The --pattern option supports regular expressions with which to match.

$ npx gh-org create superrepo --help
Usage: superrepo [options] <repo>

Arguments:
  repo                            name of the new repo in the organization

Options:
  --pattern <regular-expression>  Include only those that match the regular expression
  -h, --help                      display help for command

- Example of use

$ node index.js list repo
List of repos in serah-org.
[1]:    dummy
[2]:    dummy2
[3]:    internal
[4]:    dummy3
[5]:    test1
[6]:    test2
[7]:    dummy4
[8]:    day3
[9]:    day3-2
[10]:   day3-3
[11]:   day3-4
[12]:   day3-5
[13]:   day3-6
[14]:   day3-7
[15]:   day3-8
[16]:   day3-9
[17]:   day3-10
[18]:   day4-1
[19]:   day5-1
[20]:   day5-2
$ npx gh-org create superrepo newRepo --pattern day5
Cloning into 'C:/Users/joser/Desktop/ULL/TFG/tfg-jose-ramon-rodriguez-hernandez/.gh/superrepo/newRepo1/day5-1'...
warning: LF will be replaced by CRLF in .gitmodules.
The file will have its original line endings in your working directory
Cloning into 'C:/Users/joser/Desktop/ULL/TFG/tfg-jose-ramon-rodriguez-hernandez/.gh/superrepo/newRepo1/day5-2'...
warning: LF will be replaced by CRLF in .gitmodules.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .gitmodules.
The file will have its original line endings in your working directory
[master (root-commit) a408b3b] Submodules included
 3 files changed, 8 insertions(+)
 create mode 100644 .gitmodules
 create mode 160000 day5-1
 create mode 160000 day5-2
To github.com:serah-org/newRepo.git
 * [new branch]      master -> master

Subcommand Repo

The repo, Create a repo within the organization. By default, it will do so in the default organization. The --org option, allows you to select an organization.

$ npx gh-org create repo --help
Usage: repo [options] <repo>

Arguments:
  repo                  name of the new repo in the organization

Options:
  --org <organization>  Select the organization
  -h, --help            display help for command

- Example of use

$ npx gh-org create repo day2-09-08 --org serah-org
Created successfully

Command List

The list command displays information about our organization.

$ npx gh-org list --help
Usage: list [options] [command]
Options:
  -h, --help      display help for command

Commands:
  default         Default organization name
  repo            Lists the repositories
  people          Lists the people
  teams           Lists the teams
  overview        Summary of the organization
  help [command]  display help for command

Subcommand Default

The default, shows the name of the default organization within the org.json.

- Example of use

$ npx gh-org list default
Organization default:
        "serah-org"

Subcommand repo

The repo, displays a list of the organization's repositories by default. Additionally, the --pattern option supports regular expressions with which to match, the --org select another organization than the default one and --paginate collect all the repositories, being a slower call.

$npx gh-org list repo --help
Usage: repo [options]

Options:
  --pattern <regular-expression>  Include only those that match the regular expression
  --org <organization>            Select the organization
  --paginate                      Enable paginate request
  -h, --help                      display help for command

- Example of use

$ node index.js list repo --org serah-org
List of repos in serah-org.
[1]:    dummy
[2]:    dummy2
[3]:    internal
[4]:    dummy3
[5]:    test1
[6]:    test2
[7]:    dummy4
[8]:    day3
[9]:    day3-2
[10]:   day3-3
[11]:   day3-4
[12]:   day3-5
[13]:   day3-6
[14]:   day3-7
[15]:   day3-8
[16]:   day3-9
[17]:   day3-10
[18]:   day4-1
[19]:   day5-1
[20]:   day5-2

Subcommnad people

The people, shows the members within the organization. Additionally, the --outside-collaborators option displays the external collaborators.

$ npx gh-org list people --help
Usage: people [options]

Options:
--outside-collaborators  Show list of outside collaborators of organizations
by default
-h, --help               display help for command

- Example of use

$ npx gh-org list people
User: AiranSchez
Github url: https://github.com/AiranSchez
User: Serah73
Github url: https://github.com/Serah73
$ npx gh-org list people --outside-collaborators
User: AkaiBF
Github url: https://github.com/AkaiBF
 

Subcommand teams

The teams, shows the teams within the organization. Additionally, the --org selects the org by parameter instead of the default one. Also, a regular expression can be passed to filter the output.

$ npx gh-org list teams --help
Usage: teams [options]

Options:
  --pattern <regular-expression>  Include only those that match the regular
                                  expression
  --org <organization>            Select the organization
  -h, --help                      display help for command

- Example of use

$npx gh-org list teams --org serah-org
List of team in serah-org:
- [1]:  dummy
- [2]:  team1
- [3]:  team2

Subcommand overview

The overview, summary of the default organization, unless you use the option --org, then then you use the org by parameter

$ npx gh-org list overview --help
Usage: overview [options]

Options:
  --org <organization>  Select the organization
  -h, --help            display help for command

- Example of use

$ npx gh-org list overview --org serah-org

Overview of "serah-org"

- url: https://api.github.com/orgs/serah-org
- html url: https://github.com/serah-org
- Description: null