add README
This commit is contained in:
42
README.md
Normal file
42
README.md
Normal file
@@ -0,0 +1,42 @@
|
||||
# Kotlin Shell
|
||||
|
||||
This library enables the execution of shell commands in Kotlin Multiplatform.
|
||||
|
||||
## Features
|
||||
|
||||
* Execute commands on the shell.
|
||||
* Multiplatform support
|
||||
* JVM
|
||||
* JavaScript
|
||||
* Native (Linux)
|
||||
|
||||
## Installation
|
||||
|
||||
Add the following to your `build.gradle.kts`.
|
||||
|
||||
```kotlin
|
||||
repositories {
|
||||
maven("https://git.infendro.com/api/packages/Infendro/maven")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("com.infendro:shell:1.0.0")
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```kotlin
|
||||
import com.infendro.shell.Shell
|
||||
|
||||
fun main() {
|
||||
// the command to execute
|
||||
val command = arrayOf("echo", "Hello World!")
|
||||
|
||||
// execute the command
|
||||
val result = Shell.run(command)
|
||||
|
||||
println(result.code) // 0
|
||||
println(result.value) // Hello World!
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user