main

SolidGroundUX DocumentationSolidGroundUX
NL

fn: main

Purpose

Parse command-line arguments and dispatch the requested command.

Signature

def main(argv: list[str] | None=None) -> int:

Arguments

  • argv: Optional CLI argument vector; None uses the process arguments.

Usage

result = main(["validate", "--source", str(site_root)])
result = main(["generate", "--source", str(site_root),
               "--output", str(output_dir), "--mode", "preview"])