class Command

def help

def help
  <<~HELP
    Usage: pangea command [OPTIONS] SUBCOMMAND
    Arguments:
      SUBCOMMAND  subcommand for pangea
    Options:
      -h, --help     Print usage
      -v, --version  Print version
    Subcommands:
      infra   manage infrastructure
      config  manage configuration
  HELP
end

def run

def run
  argv = ARGV
  parse(argv)
  case params[:subcommand].to_s
  when %(infra)
    InfraCommand.new.run(argv)
  when %(config)
    ConfigCommand.new.run(argv)
  else
    if params[:version]
      puts Pangea::VERSION
    else
      puts help
    end
    exit
  end
end