#compdef nitrocli

autoload -U is-at-least

_nitrocli() {
    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[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
":: :_nitrocli_commands" \
"*::: :->nitrocli" \
&& ret=0
    case $state in
    (nitrocli)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-command-$line[1]:"
        case $line[1] in
            (config)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__config_commands" \
"*::: :->config" \
&& ret=0
case $state in
    (config)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-config-command-$line[1]:"
        case $line[1] in
            (get)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'-n+[Sets the Num Lock option to the given HOTP slot]' \
'--num-lock=[Sets the Num Lock option to the given HOTP slot]' \
'-c+[Sets the Cap Lock option to the given HOTP slot]' \
'--caps-lock=[Sets the Cap Lock option to the given HOTP slot]' \
'-s+[Sets the Scroll Lock option to the given HOTP slot]' \
'--scroll-lock=[Sets the Scroll Lock option to the given HOTP slot]' \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'(-n --num-lock)-N[Unsets the Num Lock option]' \
'(-n --num-lock)--no-num-lock[Unsets the Num Lock option]' \
'(-c --caps-lock)-C[Unsets the Caps Lock option]' \
'(-c --caps-lock)--no-caps-lock[Unsets the Caps Lock option]' \
'(-s --scroll-lock)-S[Unsets the Scroll Lock option]' \
'(-s --scroll-lock)--no-scroll-lock[Unsets the Scroll Lock option]' \
'-o[Requires the user PIN to generate one-time passwords]' \
'--otp-pin[Requires the user PIN to generate one-time passwords]' \
'(-o --otp-pin)-O[Allows one-time password generation without PIN]' \
'(-o --otp-pin)--no-otp-pin[Allows one-time password generation without PIN]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(encrypted)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__encrypted_commands" \
"*::: :->encrypted" \
&& ret=0
case $state in
    (encrypted)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-encrypted-command-$line[1]:"
        case $line[1] in
            (close)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(open)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(fill)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-a[Checks if a fill operation is already running and show its progress instead of starting a new operation]' \
'--attach[Checks if a fill operation is already running and show its progress instead of starting a new operation]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(hidden)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__hidden_commands" \
"*::: :->hidden" \
&& ret=0
case $state in
    (hidden)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-hidden-command-$line[1]:"
        case $line[1] in
            (close)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(create)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The hidden volume slot to use:_files' \
':start -- The start location of the hidden volume as a percentage of the encrypted volume's size (0-99):_files' \
':end -- The end location of the hidden volume as a percentage of the encrypted volume's size (1-100):_files' \
&& ret=0
;;
(open)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(list)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-n[Only print the information that is available without connecting to a device]' \
'--no-connect[Only print the information that is available without connecting to a device]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(lock)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(otp)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__otp_commands" \
"*::: :->otp" \
&& ret=0
case $state in
    (otp)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-otp-command-$line[1]:"
        case $line[1] in
            (clear)
_arguments "${_arguments_options[@]}" \
'-a+[The OTP algorithm to use]: :(hotp totp)' \
'--algorithm=[The OTP algorithm to use]: :(hotp totp)' \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The OTP slot to clear:_files' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-a+[The OTP algorithm to use]: :(hotp totp)' \
'--algorithm=[The OTP algorithm to use]: :(hotp totp)' \
'-t+[The time to use for TOTP generation (Unix timestamp) \[default: system time\]]' \
'--time=[The time to use for TOTP generation (Unix timestamp) \[default: system time\]]' \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The OTP slot to use:_files' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'-a+[The OTP algorithm to use]: :(hotp totp)' \
'--algorithm=[The OTP algorithm to use]: :(hotp totp)' \
'-d+[The number of digits to use for the one-time password]: :(6 8)' \
'--digits=[The number of digits to use for the one-time password]: :(6 8)' \
'-c+[The counter value for HOTP]' \
'--counter=[The counter value for HOTP]' \
'-t+[The time window for TOTP]' \
'--time-window=[The time window for TOTP]' \
'-f+[The format of the secret]: :(ascii base32 hex)' \
'--format=[The format of the secret]: :(ascii base32 hex)' \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The OTP slot to use:_files' \
':name -- The name of the slot:_files' \
':secret -- The secret to store on the slot as a base32 encoded string (or in the format set with the --format option):_files' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-a[Shows slots that are not programmed]' \
'--all[Shows slots that are not programmed]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(pin)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__pin_commands" \
"*::: :->pin" \
&& ret=0
case $state in
    (pin)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-pin-command-$line[1]:"
        case $line[1] in
            (clear)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(set)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':type -- The PIN type to change:(admin user)' \
&& ret=0
;;
(unblock)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(pws)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__pws_commands" \
"*::: :->pws" \
&& ret=0
case $state in
    (pws)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-pws-command-$line[1]:"
        case $line[1] in
            (clear)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The PWS slot to clear:_files' \
&& ret=0
;;
(get)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-n[Shows the name stored on the slot]' \
'--name[Shows the name stored on the slot]' \
'-l[Shows the login stored on the slot]' \
'--login[Shows the login stored on the slot]' \
'-p[Shows the password stored on the slot]' \
'--password[Shows the password stored on the slot]' \
'-q[Prints the stored data without description]' \
'--quiet[Prints the stored data without description]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The PWS slot to read:_files' \
&& ret=0
;;
(add)
_arguments "${_arguments_options[@]}" \
'-s+[The number of the slot to write]' \
'--slot=[The number of the slot to write]' \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':name -- The name to store on the slot:_files' \
':login -- The login to store on the slot:_files' \
':password -- The password to store on the slot:_files' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" \
'-n+[The new name to store on the slot]' \
'--name=[The new name to store on the slot]' \
'-l+[The new login to store on the slot]' \
'--login=[The new login to store on the slot]' \
'-p+[The new password to store on the slot]' \
'--password=[The new password to store on the slot]' \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':slot -- The PWS slot to update:_files' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-a[Shows slots that are not programmed]' \
'--all[Shows slots that are not programmed]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(reset)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'--only-aes-key[Only build a new AES key instead of performing a full factory reset]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(status)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
(unencrypted)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
":: :_nitrocli__unencrypted_commands" \
"*::: :->unencrypted" \
&& ret=0
case $state in
    (unencrypted)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:nitrocli-unencrypted-command-$line[1]:"
        case $line[1] in
            (set)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
':type -- The mode to change to:(read-write read-only)' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
;;
(help)
_arguments "${_arguments_options[@]}" \
'-m+[Selects the device model to connect to]: :(librem pro storage)' \
'--model=[Selects the device model to connect to]: :(librem pro storage)' \
'*--serial-number=[Sets the serial number of the device to connect to. Can be set multiple times to allow multiple serial numbers]' \
'--usb-path=[Sets the USB path of the device to connect to]' \
'-h[Prints help information]' \
'--help[Prints help information]' \
'-V[Prints version information]' \
'--version[Prints version information]' \
'*-v[Increases the log level (can be supplied multiple times)]' \
'*--verbose[Increases the log level (can be supplied multiple times)]' \
'--no-cache[Disables the cache for all secrets]' \
&& ret=0
;;
        esac
    ;;
esac
}

(( $+functions[_nitrocli_commands] )) ||
_nitrocli_commands() {
    local commands; commands=(
        "config:Reads or writes the device configuration" \
"encrypted:Interacts with the device's encrypted volume" \
"fill:Fills the SD card with random data" \
"hidden:Interacts with the device's hidden volume" \
"list:Lists the attached Nitrokey devices" \
"lock:Locks the connected Nitrokey device" \
"otp:Accesses one-time passwords" \
"pin:Manages the Nitrokey PINs" \
"pws:Accesses the password safe" \
"reset:Performs a factory reset" \
"status:Prints the status of the connected Nitrokey device" \
"unencrypted:Interacts with the device's unencrypted volume" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli commands' commands "$@"
}
(( $+functions[_nitrocli__pws__add_commands] )) ||
_nitrocli__pws__add_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pws add commands' commands "$@"
}
(( $+functions[_nitrocli__otp__clear_commands] )) ||
_nitrocli__otp__clear_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli otp clear commands' commands "$@"
}
(( $+functions[_nitrocli__pin__clear_commands] )) ||
_nitrocli__pin__clear_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pin clear commands' commands "$@"
}
(( $+functions[_nitrocli__pws__clear_commands] )) ||
_nitrocli__pws__clear_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pws clear commands' commands "$@"
}
(( $+functions[_nitrocli__encrypted__close_commands] )) ||
_nitrocli__encrypted__close_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli encrypted close commands' commands "$@"
}
(( $+functions[_nitrocli__hidden__close_commands] )) ||
_nitrocli__hidden__close_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli hidden close commands' commands "$@"
}
(( $+functions[_nitrocli__config_commands] )) ||
_nitrocli__config_commands() {
    local commands; commands=(
        "get:Prints the Nitrokey configuration" \
"set:Changes the Nitrokey configuration" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli config commands' commands "$@"
}
(( $+functions[_nitrocli__hidden__create_commands] )) ||
_nitrocli__hidden__create_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli hidden create commands' commands "$@"
}
(( $+functions[_nitrocli__encrypted_commands] )) ||
_nitrocli__encrypted_commands() {
    local commands; commands=(
        "close:Closes the encrypted volume on a Nitrokey Storage" \
"open:Opens the encrypted volume on a Nitrokey Storage" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli encrypted commands' commands "$@"
}
(( $+functions[_nitrocli__fill_commands] )) ||
_nitrocli__fill_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli fill commands' commands "$@"
}
(( $+functions[_nitrocli__config__get_commands] )) ||
_nitrocli__config__get_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli config get commands' commands "$@"
}
(( $+functions[_nitrocli__otp__get_commands] )) ||
_nitrocli__otp__get_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli otp get commands' commands "$@"
}
(( $+functions[_nitrocli__pws__get_commands] )) ||
_nitrocli__pws__get_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pws get commands' commands "$@"
}
(( $+functions[_nitrocli__config__help_commands] )) ||
_nitrocli__config__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli config help commands' commands "$@"
}
(( $+functions[_nitrocli__encrypted__help_commands] )) ||
_nitrocli__encrypted__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli encrypted help commands' commands "$@"
}
(( $+functions[_nitrocli__help_commands] )) ||
_nitrocli__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli help commands' commands "$@"
}
(( $+functions[_nitrocli__hidden__help_commands] )) ||
_nitrocli__hidden__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli hidden help commands' commands "$@"
}
(( $+functions[_nitrocli__otp__help_commands] )) ||
_nitrocli__otp__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli otp help commands' commands "$@"
}
(( $+functions[_nitrocli__pin__help_commands] )) ||
_nitrocli__pin__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pin help commands' commands "$@"
}
(( $+functions[_nitrocli__pws__help_commands] )) ||
_nitrocli__pws__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pws help commands' commands "$@"
}
(( $+functions[_nitrocli__unencrypted__help_commands] )) ||
_nitrocli__unencrypted__help_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli unencrypted help commands' commands "$@"
}
(( $+functions[_nitrocli__hidden_commands] )) ||
_nitrocli__hidden_commands() {
    local commands; commands=(
        "close:Closes the hidden volume on a Nitrokey Storage" \
"create:Creates a hidden volume on a Nitrokey Storage" \
"open:Opens the hidden volume on a Nitrokey Storage" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli hidden commands' commands "$@"
}
(( $+functions[_nitrocli__list_commands] )) ||
_nitrocli__list_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli list commands' commands "$@"
}
(( $+functions[_nitrocli__lock_commands] )) ||
_nitrocli__lock_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli lock commands' commands "$@"
}
(( $+functions[_nitrocli__encrypted__open_commands] )) ||
_nitrocli__encrypted__open_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli encrypted open commands' commands "$@"
}
(( $+functions[_nitrocli__hidden__open_commands] )) ||
_nitrocli__hidden__open_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli hidden open commands' commands "$@"
}
(( $+functions[_nitrocli__otp_commands] )) ||
_nitrocli__otp_commands() {
    local commands; commands=(
        "clear:Clears a one-time password slot" \
"get:Generates a one-time password" \
"set:Configures a one-time password slot" \
"status:Prints the status of the one-time password slots" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli otp commands' commands "$@"
}
(( $+functions[_nitrocli__pin_commands] )) ||
_nitrocli__pin_commands() {
    local commands; commands=(
        "clear:Clears the cached PINs" \
"set:Changes a PIN" \
"unblock:Unblocks and resets the user PIN" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli pin commands' commands "$@"
}
(( $+functions[_nitrocli__pws_commands] )) ||
_nitrocli__pws_commands() {
    local commands; commands=(
        "clear:Clears a password safe slot" \
"get:Reads a password safe slot" \
"add:Adds a new password safe slot" \
"update:Updates a password safe slot" \
"status:Prints the status of the password safe slots" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli pws commands' commands "$@"
}
(( $+functions[_nitrocli__reset_commands] )) ||
_nitrocli__reset_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli reset commands' commands "$@"
}
(( $+functions[_nitrocli__config__set_commands] )) ||
_nitrocli__config__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli config set commands' commands "$@"
}
(( $+functions[_nitrocli__otp__set_commands] )) ||
_nitrocli__otp__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli otp set commands' commands "$@"
}
(( $+functions[_nitrocli__pin__set_commands] )) ||
_nitrocli__pin__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pin set commands' commands "$@"
}
(( $+functions[_nitrocli__unencrypted__set_commands] )) ||
_nitrocli__unencrypted__set_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli unencrypted set commands' commands "$@"
}
(( $+functions[_nitrocli__otp__status_commands] )) ||
_nitrocli__otp__status_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli otp status commands' commands "$@"
}
(( $+functions[_nitrocli__pws__status_commands] )) ||
_nitrocli__pws__status_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pws status commands' commands "$@"
}
(( $+functions[_nitrocli__status_commands] )) ||
_nitrocli__status_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli status commands' commands "$@"
}
(( $+functions[_nitrocli__pin__unblock_commands] )) ||
_nitrocli__pin__unblock_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pin unblock commands' commands "$@"
}
(( $+functions[_nitrocli__unencrypted_commands] )) ||
_nitrocli__unencrypted_commands() {
    local commands; commands=(
        "set:Changes the configuration of the unencrypted volume on a Nitrokey Storage" \
"help:Prints this message or the help of the given subcommand(s)" \
    )
    _describe -t commands 'nitrocli unencrypted commands' commands "$@"
}
(( $+functions[_nitrocli__pws__update_commands] )) ||
_nitrocli__pws__update_commands() {
    local commands; commands=(
        
    )
    _describe -t commands 'nitrocli pws update commands' commands "$@"
}

_nitrocli "$@"