Cloning is done through groovy, but to create simple script to create alert definitions is a really tough job. At least if you want script to be intelligent. It's much easier to use existing alert definitions for cloning, that create alert definition from scratch.
Another option is to use the alertdefinition command delivered as part of the CLI we are delivering with HQApi in HQ 4.1. That release is still a couple weeks away, but I think it should do exactly what you need.