{"id":13983527,"url":"https://github.com/beatlabs/gomodctl","last_synced_at":"2025-09-08T13:07:48.617Z","repository":{"id":45960681,"uuid":"235592217","full_name":"beatlabs/gomodctl","owner":"beatlabs","description":"Search, Check, and Update Go modules.","archived":false,"fork":false,"pushed_at":"2022-07-08T07:56:51.000Z","size":16769,"stargazers_count":47,"open_issues_count":8,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-07-21T23:46:56.288Z","etag":null,"topics":["cli","go","golang","modules","packages"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beatlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-22T14:35:04.000Z","updated_at":"2025-05-05T14:38:28.000Z","dependencies_parsed_at":"2022-08-28T15:20:40.457Z","dependency_job_id":null,"html_url":"https://github.com/beatlabs/gomodctl","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/beatlabs/gomodctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatlabs%2Fgomodctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatlabs%2Fgomodctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatlabs%2Fgomodctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatlabs%2Fgomodctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beatlabs","download_url":"https://codeload.github.com/beatlabs/gomodctl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beatlabs%2Fgomodctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274189049,"owners_count":25237870,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"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":["cli","go","golang","modules","packages"],"created_at":"2024-08-09T05:01:47.681Z","updated_at":"2025-09-08T13:07:48.592Z","avatar_url":"https://github.com/beatlabs.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# gomodctl\n\n[![gomodctl build](https://github.com/beatlabs/gomodctl/workflows/gomodctl%20build/badge.svg)](https://github.com/beatlabs/gomodctl/actions?query=workflow%3A%22gomodctl+build%22)\n[![gomodctl release](https://github.com/beatlabs/gomodctl/workflows/gomodctl%20release/badge.svg)](https://github.com/beatlabs/gomodctl/actions?query=workflow%3A%22gomodctl+release%22)\n[![gomodctl snyk](https://github.com/beatlabs/gomodctl/workflows/gomodctl%20snyk/badge.svg)](https://github.com/beatlabs/gomodctl/actions?query=workflow%3A%22gomodctl+snyk%22)\n\n_gomodctl_ - search, check and update go modules.\n\nCurrently supported commands:\n\n- search - search for Go packages by the given term\n- info - search by the given term and show information about the matched package\n- check - check project dependencies for the version information and shows outdated packages\n- update - automatically sync project dependencies with their latest version\n- license - fetch license of a module with/without version\n\n## Installation\n\nExecute:\n\n```bash\n$ go get github.com/beatlabs/gomodctl\n```\n\nOr using [Homebrew 🍺](https://brew.sh)\n\n```bash\nbrew tap beatlabs/gomodctl https://github.com/beatlabs/gomodctl\nbrew install gomodctl\n```\n\n## Features\n\n### gomodctl search \u003cterm\u003e\n\nSearch in Go registry and return matched results.\n\nCommand:\n\n```shell script\ngomodctl search patron\n```\n\nResult:\n\n```shell script\n                   NAME                   | STARS |   IMPORT COUNT    |  SCORE\n------------------------------------------+-------+-------------------+-----------\n  github.com/beatlabs/patron/log          |    44 |                26 | 0.940500\n  github.com/beatlabs/patron/trace        |    43 |                19 | 0.940500\n  github.com/mantzas/patron/log           |    26 |                12 | 0.940500\n  github.com/mantzas/patron/errors        |     9 |                12 | 0.940500\n  github.com/beatlabs/patron              |    44 |                 9 | 1.000000\n  github.com/beatlabs/patron/async        |    43 |                10 | 0.940500\n  github.com/mantzas/patron/trace         |    26 |                 8 | 0.940500\n  github.com/beatlabs/patron/examples     |    44 |                 8 | 0.940500\n  github.com/beatlabs/patron/sync         |    46 |                 6 | 0.940500\n  github.com/beatlabs/patron/sync/http    |    46 |                 6 | 0.931095\n  github.com/mantzas/patron/encoding      |    20 |                 5 | 0.940500\n  github.com/mantzas/patron               |    24 |                 4 | 1.000000\n  github.com/mantzas/patron/encoding/json |     9 |                 5 | 0.931095\n  github.com/mantzas/patron/examples      |    26 |                 4 | 0.940500\n  github.com/mantzas/patron/async         |    24 |                 4 | 0.940500\n  github.com/beatlabs/patron/trace/http   |    46 |                 4 | 0.931095\n  github.com/mantzas/patron/sync          |    26 |                 3 | 0.940500\n  github.com/mantzas/patron/sync/http     |    26 |                 3 | 0.931095\n  github.com/mantzas/patron/info          |    13 |                 2 | 0.940500\n  github.com/beatlabs/patron/async/kafka  |    44 |                 2 | 0.931095\n------------------------------------------+-------+-------------------+-----------\n                                                    NUMBER OF MODULES |    20\n                                                  --------------------+-----------\n```\n\nAdd `--json` parameter to the command to print result as a JSON.\n\nCommand:\n\n```shell script\ngomodctl search github --json\n```\n\nResult:\n\n```json\n...\n{\n  \"Name\": \"gomock\",\n  \"Path\": \"github.com/golang/mock/gomock\",\n  \"ImportCount\": 3900,\n  \"Stars\": 3844,\n  \"Score\": 0.99,\n  \"Synopsis\": \"Package gomock is a mock framework for Go.\"\n},\n{\n  \"Name\": \"uuid\",\n  \"Path\": \"github.com/pborman/uuid\",\n  \"ImportCount\": 3579,\n  \"Stars\": 318,\n  \"Score\": 1,\n  \"Synopsis\": \"The uuid package generates and inspects UUIDs.\"\n},\n{\n  \"Name\": \"distribution\",\n  \"Path\": \"github.com/docker/distribution\",\n  \"ImportCount\": 3549,\n  \"Stars\": 5219,\n  \"Score\": 1,\n  \"Synopsis\": \"Package distribution will define the interfaces for the components of docker distribution.\"\n},\n{\n  \"Name\": \"state\",\n  \"Path\": \"github.com/juju/juju/state\",\n  \"ImportCount\": 3851,\n  \"Stars\": 1614,\n  \"Score\": 0.99,\n  \"Synopsis\": \"\"\n},\n...\n```\n\n### gomodctl info \u003cterm\u003e\n\nDetailed information about the package with fetched documentation.\n\nCommand:\n\n```shell script\ngomodctl info patron\n```\n\nResult:\n\n```shell script\n                PATH               | STARS | IMPORT COUNT |  SCORE\n-----------------------------------+-------+--------------+-----------\n  github.com/beatlabs/patron/trace |    43 |           19 | 0.940500\n\nDocumentation:\nPACKAGE\n\npackage trace\n    import \"github.com/beatlabs/patron/trace\"\n...\n```\n\nUse `--imports` and `--importers` flags to see list of imports in the package or importers using the package.\n\n### gomodctl check\n\nCheck module versions in the given Go project.\n\nCommand:\n\n```shell script\ngomodctl check\n```\n\nResult:\n\n```shell script\n              MODULE              |       CURRENT       |       LATEST\n----------------------------------+---------------------+----------------------\n  github.com/stretchr/testify     | v1.3.0              | v1.4.0\n  go.mongodb.org/mongo-driver     | v1.1.1              | v1.2.1\n  github.com/mitchellh/go-homedir | v1.1.0              | v1.1.0\n  github.com/ory/dockertest       | v3.3.5+incompatible | v3.3.5+incompatible\n  github.com/pkg/errors           | v0.8.1              | v0.9.1\n  github.com/spf13/cobra          | v0.0.5              | v0.0.5\n  github.com/spf13/viper          | v1.4.0              | v1.6.2\n----------------------------------+---------------------+----------------------\n                                     NUMBER OF MODULES  |          7\n                                  ----------------------+----------------------\n```\n\nAdd `--json` parameter to the command to print result as a JSON.\nAdd `--path` parameter to the command to run command on another directory.\n\n```shell script\ngomodctl check --json --path ~/projects/gomodctl\n```\n\n### gomodctl scan\n\nScan for vulnerabilities using the tool [gosec](https://github.com/securego/gosec)\n\nCommand:\n\n```shell script\ngomodctl scan\n```\n\nResult\n\n```shell script\n                MODULE                | CONFIDENCE | SEVERITY |                       CWE                       |                                                                    LINE,COLUMN\n--------------------------------------+------------+----------+-------------------------------------------------+------------------------------------------------------------------------------------\n  github.com/mitchellh/go-homedir     | HIGH       | MEDIUM   | https://cwe.mitre.org/data/definitions/78.html  | /go/pkg/mod/github.com/mitchellh/go-homedir@v1.1.0/homedir.go\n                                      |            |          |                                                 | ln:114 | col:10  exec.Command(\"getent\", \"passwd\", strconv.Itoa(os.Getuid()))\n--------------------------------------+------------+----------+-------------------------------------------------+------------------------------------------------------------------------------------\n  github.com/olekukonko/tablewriter   | HIGH       | MEDIUM   | https://cwe.mitre.org/data/definitions/22.html  | /go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.4/csv.go\n                                      |            |          |                                                 | ln:19 | col:15  os.Open(fileName)\n--------------------------------------+------------+----------+-------------------------------------------------+------------------------------------------------------------------------------------\n  github.com/olekukonko/tablewriter   | HIGH       | LOW      | https://cwe.mitre.org/data/definitions/703.html | /go/pkg/mod/github.com/olekukonko/tablewriter@v0.0.4/table.go\n                                      |            |          |                                                 | ln:782 | col:3  tmpWriter.WriteTo(t.out)\n--------------------------------------+------------+----------+-------------------------------------------------+------------------------------------------------------------------------------------\n  github.com/stretchr/testify         | HIGH       | MEDIUM   | https://cwe.mitre.org/data/definitions/22.html  | /Users/thomaschavakis/go/pkg/mod/github.com/stretchr/testify@v1.4.0/_codegen/main.go\n                                      |            |          |                                                 | ln:184 | col:15  ioutil.ReadFile(path.Join(pd.SrcRoot, pd.ImportPath, fname))\n--------------------------------------+------------+----------+-------------------------------------------------+------------------------------------------------------------------------------------\n```\n\n### gomodctl update\n\nUpdate module versions to latest minor\n\nCommand:\n\n```shell script\ngomodctl update\n```\n\nResult:\n\n```shell script\nYour dependencies updated to latest minor and go.mod.backup created\n              MODULE              |      PREVIOUS       |         NOW\n----------------------------------+---------------------+----------------------\n  github.com/ory/dockertest       | v3.3.5+incompatible | v3.3.5+incompatible\n  github.com/pkg/errors           | v0.8.1              | v0.9.1\n  github.com/spf13/cobra          | v0.0.5              | v0.0.5\n  github.com/spf13/viper          | v1.4.0              | v1.6.2\n  github.com/stretchr/testify     | v1.3.0              | v1.4.0\n  go.mongodb.org/mongo-driver     | v1.1.1              | v1.2.1\n  github.com/mitchellh/go-homedir | v1.1.0              | v1.1.0\n----------------------------------+---------------------+----------------------\n                                     NUMBER OF MODULES  |          7\n                                  ----------------------+----------------------\n```\n\nAdd `--json` parameter to the command to print result as a JSON.\nAdd `--path` parameter to the command to run command on another directory.\n\n```shell script\ngomodctl update --json --path ~/projects/gomodctl\n```\n\n### gomodctl license \u003cmodulename\u003e \u003cversion\u003e\n\nFetch licenses of the all dependencies of the current module.\nIf module name provided, it will fetch license of specific module, version is optional.\n\nCommand:\n\n```shell script\ngomodctl license\n```\n\nResult:\n\n```shell script\n                MODULE                |              VERSION               |   LICENSE     \n--------------------------------------+------------------------------------+---------------\n  github.com/go-resty/resty/v2        | v2.1.0                             | MIT           \n  github.com/olekukonko/tablewriter   | v0.0.4                             | MIT           \n  github.com/securego/gosec           | v0.0.0-20200129084146-17df5b370244 | Apache-2.0    \n  github.com/stretchr/testify         | v1.4.0                             | MIT           \n  github.com/Masterminds/semver       | v1.5.0                             | MIT           \n  github.com/google/licenseclassifier | v0.0.0-20200108231022-9dfa8d8474eb | Apache-2.0    \n  github.com/mholt/archiver/v3        | v3.3.0                             | MIT           \n  github.com/mitchellh/go-homedir     | v1.1.0                             | MIT           \n  github.com/spf13/cobra              | v0.0.6                             | Apache-2.0    \n  github.com/spf13/viper              | v1.5.0                             | MIT           \n  golang.org/x/mod                    | v0.2.0                             | BSD-3-Clause  \n--------------------------------------+------------------------------------+---------------\n                                                NUMBER OF MODULES          |      11       \n                                      -------------------------------------+---------------\n```\n\nAdd `--json` parameter to the command to print result as a JSON.\n\nCommand:\n\n```shell script\ngomodctl license github.com/beatlabs/patron\ngomodctl license github.com/beatlabs/patron v0.30.0\n```\n\nResult:\n\n```shell script\nApache-2.0\n```\n\n## How to ignore modules for version check and update\n\nCreate a `gomodctl.yaml` which has following structure which contains modules you want to ignore.\n```yaml\nignored_modules:\n - github.com/x/y\n - github.com/a/b\n```\n\ngomodctl checks directories for `gomodctl.yaml` in given order.\n \n1. `path` parameter\n2.  current working directory\n3.  home directory\n\n## How to configure for private modules\n\nSince check and update rely on go toolchain, if you have any private module that isn't publicly accessible, don't forget to set up your environment variables. For more information and how to configure, please check [Module configuration for non-public modules](https://golang.org/cmd/go/#hdr-Module_configuration_for_non_public_modules).\n\n## Code of conduct\n\nPlease note that this project is released with a [Contributor Code of Conduct](https://github.com/beatlabs/gomodctl/blob/master/CODE_OF_CONDUCT.md). By participating in this project and its community you agree to abide by those terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeatlabs%2Fgomodctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeatlabs%2Fgomodctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeatlabs%2Fgomodctl/lists"}