diff --git a/changelog/140.fixed.md b/changelog/140.fixed.md index 9ffcfd5d..95410883 100644 --- a/changelog/140.fixed.md +++ b/changelog/140.fixed.md @@ -1 +1 @@ -CTL: List available transforms if no name is provided +CTL: List available transforms and generators if no name is provided diff --git a/infrahub_sdk/ctl/cli_commands.py b/infrahub_sdk/ctl/cli_commands.py index 3f5e704f..04d0d8f1 100644 --- a/infrahub_sdk/ctl/cli_commands.py +++ b/infrahub_sdk/ctl/cli_commands.py @@ -267,7 +267,7 @@ def render( variables_dict = parse_cli_vars(variables) repository_config = get_repository_config(Path(config.INFRAHUB_REPO_CONFIG_FILE)) - if list_available: + if list_available or not transform_name: list_jinja2_transforms(config=repository_config) return diff --git a/infrahub_sdk/ctl/generator.py b/infrahub_sdk/ctl/generator.py index 95ae11e7..9081d42f 100644 --- a/infrahub_sdk/ctl/generator.py +++ b/infrahub_sdk/ctl/generator.py @@ -23,7 +23,7 @@ async def run( ) -> None: # pylint: disable=unused-argument repository_config = get_repository_config(Path(config.INFRAHUB_REPO_CONFIG_FILE)) - if list_available: + if list_available or not generator_name: list_generators(repository_config=repository_config) return