Product Promotion
0x5a.live
for different kinds of informations and explorations.
GitHub - kotlin-inquirer/kotlin-inquirer: A collection of common interactive command line user interfaces written in Kotlin
A collection of common interactive command line user interfaces written in Kotlin - kotlin-inquirer/kotlin-inquirer
Visit SiteGitHub - kotlin-inquirer/kotlin-inquirer: A collection of common interactive command line user interfaces written in Kotlin
A collection of common interactive command line user interfaces written in Kotlin - kotlin-inquirer/kotlin-inquirer
Powered by 0x5a.live 💗
A collection of common interactive command line user interfaces written in inspired by Inquirer.js
:rocket: Run Demo Using kscript
Remote scriplet raw-URL
kscript https://bit.ly/kotlin-inquirer-pizza
Or clone it
git clone https://github.com/kotlin-inquirer/kotlin-inquirer.git
cd kotlin-inquirer
kscript ./scripts/pizza.kts
Or without kscript
./gradlew shadowJar
java -jar example/build/libs/kotlin-pizza.jar
:cloud: Download
Gradle
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.kotlin-inquirer:kotlin-inquirer:0.1.0'
}
:clipboard: Usages
Confirm
val isDelivery: Boolean = KInquirer.promptConfirm(message = "Is this for delivery?", default = false)
println("Is Delivery: $isDelivery")
Input
val comments: String = KInquirer.promptInput(message = "Any comments on your purchase experience?")
println("Comments: $comments")
Input Numbers
val quantity: BigDecimal = KInquirer.promptInputNumber(message = "How many do you need?")
println("Quantity: $quantity")
Input Password
val password: String = KInquirer.promptInputPassword(message = "Enter Your Password:", hint = "password")
println("Password: $password")
Input Password custom mask
val passwordMasked: String = KInquirer.promptInputPassword(
message = "Enter Your Password:",
hint = "password",
mask = "🤫"
)
println("Password: $passwordMasked")
List
val size: String = KInquirer.promptList(message = "What size do you need?", choices = listOf("Large", "Medium", "Small"))
println("Size: $size")
List with more options
val continent: String = KInquirer.promptList(
message = "Select a continent:",
choices = listOf(
"Asia",
"Africa",
"Europe",
"North America",
"South America",
"Australia",
"Antarctica",
),
hint = "press Enter to pick",
pageSize = 3,
viewOptions = ListViewOptions(
questionMarkPrefix = "🌍",
cursor = " 😎 ",
nonCursor = " ",
)
)
println("Continent: $continent")
Checkbox
val toppings: List<String> = KInquirer.promptCheckbox(
message = "What about the toppings?",
choices = listOf(
"Pepperoni and cheese",
"All dressed",
"Hawaiian",
),
)
println("Toppings: $toppings")
Checkbox with more options
val colors: List<String> = KInquirer.promptCheckbox(
message = "Which colors do you prefer?",
choices = listOf(
"Red",
"Green",
"Blue",
"Yellow",
"Black",
"White",
),
hint = "pick a color using spacebar",
maxNumOfSelection = 3,
minNumOfSelection = 2,
pageSize = 3,
viewOptions = CheckboxViewOptions(
questionMarkPrefix = "❓",
cursor = " 👉 ",
nonCursor = " ",
checked = "✅ ",
unchecked = "○ ",
)
)
println("Colors: $colors")
:crystal_ball: Roadmap
Components
- Confirm
- Input
- Input Numbers
- Input Password
- List
- Checkbox
- Input validation error message
- Support Hint
- Better package name
- Add examples for
ViewOption
- Support List/Checkbox Fuzzy search
- Support List/Checkbox autocomplete
- Add DSL support
- Consider non static function for prompts
Operation
- Examples
- Logo
- GIFs
- codecov
- Maven Central
Kotlin Resources
are all listed below.
GitHub - BenWoodworth/knbt: Kotlin NBT library for kotlinx.serialization
resource
~/github.com
resource
GitHub - brianmadden/krawler: A web crawling framework written in Kotlin
resource
~/github.com
resource
GitHub - OxygenCobalt/Auxio: A simple, rational music player for android
resource
~/github.com
resource
GitHub - eriksencosta/math-percentage: Percentage calculations made easy
resource
~/github.com
resource
GitHub - ctripcorp/mmkv-kotlin: A Kotlin Multiplatform porting for MMKV.
resource
~/github.com
resource
GitHub - Litote/kmongo: [deprecated] KMongo - a Kotlin toolkit for Mongo
resource
~/github.com
resource
Test-Driven Development Tutorial for Android: Getting Started
resource
~/www.raywenderlich.com
resource
GitHub - jacinpoz/rxaerospike: RxJava2 wrapper for aerospike-client-java
resource
~/github.com
resource
GitHub - pedrovgs/KotlinSnapshot: Snapshot Testing framework for Kotlin.
resource
~/github.com
resource
GitHub - hankdavidson/ktime: kotlin extensions to the java8 time library
resource
~/github.com
resource
GitHub - ziggy42/Blum: A simple android Twitter client written in Kotlin
resource
~/github.com
resource
Made with ❤️
to provide different kinds of informations and resources.