22
33# github-compare
44
5- A Command -line tool to statistics the GitHub repositories
5+ A GitHub repositories statistics command -line tool for the terminal
66
77## Install
88
@@ -12,84 +12,101 @@ $ go install github.com/anqiansong/github-compare@latest
1212
1313## Example
1414
15- ### TableView
15+ ### TermUI-View
16+
17+ #### Single Repository
18+
19+ ``` bash
20+ $ github-compare spf13/cobra
21+ ```
22+
23+ ![ repo-detail] ( ./resource/repo-detail.png )
24+
25+ #### More than one Repository
1626
1727``` bash
1828$ github-compare spf13/cobra urfave/cli junegunn/fzf antonmedv/fx
1929```
30+
2031![ preview] ( ./resource/compare-preview.png )
2132
22- ### JSONView
33+ ### JSON-View
2334
2435``` bash
2536$ github-compare spf13/cobra --json
2637[
2738 {
28- " age" : " 3187 days" ,
39+ " age" : " 3191 days" ,
2940 " avgReleasePeriod" : " 199 days" ,
3041 " contributorCount" : " 246" ,
31- " forkCount" : " 2327 (0/d)" ,
42+ " forkCount" : " 2331 (0/d)" ,
3243 " fullName" : " spf13/cobra" ,
3344 " homepage" : " https://cobra.dev" ,
34- " issue" : " 107/892 " ,
45+ " issue" : " 0/893 " ,
3546 " language" : " Go" ,
36- " lastPushedAt" : " 8 hour(s) ago" ,
47+ " lastPushedAt" : " 15 hour(s) ago" ,
3748 " latestReleaseAt" : " 2 month(s) ago" ,
38- " lastUpdatedAt" : " 1 hour (s) ago" ,
39- " latestDayStarCount" : " 14 ⇊ " ,
40- " latestMonthStarCount" : " 477 " ,
41- " latestWeekStarCount" : " 110 ⇈ " ,
49+ " lastUpdatedAt" : " 3 minute (s) ago" ,
50+ " latestDayStarCount" : " 13 ⇈ " ,
51+ " latestMonthStarCount" : " 455 " ,
52+ " latestWeekStarCount" : " 93 ⇊ " ,
4253 " license" : " Apache License 2.0" ,
43- " pull" : " 55/808 " ,
54+ " pull" : " 56/809 " ,
4455 " releaseCount" : " 16" ,
45- " starCount" : " 26774(8/d)" ,
46- " watcherCount" : " 350"
47- }
56+ " starCount" : " 26807(8/d)" ,
57+ " watcherCount" : " 349" ,
58+ " description" : " A Commander for modern Go CLI interactions" ,
59+ ...
4860]
4961` ` `
62+ For details see [cobra.json](./resource/cobra.json)
5063
51- ### YAMLView
64+ # ## YAML-View
5265
5366` ` ` bash
5467$ github-compare spf13/cobra --yaml
55- - age: 3187 days
68+ - age: 3191 days
5669 avgreleaseperiod: 199 days
5770 contributorcount: " 246"
58- forkcount: 2327 (0/d)
71+ forkcount: 2331 (0/d)
5972 fullname: spf13/cobra
6073 homepage: https://cobra.dev
61- issue: 107/892
74+ issue: 0/893
6275 language: Go
63- lastpushedat: 8 hour(s) ago
76+ lastpushedat: 15 hour(s) ago
6477 latestreleaseat: 2 month(s) ago
65- lastupdatedat: 1 hour (s) ago
66- latestdaystarcount: 14 ⇊
67- latestmonthstarcount: " 477 "
68- latestweekstarcount: 110 ⇈
78+ lastupdatedat: 7 minute (s) ago
79+ latestdaystarcount: 13 ⇈
80+ latestmonthstarcount: " 455 "
81+ latestweekstarcount: 93 ⇊
6982 license: Apache License 2.0
70- pull: 55/808
83+ pull: 56/809
7184 releasecount: " 16"
72- starcount: 26774(8/d)
73- watchercount: " 350"
85+ starcount: 26807(8/d)
86+ watchercount: " 349"
87+ description: A Commander for modern Go CLI interactions
88+ ...
7489` ` `
7590
91+ For details see [cobra.yaml](./resource/cobra.yaml)
92+
7693# ## Export as a csv file
7794
7895` ` ` bash
7996$ github-compare spf13/cobra urfave/cli junegunn/fzf antonmedv/fx -f data.csv
8097` ` `
81- ![ csv] ( ./resource/compare-csv.png )
8298
99+ ! [csv](./resource/compare-csv.png)
83100
84101# # Usage
85102
86103# ## Preparation
87104
881051. [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)
891062. Set access token token
90- - Copied the access token and export to environment
91- - Or you can set the access token by passing ` github-compare ` argument
92- ` --token `
107+ - Copied the access token and export to environment
108+ - Or you can set the access token by passing ` github-compare` argument
109+ ` --token`
93110
94111# ## Execute
95112
@@ -105,7 +122,7 @@ $ github-compare zeromicro/go-zero
105122
106123` ` ` bash
107124$ github-compare -h
108- A cli tool to compare two github repositories
125+ A GitHub repositories statistics command-line tool for the terminal
109126
110127Usage:
111128 github-compare [flags]
@@ -114,21 +131,32 @@ Flags:
114131 -f, --file string output to a specified file
115132 -h, --help help for github-compare
116133 --json print with json style
117- --table print with table style(default) (default true)
118134 -t, --token string github access token
135+ --ui print with term ui style(default) (default true)
136+ -v, --version version for github-compare
119137 --yaml print with yaml style
120138` ` `
121139
122140# # Note
123141
1241421. A GitHub personal access token is required.
1251432. ` github-compare` accepts 1 to 4 repositories data queries.
126- 3 . If you prefer to export the access token to environment, you must use
144+ 3. If you prefer to export the access token to environment, you must use
127145 environment key ` GITHUB_ACCESS_TOKEN`
128146
147+ # # Thanks
148+ - [termui](https://github.com/gizak/termui)
149+ - [termui-dpc](https://github.com/dcorbe/termui-dpc)
150+ - [spinner](https://github.com/briandowns/spinner)
151+ - [go-github](https://github.com/google/go-github)
152+ - [githubv4](https://github.com/shurcooL/githubv4)
153+ - [mapreduce](https://github.com/kevwan/mapreduce)
154+ - [cobra](https://github.com/spf13/cobra)
155+ - [lipgloss](https://github.com/charmbracelet/lipgloss)
156+
129157# # Last
130158
131- If this repository can help you, give a star please!
159+ If this repository can help you, give a star please!
132160
133161Thanks all!
134162
0 commit comments