from typing import Union
from typing import List


def get_args(text: str, maximum: int = 2) -> Union[List[str], str]:
    """
    Get command arguments.

    :param text: Original text
    :param maximum: Maximum number of list items for split, 0 or less for unlimited.
    :return:
    """
    if maximum <= 0:
        maximum = -1
    elif maximum == 1:
        args = text.split(maxsplit=maximum)[1:]
        if args:
            return args[0]

        return args

    return text.split(maxsplit=maximum)[1:]