add cli docs generator

This commit is contained in:
Johannes Kirschbauer
2024-04-30 18:53:00 +02:00
parent 68a8a1ca71
commit 964625630e
3 changed files with 227 additions and 2 deletions

View File

@@ -79,13 +79,17 @@ def create_parser(prog: str | None = None) -> argparse.ArgumentParser:
"--flake",
help="path to the flake where the clan resides in, can be a remote flake or local, can be set through the [CLAN_DIR] environment variable",
default=get_clan_flake_toplevel_or_env(),
metavar="PATH",
type=flake_path,
epilog="Default is dynamically determined based on the current directory.",
)
subparsers = parser.add_subparsers()
parser_backups = subparsers.add_parser(
"backups", help="manage backups of clan machines"
"backups",
help="manage backups of clan machines",
description="manage backups of clan machines",
)
backups.register_parser(parser_backups)

View File

@@ -182,9 +182,10 @@ def register_update_parser(parser: argparse.ArgumentParser) -> None:
parser.add_argument(
"machines",
type=str,
help="machine to update. if empty, update all machines",
nargs="*",
default=[],
metavar="MACHINE",
help="machine to update. If no machine is specified, all machines will be updated.",
)
parser.add_argument(
"--target-host",