def command(index, &block)
      if index.is_a? Command
        cmd = index
      else
        cmd = Command.new
        cmd.index= index
        cmd.instance_eval(&block)
      end
      @commands = {} unless @commands
      @flags = [] unless @flags
      if cmd.flags?
        @flags << cmd.flags.short if cmd.flags.short?
        @flags << cmd.flags.long  if cmd.flags.long?
      elsif cmd.index # just use index
        @flags << cmd.index.to_s
      else
        raise "No index or flags were given to use this command."
      end
      if cmd.options?
        cmd.options.each do |_, option|
          if option.flags?
            @flags << option.flags.short if option.flags.short?
            @flags << option.flags.long  if option.flags.long?
          else # just use index
            @flags << option.index.to_s
          end
          @commands[option.index] = option
        end
      end
      @commands[cmd.index] = cmd
      cmd
    end
def command(index, &block)
      if index.is_a? Command
        cmd = index
      else
        cmd = Command.new
        cmd.index= index
        cmd.instance_eval(&block)
      end
      @commands = {} unless @commands
      @flags = [] unless @flags
      if cmd.flags?
        @flags << cmd.flags.short if cmd.flags.short?
        @flags << cmd.flags.long  if cmd.flags.long?
      elsif cmd.index # just use index
        @flags << cmd.index.to_s
      else
        raise "No index or flags were given to use this command."
      end
      if cmd.options?
        cmd.options.each do |_, option|
          if option.flags?
            @flags << option.flags.short if option.flags.short?
            @flags << option.flags.long  if option.flags.long?
          else # just use index
            @flags << option.index.to_s
          end
          @commands[option.index] = option
        end
      end
      @commands[cmd.index] = cmd
      cmd
    end
An application usually has multiple commands.

 == Example
   app = CommandLion::App.build
     # meta information

     command :example1 do
       # more code
     end

     command :example2 do
       # more code
     end
   end

   app.commands.map(&:name)
   # => [:example1, :example2]