static function cli_read($format, $first = false)
    {
        $stdin = fopen('php://stdin', 'r');

        $result = fscanf($stdin, $format);

        if ($first) {
            return empty($result[0]) ? '' : $result[0];
        }

        return $result;
    }