CLI¶
NetForge exposes three main commands through the netforge entry point:
fitgeneratereport
There is also a combined run command that executes those stages in sequence.
netforge fit¶
Use fit to validate the input data, build the layered graph, and fit the block model.
netforge fit \
--data-root <data-root> \
--dataset <dataset> \
--directed \
--weight-col trade \
--weight-model auto \
--weight-transform none
Common flags:
--date-startand--date-endto select a calendar range--ts-startand--ts-endto select an ordinal or Unix range--fit-covariatesto choose built-in edge covariates--joint-metadata-modelor--no-joint-metadata-modelto include or skip metadata tag vertices--metadata-fieldsto choose which metadata become tag nodes--metadata-numeric-bins,--metadata-grid-km, and--metadata-ft-top-kto control tag construction--output-dirto write the run somewhere other than the default run directory
With the default fit settings, NetForge builds a joint data-metadata multilayer graph. Distinct metadata tokens become tag vertices in a layer named __metadata__.
netforge generate¶
Use generate on a fitted run directory to draw synthetic panels.
netforge generate \
--run-dir <run-dir> \
--num-samples 10 \
--seed 2026 \
--posterior-partition-sweeps 10 \
--posterior-partition-sweep-niter 5
Common flags:
--sample-canonicalfor canonical edge-count sampling--sample-max-entfor max-entropy edge-count sampling--sample-paramsor--no-sample-paramsto control parameter draws during canonical sampling--rewire-modeland--rewire-n-iterfor post-sampling rewiring checks--weight-min-cell-countto control the backing-off threshold in the weight sampler
netforge report¶
Use report to compare saved synthetic panels against the observed panel in the same run directory.
netforge report \
--run-dir <run-dir> \
--detailed-diagnostics \
--diagnostic-top-k 12 \
--html-report
Common flags:
--synthetic-edges-csvto report one saved sample--sample-labelto control filenames--html-report-pathto write the HTML report to a custom path
netforge run¶
Use run when you want a single command that fits, generates, and reports.
netforge run \
--data-root <data-root> \
--dataset <dataset> \
--directed \
--weight-col trade \
--weight-model auto \
--num-samples 3 \
--html-report
run accepts the same fit, generate, and report flags as the individual stages.
Help output¶
Every command exposes a full help page: