Provide a unified gnn CLI entry point that dispatches to pipeline module APIs.
- Subcommand routing: 12 subcommands (
run,validate,parse,render,report,reproduce,preflight,health,serve,lsp,watch,graph) - Lazy imports: Each handler imports its target module only when invoked
- Standard exit codes: 0=success, 1=error
- Verbose mode:
--verbose/-vflag enables DEBUG logging globally - Path management: All handlers ensure
src/is onsys.path
def main(argv: Optional[List[str]] = None) -> int:
"""CLI entrypoint. Returns exit code."""- No state between invocations (pure CLI tool)
- All domain logic lives in target modules, not in CLI handlers
- Entry point registered in
pyproject.tomlasgnn = "src.cli:main"