from @unified-product-graph/cli · Create & edit
upg connect
Create an edge between 2 nodes. Type is auto-inferred.
Usage
upg connect <source-id> <target-id> [options]Arguments
<source-id>- ID of the source node
<target-id>- ID of the target node
Options
--file <path>- Path to .upg file
--type <type>- Edge type. Auto-inferred if omitted
--properties <json>- Edge property bag as JSON (only for property-carrying edge types; unknown keys / off-scale values rejected)
--json- Machine-readable JSON output (the created edge)
Examples
Edge with auto-inferred type
upg connect n_Kg19aubWwbwm7V5t n_Mt84owZpqrst2X9cOutput
Connected: feature "Guest checkout" → persona "Returning shopper" (feature_serves_persona)
Force a specific edge type
upg connect node_feature node_metric --type feature_impacts_metric