From 744bbdb245a8f4da1ca09455d07ffd92f08beb2f Mon Sep 17 00:00:00 2001 From: June Date: Mon, 10 Jun 2024 02:35:59 +0200 Subject: [PATCH] docs: add basic documentation to the infra-rebuild root command This way, by only looking at the help page, users should get a good enough idea on how to use infra-rebuild to start using it. --- src/infra_rebuild/cli/__init__.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/infra_rebuild/cli/__init__.py b/src/infra_rebuild/cli/__init__.py index fe31d77..c7e2dd9 100644 --- a/src/infra_rebuild/cli/__init__.py +++ b/src/infra_rebuild/cli/__init__.py @@ -34,7 +34,17 @@ def update_recursive_option(ctx, option_name, given_value): ctx.obj[option_name] = given_value -@click.group(context_settings={"help_option_names": ["-h", "--help"]}, invoke_without_command=True) +@click.group( + context_settings={"help_option_names": ["-h", "--help"]}, + invoke_without_command=True, + help="""Runs COMMAND for each given host. + + The commands mirror the operations of nixos-rebuild (with the exception of reboot, which is simply a convenience alias for "boot --reboot"). + + For commands acting remotely (boot, reboot, switch, test) infra-rebuild tries to be useful without any configuration by taking the FQDN from the hosts NixOS configuration as the target host. + However infra-rebuild also accepts configuration to override various aspects of the target host for specific or all hosts. + See the documentation on configuration for more information.""", # noqa: E501 +) @click.version_option(prog_name="infra-rebuild") @click.pass_context @click.option("--flake", help=flake_option_help_text)