run-stack 0.6.1

One command to boot a full local stack in Docker: API, Vite apps, Expo mobile, desktop renderer, database, mail and a status dashboard.
Documentation
#compdef run-stack rst
# eval "$(run-stack completion zsh)"  # or: eval "$(rst completion zsh)"

_run_stack() {
  local -a global workspace deploy shells bundler reload
  global=(create new migrate upgrade update self-update completion help -h --help -v --version)
  workspace=(
    init up run down restart rebuild clean ps status ports commands apps list services logs shell sh
    backend artisan composer migrate seed fresh pnpm dash dashboard
    ios android device mobile reload prebuild desktop deploy sync-mobile-port bundler configure-bundler
  )
  deploy=(web mobile desktop)
  shells=(bash zsh install services)
  bundler=(ios android)
  reload=(--clear)

  if ((CURRENT == 2)); then
    _describe -t commands 'run-stack command' global workspace
    return
  fi

  case "${words[2]}" in
    up|run|down|restart|rebuild|logs|shell|sh|status|ps)
      _run_stack_services ;;
    deploy)
      _describe -t targets 'deploy target' deploy ;;
    bundler|configure-bundler)
      _describe -t platforms 'platform' bundler ;;
    reload)
      _describe -t options 'reload options' reload ;;
    completion)
      _describe -t shells 'shell' shells ;;
    create|new|upgrade|update|migrate)
      _files -/ ;;
  esac
}

_run_stack_services() {
  local -a services
  services=("${(@f)$(run-stack completion services 2>/dev/null || rst completion services 2>/dev/null)}")
  (( ${#services} )) || return 0
  _describe -t services 'service' services
}

# #compdef only applies when this file is loaded from fpath. Eval install must
# register the completer explicitly (after compinit).
if (( $+functions[compdef] )); then
  compdef _run_stack run-stack rst
fi