Skip to content

dlgforge.cli

CLI parser and command dispatch for DialogForge.

build_parser()

Build the top-level dlgforge argument parser.

Returns:

Type Description
ArgumentParser

argparse.ArgumentParser: Parser configured with run, judge, push,

ArgumentParser

and seeds-migrate subcommands.

Examples:

>>> from dlgforge.cli import build_parser
>>> parser = build_parser()
>>> parser.prog
'dlgforge'

main()

Parse CLI arguments and dispatch to the selected command.

The selected subcommand is executed synchronously. Failures are surfaced as SystemExit with a command-scoped error message.

Returns:

Name Type Description
None None

Always returns None when execution completes.

Raises:

Type Description
SystemExit

Raised for command parsing errors or command execution failures.

Side Effects / I/O: - Reads CLI arguments from sys.argv. - Executes generation, judge, export, or migration workflows depending on the selected command.

Examples:

>>> from dlgforge.cli import main
>>> main()