#compdef kwctl

autoload -U is-at-least

_kwctl() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'-v[Increase verbosity]' \
'--verbose[Increase verbosity]' \
'--no-color[Disable colorful output]' \
'-h[Print help]' \
'--help[Print help]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_kwctl_commands" \
"*::: :->kwctl" \
&& ret=0
    case $state in
    (kwctl)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kwctl-command-$line[1]:"
        case $line[1] in
            (annotate)
_arguments "${_arguments_options[@]}" : \
'-m+[File containing the metadata]:PATH:_default' \
'--metadata-path=[File containing the metadata]:PATH:_default' \
'-o+[Output file]:PATH:_default' \
'--output-path=[Output file]:PATH:_default' \
'-u+[File containing the usage information of the policy]:PATH:_default' \
'--usage-path=[File containing the usage information of the policy]:PATH:_default' \
'-h[Print help]' \
'--help[Print help]' \
':wasm-path -- Path to WebAssembly module to be annotated:_default' \
&& ret=0
;;
(bench)
_arguments "${_arguments_options[@]}" : \
'--allowed-host-capabilities=[Host capabilities the policy is allowed to use. Use '\''*'\'' to allow all. Can be repeated multiple times. Examples\: '\''oci/*'\'', '\''net/v1/dns_lookup_host'\'']:: :_default' \
'--cert-email=[Expected email in Fulcio certificate]:VALUE:_default' \
'--cert-oidc-issuer=[Expected OIDC issuer in Fulcio certificates]:VALUE:_default' \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:PATH:_default' \
'--dump-results-to-disk=[Puts results in target/tiny-bench/label/.. if target can be found. used for comparing previous runs]: :_default' \
'-e+[The runtime to use to execute this policy]:MODE:(opa gatekeeper kubewarden wasi)' \
'--execution-mode=[The runtime to use to execute this policy]:MODE:(opa gatekeeper kubewarden wasi)' \
'--github-owner=[GitHub owner expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--github-repo=[GitHub repository expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--measurement-time=[How long the bench '\''should'\'' run, num_samples is prioritized so benching will take longer to be able to collect num_samples if the code to be benched is slower than this time limit allowed]:SECONDS:_default' \
'--num-resamples=[How many resamples should be done]:NUM:_default' \
'--num-samples=[How many resamples should be done. Recommended at least 50, above 100 doesn'\''t seem to yield a significantly different result]:NUM:_default' \
'--record-host-capabilities-interactions=[]:FILE:_default' \
'--replay-host-capabilities-interactions=[]:FILE:_default' \
'-r+[File containing the Kubernetes admission request object in JSON format]:PATH:_default' \
'--request-path=[File containing the Kubernetes admission request object in JSON format]:PATH:_default' \
'--settings-json=[JSON string containing the settings for this policy]:VALUE:_default' \
'-s+[File containing the settings for this policy]:PATH:_default' \
'--settings-path=[File containing the settings for this policy]:PATH:_default' \
'--sigstore-trust-config=[JSON-formatted file conforming to the ClientTrustConfig message in the Sigstore protobuf specs. This file configures the entire Sigstore instance state, including the URIs used to access the CA and artifact transparency services as well as the cryptographic root of trust itself]:PATH:_files' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'*-a+[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'*--verification-annotation=[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'--verification-config-path=[YAML file holding verification config information (signatures, public keys...)]:PATH:_default' \
'*-k+[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'*--verification-key=[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'--warm-up-time=[How long the bench should warm up]:SECONDS:_default' \
'--allow-context-aware[Grant access to the Kubernetes resources defined inside of the policy'\''s \`contextAwareResources\` section. Warning\: review the list of resources carefully to avoid abuses. Disabled by default]' \
'--disable-wasmtime-cache[Turn off usage of wasmtime cache]' \
'--raw[Validate a raw request]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':uri_or_sha_prefix_or_yaml_file -- Policy URI, SHA prefix or YAML file containing Kubewarden policy resources. Supported schemes\: registry\://, https\://, file\://. If schema is omitted, file\:// is assumed, rooted on the current directory.:_default' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-s+[Shell type]:VALUE:(bash elvish fish powershell zsh)' \
'--shell=[Shell type]:VALUE:(bash elvish fish powershell zsh)' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(digest)
_arguments "${_arguments_options[@]}" : \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:PATH:_default' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'-h[Print help]' \
'--help[Print help]' \
':uri -- Policy URI:_default' \
&& ret=0
;;
(docs)
_arguments "${_arguments_options[@]}" : \
'-o+[path where the documentation file will be stored]:FILE:_default' \
'--output=[path where the documentation file will be stored]:FILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:PATH:_default' \
'-o+[Output format]:FORMAT:(yaml)' \
'--output=[Output format]:FORMAT:(yaml)' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'--show-signatures[Show sigstore signatures]' \
'-h[Print help]' \
'--help[Print help]' \
':uri_or_sha_prefix -- Policy URI or SHA prefix. Supported schemes\: registry\://, https\://, file\://. If schema is omitted, file\:// is assumed, rooted on the current directory.:_default' \
&& ret=0
;;
(load)
_arguments "${_arguments_options[@]}" : \
'--input=[load policies from tarball]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(policies)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
'--cert-email=[Expected email in Fulcio certificate]:VALUE:_default' \
'--cert-oidc-issuer=[Expected OIDC issuer in Fulcio certificates]:VALUE:_default' \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:DOCKER_CONFIG:_default' \
'--github-owner=[GitHub owner expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--github-repo=[GitHub repository expected in the certificates generated in CD pipelines]:VALUE:_default' \
'-o+[Output file. If not provided will be downloaded to the Kubewarden store]:PATH:_default' \
'--output-path=[Output file. If not provided will be downloaded to the Kubewarden store]:PATH:_default' \
'--sigstore-trust-config=[JSON-formatted file conforming to the ClientTrustConfig message in the Sigstore protobuf specs. This file configures the entire Sigstore instance state, including the URIs used to access the CA and artifact transparency services as well as the cryptographic root of trust itself]:PATH:_files' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'*-a+[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'*--verification-annotation=[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'--verification-config-path=[YAML file holding verification config information (signatures, public keys...)]:PATH:_default' \
'*-k+[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'*--verification-key=[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':uri -- Policy URI. Supported schemes\: registry\://, https\://, file\://:_default' \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:PATH:_default' \
'-f+[Push also a policy that is not annotated]: :_default' \
'--force=[Push also a policy that is not annotated]: :_default' \
'-o+[Output format]:PATH:(text json)' \
'--output=[Output format]:PATH:(text json)' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':policy -- Policy to push. Can be the path to a local file, a policy URI or the SHA prefix of a policy in the store.:_default' \
':uri -- Policy URI. Supported schemes\: registry\://:_default' \
&& ret=0
;;
(rm)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':uri_or_sha_prefix -- Policy URI or SHA prefix:_default' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'--allowed-host-capabilities=[Host capabilities the policy is allowed to use. Use '\''*'\'' to allow all. Can be repeated multiple times. Examples\: '\''oci/*'\'', '\''net/v1/dns_lookup_host'\'']:: :_default' \
'--cert-email=[Expected email in Fulcio certificate]:VALUE:_default' \
'--cert-oidc-issuer=[Expected OIDC issuer in Fulcio certificates]:VALUE:_default' \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:PATH:_default' \
'-e+[The runtime to use to execute this policy]:MODE:(opa gatekeeper kubewarden wasi)' \
'--execution-mode=[The runtime to use to execute this policy]:MODE:(opa gatekeeper kubewarden wasi)' \
'--github-owner=[GitHub owner expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--github-repo=[GitHub repository expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--record-host-capabilities-interactions=[]:FILE:_default' \
'--replay-host-capabilities-interactions=[]:FILE:_default' \
'-r+[File containing the Kubernetes admission request object in JSON format]:PATH:_default' \
'--request-path=[File containing the Kubernetes admission request object in JSON format]:PATH:_default' \
'--settings-json=[JSON string containing the settings for this policy]:VALUE:_default' \
'-s+[File containing the settings for this policy]:PATH:_default' \
'--settings-path=[File containing the settings for this policy]:PATH:_default' \
'--sigstore-trust-config=[JSON-formatted file conforming to the ClientTrustConfig message in the Sigstore protobuf specs. This file configures the entire Sigstore instance state, including the URIs used to access the CA and artifact transparency services as well as the cryptographic root of trust itself]:PATH:_files' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'*-a+[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'*--verification-annotation=[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'--verification-config-path=[YAML file holding verification config information (signatures, public keys...)]:PATH:_default' \
'*-k+[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'*--verification-key=[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'--allow-context-aware[Grant access to the Kubernetes resources defined inside of the policy'\''s \`contextAwareResources\` section. Warning\: review the list of resources carefully to avoid abuses. Disabled by default]' \
'--disable-wasmtime-cache[Turn off usage of wasmtime cache]' \
'--raw[Validate a raw request]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':uri_or_sha_prefix_or_yaml_file -- Policy URI, SHA prefix or YAML file containing Kubewarden policy resources. Supported schemes\: registry\://, https\://, file\://. If schema is omitted, file\:// is assumed, rooted on the current directory.:_default' \
&& ret=0
;;
(save)
_arguments "${_arguments_options[@]}" : \
'-o+[path where the file will be stored]:FILE:_default' \
'--output=[path where the file will be stored]:FILE:_default' \
'-h[Print help]' \
'--help[Print help]' \
'*::policies -- list of policies to save:_default' \
&& ret=0
;;
(scaffold)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_kwctl__subcmd__scaffold_commands" \
"*::: :->scaffold" \
&& ret=0

    case $state in
    (scaffold)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kwctl-scaffold-command-$line[1]:"
        case $line[1] in
            (admission-request)
_arguments "${_arguments_options[@]}" : \
'--object=[The file containing the new object being admitted]:PATH:_default' \
'--old-object=[The file containing the existing object]:PATH:_default' \
'-o+[Kubewarden Custom Resource type]:TYPE:(CREATE)' \
'--operation=[Kubewarden Custom Resource type]:TYPE:(CREATE)' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(artifacthub)
_arguments "${_arguments_options[@]}" : \
'-m+[File containing the metadata of the policy]:PATH:_default' \
'--metadata-path=[File containing the metadata of the policy]:PATH:_default' \
'-o+[Path where the artifact-pkg.yml file will be stored]:FILE:_default' \
'--output=[Path where the artifact-pkg.yml file will be stored]:FILE:_default' \
'-q+[File containing the questions-ui content of the policy]:PATH:_default' \
'--questions-path=[File containing the questions-ui content of the policy]:PATH:_default' \
'-v+[Semver version of the policy]:VALUE:_default' \
'--version=[Semver version of the policy]:VALUE:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(manifest)
_arguments "${_arguments_options[@]}" : \
'--cert-email=[Expected email in Fulcio certificate]:VALUE:_default' \
'--cert-oidc-issuer=[Expected OIDC issuer in Fulcio certificates]:VALUE:_default' \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:DOCKER_CONFIG:_default' \
'--github-owner=[GitHub owner expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--github-repo=[GitHub repository expected in the certificates generated in CD pipelines]:VALUE:_default' \
'(-s --settings-path)--settings-json=[JSON string containing the settings for this policy]:VALUE:_default' \
'-s+[File containing the settings for this policy]:PATH:_default' \
'--settings-path=[File containing the settings for this policy]:PATH:_default' \
'--sigstore-trust-config=[JSON-formatted file conforming to the ClientTrustConfig message in the Sigstore protobuf specs. This file configures the entire Sigstore instance state, including the URIs used to access the CA and artifact transparency services as well as the cryptographic root of trust itself]:PATH:_files' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'--title=[Policy title]:VALUE:_default' \
'-t+[Kubewarden Custom Resource type]:VALUE:(ClusterAdmissionPolicy AdmissionPolicy)' \
'--type=[Kubewarden Custom Resource type]:VALUE:(ClusterAdmissionPolicy AdmissionPolicy)' \
'*-a+[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'*--verification-annotation=[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'--verification-config-path=[YAML file holding verification config information (signatures, public keys...)]:PATH:_default' \
'*-k+[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'*--verification-key=[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'--allow-context-aware[Uses the policy metadata to define which Kubernetes resources can be accessed by the policy. Warning\: review the list of resources carefully to avoid abuses. Disabled by default]' \
'-h[Print help]' \
'--help[Print help]' \
':uri_or_sha_prefix -- Policy URI or SHA prefix. Supported schemes\: registry\://, https\://, file\://. If schema is omitted, file\:// is assumed, rooted on the current directory.:_default' \
&& ret=0
;;
(vap)
_arguments "${_arguments_options[@]}" : \
'-b+[The file containing the ValidatingAdmissionPolicyBinding definition]:VALIDATING-ADMISSION-POLICY-BINDING.yaml:_default' \
'--binding=[The file containing the ValidatingAdmissionPolicyBinding definition]:VALIDATING-ADMISSION-POLICY-BINDING.yaml:_default' \
'--cel-policy=[The CEL policy module to use]:URI:_default' \
'-p+[The file containing the ValidatingAdmissionPolicy definition]:VALIDATING-ADMISSION-POLICY.yaml:_default' \
'--policy=[The file containing the ValidatingAdmissionPolicy definition]:VALIDATING-ADMISSION-POLICY.yaml:_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(verification-config)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_kwctl__subcmd__scaffold__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kwctl-scaffold-help-command-$line[1]:"
        case $line[1] in
            (admission-request)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(artifacthub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(manifest)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(vap)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(verification-config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(verify)
_arguments "${_arguments_options[@]}" : \
'--cert-email=[Expected email in Fulcio certificate]:VALUE:_default' \
'--cert-oidc-issuer=[Expected OIDC issuer in Fulcio certificates]:VALUE:_default' \
'--docker-config-json-path=[Path to a directory containing the Docker '\''config.json'\'' file. Can be used to indicate registry authentication details]:PATH:_default' \
'--github-owner=[GitHub owner expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--github-repo=[GitHub repository expected in the certificates generated in CD pipelines]:VALUE:_default' \
'--sigstore-trust-config=[JSON-formatted file conforming to the ClientTrustConfig message in the Sigstore protobuf specs. This file configures the entire Sigstore instance state, including the URIs used to access the CA and artifact transparency services as well as the cryptographic root of trust itself]:PATH:_files' \
'--sources-path=[YAML file holding source information (https, registry insecure hosts, custom CA'\''s...)]:PATH:_default' \
'*-a+[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'*--verification-annotation=[Annotation in key=value format. Can be repeated multiple times]:KEY=VALUE:_default' \
'--verification-config-path=[YAML file holding verification config information (signatures, public keys...)]:PATH:_default' \
'*-k+[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'*--verification-key=[Path to key used to verify the policy. Can be repeated multiple times]:PATH:_default' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':uri -- Policy URI. Supported schemes\: registry\://:_default' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_kwctl__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kwctl-help-command-$line[1]:"
        case $line[1] in
            (annotate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(bench)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(digest)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(docs)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(info)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(inspect)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(load)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(policies)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(pull)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(push)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rm)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(save)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(scaffold)
_arguments "${_arguments_options[@]}" : \
":: :_kwctl__subcmd__help__subcmd__scaffold_commands" \
"*::: :->scaffold" \
&& ret=0

    case $state in
    (scaffold)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:kwctl-help-scaffold-command-$line[1]:"
        case $line[1] in
            (admission-request)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(artifacthub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(manifest)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(vap)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(verification-config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(verify)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_kwctl_commands] )) ||
_kwctl_commands() {
    local commands; commands=(
'annotate:Add Kubewarden metadata to a WebAssembly module' \
'bench:Benchmarks a Kubewarden policy' \
'completions:Generate shell completions' \
'digest:Fetch digest from the OCI manifest of a policy' \
'docs:Generates the markdown documentation for kwctl commands' \
'info:Display system information' \
'inspect:Inspect Kubewarden policy' \
'load:load policies from a tar.gz file' \
'policies:Lists all downloaded policies' \
'pull:Pulls a Kubewarden policy from a given URI' \
'push:Pushes a Kubewarden policy to an OCI registry' \
'rm:Removes a Kubewarden policy from the store' \
'run:Runs a Kubewarden policy from a given URI' \
'save:save policies to a tar.gz file' \
'scaffold:Scaffold a Kubernetes resource or configuration file' \
'verify:Verify a Kubewarden policy from a given URI using Sigstore' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kwctl commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__annotate_commands] )) ||
_kwctl__subcmd__annotate_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl annotate commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__bench_commands] )) ||
_kwctl__subcmd__bench_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl bench commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__completions_commands] )) ||
_kwctl__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl completions commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__digest_commands] )) ||
_kwctl__subcmd__digest_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl digest commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__docs_commands] )) ||
_kwctl__subcmd__docs_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl docs commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help_commands] )) ||
_kwctl__subcmd__help_commands() {
    local commands; commands=(
'annotate:Add Kubewarden metadata to a WebAssembly module' \
'bench:Benchmarks a Kubewarden policy' \
'completions:Generate shell completions' \
'digest:Fetch digest from the OCI manifest of a policy' \
'docs:Generates the markdown documentation for kwctl commands' \
'info:Display system information' \
'inspect:Inspect Kubewarden policy' \
'load:load policies from a tar.gz file' \
'policies:Lists all downloaded policies' \
'pull:Pulls a Kubewarden policy from a given URI' \
'push:Pushes a Kubewarden policy to an OCI registry' \
'rm:Removes a Kubewarden policy from the store' \
'run:Runs a Kubewarden policy from a given URI' \
'save:save policies to a tar.gz file' \
'scaffold:Scaffold a Kubernetes resource or configuration file' \
'verify:Verify a Kubewarden policy from a given URI using Sigstore' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kwctl help commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__annotate_commands] )) ||
_kwctl__subcmd__help__subcmd__annotate_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help annotate commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__bench_commands] )) ||
_kwctl__subcmd__help__subcmd__bench_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help bench commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__completions_commands] )) ||
_kwctl__subcmd__help__subcmd__completions_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help completions commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__digest_commands] )) ||
_kwctl__subcmd__help__subcmd__digest_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help digest commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__docs_commands] )) ||
_kwctl__subcmd__help__subcmd__docs_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help docs commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__help_commands] )) ||
_kwctl__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help help commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__info_commands] )) ||
_kwctl__subcmd__help__subcmd__info_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help info commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__inspect_commands] )) ||
_kwctl__subcmd__help__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help inspect commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__load_commands] )) ||
_kwctl__subcmd__help__subcmd__load_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help load commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__policies_commands] )) ||
_kwctl__subcmd__help__subcmd__policies_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help policies commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__pull_commands] )) ||
_kwctl__subcmd__help__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help pull commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__push_commands] )) ||
_kwctl__subcmd__help__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help push commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__rm_commands] )) ||
_kwctl__subcmd__help__subcmd__rm_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help rm commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__run_commands] )) ||
_kwctl__subcmd__help__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help run commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__save_commands] )) ||
_kwctl__subcmd__help__subcmd__save_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help save commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__scaffold_commands] )) ||
_kwctl__subcmd__help__subcmd__scaffold_commands() {
    local commands; commands=(
'admission-request:Scaffold an AdmissionRequest object' \
'artifacthub:Output an artifacthub-pkg.yml file from a metadata.yml file' \
'manifest:Output a Kubernetes resource manifest' \
'vap:Convert a Kubernetes \`ValidatingAdmissionPolicy\` into a Kubewarden \`ClusterAdmissionPolicy\`' \
'verification-config:Output a default Sigstore verification configuration file' \
    )
    _describe -t commands 'kwctl help scaffold commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__scaffold__subcmd__admission-request_commands] )) ||
_kwctl__subcmd__help__subcmd__scaffold__subcmd__admission-request_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help scaffold admission-request commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__scaffold__subcmd__artifacthub_commands] )) ||
_kwctl__subcmd__help__subcmd__scaffold__subcmd__artifacthub_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help scaffold artifacthub commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__scaffold__subcmd__manifest_commands] )) ||
_kwctl__subcmd__help__subcmd__scaffold__subcmd__manifest_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help scaffold manifest commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__scaffold__subcmd__vap_commands] )) ||
_kwctl__subcmd__help__subcmd__scaffold__subcmd__vap_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help scaffold vap commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__scaffold__subcmd__verification-config_commands] )) ||
_kwctl__subcmd__help__subcmd__scaffold__subcmd__verification-config_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help scaffold verification-config commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__help__subcmd__verify_commands] )) ||
_kwctl__subcmd__help__subcmd__verify_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl help verify commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__info_commands] )) ||
_kwctl__subcmd__info_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl info commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__inspect_commands] )) ||
_kwctl__subcmd__inspect_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl inspect commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__load_commands] )) ||
_kwctl__subcmd__load_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl load commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__policies_commands] )) ||
_kwctl__subcmd__policies_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl policies commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__pull_commands] )) ||
_kwctl__subcmd__pull_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl pull commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__push_commands] )) ||
_kwctl__subcmd__push_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl push commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__rm_commands] )) ||
_kwctl__subcmd__rm_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl rm commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__run_commands] )) ||
_kwctl__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl run commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__save_commands] )) ||
_kwctl__subcmd__save_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl save commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold_commands] )) ||
_kwctl__subcmd__scaffold_commands() {
    local commands; commands=(
'admission-request:Scaffold an AdmissionRequest object' \
'artifacthub:Output an artifacthub-pkg.yml file from a metadata.yml file' \
'manifest:Output a Kubernetes resource manifest' \
'vap:Convert a Kubernetes \`ValidatingAdmissionPolicy\` into a Kubewarden \`ClusterAdmissionPolicy\`' \
'verification-config:Output a default Sigstore verification configuration file' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kwctl scaffold commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__admission-request_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__admission-request_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold admission-request commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__artifacthub_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__artifacthub_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold artifacthub commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help_commands() {
    local commands; commands=(
'admission-request:Scaffold an AdmissionRequest object' \
'artifacthub:Output an artifacthub-pkg.yml file from a metadata.yml file' \
'manifest:Output a Kubernetes resource manifest' \
'vap:Convert a Kubernetes \`ValidatingAdmissionPolicy\` into a Kubewarden \`ClusterAdmissionPolicy\`' \
'verification-config:Output a default Sigstore verification configuration file' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'kwctl scaffold help commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help__subcmd__admission-request_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help__subcmd__admission-request_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold help admission-request commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help__subcmd__artifacthub_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help__subcmd__artifacthub_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold help artifacthub commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help__subcmd__help_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold help help commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help__subcmd__manifest_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help__subcmd__manifest_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold help manifest commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help__subcmd__vap_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help__subcmd__vap_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold help vap commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__help__subcmd__verification-config_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__help__subcmd__verification-config_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold help verification-config commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__manifest_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__manifest_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold manifest commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__vap_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__vap_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold vap commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__scaffold__subcmd__verification-config_commands] )) ||
_kwctl__subcmd__scaffold__subcmd__verification-config_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl scaffold verification-config commands' commands "$@"
}
(( $+functions[_kwctl__subcmd__verify_commands] )) ||
_kwctl__subcmd__verify_commands() {
    local commands; commands=()
    _describe -t commands 'kwctl verify commands' commands "$@"
}

if [ "$funcstack[1]" = "_kwctl" ]; then
    _kwctl "$@"
else
    compdef _kwctl kwctl
fi
