{% import 'click_web/form_macros.html' as macros %}
{{ levels[1:-1]| join(' - ', attribute='command.name')|title }}

{{ command.name|title }}

{{ command.html_help }}
{% set command_list = [] %} {% for level in levels %}
{% if loop.index == 1 %} {# do not print root command as it most likely is juse "cli" #} {% elif not level.fields %} {# It is just a command group without any options do not create it's own section #} {% do command_list.append(level.command.name) %} {% else %} {% do command_list.append(level.command.name) %} {{ command_list | join(' ') }} {% do command_list.clear() %} {% endif %} {% for field in level.fields %}
{% if field.nargs == -1 %} {{ macros.add_variadic_field_input(field) }} {% else %} {% for arg in range(field.nargs) %} {{ macros.add_field_input(field) }} {% endfor %}
{{ field.desc|default('', true)|capitalize }}
{% endif %}
{% endfor %}
{% endfor %}