cli/docs/cmd/go/mod/graph/index.md
Snider a1306bc321 feat/ml-integration (#2)
Co-authored-by: Charon (snider-linux) <charon@lethean.io>
Co-authored-by: Snider <snider@host.uk.com>
Co-authored-by: Virgil <virgil@lethean.io>
Co-authored-by: Claude <developers@lethean.io>
Reviewed-on: #2
Co-authored-by: Snider <snider@lethean.io>
Co-committed-by: Snider <snider@lethean.io>
2026-02-16 06:19:09 +00:00

900 B

core go mod graph

Print module dependency graph.

Wrapper around go mod graph. Outputs the module dependency graph in text form.

Usage

core go mod graph

What It Does

  • Prints module dependencies as pairs
  • Each line shows: module@version dependency@version
  • Useful for understanding dependency relationships

Examples

# Print dependency graph
core go mod graph

# Find who depends on a specific module
core go mod graph | grep "some/module"

# Visualise with graphviz
core go mod graph | dot -Tpng -o deps.png

Output

forge.lthn.ai/core/cli github.com/stretchr/testify@v1.11.1
github.com/stretchr/testify@v1.11.1 github.com/davecgh/go-spew@v1.1.2
github.com/stretchr/testify@v1.11.1 github.com/pmezard/go-difflib@v1.0.1
...

See Also