Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/falkern/git_analytics

This CLI tool fetches and displays analytics for a GitHub user's repositories using the GitHub API. It collects data such as star counts, fork counts, and open issues.
https://github.com/falkern/git_analytics

analytics cli github github-analytics github-api open-source repository ruby tools

Last synced: 19 days ago
JSON representation

This CLI tool fetches and displays analytics for a GitHub user's repositories using the GitHub API. It collects data such as star counts, fork counts, and open issues.

Awesome Lists containing this project

README

        

# GitHub Analytics CLI

This is a simple command-line interface (CLI) tool to fetch and display analytics for a GitHub user's repositories. It uses the GitHub API to gather data about repositories, including star counts, fork counts, and open issues.

## Features

- Fetch all repositories for a specified GitHub user.
- Display the number of stars, forks, and open issues for each repository.
- Display summary statistics for all repositories.

## Prerequisites

- Ruby installed on your system.
- A GitHub personal access token with the necessary permissions.
- The `httparty` and `dotenv` gems.

## Installation

1. Clone the repository:

```sh
git clone https://github.com/Falkern/git_analytics.git
cd git_analytics
```

2. Install the required gems:

```sh
bundle install
```

3. Create a `.env` file in the root directory and add your GitHub username and token:
```sh
GITHUB_USERNAME=your_github_username
GITHUB_TOKEN=your_github_token
```

## Usage

Run the script with the desired options:

```sh
ruby app.rb [options]
```

### Options

- `--stars`: Show star counts (default: true)
- `--forks`: Show fork counts (default: true)
- `--issues`: Show open issues count (default: true)
- `--help`: Displays the help message

### Example

```sh
ruby app.rb --stars --forks --issues
```

This will display the star counts, fork counts, and open issues for each repository of the specified GitHub user, along with summary statistics.

## Contributing

Contributions are welcome! Please open an issue or submit a pull request.