docs: def init_and_get_conf(argv: list=None) -> Config:
      """Initialize a YABT CLI environment and return a Config instance.
  
      :param argv: Manual override of command-line params to parse (for tests).
      """
      colorama.init()
      work_dir = os.path.abspath(os.curdir)
      project_root = search_for_parent_dir(work_dir,
                                           with_files=set([BUILD_PROJ_FILE]))
      parser = make_parser(find_project_config_file(project_root))
      settings_module = get_user_settings_module(project_root)
      call_user_func(settings_module, 'extend_cli', parser)
      argcomplete.autocomplete(parser)
      args = parser.parse(argv)
      get_build_flavor(settings_module, args)
      config = Config(args, project_root, work_dir, settings_module)
      config.common_conf = call_user_func(
          config.settings, 'get_common_config', config, args)
      config.flavor_conf = call_user_func(
          config.settings, 'get_flavored_config', config, args)
      call_user_func(config.settings, 'extend_config', config, args)
      if not args.no_policies:
          config.policies = listify(call_user_func(
              config.settings, 'get_policies', config))
      return config