Skip to main content

ovecc export

Deterministic exports of the model, in two shapes.

Usage: ovecc export <COMMAND>

Commands:
context Export a compact context slice for an element
graph Export the dependency graph as JSON, or as an interactive HTML viewer

export context <target>

The same context slice that explain narrates, as clean JSON: the deterministic input for an external LLM or tool. Nothing is sent anywhere — it just prints.

$ ovecc export context billing
{
"schema_version": 1,
"tool": { "name": "ovecc", "version": "0.1.0" },
"command": "export context",
"data": {
"target": "POST /billing/charge",
"dependencies": ["<POST /billing/charge handler>"],
"reverse_dependencies": ["routes"],
"call_paths": [
["POST /billing/charge", "routes"],
["POST /billing/charge", "routes", "src"]
],
"apis": [],
"schemas": [],
"ownership": [],
"drift": [],
"findings": []
}
}

The slice contains: dependencies, dependents, call paths, related APIs and schemas, ownership, drift context, and findings — everything a consumer needs to reason about the element without re-deriving the graph.

export graph

The whole dependency graph — module-level and file-level nodes and edges, sorted so an unchanged database exports byte-identical output. Ready for Graphviz, d3, or any external tool:

ovecc export graph > graph.json
{
"data": {
"repository": "acme-shop",
"modules": {
"nodes": [
{ "id": "core", "label": "core", "kind": "module", "files": 2 },
{ "id": "external:external:express", "label": "external:express", "kind": "external" }
],
"edges": [
{ "source": "routes", "target": "core", "kind": "internal" },
{ "source": "routes", "target": "external:external:express", "kind": "external" }
]
},
"files": { "nodes": ["..."], "edges": ["..."] }
}
}

--html: the interactive viewer

$ ovecc export graph --html
{ "html": "ovecc-graph.html", "bytes": 23560, "modules": 10, "files": 16, "file_edges": 22 }

Writes a self-contained interactive viewer (default ovecc-graph.html; pass a path to choose): force-directed canvas, module/file views, search, an external-dependency toggle, and a per-node detail panel. The renderer ships inside the ovecc binary — no CDN, no runtime dependency, zero external URLs. The file opens offline in any browser and attaches to a PR or wiki page as-is.

Options

OptionEffect
context <TARGET>Element to slice (target forms)
graph --html [<PATH>]Write the HTML viewer instead of printing JSON

Plus the global options.