from typing import List
from typing import Dict
from typing import Any


def transcripte(*args: List[str], **kwargs: Dict[str, Any]) -> List[str]:
    """Transcribe args and kwargs to linux base schema

    ```
    transcripte("start", uid="foobar", read_only=True)
    >> --uid=foobar --read-only start
    ```

    Arguments:
        args: Interpreted as a Linux command commands or actions
        kwargs: Interpreted as Linux command options

    Return:
        Linux base commands and options representation
    """
    commands: List = []

    for option, value in kwargs.items():

        if len(option) == 1:
            option = f"-{option}"
        else:
            option = f"--{option}"

        option = option.replace("_", "-")
        # change snake_case python name to use minus

        if isinstance(value, bool):
            # We don't need to continue we can stop here
            commands.append(option)
        elif isinstance(value, list):
            # We will use comma separated list. Space separation is not
            # will not be supported
            commands.append("{}={}".format(option, ",".join(value)))
        else:
            commands.append(f"{option}={value}")

    for command in args:
        commands.append(command)

    return commands