code: def _config_create(self):
          
          # Create ~/.config/urlscan/config.json if if doesn't exist
          if not exists(self.conf):
              try:
                  # Python 2/3 compatible recursive directory creation
                  os.makedirs(dirname(expanduser(self.conf)))
              except OSError as err:
                  if errno.EEXIST != err.errno:
                      raise
              keys = dict(zip(self.keys.keys(),
                              [i.__name__.strip('_') for i in self.keys.values()]))
              with open(expanduser(self.conf), 'w') as pals:
                  pals.writelines(json.dumps({"palettes": self.palettes, "keys": keys},
                                             indent=4))
              print("Created ~/.config/urlscan/config.json")
          else:
              print("~/.config/urlscan/config.json already exists")
docs: --genconf