Skip to main content

Graph Export Formats Explained

A guide to every format vg export supports — JSON, GraphML, Graphviz DOT, Neo4j Cypher, Markdown, HTML, CycloneDX, and SPDX — with guidance on which to pick for visualization, databases, docs, and SBOMs.

Vibgrate Docs

Vibgrate Help

vg export can write your code map in eight formats, each suited to a different downstream tool. This guide walks through them so you can choose the right one and avoid re-exporting later. It is written for developers integrating the graph into other systems and for teams standardizing on a format.

Overview

Vibgrate Graph holds a structural map of your code. vg export serializes that map for use elsewhere. The supported formats fall into four groups: interchange, visualization, documentation, and supply chain. You select a format with --format and a destination with --out.

Interchange: JSON

JSON is the general-purpose option — ideal for custom scripts, data pipelines, and tools that consume structured data.

vg export --format json --out code-map.json

Visualization: GraphML, DOT, Cypher

For graph viewers and visualization, GraphML and Graphviz DOT are the right choices. For loading into a Neo4j graph database where you can run queries, use Cypher.

vg export --format graphml --out code-map.graphml
vg export --format dot --out code-map.dot
vg export --format cypher --out code-map.cypher
  • GraphML — broad support across graph visualization tools.
  • DOT — render directly with Graphviz.
  • Cypher — build a queryable graph in Neo4j.

Documentation: Markdown and HTML

For human consumption — wikis, pull requests, or a shareable page — export to Markdown or HTML.

vg export --format markdown --out code-map.md
vg export --format html --out code-map.html

Supply chain: CycloneDX and SPDX

For SBOM and supply-chain workflows, export CycloneDX or SPDX. These slot into governance and compliance pipelines.

vg export --format cyclonedx --out code-map.cdx.json
vg export --format spdx --out code-map.spdx.json

Choosing the right format

  • Building tooling? JSON.
  • Visualizing? GraphML or DOT.
  • Querying a graph DB? Cypher.
  • Sharing with people? Markdown or HTML.
  • Governance and SBOM? CycloneDX or SPDX.

Tips

  • Run vg status before exporting so the output matches your working tree.
  • Match the file extension to the format so downstream tools recognize it.

Related

  • Export the code map with vg export.
  • Troubleshoot graph export and share issues.
  • For dependency SBOMs specifically, see vg sbom.