code: def cli(location, **kwargs):
      
  
      locations = []
  
      # Read Standard Input
      # $ cat foo.txt | geocode
      try:
          for line in fileinput.input():
              locations.append(line.strip())
      except:
          pass
  
      # Read multiple files & user input location
      for item in location:
          if os.path.exists(item):
              with open(item, 'rb') as f:
                  locations += f.read().splitlines()
          else:
              locations.append(item)
  
      # Distance calculation
      if kwargs['distance']:
          d = geocoder.distance(locations, **kwargs)
          click.echo(d)
          return
  
      # Geocode results from user input
      for location in locations:
          g = geocoder.get(location.strip(), **kwargs)
          try:
              click.echo(json.dumps(getattr(g, kwargs['output'])))
          except IOError:
              # When invalid command is entered a broken pipe error occurs
              return
docs: Geocode an arbitrary number of strings from Command Line.