_soundcraft__cli() {
    local i cur prev opts cmd
    COMPREPLY=()
    if [[ "${BASH_VERSINFO[0]}" -ge 4 ]]; then
        cur="$2"
    else
        cur="${COMP_WORDS[COMP_CWORD]}"
    fi
    prev="$3"
    cmd=""
    opts=""

    for i in "${COMP_WORDS[@]:0:COMP_CWORD}"
    do
        case "${cmd},${i}" in
            ",$1")
                cmd="soundcraft__cli"
                ;;
            soundcraft__cli,app)
                cmd="soundcraft__cli__subcmd__app"
                ;;
            soundcraft__cli,commands)
                cmd="soundcraft__cli__subcmd__commands"
                ;;
            soundcraft__cli,convert)
                cmd="soundcraft__cli__subcmd__convert"
                ;;
            soundcraft__cli,describe)
                cmd="soundcraft__cli__subcmd__describe"
                ;;
            soundcraft__cli,help)
                cmd="soundcraft__cli__subcmd__help"
                ;;
            soundcraft__cli,info)
                cmd="soundcraft__cli__subcmd__info"
                ;;
            soundcraft__cli,mcp)
                cmd="soundcraft__cli__subcmd__mcp"
                ;;
            soundcraft__cli,parity)
                cmd="soundcraft__cli__subcmd__parity"
                ;;
            soundcraft__cli,plugins)
                cmd="soundcraft__cli__subcmd__plugins"
                ;;
            soundcraft__cli,run)
                cmd="soundcraft__cli__subcmd__run"
                ;;
            soundcraft__cli,script)
                cmd="soundcraft__cli__subcmd__script"
                ;;
            soundcraft__cli__subcmd__help,app)
                cmd="soundcraft__cli__subcmd__help__subcmd__app"
                ;;
            soundcraft__cli__subcmd__help,commands)
                cmd="soundcraft__cli__subcmd__help__subcmd__commands"
                ;;
            soundcraft__cli__subcmd__help,convert)
                cmd="soundcraft__cli__subcmd__help__subcmd__convert"
                ;;
            soundcraft__cli__subcmd__help,describe)
                cmd="soundcraft__cli__subcmd__help__subcmd__describe"
                ;;
            soundcraft__cli__subcmd__help,help)
                cmd="soundcraft__cli__subcmd__help__subcmd__help"
                ;;
            soundcraft__cli__subcmd__help,info)
                cmd="soundcraft__cli__subcmd__help__subcmd__info"
                ;;
            soundcraft__cli__subcmd__help,mcp)
                cmd="soundcraft__cli__subcmd__help__subcmd__mcp"
                ;;
            soundcraft__cli__subcmd__help,parity)
                cmd="soundcraft__cli__subcmd__help__subcmd__parity"
                ;;
            soundcraft__cli__subcmd__help,plugins)
                cmd="soundcraft__cli__subcmd__help__subcmd__plugins"
                ;;
            soundcraft__cli__subcmd__help,run)
                cmd="soundcraft__cli__subcmd__help__subcmd__run"
                ;;
            soundcraft__cli__subcmd__help,script)
                cmd="soundcraft__cli__subcmd__help__subcmd__script"
                ;;
            *)
                ;;
        esac
    done

    case "${cmd}" in
        soundcraft__cli)
            opts="-h -V --help --version info convert run script commands describe app mcp parity plugins help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__app)
            opts="-h --port --compact --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --port)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__commands)
            opts="-h --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__convert)
            opts="-h --bit-depth --rate --normalize --dither --no-dither --in-place --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --bit-depth)
                    COMPREPLY=($(compgen -W "16 24 32f" -- "${cur}"))
                    return 0
                    ;;
                --rate)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__describe)
            opts="-h --compact --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help)
            opts="info convert run script commands describe app mcp parity plugins help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__app)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__commands)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__convert)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__describe)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__help)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__info)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__mcp)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__parity)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__plugins)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__run)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__help__subcmd__script)
            opts=""
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__info)
            opts="-h --compact --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__mcp)
            opts="-h --connect --demo --automation-read-root --automation-write-root --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --connect)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --automation-read-root)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --automation-write-root)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__parity)
            opts="-h --write --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --write)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__plugins)
            opts="-h --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__run)
            opts="-h --cmd --in --sample --demo --bounce --start --end --save --inspect --compact --in-place --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --cmd)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --in)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --bounce)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --start)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --end)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --save)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
        soundcraft__subcmd__cli__subcmd__script)
            opts="-h --keep-going --in --sample --demo --bounce --start --end --save --inspect --compact --in-place --help"
            if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
                COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
                return 0
            fi
            case "${prev}" in
                --in)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --bounce)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --start)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --end)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                --save)
                    COMPREPLY=($(compgen -f "${cur}"))
                    return 0
                    ;;
                *)
                    COMPREPLY=()
                    ;;
            esac
            COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
            return 0
            ;;
    esac
}

if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then
    complete -F _soundcraft__cli -o nosort -o bashdefault -o default soundcraft-cli
else
    complete -F _soundcraft__cli -o bashdefault -o default soundcraft-cli
fi
