{"id":13615303,"url":"https://github.com/nikolaydubina/import-graph","last_synced_at":"2025-04-14T03:11:55.936Z","repository":{"id":57580508,"uuid":"355510236","full_name":"nikolaydubina/import-graph","owner":"nikolaydubina","description":"Collect data about your dependencies","archived":false,"fork":false,"pushed_at":"2025-03-01T04:05:25.000Z","size":10164,"stargazers_count":43,"open_issues_count":1,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-27T17:11:58.057Z","etag":null,"topics":["go","graph","source-code-analysis","tools"],"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/nikolaydubina.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"nikolaydubina"}},"created_at":"2021-04-07T10:55:06.000Z","updated_at":"2025-02-16T14:28:26.000Z","dependencies_parsed_at":"2023-10-12T13:20:41.234Z","dependency_job_id":"fe7b1f6f-4b6a-422d-8664-f84e6c422acd","html_url":"https://github.com/nikolaydubina/import-graph","commit_stats":{"total_commits":111,"total_committers":2,"mean_commits":55.5,"dds":0.08108108108108103,"last_synced_commit":"b96b875f49dad0c9c0738bc282cfecae0ad9a422"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolaydubina%2Fimport-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolaydubina%2Fimport-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolaydubina%2Fimport-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikolaydubina%2Fimport-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikolaydubina","download_url":"https://codeload.github.com/nikolaydubina/import-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248813798,"owners_count":21165634,"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":["go","graph","source-code-analysis","tools"],"created_at":"2024-08-01T20:01:11.689Z","updated_at":"2025-04-14T03:11:55.917Z","avatar_url":"https://github.com/nikolaydubina.png","language":"Go","funding_links":["https://github.com/sponsors/nikolaydubina"],"categories":["Go"],"sub_categories":[],"readme":"# Collect data about your dependencies\n\n[![Tests](https://github.com/nikolaydubina/import-graph/workflows/Test/badge.svg)](https://github.com/nikolaydubina/import-graph/workflows/Test/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nikolaydubina/import-graph)](https://goreportcard.com/report/github.com/nikolaydubina/import-graph)\n[![go-recipes](https://raw.githubusercontent.com/nikolaydubina/go-recipes/main/badge.svg?raw=true)](https://github.com/nikolaydubina/go-recipes)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nikolaydubina/import-graph/badge)](https://securityscorecards.dev/viewer/?uri=github.com/nikolaydubina/import-graph)\n\n```bash\n$ go install github.com/nikolaydubina/jsonl-graph@latest\n$ go install github.com/nikolaydubina/import-graph@latest\n# and get https://graphviz.org/download/\n```\n\nFeatures\n\n- [x] Go modules, runs tests, detects tests and benchmarks\n- [x] git log\n- [x] goreportcard.com\n- [x] codecov.io\n- [x] Analyzes README.md\n- [x] Checks if mentioned in Awesome lists\n- [x] GitHub Stars\n- [ ] GitHub verified Organizations\n- [ ] reuse `go get` and `go list` to get code loaded by native Go routines\n- [ ] ... add yours here\n\n## Example\n\n```\n$ go mod graph | import-graph -i=gomod | jsonl-graph -color-scheme=file://$PWD/basic.json | dot -Tsvg \u003e output.svg\n```\n![gin-example](./docs/gin.svg)\n\nOutput in [JSONL](https://jsonlines.org) graph\n```\n$ go mod graph | import-graph -i=gomod\n{\"id\":\"golang.org/x/net\",\"can_get_gitstats\":true,\"can_get_codecov\":false, ... }\n...\n{\"from\":\"github.com/gin-gonic/gin\",\"to\":\"github.com/gin-contrib/sse\"}\n{\"from\":\"github.com/gin-gonic/gin\",\"to\":\"github.com/go-playground/validator/v10\"}\n```\n\nPretty-print with [jq](https://github.com/stedolan/jq)\n```bash\n$ go mod graph | import-graph -i=gomod | jq -f\n...\n{\n    \"id\": \"github.com/gin-gonic/gin\",\n    \"can_get_git\": true,\n    \"can_get_codecov\": true,\n    \"can_get_goreportcard\": true,\n    \"can_run_tests\": true,\n    \"github_url\": \"https://github.com/gin-gonic/gin\",\n    \"git_url\": \"https://github.com/gin-gonic/gin\",\n    \"git_last_commit\": \"2021-04-21\",\n    \"git_last_commit_days_since\": 3,\n    \"git_num_contributors\": 321,\n    \"codecov_url\": \"https://app.codecov.io/gh/gin-gonic/gin\",\n    \"codecov_files\": 41,\n    \"codecov_lines\": 2036,\n    \"codecov_coverage\": 98.67,\n    \"gotest_has_tests\": true,\n    \"gotest_all_tests_passed\": true,\n    \"gotest_num_packages\": 6,\n    \"gotest_num_packages_with_tests\": 4,\n    \"gotest_num_packages_tests_passed\": 4,\n    \"gotest_package_coverage_avg\": 98.9,\n    \"goreportcard_average\": 0.99,\n    \"goreportcard_grade\": \"A+\",\n    \"goreportcard_files\": 82,\n    \"goreportcard_issues\": 6,\n    \"files_has_benchmarks\": true,\n    \"files_has_tests\": true\n    ...\n}\n...\n```\n\n## Notes\n\nFor GitHub you need to set to set in environment `GITHUB_IMPORT_GRAPH_TOKEN` to your [personal GitHub token](https://github.com/settings/tokens). It does not need any permissions at all. It is needed for higher quota of GitHub API calls.\n\n## Related Projects\n\n- `Graphviz` https://graphviz.org/ is a very popular tool for visualizing graph data, most of tools bellow use dot from it\n- `Graphviz` https://graphviz.org/Gallery/directed/neural-network.html is nice example of dot format\n- `Graphviz` http://magjac.com/graphviz-visual-editor online editor\n- `Docs` https://awesomeopensource.com/projects/dependency-graph is a list of dependency visualization projects  \n- `Go` https://github.com/lucasepe/modgv written in Go; converts go mod graph into graphviz; does not collect data; CLI; dot   \n- `Go` https://github.com/loov/goda written in Go; analyses imports on its own; does not collect dta; CLI; dot  \n- `Go` https://github.com/adonovan/spaghetti wirtten in Go; search and read details about selected package; web; not graphic\n- `Go` https://github.com/psampaz/go-mod-outdated written in Go; pretty prints built-in Go tooling; not collecting; not dot; CLI \n- `Go` https://github.com/firstrow/go-outdated written in Go; deprecated; collects data from GitHub; CLI\n- `GitHub Tasks` https://github.com/moul/depviz written in Go and JavaScript; collects data from GitHub Tasks; plots nice web UI\n- `C++` https://github.com/jmarkowski/codeviz written in Python; C++ headers analysis; does not collect data; CLI; dot  \n- `Python` https://github.com/thebjorn/pydeps written in Python; looks for Python bytecode imports; clustering; does not collect data; CLI; dot  \n- `Python` https://github.com/naiquevin/pipdeptree written in Python; looks for python modules locally; does not collect data; CLI; JSON and dot, Deprecated  \n- `JavaScript` https://github.com/auchenberg/dependo written in JavaScript; does not fetch data; D3.js; CLI; HTML   \n- `JavaScript` https://github.com/pahen/madge written in JavaScript; does not collect data; CLI; dot  \n- `JavaScript` https://github.com/sverweij/dependency-cruiser written in JavaScript; rules; does not collect data; CLI; dot  \n- `JavaScript` https://github.com/anvaka/npmgraph.an written in JavaScript; collects data; HTML; hosted in GitHub Pages  \n- `JavaScript` https://github.com/anvaka/npmgraphbuilder written in JavaScript; collects data; module  \n- `JavaScript` https://github.com/dyatko/arkit written in JavaScript; modules and dependencies; CLI; svg, puml  \n- `JavaScript` https://github.com/hughsk/colony written in JavaScript; does not collect data; HTML; JSON  \n- `JavaScript` https://www.npmjs.com/package/node-dependency-visualizer written in JavaScript; does not collectdata; CLI; dot  \n- `Objective-C` `Swift` https://github.com/PaulTaykalo/objc-dependency-visualizer written in JavaScript and Ruby; does not collect data; CLI; dot; HTML; D3.js   \n- `Java` https://github.com/arunkumar9t2/scabbard written in Kotlin; CLI; dot  \n- `PHP` https://github.com/mamuz/PhpDependencyAnalysis written in PHP; does not collect data; code analysis; CLI; dot  \n- `Go` `Python` `Java` `JavaScript` `C++` https://github.com/oss-review-toolkit/ort written in Kotlin JavaSCript Python; collects data; analyses; analysis, downloading, reporting; used for licence scanning in open source; good architecture; a bit lacking support for Go; components may not be used separately  \n- `Code` https://github.com/aspiers/git-deps written in Python; analyses dependencies of commits in Git repository  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolaydubina%2Fimport-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikolaydubina%2Fimport-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikolaydubina%2Fimport-graph/lists"}