Skip to content

πŸ” GitHub Repository Insights - A sleek Ruby CLI tool to fetch, analyze, and export GitHub repository data effortlessly. Perfect for developers craving clean insights and cool vibes! πŸš€βœ¨

License

Notifications You must be signed in to change notification settings

NML-LETRAS/github_repository_insights

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitHub Repository Insights ✨

GitHub Repository Insights is your go-to CLI tool for exploring and analyzing GitHub repos like a pro – no browser needed! πŸ’€ It’s sleek, it’s fast, and it’s built with Ruby. Whether you're stalking your favorite dev’s projects or managing your own, this app has got you covered.


Why You'll Love It 🌟

  • Fetch Repos Like a Boss: Get a complete list of public repos from any GitHub user.
  • Deets Galore: Check out stats like stars, forks, issues, language, size, and commit counts.
  • Filter & Sort FTW: Flex those sorting skillsβ€”stars, forks, issues, you name it.
  • Export Data: Save repo info to CSV or JSON (because spreadsheets rule).
  • Zero Clutter: Simple, intuitive CLI vibes.
  • Error-Handled Like a Pro: No crashing, no burning. πŸ›Έ

Before You Start ⚑

Prerequisites

  1. Ruby: Make sure you have Ruby installed (v2.7 or later is 🌈).
  2. GitHub PAT (Personal Access Token): Create one with public_repo access. Here’s how.
  3. Required Gems: Install dependencies by running:
    gem install terminal-table dotenv

Setup πŸ‘Œ

  1. Clone this bad boy:
    git clone https://github.com/NML-LETRAS/github_repository_insights.git
    cd github_repository_insights
  2. Create a .env file and paste your GitHub PAT:
    GITHUB_API_KEY=your_personal_access_token_here
  3. Run the app:
    ruby main.rb

How It Works πŸš€

Main Menu πŸ”

When you fire up the app, you’ll see:

--- GitHub Repository Insights ---
1. View Repositories
2. Search Repository by Name
3. View Detailed Repository Information
4. Export Repository Data
5. Help
6. Exit

Features Explained 🎯

1. View Repositories

Get all public repos for a GitHub user. See them laid out in a sick table:

+-------------------------+-------+-------+-------------+----------+-----------+---------+
| Name                    | Stars | Forks | Open Issues | Language | Size (MB) | Commits |
+-------------------------+-------+-------+-------------+----------+-----------+---------+
| repo-1                  | 150   | 25    | 3           | Ruby     | 0.20      | 500     |
+-------------------------+-------+-------+-------------+----------+-----------+---------+

2. Search Repository by Name

Looking for a specific repo? No problem. Search by keywords and get instant results.

3. View Detailed Repository Info

Want the nitty-gritty on a repo? Dive deep:

--- Repository Details ---
Name: repo-1
Description: CLI tool.
Stars: 150
Forks: 25
Open Issues: 3
Language: Ruby
Size: 0.20 MB
Default Branch: main
Created At: 2025-01-01
Last Updated: 2025-01-03

4. Export Repository Data

Save your results for later:

  • CSV: Perfect for Excel nerds.
  • JSON: Because who doesn’t love APIs?

5. Help

Get a quick rundown of all features. 🌐

6. Exit

Peace out! πŸ™‹


Example Usage 🀩

  1. Enter the GitHub username:
    Enter GitHub username: octocat
    
  2. View repo data in style:
    +-----------+-------+-------+-------------+----------+-----------+---------+
    | Name      | Stars | Forks | Open Issues | Language | Size (MB) | Commits |
    +-----------+-------+-------+-------------+----------+-----------+---------+
    | repo-1    | 150   | 25    | 3           | Ruby     | 0.20      | 500     |
    +-----------+-------+-------+-------------+----------+-----------+---------+
    
  3. Export the data:
    Export data as: 1) CSV 2) JSON: 1
    Data exported to repositories.csv
    

Project Structure πŸ”’

github_repository_insights/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ api_client.rb        # GitHub API requests.
β”‚   β”œβ”€β”€ repository.rb        # Repo model.
β”‚   β”œβ”€β”€ display.rb           # CLI output.
β”‚   └── utils.rb             # Filtering, sorting, exporting.
β”œβ”€β”€ main.rb                  # App entry point.
β”œβ”€β”€ .env                     # Your API key lives here.
β”œβ”€β”€ Gemfile                  # Dependencies.
└── README.md                # This file! πŸ˜‰

Testing 🐝

To make sure it’s all working, run:

rspec

This will check your code and ensure no bugs are lurking. πŸ’‘


Future Plans 🌍

  • Add analytics for contributors and pull requests.
  • Cache API responses for faster loading.
  • Build a web app version (because CLI isn’t for everyone πŸ˜‚).

License πŸ”’

MIT Licenseβ€”because sharing is caring. 😎 See the LICENSE file for details.


Made with ❀ by nmlletras

About

πŸ” GitHub Repository Insights - A sleek Ruby CLI tool to fetch, analyze, and export GitHub repository data effortlessly. Perfect for developers craving clean insights and cool vibes! πŸš€βœ¨

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages