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.
go mod graph... doesn't show... a graph.
gopkgview does.
Example of visualization of lazydocker:
gopkgview-lazydocker.mp4
- Support latest Go version
- Interactive web-based visualization - Real-time exploration of dependencies
- Toggle dependencies by type - Filter standard library, external, and local packages
- Focus on specific dependencies - Drill down into particular packages for detailed analysis
- Multiple installation options -
go install, binary download, or Docker
go install github.com/grishy/gopkgview@latestDownload the latest binary from the Releases Page.
docker run -p 8080:8080 -v $(pwd):/app ghcr.io/grishy/gopkgview:latestNavigate to your Go project directory and run:
cd my-go-project
gopkgviewThis will start a web server with the dependency visualization available in your browser. By default it opens your default browser; use --skip-browser if you prefer to launch it manually.
| Flag | Description |
|---|---|
--root |
From which directory find go.mod ‣ Default: ./ ‣ Environment Variable: GO_PKGVIEW_ROOT |
--gomod |
Path to go.mod ‣ Default: Auto-detected ‣ Environment Variable: GO_PKGVIEW_GOMOD |
--addr |
Address to listen on ‣ Default: :0 (random port) ‣ Environment Variable: GO_PKGVIEW_ADDR |
--max-goroutines |
Maximum number of goroutines to use for parsing in parallel ‣ Default: 20 ‣ Environment Variable: GO_PKGVIEW_MAX_GOROUTINES |
--skip-browser |
Don't open browser on start ‣ Default: false ‣ Environment Variable: GO_PKGVIEW_SKIP_BROWSER |
--help, -h |
Show help |
--version, -v |
Print the version |
# Analyze a specific directory
gopkgview --root ./path/to/project
# Use a specific go.mod file
gopkgview --gomod ./path/to/go.modReminder for me, just create a tag and push it.
# Replace 1.2.0 with the new version in project
git tag -a v1.2.0 -m "Release v1.2.0"
git push origin tag v1.2.0- 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
© 2025 Sergei G. This project is licensed under the GPL-3.0 license.