code: def main():
      
      # Dynamically determine all the providers available and gather command line arguments.
      parsed_args = generate_cli_main_parser().parse_args()
  
      log_level = logging.getLevelName(parsed_args.log_level)
      logging.basicConfig(stream=sys.stdout, level=log_level,
                          format='%(message)s')
      logger.debug('Arguments: %s', parsed_args)
  
      # In the CLI context, will get configuration interactively:
      #   * from the command line
      #   * from the environment variables
      #   * from lexicon configuration files found in given --config-dir (default is current dir)
      config = ConfigResolver()
      config.with_args(parsed_args).with_env().with_config_dir(parsed_args.config_dir)
  
      client = Client(config)
  
      results = client.execute()
  
      handle_output(results, parsed_args.output, config.resolve('lexicon:action'))
docs: Main function of Lexicon.