{"id":28544951,"url":"https://github.com/bhupesh-v/godeping","last_synced_at":"2025-07-24T22:07:57.066Z","repository":{"id":294309829,"uuid":"985856194","full_name":"Bhupesh-V/godeping","owner":"Bhupesh-V","description":"Ping your Go project dependencies for aliveness (are they maintained or not?)","archived":false,"fork":false,"pushed_at":"2025-06-01T14:09:23.000Z","size":66,"stargazers_count":11,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-04T19:24:53.830Z","etag":null,"topics":["cleanup","cli","dependencies","go","go-tools","healthcheck","ping","refactoring"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Bhupesh-V.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-18T17:03:10.000Z","updated_at":"2025-06-10T09:16:36.000Z","dependencies_parsed_at":"2025-06-08T03:32:31.750Z","dependency_job_id":null,"html_url":"https://github.com/Bhupesh-V/godeping","commit_stats":null,"previous_names":["bhupesh-v/godeping"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Bhupesh-V/godeping","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhupesh-V%2Fgodeping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhupesh-V%2Fgodeping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhupesh-V%2Fgodeping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhupesh-V%2Fgodeping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bhupesh-V","download_url":"https://codeload.github.com/Bhupesh-V/godeping/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bhupesh-V%2Fgodeping/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264001882,"owners_count":23542335,"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":["cleanup","cli","dependencies","go","go-tools","healthcheck","ping","refactoring"],"created_at":"2025-06-09T22:38:11.329Z","updated_at":"2025-07-07T02:31:05.399Z","avatar_url":"https://github.com/Bhupesh-V.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# godeping\n\n_Pronounced: \"Go deping\". Technically, \"Go dep ping\"_\n\n\u003e **A Go tool to check whether you Go project dependencies are maintained or not.**\n\n[![Go Build \u0026 Test](https://github.com/Bhupesh-V/godeping/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/Bhupesh-V/godeping/actions/workflows/main.yml)\n\n## Installation\n\n```\ngo install github.com/Bhupesh-V/godeping@latest\n```\n\n## Use-cases\n\n1. **Tech Debt, Refactoring \u0026 Cleanup**\n   - When inheriting an unfamiliar Go project, get a sense of technical debt in terms of dependencies.\n2. **Security Audits \u0026 Compliance**\n   - Flag deps that might not receive security patches anymore.\n3. **Open-Source Spirit**\n   - Help (sponsor) maintainers to keep the unmaintained libraries alive.\n   - Fork the ones that cannot be helped. Take charge on giving back to the community 🏃🏼‍♂️.\n\n## Judgement Criteria\n\n`godeping` relies on the Go Infrastructure to determine whether a dependency is archived or not. Namely `pkg.go.dev` which itself is powered by [`index.golang.org`](https://index.golang.org/).\n\n- As of today an API for [`pkg.go.dev` is still not available](https://github.com/golang/go/issues/36785).\n- By default, `godeping` considers a module unmaintained if it hasn't been updated in 2 years. This threshold can be customized using the `-since` flag.\n\n## Usage\n\nQuick start (assuming you are in the root of your Go project):\n\n```bash\ngodeping -quiet .\n```\n\nAll options:\n\n```bash\ngodeping [options] \u003cpath-to-go-project\u003e\n\nOptions:\n  -json\n        Output in JSON format\n  -quiet\n        Suppress progress output\n  -since string\n        Consider dependencies as unmaintained if not updated since this duration (e.g. 1y, 6m, 2y3m) (default \"2y\")\n```\n\n### Duration Format for `-since`\n\nThe `-since` flag accepts durations in several formats:\n\n```\n-since 3y\n-since 2y5m\n```\n\n## Example\n\n### Text (Default) Mode\n\n```\n$ godeping -quiet /path/to/your/project\nAnalyzing Go project at: /path/to/your/project\nFound 90 dependencies in go.mod\nModule: /path/to/your/project\nGo Version: 1.24.2\nDirect Dependencies: 30\n\nArchived (Dead) Direct Dependencies:\ngithub.com/avast/retry-go\n          Last Published: Oct 13, 2020\ngithub.com/golang/mock\n          Last Published: Jun 11, 2021\ngithub.com/pkg/errors\n          Last Published: Jan 14, 2020\ngithub.com/opentracing/opentracing-go\n          Last Published: Jul 1, 2020\ngithub.com/patrickmn/go-cache\n          Last Published: Jul 22, 2017\n\nSummary:\n- Total Dependencies: 90\n- Direct Dependencies: 30\n- Unmaintained Dependencies: 5\n```\n\n### Using Custom Duration\n\n```\n$ godeping -quiet -since 6m /path/to/your/project\n```\n\nThis checks for dependencies that haven't been updated in the last 6 months.\n\n### JSON Mode\n\nUse the `-json` flag to output the results in JSON format. JSON mode enables `-quiet` by default.\n\n```\ngodeping -json /path/to/your/project\n```\n\n```json\n{\n  \"module\": \"your/main/module\",\n  \"goVersion\": \"1.24.2\",\n  \"totalDependencies\": 90,\n  \"directDependencies\": 30,\n  \"deadDirectDependencies\": [\n    {\n      \"module_path\": \"github.com/golang/mock\",\n      \"last_published\": \"2021-06-11T00:00:00Z\"\n    },\n    {\n      \"module_path\": \"github.com/avast/retry-go\",\n      \"last_published\": \"2020-10-13T00:00:00Z\"\n    },\n    {\n      \"module_path\": \"github.com/patrickmn/go-cache\",\n      \"last_published\": \"2017-07-22T00:00:00Z\"\n    },\n    {\n      \"module_path\": \"github.com/pkg/errors\",\n      \"last_published\": \"2020-01-14T00:00:00Z\"\n    },\n    {\n      \"module_path\": \"github.com/opentracing/opentracing-go\",\n      \"last_published\": \"2020-07-01T00:00:00Z\"\n    }\n  ]\n}\n```\n\n## Alternatives\n\nIf you fancy freedom.\n\n```bash\ngo mod edit -json \\\n  | jq -r '.Require[].Path' \\\n  | grep github.com \\\n  | while read -r path; do\n    # Strip github.com/\n    repo=$(echo \"$path\" | sed -E 's|^github.com/||')\n    # Remove /v2, /v3, etc. at the end\n    clean_repo=$(echo \"$repo\" | sed -E 's|/v[0-9]+$||')\n    echo -n \"$clean_repo: \"\n    gh repo view \"$clean_repo\" --json isArchived --jq '.isArchived' 2\u003e/dev/null || echo \"not found\"\ndone\n```\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhupesh-v%2Fgodeping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbhupesh-v%2Fgodeping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbhupesh-v%2Fgodeping/lists"}