Popularity
3.1
Declining
Activity
0.0
Stable
38
1
11
Programming language: Kotlin
License: MIT License
Tags:
Command Line Interface
kotlin-cli alternatives and similar libraries
Based on the "Command Line Interface" category.
Alternatively, view kotlin-cli alternatives based on common mentions on social networks and blogs.
-
mordant
Multiplatform text styling for Kotlin command-line applications -
kotlin-argparser
Easy to use and concise yet powerful and robust command line argument parsing for Kotlin
Appwrite - The Open Source Firebase alternative introduces iOS support
Appwrite is an open source backend server that helps you build native iOS applications much faster with realtime APIs for authentication, databases, files storage, cloud functions and much more!
Promo
appwrite.io
Do you think we are missing an alternative of kotlin-cli or a related project?
README
kotlin-cli
Kotlin-CLI - command line option parsing suite for Kotlin
Usage
import com.evalab.core.cli.Command
import com.evalab.core.cli.exception.OptionException
fun main(args: Array<String>) {
val command = Command("command", "Command just for testing")
command.addBooleanOption("debug", false, 'd', "Flag of debug mode")
command.addBooleanOption("verbose", false, 'v', "Returns detailed information")
command.addIntegerOption("size", false, 's', "Sets size")
command.addDoubleOption("fraction", false, 'f', "Sets fraction")
command.addStringOption("name", true, 'n', "Sets name")
try {
command.parse(args)
} catch (e: OptionException) {
println(e.message)
println(command.getHelp())
System.exit(2)
}
val debug = command.getBooleanValue("debug", false)
val verbose = command.getBooleanValue("verbose", false)
val size = command.getIntegerValue("size", 0)
val fraction = command.getDoubleValue("fraction", 0.0)
val name = command.getStringValue("name")
println("debug: " + debug)
println("verbose: " + verbose)
println("size: " + size)
println("fraction: " + fraction)
println("name: " + name)
}
Contact
Follow me @leprosus
License
MIT License. See the LICENSE
file.
*Note that all licence references and agreements mentioned in the kotlin-cli README section above
are relevant to that project's source code only.