main

Executes this command, or one of its subcommands, with the program’s command-line arguments.

AsyncParsableCommand.swift:60
iOS
13+
macOS
10.15+
Mac Catalyst
13+
tvOS
13+
watchOS
6+
static func main() async

Instead of calling this method directly, you can add @main to the root command for your command-line tool.

This method parses an instance of this type, one of its subcommands, or another built-in AsyncParsableCommand type, from command-line arguments, and then calls its run() method, exiting with a relevant error message if necessary.