11![ banner] ( ./resource/banner.png )
22
33# github-compare
4+
45A Command-line tool to statistics the GitHub repositories
56
67## Install
@@ -10,14 +11,80 @@ $ go install github.com/anqiansong/github-compare@latest
1011```
1112
1213## Example
14+
15+ ### TableView
16+
1317``` bash
14- $ github-compare zeromicro/go-zero go-kratos/kratos asim/go-micro go-kit/kit
18+ $ github-compare spf13/cobra urfave/cli junegunn/fzf antonmedv/fx
1519```
1620![ preview] ( ./resource/compare-preview.png )
1721
22+ ### JSONView
23+
24+ ``` bash
25+ $ github-compare spf13/cobra --json
26+ [
27+ {
28+ " age" : " 3187 days" ,
29+ " avgReleasePeriod" : " 199 days" ,
30+ " contributorCount" : " 246" ,
31+ " forkCount" : " 2327(0/d)" ,
32+ " fullName" : " spf13/cobra" ,
33+ " homepage" : " https://cobra.dev" ,
34+ " issue" : " 107/892" ,
35+ " language" : " Go" ,
36+ " lastPushedAt" : " 8 hour(s) ago" ,
37+ " latestReleaseAt" : " 2 month(s) ago" ,
38+ " lastUpdatedAt" : " 1 hour(s) ago" ,
39+ " latestDayStarCount" : " 14 ⇊" ,
40+ " latestMonthStarCount" : " 477" ,
41+ " latestWeekStarCount" : " 110 ⇈" ,
42+ " license" : " Apache License 2.0" ,
43+ " pull" : " 55/808" ,
44+ " releaseCount" : " 16" ,
45+ " starCount" : " 26774(8/d)" ,
46+ " watcherCount" : " 350"
47+ }
48+ ]
49+ ```
50+
51+ ### YAMLView
52+
53+ ``` bash
54+ $ github-compare spf13/cobra --yaml
55+ - age: 3187 days
56+ avgreleaseperiod: 199 days
57+ contributorcount: " 246"
58+ forkcount: 2327(0/d)
59+ fullname: spf13/cobra
60+ homepage: https://cobra.dev
61+ issue: 107/892
62+ language: Go
63+ lastpushedat: 8 hour(s) ago
64+ latestreleaseat: 2 month(s) ago
65+ lastupdatedat: 1 hour(s) ago
66+ latestdaystarcount: 14 ⇊
67+ latestmonthstarcount: " 477"
68+ latestweekstarcount: 110 ⇈
69+ license: Apache License 2.0
70+ pull: 55/808
71+ releasecount: " 16"
72+ starcount: 26774(8/d)
73+ watchercount: " 350"
74+ ```
75+
76+ ### Export as a csv file
77+
78+ ``` bash
79+ $ github-compare spf13/cobra urfave/cli junegunn/fzf antonmedv/fx -f data.csv
80+ ```
81+ ![ csv] ( ./resource/compare-csv.png )
82+
83+
1884## Usage
1985
2086### Preparation
87+
21881 . [ Creating a personal access token] ( https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token )
22892 . Set access token token
2390 - Copied the access token and export to environment
@@ -34,6 +101,24 @@ $ export GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}
34101$ github-compare zeromicro/go-zero
35102```
36103
104+ ### Commands
105+
106+ ``` bash
107+ $ github-compare -h
108+ A cli tool to compare two github repositories
109+
110+ Usage:
111+ github-compare [flags]
112+
113+ Flags:
114+ -f, --file string output to a specified file
115+ -h, --help help for github-compare
116+ --json print with json style
117+ --table print with table style(default) (default true)
118+ -t, --token string github access token
119+ --yaml print with yaml style
120+ ```
121+
37122## Note
38123
391241 . A GitHub personal access token is required.
@@ -42,9 +127,11 @@ $ github-compare zeromicro/go-zero
42127 environment key ` GITHUB_ACCESS_TOKEN `
43128
44129## Last
130+
45131If this repository can help you, give a star please!
46132
47133Thanks all!
48134
49135## License
136+
50137[ MIT License] ( License )
0 commit comments