@available(macOS 10.15, macCatalyst 13, iOS 13, tvOS 13, watchOS 6, *) extension AsyncParsableCommand { /// Executes this command, or one of its subcommands, with the program's /// command-line arguments. /// /// Instead of calling this method directly, you can add `@main` to the root /// command for your command-line tool. public static func main() async { do { var command = try parseAsRoot() if var asyncCommand = command as? AsyncParsableCommand { try await asyncCommand.run() } else { try command.run() } } catch { exit(withError: error) } } }