What's the syntax of drush generate --answers argument?
Finally found it: 

drush generate theme --directory themes/custom --answers '{"name": "test", "machine_name": "test", "base_theme": "Classy"}'


in the absence of documentation, you'll find the needed json keys in the sources of drush code generator:

/sources/vendor/chi-teck/drupal-code-generator/src/Command/Drupal_8/Theme.php


in the "interact" method