Decouple the command from Groovy