Run WP-Smush via Command Line Possible

I have tens of thousands of images that need smushed and it keeps timing out via WordPress dashboard; is it possible to run Smush from command line locally or remotely to evade timeout issues and execute quicker?