Explore the graph
Everything ovecc index learns — modules, files, symbols, call edges, HTTP routes,
table accesses — is one connected graph. Four commands let you interrogate it, and
one exports it.
query: structured questions
ovecc query "deps services" # what does services depend on?
ovecc query "rdeps core" # who depends on core?
ovecc query "paths core" # traced paths through core
ovecc query "routes -> core" # is core reachable from routes? (with the path)
ovecc query "cycles" # elementary cycles, with witness edges
ovecc query "module billing" # search elements by name
Real answers:
$ ovecc query "rdeps core"
Dependents: 3
routes
services
src
$ ovecc query "routes -> core"
routes depends on core: yes
routes -> core
$ ovecc query "cycles"
Cycles: 1
core -> services -> core
src/core/db.ts:2 -> src/services/billing.ts (../services/billing)
src/services/billing.ts:1 -> src/core/db.ts (../core/db)
Targets can be modules, files, symbols, or table:NAME — ovecc query "rdeps table:products" answers "who touches this table?" with the exact handler symbols.
impact: blast radius
"What breaks if I touch this?" — downstream by default, --direction upstream|both to flip, --max-depth to bound the walk:
$ ovecc impact "api:/billing/summary"
Impact: GET /billing/summary/:id
Affected modules: 0
Affected APIs: 0
Affected tables: 1
Affected symbols: 5
Risk: Low (11)
Top paths:
GET /billing/summary/:id -> <GET /billing/summary/:id handler>
GET /billing/summary/:id -> <GET /billing/summary/:id handler> -> invoiceSummary
GET /billing/summary/:id -> <GET /billing/summary/:id handler> -> invoiceSummary -> invoices
GET /billing/summary/:id -> <GET /billing/summary/:id handler> -> invoiceSummary -> query -> loadConfig
The paths are the answer: this endpoint reaches the invoices table through
invoiceSummary. API targets accept the label (api:GET /search) or any substring
(api:/search).
explain: the role of an element
A deterministic, offline explanation — every sentence backed by a fact from the context slice:
$ ovecc explain core
# core
`core` is foundational: 3 component(s) depend on it and it has no dependencies of
its own, so changes here ripple outward. It lies on 3 traced call path(s).
2 finding(s) affect it, the most severe being low.
## Dependents (3)
- routes
- services
- src
## Change impact
Modifying `core` directly affects 3 dependent(s); change can propagate along:
- core -> routes
- core -> services
- core -> src
explain characterizes coupling (isolated / entry-point / foundational /
intermediary), lists the direct dependency edges both ways, walks change-impact
paths in the reverse-dependency direction (who is affected, up to three hops), and
appends the findings touching the element. It works on modules, files, symbols,
tables, and APIs.
export context: the slice as JSON
The same context slice explain narrates, as clean JSON for an external tool or LLM.
Nothing is sent anywhere — it just prints:
$ ovecc export context billing
{
"data": {
"target": "POST /billing/charge",
"dependencies": ["<POST /billing/charge handler>"],
"reverse_dependencies": ["routes"],
"call_paths": [["POST /billing/charge", "routes"], ...],
"findings": []
}
}
export graph: the whole graph
As data — module-level and file-level nodes and edges, sorted so an unchanged database exports byte-identical output, ready for Graphviz, d3, or any tool:
ovecc export graph --format json > graph.json
Or as a self-contained interactive viewer:
$ ovecc export graph --html
{ "html": "ovecc-graph.html", "bytes": 23560, "modules": 10, "files": 16, "file_edges": 22 }
The HTML file is genuinely offline — zero external URLs, the renderer ships inside the ovecc binary. Open it in any browser:
- force-directed canvas with module and file views;
- search, per-node detail panel;
- toggle external dependencies on/off.
Because it's one file, it attaches to a PR, an ADR, or a wiki page as-is.
Which one do I want?
| Question | Command |
|---|---|
| Who imports X? | query "rdeps X" |
| Does A (transitively) depend on B? | query "A -> B" |
| What breaks if I change X? | impact X |
| What is X, architecturally? | explain X |
| Give my LLM the facts about X | export context X |
| Show me everything | export graph --html |