fixed-up wpcli integration functions