# Generated from server/operations/commandMetadata.ts. Do not edit.
_rgoon_ctl() {
    local current previous command choices
    current="${COMP_WORDS[COMP_CWORD]}"
    previous="${COMP_WORDS[COMP_CWORD-1]}"
    command="${COMP_WORDS[1]}"
    if (( COMP_CWORD == 1 )); then
        COMPREPLY=( $(compgen -W "--setup --setup-web --generate-internal-secret --help -h version -v --version start stop restart status show config update set validate test-db init-db create-db-user wipe-db migrate-db ratelimit ssl-renew nginx-config nginx-reload backup restore doctor components analyze analyse analize logs support-bundle secrets install-hooks ssh-apply reconcile-releases completion" -- "$current") )
        return
    fi
    case "$previous" in
        --db) COMPREPLY=( $(compgen -W "sqlite postgresql mysql oracle convex" -- "$current") ); return ;;
        --from) COMPREPLY=( $(compgen -W "sqlite postgresql mysql oracle convex" -- "$current") ); return ;;
        --to) COMPREPLY=( $(compgen -W "sqlite postgresql mysql oracle convex" -- "$current") ); return ;;
        --component) COMPREPLY=( $(compgen -W "repogoon sync runner" -- "$current") ); return ;;
    esac
    case "$command" in
        --setup) choices="" ;;
        --setup-web) choices="" ;;
        --generate-internal-secret) choices="" ;;
        --help|-h) choices="" ;;
        version|-v|--version) choices="--json" ;;
        start) choices="" ;;
        stop) choices="" ;;
        restart) choices="" ;;
        status) choices="" ;;
        show) choices="--json" ;;
        config) choices="diff --json" ;;
        update) choices="check apply --json --skip-backup --yes" ;;
        set) choices="--dry-run --json" ;;
        validate) choices="" ;;
        test-db) choices="" ;;
        init-db) choices="" ;;
        create-db-user) choices="" ;;
        wipe-db) choices="--db" ;;
        migrate-db) choices="--from --to" ;;
        ratelimit) choices="list set enable disable" ;;
        ssl-renew) choices="" ;;
        nginx-config) choices="" ;;
        nginx-reload) choices="" ;;
        backup) choices="list verify prune --json --keep --older-than --apply" ;;
        restore) choices="--dry-run --json" ;;
        doctor) choices="--json" ;;
        components) choices="--json" ;;
        analyze|analyse|analize) choices="--deep --since --component --offline --json --fix --dry-run --yes --support-bundle" ;;
        logs) choices="--follow --since --lines --component --no-pager --json" ;;
        support-bundle) choices="--include-config-shape --overwrite --json" ;;
        secrets) choices="store status capabilities setup-fields provision set rotate-session-secret rotate-data-key retire-data-key recovery keygen init create verify restore list doctor gc --json --directory --bootstrap --yes --dry-run --generate --batch-size --source-instance --expires-days --max-bundle-bytes --generation --wait --timeout" ;;
        install-hooks) choices="" ;;
        ssh-apply) choices="--dry-run --yes" ;;
        reconcile-releases) choices="--apply --namespace --repo --recreate-from-head" ;;
        completion) choices="" ;;
        *) choices="" ;;
    esac
    COMPREPLY=( $(compgen -W "$choices" -- "$current") )
}
complete -F _rgoon_ctl rgoon-ctl
