Merge pull request 'cli: improve --help documentation' (#3186) from push-qnptotlvsnyq into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3186
This commit is contained in:
@@ -344,15 +344,15 @@ For more detailed information, visit: {help_hyperlink("secrets", "https://docs.c
|
|||||||
description="Manage machines and their configuration",
|
description="Manage machines and their configuration",
|
||||||
epilog=(
|
epilog=(
|
||||||
f"""
|
f"""
|
||||||
This subcommand provides an interface to machines managed by clan.
|
This subcommand provides an interface to machines managed by Clan.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ clan machines list
|
$ clan machines list
|
||||||
List all the machines managed by clan.
|
List all the machines managed by Clan.
|
||||||
|
|
||||||
$ clan machines update [MACHINES]
|
$ clan machines update [MACHINES]
|
||||||
Will update the specified machine [MACHINE], if [MACHINE] is omitted, the command
|
Will update the specified machines [MACHINES], if [MACHINES] is omitted, the command
|
||||||
will attempt to update every configured machine.
|
will attempt to update every configured machine.
|
||||||
|
|
||||||
$ clan machines install [MACHINE] --target-host [TARGET_HOST]
|
$ clan machines install [MACHINE] --target-host [TARGET_HOST]
|
||||||
@@ -410,9 +410,9 @@ Examples:
|
|||||||
description="Query state information about machines",
|
description="Query state information about machines",
|
||||||
epilog=(
|
epilog=(
|
||||||
f"""
|
f"""
|
||||||
This subcommand provides an interface to the state managed by clan.
|
This subcommand provides an interface to the state managed by Clan.
|
||||||
|
|
||||||
State can be folders and databases that modules depend on managed by clan.
|
State can be folders and databases that modules depend on managed by Clan.
|
||||||
|
|
||||||
State directories can be added to on a per machine basis:
|
State directories can be added to on a per machine basis:
|
||||||
```
|
```
|
||||||
@@ -427,7 +427,7 @@ can be a good choice.
|
|||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ clan state list [MACHINE]
|
$ clan state list [MACHINE]
|
||||||
List state of the machines managed by clan.
|
List state of the machines managed by Clan.
|
||||||
|
|
||||||
For more detailed information, visit: {help_hyperlink("getting-started", "https://docs.clan.lol/backups")}
|
For more detailed information, visit: {help_hyperlink("getting-started", "https://docs.clan.lol/backups")}
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
|
|
||||||
update_parser = subparser.add_parser(
|
update_parser = subparser.add_parser(
|
||||||
"update",
|
"update",
|
||||||
help="Update a machine",
|
help="Update one or more machines",
|
||||||
epilog=(
|
epilog=(
|
||||||
"""
|
"""
|
||||||
This subcommand provides an interface to update machines managed by clan.
|
This subcommand provides an interface to update machines managed by Clan.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ clan machines update [MACHINES]
|
$ clan machines update [MACHINES]
|
||||||
Will update the specified machine [MACHINE], if [MACHINE] is omitted, the command
|
Will update the specified machines [MACHINES], if [MACHINES] is omitted, the command
|
||||||
will attempt to update every configured machine.
|
will attempt to update every configured machine.
|
||||||
To exclude machines being updated `clan.deployment.requireExplicitUpdate = true;`
|
To exclude machines being updated `clan.deployment.requireExplicitUpdate = true;`
|
||||||
can be set in the machine config.
|
can be set in the machine config.
|
||||||
@@ -110,7 +110,7 @@ Installing a machine means overwriting the target's disk.
|
|||||||
""",
|
""",
|
||||||
epilog=(
|
epilog=(
|
||||||
"""
|
"""
|
||||||
This subcommand provides an interface to install machines managed by clan.
|
This subcommand provides an interface to install machines managed by Clan.
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ def register_update_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
nargs="*",
|
nargs="*",
|
||||||
default=[],
|
default=[],
|
||||||
metavar="MACHINE",
|
metavar="MACHINE",
|
||||||
help="Machine to update. If no machine is specified, all machines will be updated.",
|
help="Machine to update. If no machines are specified, all machines that don't require explicit updates will be updated.",
|
||||||
)
|
)
|
||||||
add_dynamic_completer(machines_parser, complete_machines)
|
add_dynamic_completer(machines_parser, complete_machines)
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
description="list state folders and the services that configure them",
|
description="list state folders and the services that configure them",
|
||||||
epilog=(
|
epilog=(
|
||||||
"""
|
"""
|
||||||
List state of the machines managed by clan.
|
List state of the machines managed by Clan.
|
||||||
|
|
||||||
The backup commands are commands that will exist on the deployed machine.
|
The backup commands are commands that will exist on the deployed machine.
|
||||||
They can be introspected by checking under `/run/current-system/sw/bin/[COMMAND]`
|
They can be introspected by checking under `/run/current-system/sw/bin/[COMMAND]`
|
||||||
@@ -26,7 +26,7 @@ def register_parser(parser: argparse.ArgumentParser) -> None:
|
|||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ clan state list [MACHINE]
|
$ clan state list [MACHINE]
|
||||||
List state of the machine [MACHINE] managed by clan.
|
List state of the machine [MACHINE] managed by Clan.
|
||||||
|
|
||||||
|
|
||||||
For more detailed information, visit: https://docs.clan.lol/getting-started/backups/
|
For more detailed information, visit: https://docs.clan.lol/getting-started/backups/
|
||||||
|
|||||||
Reference in New Issue
Block a user