Skip to content

cli

etl_craft.cli

The etl-craft command line.

build_parser

build_parser(commands: Sequence[Command] = COMMANDS) -> argparse.ArgumentParser

Build the top-level argument parser with one subcommand per entry in commands.

main

main(argv: Sequence[str] | None = None, commands: Sequence[Command] = COMMANDS) -> int

Run the command line and return its exit code.

Returns 2 with the usage when no command is given. An EtlCraftError is written as an error: line and returns its own exit status; any other exception is a bug, logged with its traceback, and returns ExitCode.UNEXPECTED.