头图

Original: https://www.keson.dev/tool/github-compare

When we are doing framework research, you may first search for relevant keywords through google to get some results, and then check the corresponding topic from GitHub to select the appropriate framework. I believe that when most people choose a framework, they will not use it casually, but look at some of the warehouse's indicators to decide whether to choose or compare multiple frameworks.

foreword

We know that there are already some comparison tools for web pages in the community, such as: star-history for viewing the star trend chart, but there is currently no suitable tool for viewing the data of the GitHub warehouse on the terminal. When looking at a repository, it is common to look at some of the following metrics to sum it up to measure whether it is stable or not?

  • Number of stars (stars)
  • Update frequency (releases)
  • Community activity (contributors)
  • Issue resolution cycle (remain issues)
  • Warehouse creation time (age)
  • organization

Let's take the choice of the Golang microservice framework as an example to compare some frameworks that are currently popular in the community

  • go-zero
  • kratos
  • go-micro
  • kit

Before there are no tools, we may go to each warehouse in turn from the above indicators to the homepage of its warehouse to see the relevant data, which will be cumbersome. If it needs to be implemented as some comparison data, it is more necessary to manually write a table.

Let's take a look at the comparison results of github-compare :

Through this figure, you can clearly see the indicators of the GitHub repository. Next, let's take a look at the use of this tool.

github-compare

Positioned as a GitHub repository comparison tool

Warehouse Address

https://github.com/anqiansong/github-compare

Install

 $ go install github.com/anqiansong/github-compare

Example

 $ github-compare zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit

usage

Ready to work

  1. Click to go to GitHub to create a personal AccessToken
  2. Set AccessToken

    • Copy AccessToken and add to environment variable
    • Or you can explicitly pass in --token 05b454de7e5c0b439e3122faa7694e32--- when executing the github-compare instruction

Excuting an order

 # 通过 --token 传入 AccessToken
# github-compare zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit --token ${accessToken}
#  或者添加到环境变量(推荐)
$ export GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}
$ github-compare zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit

illustrate

  1. GitHub AccessToken is required.
  2. github-compare Accept 1 to 4 warehouses for data query.
  3. If you set AccessToken through environment variable, the key of environment variable must be GITHUB_ACCESS_TOKEN .

At last

If this tool is useful to you, you can give a Oh


Keson
92 声望14 粉丝