MCPcopy Index your code
hub / github.com/awalterschulze/gographviz

github.com/awalterschulze/gographviz @v2.0.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.3 ↗ · + Follow
468 symbols 1,054 edges 37 files 90 documented · 19% 17 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Parses the Graphviz DOT language and creates an interface, in golang, with which to easily create new and manipulate existing graphs which can be written back to the DOT format.

This parser has been created using gocc.

Example (Parse and Edit)

graphAst, _ := gographviz.ParseString(`digraph G {}`)
graph := gographviz.NewGraph()
if err := gographviz.Analyse(graphAst, graph); err != nil {
    panic(err)
}
graph.AddNode("G", "a", nil)
graph.AddNode("G", "b", nil)
graph.AddEdge("a", "b", true, nil)
output := graph.String()

Documentation

Installation

go get github.com/awalterschulze/gographviz

Build and Tests

Build Status

Users

  • aptly - Debian repository management tool
  • gorgonia - A Library that helps facilitate machine learning in Go
  • imagemonkey - Let's create our own image dataset
  • depviz - GitHub dependency visualizer (auto-roadmap)
  • kustomize-graph - A tool to visualize Kustomize dependencies
  • inframap - Read your tfstate or HCL to generate a graph specific for each Terraform provider
  • Antrea Traceflow supports using Traceflow for network diagnosis for Antrea, a Kubernetes networking solution intended to be Kubernetes native

Mentions

Using Golang and GraphViz to Visualize Complex Grails Applications

Extension points exported contracts — how you extend this code

Elem (Interface)
(no doc) [16 implementers]
ast/ast.go
Interface (Interface)
Interface allows you to parse the graph into your own structure. [2 implementers]
gographviz.go
Scanner (Interface)
(no doc) [1 implementers]
internal/parser/parser.go
ErrorSymbol (Interface)
(no doc)
internal/errors/errors.go
Walkable (Interface)
(no doc) [8 implementers]
ast/ast.go
Attrib (Interface)
(no doc)
internal/parser/productionstable.go
Visitor (Interface)
(no doc) [4 implementers]
ast/ast.go
Stmt (Interface)
(no doc) [4 implementers]
ast/ast.go

Core symbols most depended-on inside this repo

String
called by 47
ast/ast.go
Walk
called by 27
ast/ast.go
AddNode
called by 19
graph.go
Visit
called by 19
ast/ast.go
esc
called by 14
escape.go
String
called by 14
write.go
top
called by 10
internal/parser/parser.go
NewGraph
called by 9
graph.go

Shape

Method 210
Function 184
Struct 37
TypeAlias 25
Interface 12

Languages

Go100%

Modules by API surface

ast/ast.go109 symbols
analysewrite_test.go54 symbols
internal/parser/parser_test.go52 symbols
catch.go22 symbols
internal/parser/parser.go19 symbols
analyse.go19 symbols
escape.go18 symbols
internal/token/token.go17 symbols
graph.go16 symbols
internal/parser/action.go15 symbols
example_test.go14 symbols
gographviz.go13 symbols

For agents

$ claude mcp add gographviz \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page