code: def init(directory):
      
      username = click.prompt("Input your username")
      password = click.prompt("Input your password", hide_input=True,
                              confirmation_prompt=True)
      log_directory = click.prompt("Input your log directory")
  
      if not path.exists(log_directory):
          sys.exit("Invalid log directory, please have a check.")
  
      config_file_path = path.join(directory, 'v2ex_config.json')
      config = {
          "username": username,
          "password": password,
          "log_directory": path.abspath(log_directory)
      }
      with open(config_file_path, 'w') as f:
          json.dump(config, f)
      click.echo("Init the config file at: {0}".format(config_file_path))
docs: Init the config fle.