Adam S
11/16/2022, 1:54 PM--log-level INFO --repeat 3 --dry-run
@Serializable
data class Args(
@SerialName("log-level")
val logLevel : LogLevel,
val repeat: UInt = 1,
@SerialName("dry-run")
val dryRun: Boolean,
)
It would be kind of like the type-safe routing in Ktor, or instead of parseSpaceSeparatedArgs()
and a more hackable version of kotlinx-cli.
The usage mostly being to parse fun main(args: Array<String>) {}
, but it could also be used to wrap existing CLI tools, so they can be called from Kotlin (and Gradle), type-safely.Oliver.O
11/16/2022, 9:51 PMCLOVIS
11/17/2022, 1:55 PM