I tried to replicate running wpcli commands using a system installed version of WPCLI and I never was able to get the same results.
I’d recommend using the bundled version of wpcli from within the shell that’s created with “Open Site Shell” since that reduces the complexity of this greatly.
As for the PHP errors, I wonder if there’s an issue with the DB_HOST
that’s set in the wp-config.php file – namely the space between Application
and Support
...Library/Application Support/Local/run...