require 'optparse' require_relative '../alerty' class Alerty class CLI def parse_options(argv = ARGV) op = OptionParser.new op.banner += ' -- command' (class< e usage e.message end Config.configure(opts) Config.plugins # load plugins in early stage command = Command.new(command: opts[:command]) command.run! end end end