|
@@ -25,6 +25,7 @@ struct UTMCtl: ParsableCommand {
|
|
|
commandName: "utmctl",
|
|
|
abstract: "CLI tool for controlling UTM virtual machines.",
|
|
|
subcommands: [
|
|
|
+ Version.self,
|
|
|
List.self,
|
|
|
Status.self,
|
|
|
Start.self,
|
|
@@ -165,6 +166,20 @@ fileprivate extension UTMScriptingStatus {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+extension UTMCtl {
|
|
|
+ struct Version: UTMAPICommand {
|
|
|
+ static var configuration = CommandConfiguration(
|
|
|
+ abstract: "Display the version number of the application."
|
|
|
+ )
|
|
|
+
|
|
|
+ @OptionGroup var environment: EnvironmentOptions
|
|
|
+
|
|
|
+ func run(with application: UTMScriptingApplication) throws {
|
|
|
+ print("\(application.UTMVersion ?? "")")
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
extension UTMCtl {
|
|
|
struct List: UTMAPICommand {
|
|
|
static var configuration = CommandConfiguration(
|