Overview
vg export writes the code map to a file in the format inferred from the extension. Use - for stdout.
Usage
vg export [file]
| Extension | Format |
|---|---|
.json | JSON |
.ndjson | Newline-delimited JSON |
.graphml | GraphML |
.dot | Graphviz DOT |
.cypher | Neo4j Cypher |
.md | Markdown |
.html | HTML visualization |
.cdx.json | CycloneDX SBOM / AI-BOM |
.spdx.json | SPDX |
Examples
# Export as JSON
vg export map.json
# Export as DOT for Graphviz
vg export map.dot
# Export CycloneDX AI-BOM
vg export ai-bom.cdx.json
# Stream JSON to stdout
vg export -