anchor.diff:  import 'package:args/args.dart';
   import 'package:googleapis_generator_dependency/googleapis_generator.dart';
   
  -ArgParser downloadCommandArgParser() => ArgParser()
  +ArgParser _downloadCommandArgParser() => ArgParser()
     ..addOption('output-dir',
         abbr: 'o',
         help: 'Output directory of discovery documents.',
         defaultsTo: 'googleapis-discovery-documents');
   
  -ArgParser runConfigCommandArgParser() => ArgParser()
  +ArgParser _runConfigCommandArgParser() => ArgParser()
     ..addCommand('download')
     ..addCommand('generate')
     ..addOption(
  
positive.code:   )
    ..addFlag('delete-existing', defaultsTo: true);
  
  ArgParser globalArgParser() => ArgParser()
    ..addCommand('download', downloadCommandArgParser())
    ..addCommand('run_config', runConfigCommandArgParser())
    ..addFlag('help', abbr: 'h', help: 'Displays usage information.');
  
  ArgResults parseArguments(ArgParser parser, List<String> arguments) {
    try {
      return parser.parse(arguments);
    } on FormatException catch (e) {
      dieWithUsage('Error parsing arguments:\n${e.message}\n');
    }
  }
  
  Never dieWithUsage([String? message]) {
    if (message != null) {
      print(message);
    }
  
negative.code:   print("The 'download' subcommand downloads all discovery documents. "
        'It takes the following options:');
    print('');
    print(_downloadCommandArgParser().usage);
    print('');
    print("The 'run_config' subcommand downloads discovery documents and "
        'generates one or more API packages based on a configuration file. '
        'It takes the following options:');
    print('');
    print(_runConfigCommandArgParser().usage);
    exit(1);
  }
  
  Future<void> main(List<String> arguments) async {
    final parser = _globalArgParser();
    final options = _parseArguments(parser, arguments);
    final commandOptions = options.command!;
    final subCommands = ['download', 'generate', 'run_config'];
  
    if (options['help'] as bool) {
      _dieWithUsage();
    } else if (!subCommands.contains(commandOptions.name)) {
      _dieWithUsage('Invalid command');
    }
  
    switch (commandOptions.name) {
  