{"id":42226729,"url":"https://github.com/adrianpk/depcheck","last_synced_at":"2026-01-27T02:36:09.726Z","repository":{"id":242945327,"uuid":"811035839","full_name":"adrianpk/depcheck","owner":"adrianpk","description":"Go modules deps stats in a snap","archived":false,"fork":false,"pushed_at":"2024-06-05T22:27:33.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-09T08:41:11.569Z","etag":null,"topics":["check","checker","deps","git","go","golang","gomod","module","stats"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adrianpk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-05T20:21:00.000Z","updated_at":"2024-06-05T22:27:36.000Z","dependencies_parsed_at":"2024-06-05T21:46:09.170Z","dependency_job_id":"1c239123-5c73-4a6c-b9d9-8a4adc94f836","html_url":"https://github.com/adrianpk/depcheck","commit_stats":null,"previous_names":["adrianpk/depcheck"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adrianpk/depcheck","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianpk%2Fdepcheck","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianpk%2Fdepcheck/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianpk%2Fdepcheck/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianpk%2Fdepcheck/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrianpk","download_url":"https://codeload.github.com/adrianpk/depcheck/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrianpk%2Fdepcheck/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28796982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["check","checker","deps","git","go","golang","gomod","module","stats"],"created_at":"2026-01-27T02:36:08.873Z","updated_at":"2026-01-27T02:36:09.711Z","avatar_url":"https://github.com/adrianpk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# depcheck\n\ndepcheck is a simple command-line interface (CLI) tool designed to provide a quick analysis of the dependencies in a Go project. \n\n## Why?\n\nWhen working on a Go project, it's often necessary to understand the dependencies that your project relies on. This can be especially important when reviewing pull requests that introduce new dependencies. depcheck provides a quick and easy way to get insights about all the dependencies of your project.\n\n## What?\n\nWhen executed in the top folder of the module, depcheck scans the `go.mod` file and fetches information about each dependency from the GitHub API. It then prints statistics about each dependency, including:\n\n- Full name of the repository\n- Whether the repository is a fork\n- Parent repo if it is a fork\n- Number of stargazers\n- Number of watchers\n- Number of open issues\n- License information\n- Default branch\n\n## Usage\n\nFollow these steps to install and use `depcheck`:\n\nClone the repository:\n```sh\n$ git clone https://github.com/adrianpk/depcheck.git\n```\n\nNavigate to the `depcheck` directory:\n```sh\n$ cd depcheck\n```\n\nInstall the application:\n```sh\n$ make install\n```\n\nOnce installed, you can run `depcheck` on the root folder of any Go module to analyze its dependencies.\n```sh\n$ depcheck\n```\n\nOr you can specify a sort flag:\n```sh\n$ depcheck -sort=stars\n```\n\nIn that case, the usage instructions would be slightly different. The user would run the compiled executable directly, rather than using `go run`. Here's how you can update the instructions:\n\n## Usage\n\nFollow these steps to install and use `depcheck`:\n\nClone the repository:\n```sh\n$ git clone https://github.com/adrianpk/depcheck.git\n```\n\nNavigate to the `depcheck` directory:\n```sh\n$ cd depcheck\n```\n\nInstall the application:\n```sh\n$ make install\n```\n\nOnce installed, you can run `depcheck` on the root folder of any Go module to analyze its dependencies:\n\n```sh\n$ depcheck\n```\n\nOr you can specify a sort flag:\n\n```sh\n$ depcheck -sort=stars\n```\n\nThe available sort flags are:\n\n* `watchers`: Sorts the repositories by the number of watchers. This is the default sort flag.\n* `stars`: Sorts the repositories by the number of stars.\n* `forks`: Sorts the repositories by the number of forks.\n* `issues`: Sorts the repositories by the number of open issues.\n\nIf no sort flag is passed, the application will sort the repositories by the number of watchers.\n\n**Prerequisite:** Before running the code, make sure to set the `GITHUB_TOKEN` environment variable to your GitHub personal access token. This is necessary for the code to authenticate with the GitHub API. You can generate a personal access token in your GitHub settings.\n\n```bash\nexport GITHUB_TOKEN=your_github_token\n```\n\nReplace `your_github_token` with your actual GitHub personal access token.\n\n## Sample output\n```markdown\nGitHub token found, proceeding...\nScanning go.mod file...\n                       Name|  IsFork|  Parent Repo|  Stargazers|  Watchers|  Open Issues|                                  License|Default Branch\n     sagikazarmark/locafero|   false|             |           4|         4|            1|                              MIT License|main\n    sagikazarmark/slog-shim|   false|             |           7|         7|            1|  BSD 3-Clause \"New\" or \"Revised\" License|main\n  inconshreveable/mousetrap|   false|             |         232|       232|            0|                       Apache License 2.0|master\n            subosito/gotenv|   false|             |         287|       287|            0|                              MIT License|master\n      magiconair/properties|   false|             |         321|       321|           23|        BSD 2-Clause \"Simplified\" License|main\n         pmezard/go-difflib|   false|             |         379|       379|            4|                                    Other|master\n          pelletier/go-toml|   false|             |        1661|      1661|           22|                                    Other|v2\n                spf13/pflag|    true|  ogier/pflag|        2328|      2328|          178|  BSD 3-Clause \"New\" or \"Revised\" License|master\n                 spf13/cast|   false|             |        3376|      3376|           89|                              MIT License|master\n              hashicorp/hcl|   false|             |        5127|      5127|          208|               Mozilla Public License 2.0|main\n                spf13/afero|   false|             |        5752|      5752|          133|                       Apache License 2.0|master\n            davecgh/go-spew|   false|             |        5946|      5946|           63|                              ISC License|master\n     mitchellh/mapstructure|   false|             |        7763|      7763|           82|                              MIT License|main\n           sourcegraph/conc|   false|             |        8562|      8562|           13|                              MIT License|main\n          fsnotify/fsnotify|   false|             |        9250|      9250|           26|  BSD 3-Clause \"New\" or \"Revised\" License|main\n           stretchr/testify|   false|             |       22304|     22304|          387|                              MIT License|master\n                spf13/viper|   false|             |       26085|     26085|          499|                              MIT License|master\n                spf13/cobra|   false|             |       36448|     36448|          274|                       Apache License 2.0|main\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianpk%2Fdepcheck","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrianpk%2Fdepcheck","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrianpk%2Fdepcheck/lists"}