Purpose: Command-line interface and dispatch functionality for the GNN pipeline. Pipeline Step: Infrastructure module (not a numbered step) Category: Infrastructure / Development Tools Status: ✅ Production Ready Version: 1.0.0 Last Updated: 2026-03-24
The CLI module provides the gnn command-line tool — a unified interface to the entire GNN pipeline. It acts as a thin dispatcher, routing 12 subcommands to their respective module APIs.
- Pattern: Thin dispatcher (not a pipeline step)
- Entry point:
src.cli:main(registered inpyproject.toml [project.scripts]) - Dependencies: All pipeline modules (imported lazily per subcommand)
- Pipeline execution via
gnn runwith skip/only-steps, log-format, and skip-llm options - File validation via
gnn validate(section, state-space, connection, dimension checks) - JSON/YAML parsing via
gnn parsewith format and summary modes - Code generation via
gnn render(PyMDP, RxInfer, JAX, NumPyro, Stan, PyTorch) - Run reproduction via
gnn reproduceusing content-addressable hashing - Environment checks via
gnn preflightandgnn health - Live development via
gnn watch(file monitoring with 250ms debounce) - Dependency graphs via
gnn graph(Mermaid/text output) - API server via
gnn serve(delegates toapi/app.py) - LSP server via
gnn lsp(delegates tolsp/__init__.py)
cli/
├── __init__.py # Main dispatcher (414 lines, 12 subcommands)
├── AGENTS.md # This file
├── README.md # Usage guide
└── SPEC.md # Module specification