https://github.com/helaili/octocli
A CLI for GitHub
https://github.com/helaili/octocli
cli github
Last synced: 6 months ago
JSON representation
A CLI for GitHub
- Host: GitHub
- URL: https://github.com/helaili/octocli
- Owner: helaili
- License: apache-2.0
- Created: 2017-12-21T14:35:32.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-20T07:27:28.000Z (over 7 years ago)
- Last Synced: 2025-04-12T13:57:46.766Z (10 months ago)
- Topics: cli, github
- Language: Go
- Size: 79.1 KB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://travis-ci.org/helaili/octocli)
# octocli
A CLI for GitHub
Current commands include:
- Orgs
- List every org a user belongs to
- List every orgs (GHE)
- Teams
- List every teams of an org
- Create a team
- Add a member to a team
- List every member of a team
- List every repository of a team
### Installation:
- Download [here](https://github.com/helaili/octocli/releases) an officilal release and unzip it,
or
- Retriveve the latest development version with the command :point_down:
```
go get github.com/helaili/octocli
```
### Usage:
List every org on a GitHub Enterprise server:
```
octocli org list -s octodemo.com
```
List every org user `monalisa` belongs to:
```
octocli org list --login monalisa
```
Add users `monalisa` and `hubot` as maintainers to the `developers` team within the `OctoCheese` organization
```
octocli team members add -o OctoCheese -t developers -r maintainer monalisa hubot
```
More information with `octocli --help`
```
Usage:
octocli [command]
Available Commands:
help Help about any command
org Base for various GitHub Organizations related commands
team Base for various team related commands
Flags:
--config string config file (default is $HOME/.octocli.yaml)
-h, --help help for octocli
-s, --server string Hostname of the GitHub Enterprise server. Using github.com if omitted (default "github.com")
-k, --token string personal authentication token to use. Required when environement variable GITHUB_AUTH_TOKEN is not set
Use "octocli [command] --help" for more information about a command.
```
### Contribute
Have a look at `release.sh`
Run tests:
```
go test ./...
```
Add a new `dosmthg` command
```
cobra add dosmthg
```
Add a sub command `mysubdosmthg` in `dosmthg`
```
cobra add mysubdosmthg -p 'dosmthgCmd'
```
More info about this [here](https://github.com/spf13/cobra/blob/master/cobra/README.md) and [here](https://github.com/spf13/cobra/blob/master/README.md)