def parse_manual_params(func, kwargs):
    """
    Parse command parameters through a dict instead of the normal CLI
    interface.

    This is used when calling the commands outside the Click-based
    interface
    """
    parameters = func.cli_params
    parsed_kwargs = {}
    for param_type in parameters:
        val = kwargs.get(param_type.name, None)
        val = param_type.parse(val)
        parsed_kwargs[param_type.name] = val
    return parsed_kwargs
