disco.main

This module contains the single function registered as the disco-start console-script entry point in pyproject.toml.


disco.main.run()[source]

Dispatch execution to either the GUI server or the CLI pipeline based on the first command-line argument.

If sys.argv[1].lower() == "gui", imports and calls disco.server.start_server(). Otherwise, imports and calls disco.cli.main().

Imports are deferred to avoid loading heavy GUI dependencies (FastAPI, Uvicorn, Matplotlib) when only the CLI is required, and vice versa.

This function is the sole entry point for all DISCO functionality and is mapped in pyproject.toml as:

[project.scripts]
disco-start = "disco.main:run"