import typing


def parse_cli_headers(text_headers: str) -> typing.Dict[str, str]:
    """Parse headers supplied from command line.

    :param text_headers: headers supplied as a text
    :type text_headers: str
    :return: a dictionary representation of headers
    :rtype: dict
    """
    headers = {}
    for header in text_headers.split(','):
        parts = header.split(':', maxsplit=1)
        if len(parts) != 2:
            raise ValueError("Unknown header supplied {!r}, headers should be set as key:value".format(header))

        headers[parts[0]] = parts[1]

    return headers