#compdef maa

autoload -U is-at-least

_maa() {
    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[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
":: :_maa_commands" \
"*::: :->maa" \
&& ret=0
    case $state in
    (maa)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maa-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
'-t+[Time to test download speed]:TEST_TIME:_default' \
'--test-time=[Time to test download speed]:TEST_TIME:_default' \
'--api-url=[URL of api to get version information]:API_URL:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--no-resource[Do not install resource]' \
'-f[Force to install even if the maa and resource already exists]' \
'--force[Force to install even if the maa and resource already exists]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::channel -- Channel to download prebuilt package:(stable beta alpha)' \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
'-t+[Time to test download speed]:TEST_TIME:_default' \
'--test-time=[Time to test download speed]:TEST_TIME:_default' \
'--api-url=[URL of api to get version information]:API_URL:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--no-resource[Do not install resource]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::channel -- Channel to download prebuilt package:(stable beta alpha)' \
&& ret=0
;;
(hot-update)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(dir)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':dir:((data\:"Directory of maa-cli'\''s data"
library\:"Directory of maa-cli'\''s dynamic library"
config\:"Directory of maa-cli'\''s config"
cache\:"Directory of maa-cli'\''s cache"
resource\:"Directory of MaaCore'\''s resource"
hot-update\:"Directory of MaaCore'\''s hot update"
log\:"Directory of MaaCore'\''s log"))' \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::component:(all maa-cli maa-core)' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':task -- Name of the task to run:_default' \
&& ret=0
;;
(startup)
_arguments "${_arguments_options[@]}" : \
'--account-name=[]:ACCOUNT_NAME:_default' \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::client_type:(Official Bilibili Txwy YoStarEN YoStarJP YoStarKR)' \
&& ret=0
;;
(closedown)
_arguments "${_arguments_options[@]}" : \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::client:(Official Bilibili Txwy YoStarEN YoStarJP YoStarKR)' \
&& ret=0
;;
(fight)
_arguments "${_arguments_options[@]}" : \
'-m+[Number of medicine (Sanity Potion) used to fight, default to 0]:MEDICINE:_default' \
'--medicine=[Number of medicine (Sanity Potion) used to fight, default to 0]:MEDICINE:_default' \
'--expiring-medicine=[Number of expiring medicine (Sanity Potion) used to fight, default to 0]:EXPIRING_MEDICINE:_default' \
'--stone=[Number of stone (Originite Prime) used to fight, default to 0]:STONE:_default' \
'--times=[Exit after fighting given times, default to infinite]:TIMES:_default' \
'*-D+[Exit after collecting given number of drops, default to no limit]:DROPS:_default' \
'*--drops=[Exit after collecting given number of drops, default to no limit]:DROPS:_default' \
'--series=[Repeat times of single proxy combat (-1 ~ 6), default to 1]:SERIES:_default' \
'--penguin-id=[Penguin Statistics ID to report drops, leave empty to report anonymously]:PENGUIN_ID:_default' \
'--yituliu-id=[Yituliu ID to report drops, leave empty to report anonymously]:YITULIU_ID:_default' \
'--client-type=[Client type used to restart the game client if game crashed]:CLIENT_TYPE:(Official Bilibili Txwy YoStarEN YoStarJP YoStarKR)' \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--report-to-penguin[Whether report drops to the Penguin Statistics]' \
'--report-to-yituliu[Whether report drops to the yituliu]' \
'--dr-grandet[Whether to use Originites like Dr. Grandet]' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::stage -- Stage to fight, e.g. 1-7, leave empty to fight current/last stage:_default' \
&& ret=0
;;
(copilot)
_arguments "${_arguments_options[@]}" : \
'--raid=[Whether to fight stage in raid mode]:RAID:_default' \
'--formation-index=[Select which formation to use (1-4)]:FORMATION_INDEX:_default' \
'--support-unit-usage=[Support operator usage mode]:SUPPORT_UNIT_USAGE:_default' \
'--support-unit-name=[Use given support unit name, don'\''t use support unit if not provided]:SUPPORT_UNIT_NAME:_default' \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--formation[Enable auto formation]' \
'--add-trust[Fill empty slots by ascending trust value during auto formation]' \
'--ignore-requirements[]' \
'--use-sanity-potion[Use sanity potion to restore sanity when it'\''s not enough]' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::uri_list -- URI of the copilot task file:_default' \
&& ret=0
;;
(ssscopilot)
_arguments "${_arguments_options[@]}" : \
'--loop-times=[Loop times]:LOOP_TIMES:_default' \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':uri:_default' \
&& ret=0
;;
(paradoxcopilot)
_arguments "${_arguments_options[@]}" : \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::uri_list -- URI of the paradox copilot task file:_default' \
&& ret=0
;;
(roguelike)
_arguments "${_arguments_options[@]}" : \
'--mode=[Mode of the roguelike]:MODE:_default' \
'--squad=[Squad to start with in Chinese, e.g. "指挥分队" (default), "后勤分队"]:SQUAD:_default' \
'--core-char=[Starting core operator in Chinese, e.g. "维什戴尔"]:CORE_CHAR:_default' \
'--roles=[Starting operators recruitment combination in Chinese, e.g. "取长补短", "先手必胜" (default)]:ROLES:_default' \
'--start-count=[Stop after given count, if not given, never stop]:START_COUNT:_default' \
'--difficulty=[Difficulty, not valid for Phantom theme (no numerical difficulty)]:DIFFICULTY:_default' \
'--investments-count=[Stop exploration investment reaches given count]:INVESTMENTS_COUNT:_default' \
'*-F+[A list of expected Foldartal to be started with]:START_FOLDARTALS:_default' \
'*--start-foldartals=[A list of expected Foldartal to be started with]:START_FOLDARTALS:_default' \
'*-P+[A list of expected collapsal paradigms]:EXPECTED_COLLAPSAL_PARADIGMS:_default' \
'*--expected-collapsal-paradigms=[A list of expected collapsal paradigms]:EXPECTED_COLLAPSAL_PARADIGMS:_default' \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--disable-investment[Disable investment]' \
'--investment-with-more-score[Try to gain more score in investment mode]' \
'--no-stop-when-investment-full[Do not stop exploration when investment is full]' \
'--use-support[Use support operator]' \
'--use-nonfriend-support[Use non-friend support operator]' \
'--start-with-elite-two[Start with elite two]' \
'--only-start-with-elite-two[Only start with elite two]' \
'--stop-at-final-boss[Stop exploration before final boss]' \
'--refresh-trader-with-dice[Whether to refresh trader with dice (only available in Mizuki theme)]' \
'--use-foldartal[Whether to use Foldartal in Sami theme]' \
'--start-with-seed[Whether to start with seed, only available in Sarkaz theme and mode 1]' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':theme -- Theme of the roguelike:(Phantom Mizuki Sami Sarkaz JieGarden)' \
&& ret=0
;;
(reclamation)
_arguments "${_arguments_options[@]}" : \
'-m+[Reclamation Algorithm task mode, 0 or 1]:MODE:_default' \
'--mode=[Reclamation Algorithm task mode, 0 or 1]:MODE:_default' \
'*-C+[Name of tool to craft in mode 1]:TOOLS_TO_CRAFT:_default' \
'*--tools-to-craft=[Name of tool to craft in mode 1]:TOOLS_TO_CRAFT:_default' \
'--increase-mode=[Method to interactive with the add button when increasing the crafting quantity]:INCREASE_MODE:_default' \
'--num-craft-batches=[Number of batches in each game run, with each batch containing 99 items]:NUM_CRAFT_BATCHES:_default' \
'-a+[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'--addr=[ADB serial number of device or MaaTools address set in PlayCover]:ADDR:_default' \
'-p+[Profile (asst config file) name]:PROFILE:_default' \
'--profile=[Profile (asst config file) name]:PROFILE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--user-resource[Load resources from the config directory]' \
'--dry-run[Parse the your config but do not connect to the game]' \
'--no-summary[Do not display task summary]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':theme -- Theme of the reclamation algorithm:(Tales)' \
&& ret=0
;;
(convert)
_arguments "${_arguments_options[@]}" : \
'-f+[Format of the output file, can be one of "toml", "yaml" and "json"]:FORMAT:(json yaml toml)' \
'--format=[Format of the output file, can be one of "toml", "yaml" and "json"]:FORMAT:(json yaml toml)' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':input -- Path of the input file:_files' \
'::output -- Path of the output file, if not specified, the output will be printed to stdout:_files' \
&& ret=0
;;
(activity)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'::client:(Official Bilibili Txwy YoStarEN YoStarJP YoStarKR)' \
&& ret=0
;;
(remainder)
_arguments "${_arguments_options[@]}" : \
'--timezone=[Time zone of the date]:TIMEZONE:_default' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':divisor -- The value of divisor:_default' \
&& ret=0
;;
(cleanup)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'*::targets -- Specify the path for deletion:((cli-cache\:"Cache files for maa-cli"
core-cache\:"Cache files for MaaCore"
debug\:"Debug files (including log and other debug files)"
log\:"Log files (both for MaaCore and maa-cli)"))' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
'-n+[The desired name for the imported configuration file]:NAME:_default' \
'--name=[The desired name for the imported configuration file]:NAME:_default' \
'-t+[The category of the configuration file, which determines its storage location and validation rules]:CONFIG_TYPE:((cli\:"CLI configuration file"
profile\:"Assistant/Profile configuration"
task\:"Task configuration"
infrast\:"Infrastructure configuration"
resource\:"Resource configuration"
copilot\:"Copilot configuration"
sss-copilot\:"SSSCopilot configuration"
paradox-copilot\:"ParadoxCopilot configuration"))' \
'--config-type=[The category of the configuration file, which determines its storage location and validation rules]:CONFIG_TYPE:((cli\:"CLI configuration file"
profile\:"Assistant/Profile configuration"
task\:"Task configuration"
infrast\:"Infrastructure configuration"
resource\:"Resource configuration"
copilot\:"Copilot configuration"
sss-copilot\:"SSSCopilot configuration"
paradox-copilot\:"ParadoxCopilot configuration"))' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'-f[Force the import operation even if a file with the same name already exists]' \
'--force[Force the import operation even if a file with the same name already exists]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':src -- The source of the configuration file to be imported:_default' \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
'-n+[Name of the profile]:NAME:_files' \
'--name=[Name of the profile]:NAME:_files' \
'-f+[Format of the configuration file]:FORMAT:(json yaml toml)' \
'--format=[Format of the configuration file]:FORMAT:(json yaml toml)' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--force[Force to initialize even if the profile already exists]' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(complete)
_arguments "${_arguments_options[@]}" : \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(mangen)
_arguments "${_arguments_options[@]}" : \
'--path=[Path of the output file]:PATH:_files' \
'--log-file=[Redirect log to file instead of stderr]::PATH:_files' \
'--batch[Enable batch mode]' \
'*-v[Increase verbosity, repeat for more verbosity]' \
'*--verbose[Increase verbosity, repeat for more verbosity]' \
'*-q[Decrease verbosity, repeat for more quiet]' \
'*--quiet[Decrease verbosity, repeat for more quiet]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_maa__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:maa-help-command-$line[1]:"
        case $line[1] in
            (install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(hot-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(dir)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(startup)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(closedown)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fight)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(copilot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(ssscopilot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(paradoxcopilot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(roguelike)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reclamation)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(convert)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(activity)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remainder)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(cleanup)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(init)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(complete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mangen)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_maa_commands] )) ||
_maa_commands() {
    local commands; commands=(
'install:Install maa maa_core and resources' \
'update:Update maa maa_core and resources' \
'hot-update:Hot update for resource' \
'dir:Print path of maa directories' \
'version:Print version of given component' \
'run:Run a custom task' \
'startup:Startup Game and Enter Main Screen' \
'closedown:Close game client' \
'fight:Run fight task' \
'copilot:Run copilot task' \
'ssscopilot:Run SSSCopilot task' \
'paradoxcopilot:Run Paradox Simulation copilot task' \
'roguelike:Run rouge-like task' \
'reclamation:Run Reclamation Algorithm task' \
'convert:Convert file format between TOML, YAML and JSON' \
'activity:Show stage activity of given client' \
'remainder:Get the remainder of given divisor and current date' \
'cleanup:Clearing the caches of maa-cli and maa core' \
'list:List all available tasks' \
'import:Import configuration files from a local path or a remote URL' \
'init:Initialize configurations for maa-cli' \
'complete:Generate completion script for given shell' \
'mangen:Generate man page' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maa commands' commands "$@"
}
(( $+functions[_maa__activity_commands] )) ||
_maa__activity_commands() {
    local commands; commands=()
    _describe -t commands 'maa activity commands' commands "$@"
}
(( $+functions[_maa__cleanup_commands] )) ||
_maa__cleanup_commands() {
    local commands; commands=()
    _describe -t commands 'maa cleanup commands' commands "$@"
}
(( $+functions[_maa__closedown_commands] )) ||
_maa__closedown_commands() {
    local commands; commands=()
    _describe -t commands 'maa closedown commands' commands "$@"
}
(( $+functions[_maa__complete_commands] )) ||
_maa__complete_commands() {
    local commands; commands=()
    _describe -t commands 'maa complete commands' commands "$@"
}
(( $+functions[_maa__convert_commands] )) ||
_maa__convert_commands() {
    local commands; commands=()
    _describe -t commands 'maa convert commands' commands "$@"
}
(( $+functions[_maa__copilot_commands] )) ||
_maa__copilot_commands() {
    local commands; commands=()
    _describe -t commands 'maa copilot commands' commands "$@"
}
(( $+functions[_maa__dir_commands] )) ||
_maa__dir_commands() {
    local commands; commands=()
    _describe -t commands 'maa dir commands' commands "$@"
}
(( $+functions[_maa__fight_commands] )) ||
_maa__fight_commands() {
    local commands; commands=()
    _describe -t commands 'maa fight commands' commands "$@"
}
(( $+functions[_maa__help_commands] )) ||
_maa__help_commands() {
    local commands; commands=(
'install:Install maa maa_core and resources' \
'update:Update maa maa_core and resources' \
'hot-update:Hot update for resource' \
'dir:Print path of maa directories' \
'version:Print version of given component' \
'run:Run a custom task' \
'startup:Startup Game and Enter Main Screen' \
'closedown:Close game client' \
'fight:Run fight task' \
'copilot:Run copilot task' \
'ssscopilot:Run SSSCopilot task' \
'paradoxcopilot:Run Paradox Simulation copilot task' \
'roguelike:Run rouge-like task' \
'reclamation:Run Reclamation Algorithm task' \
'convert:Convert file format between TOML, YAML and JSON' \
'activity:Show stage activity of given client' \
'remainder:Get the remainder of given divisor and current date' \
'cleanup:Clearing the caches of maa-cli and maa core' \
'list:List all available tasks' \
'import:Import configuration files from a local path or a remote URL' \
'init:Initialize configurations for maa-cli' \
'complete:Generate completion script for given shell' \
'mangen:Generate man page' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'maa help commands' commands "$@"
}
(( $+functions[_maa__help__activity_commands] )) ||
_maa__help__activity_commands() {
    local commands; commands=()
    _describe -t commands 'maa help activity commands' commands "$@"
}
(( $+functions[_maa__help__cleanup_commands] )) ||
_maa__help__cleanup_commands() {
    local commands; commands=()
    _describe -t commands 'maa help cleanup commands' commands "$@"
}
(( $+functions[_maa__help__closedown_commands] )) ||
_maa__help__closedown_commands() {
    local commands; commands=()
    _describe -t commands 'maa help closedown commands' commands "$@"
}
(( $+functions[_maa__help__complete_commands] )) ||
_maa__help__complete_commands() {
    local commands; commands=()
    _describe -t commands 'maa help complete commands' commands "$@"
}
(( $+functions[_maa__help__convert_commands] )) ||
_maa__help__convert_commands() {
    local commands; commands=()
    _describe -t commands 'maa help convert commands' commands "$@"
}
(( $+functions[_maa__help__copilot_commands] )) ||
_maa__help__copilot_commands() {
    local commands; commands=()
    _describe -t commands 'maa help copilot commands' commands "$@"
}
(( $+functions[_maa__help__dir_commands] )) ||
_maa__help__dir_commands() {
    local commands; commands=()
    _describe -t commands 'maa help dir commands' commands "$@"
}
(( $+functions[_maa__help__fight_commands] )) ||
_maa__help__fight_commands() {
    local commands; commands=()
    _describe -t commands 'maa help fight commands' commands "$@"
}
(( $+functions[_maa__help__help_commands] )) ||
_maa__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'maa help help commands' commands "$@"
}
(( $+functions[_maa__help__hot-update_commands] )) ||
_maa__help__hot-update_commands() {
    local commands; commands=()
    _describe -t commands 'maa help hot-update commands' commands "$@"
}
(( $+functions[_maa__help__import_commands] )) ||
_maa__help__import_commands() {
    local commands; commands=()
    _describe -t commands 'maa help import commands' commands "$@"
}
(( $+functions[_maa__help__init_commands] )) ||
_maa__help__init_commands() {
    local commands; commands=()
    _describe -t commands 'maa help init commands' commands "$@"
}
(( $+functions[_maa__help__install_commands] )) ||
_maa__help__install_commands() {
    local commands; commands=()
    _describe -t commands 'maa help install commands' commands "$@"
}
(( $+functions[_maa__help__list_commands] )) ||
_maa__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'maa help list commands' commands "$@"
}
(( $+functions[_maa__help__mangen_commands] )) ||
_maa__help__mangen_commands() {
    local commands; commands=()
    _describe -t commands 'maa help mangen commands' commands "$@"
}
(( $+functions[_maa__help__paradoxcopilot_commands] )) ||
_maa__help__paradoxcopilot_commands() {
    local commands; commands=()
    _describe -t commands 'maa help paradoxcopilot commands' commands "$@"
}
(( $+functions[_maa__help__reclamation_commands] )) ||
_maa__help__reclamation_commands() {
    local commands; commands=()
    _describe -t commands 'maa help reclamation commands' commands "$@"
}
(( $+functions[_maa__help__remainder_commands] )) ||
_maa__help__remainder_commands() {
    local commands; commands=()
    _describe -t commands 'maa help remainder commands' commands "$@"
}
(( $+functions[_maa__help__roguelike_commands] )) ||
_maa__help__roguelike_commands() {
    local commands; commands=()
    _describe -t commands 'maa help roguelike commands' commands "$@"
}
(( $+functions[_maa__help__run_commands] )) ||
_maa__help__run_commands() {
    local commands; commands=()
    _describe -t commands 'maa help run commands' commands "$@"
}
(( $+functions[_maa__help__ssscopilot_commands] )) ||
_maa__help__ssscopilot_commands() {
    local commands; commands=()
    _describe -t commands 'maa help ssscopilot commands' commands "$@"
}
(( $+functions[_maa__help__startup_commands] )) ||
_maa__help__startup_commands() {
    local commands; commands=()
    _describe -t commands 'maa help startup commands' commands "$@"
}
(( $+functions[_maa__help__update_commands] )) ||
_maa__help__update_commands() {
    local commands; commands=()
    _describe -t commands 'maa help update commands' commands "$@"
}
(( $+functions[_maa__help__version_commands] )) ||
_maa__help__version_commands() {
    local commands; commands=()
    _describe -t commands 'maa help version commands' commands "$@"
}
(( $+functions[_maa__hot-update_commands] )) ||
_maa__hot-update_commands() {
    local commands; commands=()
    _describe -t commands 'maa hot-update commands' commands "$@"
}
(( $+functions[_maa__import_commands] )) ||
_maa__import_commands() {
    local commands; commands=()
    _describe -t commands 'maa import commands' commands "$@"
}
(( $+functions[_maa__init_commands] )) ||
_maa__init_commands() {
    local commands; commands=()
    _describe -t commands 'maa init commands' commands "$@"
}
(( $+functions[_maa__install_commands] )) ||
_maa__install_commands() {
    local commands; commands=()
    _describe -t commands 'maa install commands' commands "$@"
}
(( $+functions[_maa__list_commands] )) ||
_maa__list_commands() {
    local commands; commands=()
    _describe -t commands 'maa list commands' commands "$@"
}
(( $+functions[_maa__mangen_commands] )) ||
_maa__mangen_commands() {
    local commands; commands=()
    _describe -t commands 'maa mangen commands' commands "$@"
}
(( $+functions[_maa__paradoxcopilot_commands] )) ||
_maa__paradoxcopilot_commands() {
    local commands; commands=()
    _describe -t commands 'maa paradoxcopilot commands' commands "$@"
}
(( $+functions[_maa__reclamation_commands] )) ||
_maa__reclamation_commands() {
    local commands; commands=()
    _describe -t commands 'maa reclamation commands' commands "$@"
}
(( $+functions[_maa__remainder_commands] )) ||
_maa__remainder_commands() {
    local commands; commands=()
    _describe -t commands 'maa remainder commands' commands "$@"
}
(( $+functions[_maa__roguelike_commands] )) ||
_maa__roguelike_commands() {
    local commands; commands=()
    _describe -t commands 'maa roguelike commands' commands "$@"
}
(( $+functions[_maa__run_commands] )) ||
_maa__run_commands() {
    local commands; commands=()
    _describe -t commands 'maa run commands' commands "$@"
}
(( $+functions[_maa__ssscopilot_commands] )) ||
_maa__ssscopilot_commands() {
    local commands; commands=()
    _describe -t commands 'maa ssscopilot commands' commands "$@"
}
(( $+functions[_maa__startup_commands] )) ||
_maa__startup_commands() {
    local commands; commands=()
    _describe -t commands 'maa startup commands' commands "$@"
}
(( $+functions[_maa__update_commands] )) ||
_maa__update_commands() {
    local commands; commands=()
    _describe -t commands 'maa update commands' commands "$@"
}
(( $+functions[_maa__version_commands] )) ||
_maa__version_commands() {
    local commands; commands=()
    _describe -t commands 'maa version commands' commands "$@"
}

if [ "$funcstack[1]" = "_maa" ]; then
    _maa "$@"
else
    compdef _maa maa
fi
