Vibgrate Graph builds a rich code map, and vg export lets you take that map anywhere — into graph databases, visualization tools, documentation, or supply-chain pipelines. This article covers the export formats and how to control them with --format and --out.
Overview
vg export writes the code map in a format of your choosing. The supported formats are JSON, GraphML, Graphviz DOT, Neo4j Cypher, Markdown, HTML, CycloneDX SBOM, and SPDX. This makes the graph portable: you can analyze it in another tool, render it, or hand it to a downstream system.
Prerequisites
Build the code map first:
vg build
Export the graph
Choose a format and an output path:
vg export --format json --out code-map.json
For a graph database or visualization tool:
vg export --format graphml --out code-map.graphml
vg export --format dot --out code-map.dot
vg export --format cypher --out code-map.cypher
For documentation or review:
vg export --format markdown --out code-map.md
vg export --format html --out code-map.html
Choosing a format
- JSON — general-purpose interchange and custom tooling.
- GraphML / DOT — visualization in graph viewers and Graphviz.
- Neo4j Cypher — load the graph into a Neo4j database for querying.
- Markdown / HTML — human-readable documentation and shareable pages.
- CycloneDX / SPDX — supply-chain and SBOM workflows.
Options
--formatselects the output format from the list above.--outsets the destination file path. Choose an extension that matches the format so downstream tools recognize it.
Tips
- Confirm the graph is current with
vg statusbefore exporting so the output reflects your working tree. - Re-run the export after rebuilding the map to keep external tools in sync.
Related
- Build the map with
vg build. - Check freshness with
vg status. - See graph export formats explained for guidance on picking the right one.
Exports are generated locally from the code map on your machine.