DEV Community

uetchy
uetchy

Posted on • Updated on

Comparing OSS on GitHub

You are making a decision on which open source project you would adopt for your newly developing application.

This time it is a little bit difficult for you because the candidates are seemingly almost the same in a functional perspective.

So let's delve into this from a different perspective: contributors and users activities.

  • More stars, forks, and watchers are the good vital sign of a vibrant project, which indicates many users getting involved with the project.
  • More issues stand for both good and bad sign but basically it indicates their activeness.
  • Organization owned projects are, in most cases, more stable and robust than user owned projects.
  • Size of the repository have complexed meanings but in practice, simpler code is better than the massive one if both are trying to achieve the same goal.

I made a simple tool to get you covered with the above guidelines.

compare-github

screencast

compare-github is a simple terminal app to explore your candidates and aggregate a result into a nice-looking report.

npx @compare/github facebook/react vuejs/vue riot/riot
Enter fullscreen mode Exit fullscreen mode

or using yarn:

yarn global add @compare/github
compare-github facebook/react vuejs/vue riot/riot
Enter fullscreen mode Exit fullscreen mode

You will see the GitHub activities for each candidate at once.
It could help you to decide which library you would adopt!

Warmly welcome to any comments/ideas to improve compare-github!

Top comments (3)

Collapse
 
rhymes profile image
rhymes

Hi Uechi, seems very neat tool to gather statistics on repositories, well done!

just a few things:

  • if you just call gh-compare or gh-compare --help you get this:
✖ Something went wrong: TypeError: Cannot convert undefined or null to object
✖ Generating comparison
  • if you call with just one repository you get this:
ℹ Compared to 1 repositories
┌──────────┬────────────────┐
│ fullname │ facebook/react │
├──────────┼────────────────┤
│ language │ JavaScript     │
├──────────┼────────────────┤
│ created  │ over 5 years   │
├──────────┼────────────────┤
│ updated  │ about 10 hours │
├──────────┼────────────────┤
│ stars    │ 110205         │
├──────────┼────────────────┤
│ watches  │ 6283           │
├──────────┼────────────────┤
│ forks    │ 19659          │
├──────────┼────────────────┤
│ issues   │ 349            │
├──────────┼────────────────┤
│ size     │ 134.66MB       │
├──────────┼────────────────┤
│ owner    │ Organization   │
└──────────┴────────────────┘
✔ Generating comparison

1 repositories should probably be 1 repository

  • if you call it with duplicates, it lists the duplicates twice:
ℹ Compared to 3 repositories
┌──────────┬────────────────┬─────────────────┬─────────────────┐
│ fullname │ facebook/react │ angular/angular │ angular/angular │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ language │ JavaScript     │ TypeScript      │ TypeScript      │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ created  │ over 5 years   │ almost 4 years  │ almost 4 years  │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ updated  │ about 10 hours │ about 17 hours  │ about 17 hours  │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ stars    │ 110205         │ 40163           │ 40163           │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ watches  │ 6283           │ 3193            │ 3193            │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ forks    │ 19659          │ 9808            │ 9808            │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ issues   │ 349            │ 2470            │ 2470            │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ size     │ 134.66MB       │ 83.52MB         │ 83.52MB         │
├──────────┼────────────────┼─────────────────┼─────────────────┤
│ owner    │ Organization   │ Organization    │ Organization    │
└──────────┴────────────────┴─────────────────┴─────────────────┘
✔ Generating comparison

maybe you want to deduplicate so to have only 2 repos, not 3

  • finally, if one of the repos doesn't exist the tool breaks, like gh-compare facebook/react angular/anguasd:
✖ Something went wrong: TypeError: Cannot read property 'type' of undefined
✖ Generating comparison

Hope this is helpful!

Collapse
 
uetchy profile image
uetchy

Thank you for the thoughtful feedback! It helped me so much :)
I've just updated gh-compare to cover these issues.

You can update gh-compare via npm install -g gh-compare@1.1.0.

Collapse
 
rhymes profile image
rhymes

ahahha that was quick :-D

well done!