Files
jcloud-docsgen/docs/reference/jcloud_docsgen/cli/cli.md
T
2026-09-27 23:28:05 +00:00

1.6 KiB

Module jcloud_docsgen.cli.cli

The command line interface

Function existing_directory

Function signature

existing_directory(path: str) -> pathlib.Path

Returns

Return type: pathlib.Path

Parameters

Parameter Type Kind Default value Description
path str normal -- --

Function error

Shows an error message and returns the exit code.

Function signature

error(message: str, exit_code: int = 1)

Parameters

Parameter Type Kind Default value Description
message str normal -- The error message to show.
exit_code int normal 1 The exit code.

Docstring

Shows an error message and returns the exit code.

:param message: The error message to show. :type message: str :param exit_code: The exit code. :type exit_code: int

Function create_argument_parser

Prepares a parser to parse the command-line arguments using argparse.

Function signature

create_argument_parser() -> argparse.ArgumentParser

Returns

The parser.

Return type: argparse.ArgumentParser

Docstring

Prepares a parser to parse the command-line arguments using argparse.

:return: The parser. :rtype: argparse.ArgumentParser

Function main

Function signature

main(argv=None) -> int

Returns

Return type: int

Parameters

Parameter Type Kind Default value Description
argv -- normal None --