Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sagikazarmark/gh-stat
GitHub CLI extension for displaying various stats about organizations and repositories
https://github.com/sagikazarmark/gh-stat
gh-extension
Last synced: about 1 month ago
JSON representation
GitHub CLI extension for displaying various stats about organizations and repositories
- Host: GitHub
- URL: https://github.com/sagikazarmark/gh-stat
- Owner: sagikazarmark
- License: mit
- Created: 2021-10-02T02:52:43.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-10-02T02:52:57.000Z (over 3 years ago)
- Last Synced: 2025-01-11T22:50:03.632Z (about 1 month ago)
- Topics: gh-extension
- Language: Shell
- Homepage:
- Size: 4.88 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `gh stat` GitHub CLI extension
[GitHub CLI](https://github.com/cli/cli) extension for displaying various stats about organizations and repositories.
**⚠ This is a very first version based on a few quick experiments. I plan to improve it, but things might break. ⚠**
## Installation
```shell
gh extension install sagikazarmark/gh-stat
```This extension depends on [jq](https://stedolan.github.io/jq/). To install using Homebrew:
```shell
brew install jq
```## Usage
```shell
❯ gh stat
Display various stats about your organization and repositories
USAGE
gh stat [flags]
AVAILABLE STATS
stars: Fetch data about stargazers
forks: Fetch data about forks
issues: Fetch data about issues
pull-requests: Fetch data about pull-requests
commits: Fetch data about commits
INHERITED FLAGS
--help Show help for command
ARGUMENTS
An resource can be supplied as argument in any of the following formats:
- organization or user, eg. "MY_USER"
- repository, e.g. "MY_ORG/MY_REPO".
EXAMPLES
$ gh stat stars MY_ORG/MY_REPO --group-by month
$ gh stat forks MY_ORG/MY_REPO --group-by year
$ gh stat issues MY_ORG/MY_REPO --csv
$ gh stat commits MY_ORG/MY_REPO --branch master
LEARN MORE
Use 'gh --help' for more information about a command.
Read the manual at https://cli.github.com/manual
```## Improvement ideas
- Better validation
- Support org level stats (currently blocked: https://github.com/cli/cli/issues/4413)
- Rewrite in Go
- Pros:
- Better flexibility
- Better parameter parsing/validation
- GraphQL?
- Cons:
- Binary distribution might be less ideal (users can't read the code)
- GraphQL?
- Come up with a GitHub CLI extension framework
- Based on Go?
- Based on Bash?
- Rbenv style commands?
- More options for stats
- Custom fields included?
- Table output
- Shell charts?## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.