Trace and query
Trace
codeweb trace <FROM> walks the full call chain around a node, printing callers and callees. Matching is substring-based on node keys by default.
Detail
codeweb detail <NAMES>... shows direct callers and callees per node, optionally with source context:
--depth accepts 1 (direct), 0 (target only), or -1 (unlimited).
Inspect
codeweb inspect finds directed paths that connect two or more nodes across all edge types:
Impact
codeweb impact answers “what is affected by this change” — per file or per node. The two target flags are mutually exclusive:
--edge-types accepts all (default), call, dataflow, reference, composition, inheritance.
Search by SQL fragment
codeweb trace-sql searches mapper and sql nodes by SQL text (case-insensitive substring) and traces back to the invoking Java methods:
Deduplicate
codeweb dedup merges duplicate nodes and edges (for example a table seen both with and without DDL across phases):
Declarative queries
codeweb query runs a JSON QuerySpec against the graph. A spec has three parts: start (which nodes), steps (traversal), and collect (result shape).
| Field | Values | Meaning |
|---|---|---|
start | type, name, schema | Starting node(s); all fields optional |
steps[] | {"action":"outgoing","edge_categories":[...],"max_depth":N} | Follow outgoing edges |
{"action":"incoming", ...} | Follow incoming edges | |
{"action":"filter","type_tag":"table","schema":"public"} | Keep matching nodes | |
{"action":"until","type_tag":"table"} | Stop traversal at a node type | |
collect | nodes (default), paths, subgraph | Result shape |
edge_categories accepts call, composition, dataflow, reference, inheritance — see Edge kinds. The same spec format works over HTTP (POST /api/v1/query) and MCP (codeweb_query), so one spec serves CLI, scripts, and LLM clients.