public function cli($userCommand = 'core version')
    {
        // Set an environment variable to let client code know the request is coming from the host machine.
        putenv('WPBROWSER_HOST_REQUEST=1');

        $this->initPaths();

        $command = $this->buildCommand($userCommand);

        $output = [];
        $this->debugSection('command', $command);
        $status = $this->executor->exec($command, $output);
        $this->debugSection('output', implode("\n", $output));

        $this->evaluateStatus($output, $status);

        return $status;
    }