gopkgview is an interactive tool designed to visualize and analyze Go project dependencies. It provides a rich, web-based interface for better understanding of how your project connects its components and external libraries.
Implemented with ELK's layout algorithms to arrange the graphs and React Flow to make the visualization interactive and user-friendly.
Example of visualization of lazydocker:
gopkgview-lazydocker.mp4
- Interactive web-based visualization of Go dependencies
- Toggle dependencies by type
- Focus on specific dependencies for analysis
go install github.com/grishy/gopkgview@latest
From the latest release from the Releases Page.
docker run -p 8080:8080 -v $(pwd):/app ghcr.io/grishy/gopkgview:latest
Navigate to your Go project directory and run:
cd my-go-project
gopkgview
This will start a web server with the dependency visualization available in your browser.
--root value From which directory find go.mod (default: ./) [$GO_PKGVIEW_ROOT]
--gomod value Path to go.mod [$GO_PKGVIEW_GOMOD]
--addr value Address to listen on (default: :0) [$GO_PKGVIEW_ADDR]
--max-goroutines value Maximum number of goroutines to use for parsing in parallel (default: 20) [$GO_PKGVIEW_MAX_GOROUTINES]
--help, -h show help
--version, -v print the version
- go-callvis - Great tool for visualizing of call, but panic on Go >= 1.21
- godepgraph - Same idea, but output is static image
- depgraph - Inspire me to create this tool
- gomod
© 2024 Sergei G.
This project is GPL-3.0 license licensed.