Skip to content

A high-performance CLI tool written in Go that analyzes GitHub repositories concurrently. Built with Cobra, Goroutines, and Channels.

License

Notifications You must be signed in to change notification settings

rukmini-17/gh-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gh-analyzer 🚀

A high-performance CLI tool written in Go that analyzes GitHub repositories concurrently.

Go Version Build Status

⚡ Why I Built This

I wanted to analyze repository statistics (Stars, Forks) for multiple projects without the latency of sequential API requests. By utilizing Go Routines and Channels, gh-analyzer fetches data in parallel, reducing analysis time for large datasets by ~90%.

🛠 Tech Stack

  • Language: Go (Golang)
  • CLI Framework: Cobra
  • Concurrency: WaitGroups & Channels
  • Testing: Standard testing library

🚀 Installation

# Clone the repo
git clone [https://github.com/rukmini-17/gh-analyzer.git](https://github.com/rukmini-17/gh-analyzer.git)
cd gh-analyzer

# Run directly
go run cmd/*.go --user=rukmini-17

📊 Example Output

Running against the go-chi organization demonstrates high-performance concurrency. Note the analysis time of < 200ms for 22 repositories.

> go run cmd/*.go --user=go-chi

Fetching repos for user: go-chi...
Starting analysis of 22 repositories...
Analyzed 22 repos in 196.522375ms

--- FINAL REPORT ---
REPOSITORY                     | STARS      | FORKS
------------------------------------------------------------
valve                          | 22         | 3
community-examples             | 1          | 1
stampede                       | 71         | 8
httptracer                     | 19         | 2
cors                           | 402        | 38
httprate                       | 411        | 22
chi                            | 21270      | 1063
...
(truncated for brevity)

✅ Running Tests

This project includes a unit testing suite to ensure reliability.

go test ./pkg/...

📂 Project Structure


├── cmd/            # Entry point & CLI commands
├── pkg/
│   ├── analyzer/   # Core concurrent logic
│   └── github/     # HTTP Client & API handling
└── .github/        # CI/CD Workflows

About

A high-performance CLI tool written in Go that analyzes GitHub repositories concurrently. Built with Cobra, Goroutines, and Channels.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages