move cmd to app endpoints