gopkgview

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

README

gopkgview - Go dependency visualization


Status: Maintained

GitHub tag Go Report Card Build Status

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:

https://github.com/user-attachments/assets/d9715b85-9f77-4b2e-8ef4-1581071f1e66

Features

  • Interactive web-based visualization of Go dependencies
  • Toggle dependencies by type
  • Focus on specific dependencies for analysis

Installation - 3 options

Install via go install
go install github.com/grishy/gopkgview@latest
Download the Release

From the latest release from the Releases Page.

Run with Docker
docker run -p 8080:8080 -v $(pwd):/app ghcr.io/grishy/gopkgview:latest

Usage

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.

Available Flags
--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

Alternatives

  • 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

License

© 2024 Sergei G.
This project is GPL-3.0 license licensed.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Implementation is based on https://github.com/dghubble/trie
Implementation is based on https://github.com/dghubble/trie

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL