def METHOD_NAME(action, ctx, global_args, **action_args):
    target_path = action_args.get('path') or os.path.join(project_path, action_args['name'])
    is_empty_and_create(target_path, action)
    func_action_map = {'create-project': create_project, 'create-component': create_component}
    func_action_map[action](target_path, action_args['name'])
    print('The', get_type(action), 'was created in', os.path.abspath(target_path))
    # after the command execution, no other commands are accepted and idf.py terminates
    sys.exit(0)