ovecc query
Structured queries over the persisted graph. One expression in, a query-shaped answer out — deterministically, in well under a second.
Usage: ovecc query [OPTIONS] <QUERY>
Query forms
| Expression | Answers |
|---|---|
deps X | What does X depend on (direct)? |
rdeps X | Who depends on X (direct)? |
paths X | Traced paths through X |
a -> b | Is b reachable from a? With the path |
cycles | Elementary module cycles, with witness edges per hop |
hotspots | The hotspot ranking (same data as hotspots) |
violations | The findings list (same data as violations) |
module X | Search elements by name |
X can be a module, file, symbol, or table:NAME.
Examples
$ ovecc query "deps services"
Dependencies: 2
core
utils
$ 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)
$ ovecc query "rdeps table:products"
Dependents: 1
registerRoutes.<GET /search handler>
$ ovecc query "module billing"
Dependencies: 4
<GET /billing/summary/:id handler>
invoiceSummary
invoices
query
The cycles answer is the definitive one: actual elementary cycles (A -> B -> A), each hop witnessed by the file:line of the import that creates it.
Options
Takes a quoted <QUERY> plus the global options.
An unparseable query is a usage error (exit 2).
Related
impact— transitive blast radius with risk scoring- Explore the graph — when to use which