An open API service indexing awesome lists of open source software.

https://github.com/srz-zumix/gh-team-kit

gh extension of github team api
https://github.com/srz-zumix/gh-team-kit

gh-extension github-cli-extension

Last synced: about 2 months ago
JSON representation

gh extension of github team api

Awesome Lists containing this project

README

        

# gh-team-kit

gh extension of github team api

## Installation

To install the tool, you can use the following command:

```sh
gh extension install srz-zumix/gh-team-kit
```

## Commands Overview

The following commands are available in `gh-team-kit`. Each command is designed to help manage GitHub teams, repositories, and users efficiently.

- **Team Management**: Create, update, delete, move, and display team hierarchies.
- **Member Management**: Add, remove, check, and modify roles of team members.
- **Repository Management**: Add, remove, list, and compare repositories associated with teams.
- **User Management**: Add, remove, list, and check users in the organization or repositories.
- **Organization-Role Management**: Manage roles within the organization, including listing available roles.
- **Permission Management**: Check and synchronize permissions for teams and users across repositories.
- **Comparison Tools**: Compare teams, repositories, and permissions to identify differences.

Refer to the specific command sections below for detailed usage and examples.

## Usage

### Team Management

#### Create a new team

```sh
gh team-kit create --description --parent
```

Create a new team in the specified organization with various options such as description, privacy, and notification settings.

#### Delete a team

```sh
gh team-kit delete
```

Delete a specified team from the organization. Ensure that the team is no longer needed as this action is irreversible.

#### Display a team hierarchy in a tree structure

```sh
gh team-kit tree [team-slug]
```

Display a team hierarchy in a tree structure based on the team's slug.

#### Get a team by its slug

```sh
gh team-kit get [team-slug...]
```

Retrieve details of a team using the team's slug.

#### List all teams in the organization

```sh
gh team-kit list [owner]
```

Retrieve and display a list of all teams in the specified organization. You can optionally filter the results by repository.

#### Move a team to a new parent

```sh
gh team-kit move [new-parent-slug]
```

Change the parent of an existing team in the specified organization to a new parent team. If no new parent is specified, the team will be moved to the root level.

#### Rename an existing team

```sh
gh team-kit rename
```

Rename an existing team in the specified organization to a new name.

#### Update a team

```sh
gh team-kit update --description --parent
```

Update the details of an existing team in the specified organization, such as its description or settings.

### Member Management

#### Add a member to a team

```sh
gh team-kit member add [role]
```

Add a specified user to the specified team in the organization. Optionally specify the role (default: member).

#### Check if a user is a member of a team

```sh
gh team-kit member check
```

Check if a user is a member of a team.

#### Change the role of a user in a team

```sh
gh team-kit member role
```

Change the role of a specified user in the specified team. Valid roles are: `member`, `maintainer`.

#### List members of a team

```sh
gh team-kit member list
```

List all members of the specified team in the organization.

#### Perform set operations on two teams members

```sh
gh team-kit member sets <[owner]/team-slug1> <|,&,-,^> <[owner]/team-slug2>
```

Perform set operations on the members of two teams. The operation can be union (`|`), intersection (`&`), difference (`-`), or symmetric difference (`^`).

#### Remove a member from a team

```sh
gh team-kit member remove
```

Remove a specified user from the specified team in the organization.

### Repository Management

#### Add a repository to a team

```sh
gh team-kit repo add
```

Add a specified repository to the specified team in the organization.

#### Check team permissions for a repository

```sh
gh team-kit repo check
```

Checks whether a team has admin, push, maintain, triage, pull, or none permission for a repository.

#### Compare repositories between two teams

```sh
gh team-kit diff [repository...]
```

Compare the repositories associated with two teams and display the differences.

#### Compare team permissions between two repositories

```sh
gh team-kit repo diff [team-slug...]
```

Compare the team permissions between two repositories and display the differences.

#### Copy teams and permissions to multiple destination repos

```sh
gh team-kit repo copy
```

Copy teams and permissions from a source repository to multiple destination repositories.

#### List repositories for a team

```sh
gh team-kit repo list
```

List all repositories for the specified team in the organization.

#### Remove a repository from a team

```sh
gh team-kit repo remove
```

Remove a specified repository from the specified team in the organization.

#### Sync teams and permissions to multiple destination repos

```sh
gh team-kit repo sync
```

Synchronize teams and permissions from a source repository to multiple destination repositories.

### User Management

#### Add a user to the organization

```sh
gh team-kit user add
```

Add a specified user to the organization.

#### Check the role of a user in the organization

```sh
gh team-kit user check
```

Check the role of a specified user in the organization.

#### List all users in the organization

```sh
gh team-kit user list
```

Retrieve and display a list of all users in the organization.

#### List user repositories

```sh
gh team-kit user repo
```

Retrieve and display a list of repositories that a specified user has access to, including their roles and permissions.

#### Remove a user from the organization

```sh
gh team-kit user remove
```

Remove a specified user from the organization.

#### Change the role of a user in a orgnization

```sh
gh team-kit user role
```

Change the role of a specified user in the organization. Valid roles include `member` and `admin`.

#### Check user permissions for a repository

```sh
gh team-kit repo user check
```

Check the permissions of a specified user for a repository.

#### List users with access to a repository

```sh
gh team-kit repo user list
```

List all collaborators for the specified repository. You can filter the results by affiliation and role.

#### Remove a user's access to a repository

```sh
gh team-kit repo user remove
```

Remove a specified user's access to a repository.

### Organization-Role Management

#### Add a team to an organization role

```sh
gh team-kit org add
```

Add a specified team to the specified role in the organization.

#### Remove a team from an organization role

```sh
gh team-kit org remove
```

Remove a specified team from the specified role in the organization.

#### List organization roles

```sh
gh team-kit org role list [owner]
```

List all roles available in the organization. Optionally, specify the owner to filter roles.

#### List users assigned to an organization role

```sh
gh team-kit org user list [org-role-name]
```

Retrieve and display a list of all users assigned to a specific role in the organization. Supports options for detailed information, suspended users, and filtering by owner.

#### Add a user to an organization role

```sh
gh team-kit org user add
```

Assign a specified user to the specified role in the organization.

#### Remove a user from an organization role

```sh
gh team-kit org user remove
```

Remove a specified user from the specified role in the organization.