def _parse_args() -> argparse.Namespace:
    """Setup argparse and parse command line args."""
    parser = argparse.ArgumentParser()

    subparsers = parser.add_subparsers(dest='command',
                                       metavar='<command>',
                                       required=True)

    project_parser = subparsers.add_parser(
        'project', help='output components of an MCUXpresso project')
    project_parser.add_argument('manifest_filename', type=pathlib.Path)
    project_parser.add_argument('--include', type=str, action='append')
    project_parser.add_argument('--exclude', type=str, action='append')
    project_parser.add_argument('--prefix', dest='path_prefix', type=str)

    return parser.parse_args()