#compdef rgoon-ctl
# Generated from server/operations/commandMetadata.ts. Do not edit.
local -a commands
commands=(
  '--setup:Run the initial installation wizard.'
  '--setup-web:Launch the loopback-only graphical installer.'
  '--generate-internal-secret:Generate server.internalSecret when it is missing.'
  '--help:Show generated command help.'
  '-h:Show generated command help.'
  'version:Show RepoGoon and installed companion versions.'
  '-v:Show RepoGoon and installed companion versions.'
  '--version:Show RepoGoon and installed companion versions.'
  'start:Start RepoGoon through systemd or the in-container process adapter.'
  'stop:Stop RepoGoon through the detected service adapter.'
  'restart:Restart RepoGoon through the detected service adapter.'
  'status:Show service/process state, PID, memory, and local URL.'
  'show:Show all configuration or one dot-path.'
  'config:Compare active non-secret configuration with canonical defaults.'
  'update:Resolve stable and preview candidates without changing the installed channel.'
  'set:Validate and set a non-secret scalar or structured value.'
  'validate:Validate the active configuration.'
  'test-db:Test database connectivity.'
  'init-db:Initialize the configured database schema.'
  'create-db-user:Direct operators to the interactive setup workflow.'
  'wipe-db:Destructively wipe the selected database backend.'
  'migrate-db:Migrate data between supported database backends.'
  'ratelimit:List configured rate limits.'
  'ssl-renew:Renew certbot-managed certificates and reload nginx.'
  'nginx-config:Generate nginx configuration from the active settings.'
  'nginx-reload:Validate and reload nginx configuration.'
  'backup:Create a backend-aware archive and separate signed recovery JWE.'
  'restore:Preflight or restore a verified archive and recovery pair.'
  'doctor:Run bounded health checks with stable check identifiers.'
  'components:Show package and service state for RepoGoon, sync, and runner.'
  'analyze:Correlate bounded evidence into causal findings and gated repairs.'
  'analyse:Correlate bounded evidence into causal findings and gated repairs.'
  'analize:Correlate bounded evidence into causal findings and gated repairs.'
  'logs:Show bounded redacted logs for the detected installation mode.'
  'support-bundle:Create a mode-0600 redacted diagnostic archive.'
  'secrets:Show backend and migration metadata only.'
  'install-hooks:Install Git hooks on every repository.'
  'ssh-apply:Apply and verify the configured SSH host policy transactionally.'
  'reconcile-releases:Detect release/tag drift and optionally repair tags.'
  'completion:Generate shell completion from this command manifest.'
)
if (( CURRENT == 2 )); then
  _describe 'command' commands
  return
fi
case "$words[2]" in
  --setup) _arguments '*:argument:' ;;
  --setup-web) _arguments '*:argument:' ;;
  --generate-internal-secret) _arguments '*:argument:' ;;
  --help|-h) _arguments '*:argument:' ;;
  version|-v|--version) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  start) _arguments '*:argument:' ;;
  stop) _arguments '*:argument:' ;;
  restart) _arguments '*:argument:' ;;
  status) _arguments '*:argument:' ;;
  show) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  config) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '1:subcommand:(diff)' ;;
  update) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '--skip-backup[Skip the backup only after separate confirmation.]' '--yes[Confirm the requested mutation non-interactively.]' '1:subcommand:(check apply)' ;;
  set) _arguments '--dry-run[Validate and preview without changing state.]' '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  validate) _arguments '*:argument:' ;;
  test-db) _arguments '*:argument:' ;;
  init-db) _arguments '*:argument:' ;;
  create-db-user) _arguments '*:argument:' ;;
  wipe-db) _arguments '--db[Select the backend to wipe.]:TYPE:(sqlite postgresql mysql oracle convex)' '*:argument:' ;;
  migrate-db) _arguments '--from[Select the source backend.]:TYPE:(sqlite postgresql mysql oracle convex)' '--to[Select the destination backend.]:TYPE:(sqlite postgresql mysql oracle convex)' '*:argument:' ;;
  ratelimit) _arguments '1:subcommand:(list set enable disable)' ;;
  ssl-renew) _arguments '*:argument:' ;;
  nginx-config) _arguments '*:argument:' ;;
  nginx-reload) _arguments '*:argument:' ;;
  backup) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '--keep[Retain at least this many verified backups.]:N:' '--older-than[Limit candidates to backups older than DAYS.]:DAYS:' '--apply[Apply the previewed deletions.]' '1:subcommand:(list verify prune)' ;;
  restore) _arguments '--dry-run[Validate and preview without changing state.]' '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  doctor) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  components) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  analyze|analyse|analize) _arguments '--deep[Enable deeper bounded collectors.]' '--since[Set the evidence time window.]:DURATION:' '--component[Limit the operation to one component.]:NAME:(repogoon sync runner)' '--offline[Forbid every remote probe.]' '--json[Write exactly one versioned JSON document to stdout.]' '--fix[Run only freshly confirmed allowlisted finding repairs.]:RG-ID...:' '--dry-run[Validate and preview without changing state.]' '--yes[Confirm the requested mutation non-interactively.]' '--support-bundle[Create the same redacted support archive.]:PATH:' '*:argument:' ;;
  logs) _arguments '--follow[Follow new log lines.]' '--since[Set the log time window.]:DURATION:' '--lines[Set the maximum line count.]:COUNT:' '--component[Limit the operation to one component.]:NAME:(repogoon sync runner)' '--no-pager[Disable pager use.]' '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  support-bundle) _arguments '--include-config-shape[Include keys and value types, never values.]' '--overwrite[Replace an existing target explicitly.]' '--json[Write exactly one versioned JSON document to stdout.]' '*:argument:' ;;
  secrets) _arguments '--json[Write exactly one versioned JSON document to stdout.]' '--directory[Select the protected-file store directory.]:PATH:' '--bootstrap[Allow only a provably fresh installation bootstrap.]' '--yes[Confirm the requested mutation non-interactively.]' '--dry-run[Validate and preview without changing state.]' '--generate[Generate a compliant replacement.]' '--batch-size[Set the bounded re-encryption batch size.]:N:' '--source-instance[Pin the recovery source identity.]:ID:' '--expires-days[Set bounded bundle retention.]:N:' '--max-bundle-bytes[Set the protected payload limit.]:N:' '--generation[Select the staged generation.]:N:' '--wait[Wait explicitly for the global lock.]' '--timeout[Bound explicit lock waiting.]:SECONDS:' '1:subcommand:(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)' ;;
  install-hooks) _arguments '*:argument:' ;;
  ssh-apply) _arguments '--dry-run[Validate and preview without changing state.]' '--yes[Confirm the requested mutation non-interactively.]' '*:argument:' ;;
  reconcile-releases) _arguments '--apply[Apply the proposed tag repairs.]' '--namespace[Limit inspection to one namespace.]:NS:' '--repo[Limit inspection to one repository.]:NAME:' '--recreate-from-head[Recreate a missing tag from the current head.]' '*:argument:' ;;
  completion) _arguments '*:argument:' ;;
esac
