@stof what about creating new bundle like SonataGenerator, moving command to it and enabling that bundle only in dev? It will remove not needed stuff from prod and will not require refactoring :)