#!/usr/bin/env ruby # frozen_string_literal: true require 'osa/services/setup_service' require 'osa/services/auth_service' cmd = $ARGV.shift case cmd when 'setup' OSA::SetupService.new.setup! when 'login' OSA::AuthService.login(OSA::Config.first || OSA::Config.new) when 'scan-junk' require 'osa/scripts/scan_junk_folder' when 'dashboard' require 'osa/scripts/dashboard_server' DashboardServer.start! else $stderr.puts "Usage: #{File.basename($0)} [setup|login|scan-junk|dashboard]" exit 1 end