{"id":13813671,"url":"https://github.com/kesonan/github-compare","last_synced_at":"2025-05-15T00:34:03.085Z","repository":{"id":39606276,"uuid":"496081828","full_name":"kesonan/github-compare","owner":"kesonan","description":"A GitHub repositories statistics command-line tool for the terminal","archived":false,"fork":false,"pushed_at":"2022-06-01T01:53:19.000Z","size":3098,"stargazers_count":150,"open_issues_count":1,"forks_count":9,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-04T04:04:27.083Z","etag":null,"topics":["cli","command-line","github","github-api","github-api-v4","github-compare","go","golang","statistics","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kesonan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-25T04:29:23.000Z","updated_at":"2024-07-28T09:48:08.000Z","dependencies_parsed_at":"2022-09-26T21:11:53.793Z","dependency_job_id":null,"html_url":"https://github.com/kesonan/github-compare","commit_stats":null,"previous_names":["kesonan/github-compare","anqiansong/github-compare"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kesonan%2Fgithub-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kesonan%2Fgithub-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kesonan%2Fgithub-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kesonan%2Fgithub-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kesonan","download_url":"https://codeload.github.com/kesonan/github-compare/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225319295,"owners_count":17455743,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","command-line","github","github-api","github-api-v4","github-compare","go","golang","statistics","terminal"],"created_at":"2024-08-04T04:01:25.175Z","updated_at":"2024-11-19T08:30:53.503Z","avatar_url":"https://github.com/kesonan.png","language":"Go","readme":"![banner](./resource/banner.png)\n\n# github-compare\n[![Release](https://img.shields.io/github/v/release/anqiansong/github-compare.svg?style=flat-square)](https://github.com/anqiansong/github-compare)\n[![License: MIT](https://img.shields.io/badge/License-MIT-gree.svg)](https://opensource.org/licenses/MIT)\n\n\u003ca href=\"https://www.producthunt.com/posts/github-compare-2?utm_source=badge-featured\u0026utm_medium=badge\u0026utm_souce=badge-github\u0026#0045;compare\u0026#0045;2\" target=\"_blank\"\u003e\u003cimg src=\"https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=348018\u0026theme=light\" alt=\"github\u0026#0045;compare - A\u0026#0032;GitHub\u0026#0032;repositories\u0026#0032;statistics\u0026#0032;cli\u0026#0032;tool\u0026#0032;for\u0026#0032;the\u0026#0032;terminal | Product Hunt\" style=\"width: 250px; height: 54px;\" width=\"250\" height=\"54\" /\u003e\u003c/a\u003e\n\nA GitHub repositories statistics command-line tool for the terminal\n\n## Install\n\n```bash\n$ go install github.com/anqiansong/github-compare@latest\n```\n\n## Example\n\n### TermUI-View\n\n#### Single Repository\n\n```bash\n$ github-compare spf13/cobra\n```\n\n![repo-detail](./resource/repo-detail.png)\n\n#### More than one Repository\n\n```bash\n$ github-compare spf13/cobra urfave/cli junegunn/fzf antonmedv/fx\n```\n\n![preview](./resource/compare-preview.png)\n\n### JSON-View\n\n```bash\n$ github-compare spf13/cobra --json                                           \n[\n  {\n    \"age\": \"3191 days\",\n    \"avgReleasePeriod\": \"199 days\",\n    \"contributorCount\": \"246\",\n    \"forkCount\": \"2331(0/d)\",\n    \"fullName\": \"spf13/cobra\",\n    \"homepage\": \"https://cobra.dev\",\n    \"issue\": \"0/893\",\n    \"language\": \"Go\",\n    \"lastPushedAt\": \"15 hour(s) ago\",\n    \"latestReleaseAt\": \"2 month(s) ago\",\n    \"lastUpdatedAt\": \"3 minute(s) ago\",\n    \"latestDayStarCount\": \"13 ⇈\",\n    \"latestMonthStarCount\": \"455\",\n    \"latestWeekStarCount\": \"93 ⇊\",\n    \"license\": \"Apache License 2.0\",\n    \"pull\": \"56/809\",\n    \"releaseCount\": \"16\",\n    \"starCount\": \"26807(8/d)\",\n    \"watcherCount\": \"349\",\n    \"description\": \"A Commander for modern Go CLI interactions\",\n    ...\n]\n```\nFor details see [cobra.json](./resource/cobra.json)\n\n### YAML-View\n\n```bash\n$ github-compare spf13/cobra --yaml                                           \n- age: 3191 days\n  avgreleaseperiod: 199 days\n  contributorcount: \"246\"\n  forkcount: 2331(0/d)\n  fullname: spf13/cobra\n  homepage: https://cobra.dev\n  issue: 0/893\n  language: Go\n  lastpushedat: 15 hour(s) ago\n  latestreleaseat: 2 month(s) ago\n  lastupdatedat: 7 minute(s) ago\n  latestdaystarcount: 13 ⇈\n  latestmonthstarcount: \"455\"\n  latestweekstarcount: 93 ⇊\n  license: Apache License 2.0\n  pull: 56/809\n  releasecount: \"16\"\n  starcount: 26807(8/d)\n  watchercount: \"349\"\n  description: A Commander for modern Go CLI interactions\n  ...\n```\n\nFor details see [cobra.yaml](./resource/cobra.yaml)\n\n### Export as a csv file\n\n```bash\n$ github-compare spf13/cobra urfave/cli junegunn/fzf antonmedv/fx -f data.csv\n```\n\n![csv](./resource/compare-csv.png)\n\n## Usage\n\n### Preparation\n\n1. [Creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token)\n2. Set access token token\n    - Copied the access token and export to environment\n    - Or you can set the access token by passing `github-compare` argument\n      `--token`\n\n### Execute\n\n```bash\n# set access token through the flag --token\n# github-compare zeromicro/go-zero --token ${accessToken}\n# or export access token to environment (recommended)\n$ export GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN}\n$ github-compare zeromicro/go-zero\n```\n\n### Commands\n\n```bash\n$ github-compare -h                                                    \nA GitHub repositories statistics command-line tool for the terminal\n\nUsage:\n  github-compare [flags]\n\nFlags:\n  -f, --file string    output to a specified file\n  -h, --help           help for github-compare\n      --json           print with json style\n  -t, --token string   github access token\n      --ui             print with term ui style(default) (default true)\n  -v, --version        version for github-compare\n      --yaml           print with yaml style\n```\n\n## Note\n\n1. A GitHub personal access token is required.\n2. `github-compare` accepts 1 to 4 repositories data queries.\n3. If you prefer to export the access token to environment, you must use\n   environment key `GITHUB_ACCESS_TOKEN`\n\n## Thanks\n- [termui](https://github.com/gizak/termui)\n- [termui-dpc](https://github.com/dcorbe/termui-dpc)\n- [spinner](https://github.com/briandowns/spinner)\n- [go-github](https://github.com/google/go-github)\n- [githubv4](https://github.com/shurcooL/githubv4)\n- [mapreduce](https://github.com/kevwan/mapreduce)\n- [cobra](https://github.com/spf13/cobra)\n- [lipgloss](https://github.com/charmbracelet/lipgloss)\n\n## Last\n\nIf this repository can help you, give a star please!\n\nThanks all!\n\n## License\n\n[MIT License](License)","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkesonan%2Fgithub-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkesonan%2Fgithub-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkesonan%2Fgithub-compare/lists"}