Working generate command