code: def cmd_fernet_genkey(writecfg):
      
  
      key = Fernet.generate_key()
      print(key.decode())
  
      if writecfg:
          habucfg = loadcfg(environment=False)
          habucfg['FERNET_KEY'] = key.decode()
          with Path('~/.habu.json').expanduser().open('w') as f:
              f.write(json.dumps(habucfg, indent=4, sort_keys=True))
docs: Generate a new Fernet Key, optionally write it to ~/.habu.json
  
      Example:
  
      \b
      $ habu.fernet.genkey
      xgvWCIvjwe9Uq7NBvwO796iI4dsGD623QOT9GWqnuhg=