Underpin is REALLY close to making it possible to scaffold just about anything inside WordPress using CLI commands. Something like:

composer underpin/scaffold script (args)

Would autogenerate the script loader automatically.