refactor(cli): migrate from argparse to typer for command-line interface

This commit is contained in:
2026-03-06 11:41:35 +08:00
parent 33f2b8f542
commit 7dbd704d6b
8 changed files with 195 additions and 91 deletions

View File

@@ -0,0 +1,12 @@
import typer
def visualize(
ctx: typer.Context,
host: str = typer.Option("127.0.0.1", "--host", help="Server host"),
port: int = typer.Option(8050, "--port", "-p", help="Server port"),
debug: bool = typer.Option(True, "--debug/--no-debug", help="Enable debug mode"),
):
from visualizer import app as dash_app
dash_app.run(host=host, port=port, debug=debug)